pokered/engine/predefs7.asm
2015-07-23 21:00:30 -07:00

48 lines
777 B
NASM
Executable file

DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
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, wd126
set 7, [hl]
ld hl, wcc5b
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: ; 1ca14 (7:4a14)
TX_FAR _WhichFloorText
db "@"