pokered-rematch/scripts/silphcoelevator.asm

89 lines
1.7 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
SilphCoElevatorScript:
2016-01-03 19:17:10 +00:00
ld hl, wCurrentMapScriptFlags
2014-05-18 18:19:10 +00:00
bit 5, [hl]
res 5, [hl]
push hl
call nz, SilphCoElevatorScript_457dc
pop hl
bit 7, [hl]
res 7, [hl]
call nz, SilphCoElevatorScript_45827
xor a
2014-09-13 07:50:56 +00:00
ld [wAutoTextBoxDrawingControl], a
2014-05-18 18:19:10 +00:00
inc a
2014-09-13 07:50:56 +00:00
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
SilphCoElevatorScript_457dc:
2014-09-13 07:50:56 +00:00
ld hl, wWarpEntries
2015-07-26 02:26:54 +00:00
ld a, [wWarpedFromWhichWarp]
2014-05-18 18:19:10 +00:00
ld b, a
2015-07-26 02:26:54 +00:00
ld a, [wWarpedFromWhichMap]
2014-05-18 18:19:10 +00:00
ld c, a
call SilphCoElevatorScript_457ea
2016-06-12 00:24:04 +00:00
SilphCoElevatorScript_457ea:
2014-05-18 18:19:10 +00:00
inc hl
inc hl
ld a, b
ld [hli], a
ld a, c
ld [hli], a
ret
2016-06-12 00:24:04 +00:00
SilphCoElevatorScript_457f1:
ld hl, SilphCoElavatorFloors
2014-05-18 18:19:10 +00:00
call LoadItemList
ld hl, SilphCoElevatorWarpMaps
2015-08-13 05:14:31 +00:00
ld de, wElevatorWarpMaps
2015-08-10 04:56:20 +00:00
ld bc, SilphCoElevatorWarpMapsEnd - SilphCoElevatorWarpMaps
2014-05-18 18:19:10 +00:00
call CopyData
ret
2016-06-12 00:24:04 +00:00
SilphCoElavatorFloors:
2014-05-18 18:19:10 +00:00
db $0B ; num elements in list
2015-08-10 15:03:55 +00:00
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
db FLOOR_4F
db FLOOR_5F
db FLOOR_6F
db FLOOR_7F
db FLOOR_8F
db FLOOR_9F
db FLOOR_10F
db FLOOR_11F
2014-05-18 18:19:10 +00:00
db $FF ; terminator
2016-06-12 00:24:04 +00:00
SilphCoElevatorWarpMaps:
2014-05-18 18:19:10 +00:00
; first byte is warp number
; second byte is map number
; These specify where the player goes after getting out of the elevator.
db $03, SILPH_CO_1F
db $02, SILPH_CO_2F
db $02, SILPH_CO_3F
db $02, SILPH_CO_4F
db $02, SILPH_CO_5F
db $02, SILPH_CO_6F
db $02, SILPH_CO_7F
db $02, SILPH_CO_8F
db $02, SILPH_CO_9F
db $02, SILPH_CO_10F
db $01, SILPH_CO_11F
2015-08-10 04:56:20 +00:00
SilphCoElevatorWarpMapsEnd:
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
SilphCoElevatorScript_45827:
2014-05-18 18:19:10 +00:00
call Delay3
callba ShakeElevator
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
SilphCoElevatorTextPointers:
2014-05-18 18:19:10 +00:00
dw SilphCoElevatorText1
2016-06-12 00:24:04 +00:00
SilphCoElevatorText1:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
call SilphCoElevatorScript_457f1
ld hl, SilphCoElevatorWarpMaps
2015-07-24 04:00:30 +00:00
predef DisplayElevatorFloorMenu
2014-05-18 18:19:10 +00:00
jp TextScriptEnd