2019-01-01 20:06:23 +00:00
|
|
|
CeladonMartElevator_Script:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_1, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_1, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
push hl
|
2023-11-19 00:44:03 +00:00
|
|
|
call nz, CeladonMartElevatorStoreWarpEntriesScript
|
2014-05-18 18:19:10 +00:00
|
|
|
pop hl
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_USED_ELEVATOR, [hl]
|
|
|
|
res BIT_CUR_MAP_USED_ELEVATOR, [hl]
|
2023-11-19 00:44:03 +00:00
|
|
|
call nz, CeladonMartElevatorShakeScript
|
2014-05-18 18:19:10 +00:00
|
|
|
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
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
CeladonMartElevatorStoreWarpEntriesScript:
|
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
|
2023-11-19 00:44:03 +00:00
|
|
|
call .StoreWarpEntry
|
|
|
|
; fallthrough
|
|
|
|
.StoreWarpEntry:
|
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
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
CeladonMartElevatorCopyWarpMapsScript:
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, CeladonMartElevatorFloors
|
2014-05-18 18:19:10 +00:00
|
|
|
call LoadItemList
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, CeladonMartElevatorWarpMaps
|
2015-08-13 05:14:31 +00:00
|
|
|
ld de, wElevatorWarpMaps
|
2023-11-19 00:44:03 +00:00
|
|
|
ld bc, CeladonMartElevatorWarpMaps.End - CeladonMartElevatorWarpMaps
|
2014-05-18 18:19:10 +00:00
|
|
|
jp CopyData
|
|
|
|
|
2016-04-09 01:04:36 +00:00
|
|
|
CeladonMartElevatorFloors:
|
2020-07-16 15:19:05 +00:00
|
|
|
db 5 ; #
|
2015-08-10 15:03:55 +00:00
|
|
|
db FLOOR_1F
|
|
|
|
db FLOOR_2F
|
|
|
|
db FLOOR_3F
|
|
|
|
db FLOOR_4F
|
|
|
|
db FLOOR_5F
|
2020-07-16 15:19:05 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
; These specify where the player goes after getting out of the elevator.
|
2020-07-16 15:19:05 +00:00
|
|
|
CeladonMartElevatorWarpMaps:
|
|
|
|
; warp number, map id
|
|
|
|
db 5, CELADON_MART_1F
|
|
|
|
db 2, CELADON_MART_2F
|
|
|
|
db 2, CELADON_MART_3F
|
|
|
|
db 2, CELADON_MART_4F
|
|
|
|
db 2, CELADON_MART_5F
|
2023-11-19 00:44:03 +00:00
|
|
|
.End:
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
CeladonMartElevatorShakeScript:
|
2020-07-07 01:18:22 +00:00
|
|
|
farjp ShakeElevator
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
CeladonMartElevator_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const CeladonMartElevatorText, TEXT_CELADONMARTELEVATOR
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeladonMartElevatorText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2023-11-19 00:44:03 +00:00
|
|
|
call CeladonMartElevatorCopyWarpMapsScript
|
2016-04-09 01:04:36 +00:00
|
|
|
ld hl, CeladonMartElevatorWarpMaps
|
2015-07-24 04:00:30 +00:00
|
|
|
predef DisplayElevatorFloorMenu
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|