Ride Generation 1's three elevators and play the Poke Flute in battle - #596
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DisplayElevatorFloorMenuis a predef the script walker reads with two registers standing:LoadItemListhas left the floor list behind andhlstill holds thedb warp, maptable beside it. A floor is an item id aboveNUM_ITEMSnamed by its ownItemNamesrow, so the item table runs toNUM_ITEMS + NUM_FLOORSand no floor-name table is read anywhere; a warp byte is already the 0-based indexwarp_event's\4 - 1stores.wWarpEntries' first row is rewritten twice.<Map>ElevatorStoreWarpEntriesScriptputs the warp walked in through over it at map entry, so the car's door leads back out until a floor is chosen, and.UpdateWarpputs 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 isSPECIALLISTMENUover the map, drawn byGen2MartPage.render_gen1_packwithWhichFloorTextin the box under it.Gen1SoundEngine.play_poke_flute_in_battlehad no caller and no data:Music_PokeFluteInBattle's threeSFX_Pokeflute_Ch*pointers ride the audio section now, andwLowHealthAlarm's own bit is what keeps the flute quiet.Proving it
gen1_mapsgen1_walkgen1_audiotools/validate.gd -- alladdons/warning_scanreplay_world.gdCache format 126: the three cartridges need importing again.