Skip to content

Restore native Gen2 menu, battle presentation and workflow owners - #271

Open
Roxas2712 wants to merge 76 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-pc-mail-ui
Open

Roxas2712 wants to merge 76 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-pc-mail-ui

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 25, 2026 •

Copy link
Copy Markdown

Gen2 presentation readers need the engine's actual native menu, battle and script owners. Missing controllers, mismatched party/model context and unavailable battle window methods otherwise select the wrong decorator, lose an owned continuation or leave an opaque native fallback over a staged scene. Restore these contracts over the existing native save, inventory, combat and render services; no mod/client, game data, ROM or save is included.

The change includes:

  • Native naming/save, PC, Center-PC, item-PC, PACK, box, mail and decoration controllers. Screen aliases identify the same real classes; embedded construction resolves identity without pushing a state or emitting an early screen event. Party/mail custody, quarantine, alternate saves, item effects, teaching, held items, registration and failed-write rollback keep their existing owners.
  • Foreground script ownership while a native PicBox waits for closepokepic, retaining recovery for genuinely stranded persistent/legacy field scripts. Decoration feedback commits after acknowledgment and reports its changed bit after the house PC closes.
  • Native Gen2 HP presentation at the actual queued damage/healing beat: short/long pixel cadence, live shownHp ownership, real pixel HUD fill, palettes and exact battler/Pokemon identity. Display decorators cannot write unrelated battlers or native saved HP.
  • Actual battle PACK/party context and target/cancel continuations, live native model/catalog readers and extensible presentation metadata with read-only combat fields. Native summary pages retain the real party, mon and draw/callback owners; move management reorders complete learned slots and uses the existing imported sound owner.
  • Native Gen2 resolving/message fields from the real queue/typewriter/acknowledgment path, including earlier queue records. Classic/wide composition now has actual panel/scene/object/final-overlay owners and a window drawer with Gen2-only compositor admission, existing chrome, DPI grid, layout and fixed/fill sizing. The supplied native graphics guard restores the caller's canvas/state on failed or leaking draws. Other editions retain their original route.
  • Native party item result ownership: real HP fill, 50-tick hold, full result text, A/B acknowledgment and one normal enemy action. Generic post-draw feedback survives replaceable party views without a second input controller. Native move-list and forget-list geometry serves PP items, including move cancellation and MYSTERYBERRY selection.
  • Shared native Gen2 PP maximum and legacy counters: each bonus is capped at seven, so 40 base PP with three PP Ups reaches 61. Actual item effects, healing, daycare, summary/battle labels, held restoration and link reconstruction use the same owner. Fresh AUTO settings select finite enemy PP for Gen2, while explicit saved rules remain effective. Other previous Gen2 compatibility-rule fields are retained; complete Gen2 battle-rule parity is not claimed.

Current independent validation freezes offered source 99534ce, with committed-byte verification:

  • Fifteen qualified native suites pass 4,012 checks: native PP defaults63, PP selection/arithmetic/effects/link842, actual PACK/item/turn325, party-result timing/rendering1,017 and 1,765 existing queue/window/scene/model/submenu/summary/FireRed/screen/party/wide-layout assertions.
  • Preceding89e265a5 fails 356 PP assertions and 20 actual PACK/input/turn assertions with the new modules available. Diagnosis confirmed the legacy Gen1 unlimited-enemy-PP default; the native compatibility rule is now registered and selected for automatic Gen2 settings, rather than weakening the enemy-action checks.
  • The prior wide-layout fixture used centers 40/120 despite the already published picture anchors 26/124. It produced three failures before this test correction. The 47-check replacement pins both actual anchors, the crossing midpoint, symmetric motion on each side, bounded overshoot, empty frames and OAM ordering. It preserves the existing animation implementation and is included in the dedicated CI gate. All 15 selected groups pass; this does not claim the historical full quick matrix is green.
  • Fork-only WorldReads, callback/snapshot adapters and Bank modules are absent from this upstream branch; the independent adaptation qualifies the owners actually available here.
  • Earlier full quick comparison on source 3637fe5 against upstream 8d5b438: baseline 63/74 engine suites, candidate 97/108; the same eleven suites fail with the same assertion strings/multiplicities. Available SDK/other quick tiers pass. Later menu/window additions have their independent focused source evidence above; this historical run does not qualify the final complete PR.
  • Earlier native HP component GPU checks on 3637fe5 pass 302,688 pixel checks across 1,560 native HP steps on each of Metal and OpenGL. This is queue/tile/palette evidence with generated art, not current whole-mod/window acceptance.

A separate fork's unchanged-client Metal run informed the window correction: missing drawWidescreen caused a native-screen-unavailable error and a persistent white battle view. Its corrected fork run passes 54 functional checks and 12 inspected OS captures, retaining the scene during command and actual move/healing text. That evidence belongs to the separate fork source 1d37565, not this independently adapted upstream composition.

No current upstream client/GPU/full-story, complete native page/event/animation, Windows package or final release acceptance is claimed. Existing Gen1Recomp provenance and third-party notices remain applicable.

Roxas2712 retains rights to independently owned additions and offers Cedric / UNDERdecoded the incorporation permission described in LICENSE-ROXAS2712.md. Preserve the applicable notices and visible contribution credit alongside existing authors' credits.

@Roxas2712 Roxas2712 changed the title Use native Gen2 PC, pack, box and mail menu owners Use native Gen2 menu and HP presentation owners Oct 26, 2026
@Roxas2712 Roxas2712 changed the title Use native Gen2 menu and HP presentation owners Restore native Gen2 menu, battle presentation and workflow owners Oct 27, 2026
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