Skip to content

Ride Generation 1's three elevators and play the Poke Flute in battle - #596

Merged
Decryptu merged 1 commit into
mainfrom
gen1-remaining-rows
Sep 8, 2026
Merged

Ride Generation 1's three elevators and play the Poke Flute in battle#596
Decryptu merged 1 commit into
mainfrom
gen1-remaining-rows

Conversation

@Decryptu

@Decryptu Decryptu commented Sep 8, 2026

Copy link
Copy Markdown
Owner

DisplayElevatorFloorMenu is a predef the script walker reads with two registers standing: LoadItemList has left the floor list behind and hl still holds the db warp, map table beside it. A floor is an item id above NUM_ITEMS named by its own ItemNames row, so the item table runs to NUM_ITEMS + NUM_FLOORS and no floor-name table is read anywhere; a warp byte is already the 0-based index warp_event's \4 - 1 stores.

wWarpEntries' first row is rewritten twice. <Map>ElevatorStoreWarpEntriesScript puts the warp walked in through over it at map entry, so the car's door leads back out until a floor is chosen, and .UpdateWarp puts the chosen floor over it after. ShakeElevator's 200 frames are the same hSCY offset the step function writes, flipped every second frame. The list is SPECIALLISTMENU over the map, drawn by Gen2MartPage.render_gen1_pack with WhichFloorText in the box under it.

Gen1SoundEngine.play_poke_flute_in_battle had no caller and no data: Music_PokeFluteInBattle's three SFX_Pokeflute_Ch* pointers ride the audio section now, and wLowHealthAlarm's own bit is what keeps the flute quiet.

Proving it

Check Result
gen1_maps 19 floors over 3 maps on each cartridge, every one landing on a warp its map has; script rows 312 to 314 on Red and Blue, 365 to 367 on Yellow
gen1_walk Celadon Mart's car ridden: the door opens onto warp 5 of CELADON_MART_1F unused and cancelled, and onto the chosen floor's own warp after
gen1_audio the flute plays through the driver and writes registers on all three
tools/validate.gd -- all no failures
GUT unit and scene tiers 4534 tests, 0 failures
addons/warning_scan 0 warnings in 637 scripts
replay_world.gd 33 routes, 0 failures

Cache format 126: the three cartridges need importing again.

`DisplayElevatorFloorMenu` is a predef the script walker reads with two
registers standing: `LoadItemList` has left the floor list behind and `hl`
still holds the `db warp, map` table beside it. A floor is an item id above
`NUM_ITEMS` named by its own `ItemNames` row, so the item table runs to
`NUM_ITEMS + NUM_FLOORS` and no floor-name table is read anywhere; a warp byte
is already the 0-based index `warp_event`'s `\4 - 1` stores.

`wWarpEntries`' first row is rewritten twice. `<Map>ElevatorStoreWarpEntriesScript`
puts the warp walked in through over it at map entry, so the car's door leads
back out, and `.UpdateWarp` puts the chosen floor over it after.
`ShakeElevator`'s 200 frames are the same hSCY offset the step function writes,
flipped every second frame. The list itself is `SPECIALLISTMENU` over the map,
drawn by `Gen2MartPage.render_gen1_pack` with `WhichFloorText` in the box under
it.

`Gen1SoundEngine.play_poke_flute_in_battle` had no caller and no data:
`Music_PokeFluteInBattle`'s three `SFX_Pokeflute_Ch*` pointers ride the audio
section now, and `wLowHealthAlarm`'s own bit is what keeps the flute quiet.

`gen1_maps.gd` pins every floor against its landing map's own warps on all
three cartridges, `gen1_walk.gd` rides Celadon Mart's car and cancels it,
`gen1_audio.gd` plays the flute through the driver, and
`tools/preview_world.gd`'s `elevator` kind photographs the list. Cache format
126.
@Decryptu
Decryptu merged commit 692fa19 into main Sep 8, 2026
1 check passed
@Decryptu
Decryptu deleted the gen1-remaining-rows branch September 8, 2026 10:13
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