From 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 Mon Sep 17 00:00:00 2001 From: dannye <33dannye@gmail.com> Date: Wed, 4 Nov 2020 00:06:44 -0600 Subject: Sync with pokered --- engine/events/elevator.asm | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 engine/events/elevator.asm (limited to 'engine/events/elevator.asm') diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm new file mode 100755 index 00000000..004893a0 --- /dev/null +++ b/engine/events/elevator.asm @@ -0,0 +1,54 @@ +DisplayElevatorFloorMenu: + ld hl, wd730 + ld a, [hl] + push af + set 6, [hl] + ld hl, WhichFloorText + call PrintText + pop af + ld [wd730], a + ld hl, wItemList + ld a, l + ld [wListPointer], a + ld a, h + ld [wListPointer + 1], a + ld a, [wListScrollOffset] + push af + xor a + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld [wPrintItemPrices], a + ld a, SPECIALLISTMENU + ld [wListMenuID], a + call DisplayListMenuID + pop bc + ld a, b + ld [wListScrollOffset], a + ret c + ld hl, wCurrentMapScriptFlags + set 7, [hl] + ld hl, wElevatorWarpMaps + ld a, [wWhichPokemon] + add a + ld d, 0 + ld e, a + add hl, de + ld a, [hli] + ld b, a + ld a, [hl] + ld c, a + ld hl, wWarpEntries + call .UpdateWarp + +.UpdateWarp + inc hl + inc hl + ld a, b + ld [hli], a ; destination warp ID + ld a, c + ld [hli], a ; destination map ID + ret + +WhichFloorText: + text_far _WhichFloorText + text_end -- cgit v1.3.1-sl0p