Skip to content

Add portable battle.caught_marker_visible for GB/GBA - #163

Closed
Roxas2712 wants to merge 48 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-caught-marker
Closed

Roxas2712 wants to merge 48 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-caught-marker

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 24, 2026 •

Copy link
Copy Markdown

Mods cannot currently control Gen2Recomped's already-caught enemy marker through the shared battle.caught_marker_visible hook. Add the native producer and marker rendering for classic/wide GB and GBA singles.

Only literal true shows the marker. Preserve the reference defaults (Gen 1 off; Gold/GBA on), ownership/wild-battle eligibility, Gold's encounter-entry latch, GBA tutorial/ghost/status/doubles exclusions and GBA presentation caching. API 3 and the host's API-2 unified mode use context views; native callbacks retain their original shapes. DS reports unavailable.

New GBA imports read native healthbox tile 70 separately from the existing bounded 66-tile status scan. Existing caches use their Pokédex marker, cropping the older tall Emerald cell to the central 8×8 footprint. Include a public consumer, documentation, a pinned cross-engine checker and CI.

Validation

  • 2,078/2,078 native predicate/SDK checks, 840/840 host classic/wide/GBA compositor checks, and 216/216 real flat-ROM-reader/4bpp tile/palette/transparency checks.
  • Both feature and combined trees pass 64 isolated workers / 492 paired observations across Red/Blue/Yellow, Gold/Silver/Crystal and FireRed/Emerald in four SDK configurations. The same consumer entry runs through the actual reference GB/Gold/GBA predicates and the host producer. Gen1 is clean and pinned at 79ea62f45fb2ea8f65d081a109431e4eb1bbdb36. API-2 unified tests exercise the host adapter against reference native callbacks.
  • Covers native defaults, true/false/nil/zero, pre-hook ownership/trainer gates, Gold entry latch, GBA exclusions, callback formats, errors, repeated next, unsubscribe, genuine no-mod/failed-entry rollback, DS availability, hidden HUDs, GBA caching and missing/malformed artwork. Host compositors are tested with spies only at font/tile/image leaves.
  • Combined full-suite runtime 650467e7bea28eee1dd6e2dc967b566dc3429ce6: 173/173 engine suites, SDK 3/3 and B30 passed. Feature full-suite ref bd182e0f4c39df69f86bcc76ceb15a51e1330579: 118/128 suites with exactly the ten unchanged baseline failures addressed separately in test: repair Gen2 updater asset fixtures #128–134; SDK 3/3 and B30 passed.
  • Imported Red regressions: mod-battle 468/468, save conversion 95/95, parity J 73/73 and K 22/22. The old Fix automatic ruleset selection and Gen-2 enemy PP #162 host fails the new native-producer checker (negative control).
  • LÖVE 11.5 native HUD/GPU smoke on imported Red/Gold/FireRed/Emerald at 40e3e1219e05dd3f675fddcc01c7b1b0f92593ab: the same installed API-3 consumer, actual HUD rendering and pixel readback for visibility/defaults, ownership/trainer/status/hidden-HUD gates and unsubscribe. Saved HUD images were inspected. Isolated identity, constructed battles and no normal SAVE. These use existing cache artwork/fallbacks; complete fresh-ROM reimports, cross-engine pixel equality and full playthroughs are not claimed. The new dedicated tile path is verified with synthetic ROM bytes through the real reader/decoder.
  • actionlint, new-Lua formatting and whitespace checks pass. The only feature change after the full-suite ref is fixture formatting, verified to preserve identical stripped LuaJIT bytecode; its native contract suite was rerun.

Scope and review

The argument remains a native screen/state context; this does not normalize private battle-controller internals. GBA retains the verdict until its healthbox presentation changes, including after option changes or unsubscribe.

Prerequisite: #162 and its API/native-hook stack. The series targets main; feature-only changes.

Feature head: b1c8e7e76b3e23a591e0f26635ca2867ec6d5f89. Shared reports are pinned to the full-suite refs above; native GPU smoke retains its separate historical ref. No cartridge art/data or private mod is bundled. Hosted CI results are separate from local validation.

Published combined testing branch: 7ef9983a278509c33068e9fb2e27c3ec0d1ba1e9; changes after the recorded full-suite runtime are bytecode-equivalent fixture formatting and validation documentation/status only. All 24 hosted #163 PR workflows report action_required pending maintainer approval; the new caught-marker workflow has zero jobs. Hosted CI has not executed; local results above are separate.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant