Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/events/elevator.asm
1271 views
1
DisplayElevatorFloorMenu:
2
ld hl, WhichFloorText
3
call PrintText
4
ld hl, wItemList
5
ld a, l
6
ld [wListPointer], a
7
ld a, h
8
ld [wListPointer + 1], a
9
ld a, [wListScrollOffset]
10
push af
11
xor a
12
ld [wCurrentMenuItem], a
13
ld [wListScrollOffset], a
14
ld [wPrintItemPrices], a
15
ld a, SPECIALLISTMENU
16
ld [wListMenuID], a
17
call DisplayListMenuID
18
pop bc
19
ld a, b
20
ld [wListScrollOffset], a
21
ret c
22
ld hl, wCurrentMapScriptFlags
23
set BIT_CUR_MAP_USED_ELEVATOR, [hl]
24
ld hl, wElevatorWarpMaps
25
ld a, [wWhichPokemon]
26
add a
27
ld d, 0
28
ld e, a
29
add hl, de
30
ld a, [hli]
31
ld b, a
32
ld a, [hl]
33
ld c, a
34
ld hl, wWarpEntries
35
call .UpdateWarp
36
37
.UpdateWarp
38
inc hl
39
inc hl
40
ld a, b
41
ld [hli], a ; destination warp ID
42
ld a, c
43
ld [hli], a ; destination map ID
44
ret
45
46
WhichFloorText:
47
text_far _WhichFloorText
48
text_end
49
50