From d001ced41b53271373753de835a9c3b3413dc318 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Thu, 13 Jul 2023 20:27:56 -0500 Subject: Add macros, constants, and labels for map scripts and text (#367) This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified. --- scripts/SilphCoElevator.asm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'scripts/SilphCoElevator.asm') diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm index c898cbd1..1d728e6b 100644 --- a/scripts/SilphCoElevator.asm +++ b/scripts/SilphCoElevator.asm @@ -7,7 +7,7 @@ SilphCoElevator_Script: pop hl bit 7, [hl] res 7, [hl] - call nz, SilphCoElevatorScript_45827 + call nz, SilphCoElevatorShakeElevatorScript xor a ld [wAutoTextBoxDrawingControl], a inc a @@ -20,9 +20,9 @@ SilphCoElevatorScript_457dc: ld b, a ld a, [wWarpedFromWhichMap] ld c, a - call SilphCoElevatorScript_457ea + call .StoreWarpEntry -SilphCoElevatorScript_457ea: +.StoreWarpEntry: inc hl inc hl ld a, b @@ -31,7 +31,7 @@ SilphCoElevatorScript_457ea: ld [hli], a ret -SilphCoElevatorScript_457f1: +SilphCoElevatorCopyWarpMapsScript: ld hl, SilphCoElevatorFloors call LoadItemList ld hl, SilphCoElevatorWarpMaps @@ -71,17 +71,18 @@ SilphCoElevatorWarpMaps: db 1, SILPH_CO_11F SilphCoElevatorWarpMapsEnd: -SilphCoElevatorScript_45827: +SilphCoElevatorShakeElevatorScript: call Delay3 farcall ShakeElevator ret SilphCoElevator_TextPointers: - dw SilphCoElevatorText1 + def_text_pointers + dw_const SilphCoElevatorElevatorText, TEXT_SILPHCOELEVATOR_ELEVATOR -SilphCoElevatorText1: +SilphCoElevatorElevatorText: text_asm - call SilphCoElevatorScript_457f1 + call SilphCoElevatorCopyWarpMapsScript ld hl, SilphCoElevatorWarpMaps predef DisplayElevatorFloorMenu jp TextScriptEnd -- cgit v1.3.1-sl0p