aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/elevator.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-03 09:38:52 -0400
committerGitHub <noreply@github.com>2020-07-03 09:38:52 -0400
commitc85050497c1bd062e9cd40bf5b32fa3beca366cc (patch)
tree9593ddd3ab820223ab580d5fc0ae133b485b8315 /engine/events/elevator.asm
parentActually run .travis/webhook.sh (diff)
parentAdd engine/movie/oak_speech/ subdirectory (diff)
downloadpokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.gz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.xz
pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.zip
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/events/elevator.asm')
-rwxr-xr-xengine/events/elevator.asm48
1 files changed, 48 insertions, 0 deletions
diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm
new file mode 100755
index 00000000..752bdd1a
--- /dev/null
+++ b/engine/events/elevator.asm
@@ -0,0 +1,48 @@
+DisplayElevatorFloorMenu:
+ ld hl, WhichFloorText
+ call PrintText
+ 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:
+ TX_FAR _WhichFloorText
+ db "@"