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/Route1.asm | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'scripts/Route1.asm') diff --git a/scripts/Route1.asm b/scripts/Route1.asm index bd9afea3..4b9be6e7 100644 --- a/scripts/Route1.asm +++ b/scripts/Route1.asm @@ -2,51 +2,52 @@ Route1_Script: jp EnableAutoTextBoxDrawing Route1_TextPointers: - dw Route1Text1 - dw Route1Text2 - dw Route1Text3 + def_text_pointers + dw_const Route1Youngster1Text, TEXT_ROUTE1_YOUNGSTER1 + dw_const Route1Youngster2Text, TEXT_ROUTE1_YOUNGSTER2 + dw_const Route1SignText, TEXT_ROUTE1_SIGN -Route1Text1: +Route1Youngster1Text: text_asm CheckAndSetEvent EVENT_GOT_POTION_SAMPLE jr nz, .got_item - ld hl, Route1ViridianMartSampleText + ld hl, .MartSampleText call PrintText lb bc, POTION, 1 call GiveItem jr nc, .bag_full - ld hl, Route1Text_1cae8 + ld hl, .GotPotionText jr .done .bag_full - ld hl, Route1Text_1caf3 + ld hl, .NoRoomText jr .done .got_item - ld hl, Route1Text_1caee + ld hl, .AlsoGotPokeballsText .done call PrintText jp TextScriptEnd -Route1ViridianMartSampleText: - text_far _Route1ViridianMartSampleText +.MartSampleText: + text_far _Route1Youngster1MartSampleText text_end -Route1Text_1cae8: - text_far _Route1Text_1cae8 +.GotPotionText: + text_far _Route1Youngster1GotPotionText sound_get_item_1 text_end -Route1Text_1caee: - text_far _Route1Text_1caee +.AlsoGotPokeballsText: + text_far _Route1Youngster1AlsoGotPokeballsText text_end -Route1Text_1caf3: - text_far _Route1Text_1caf3 +.NoRoomText: + text_far _Route1Youngster1NoRoomText text_end -Route1Text2: - text_far _Route1Text2 +Route1Youngster2Text: + text_far _Route1Youngster2Text text_end -Route1Text3: - text_far _Route1Text3 +Route1SignText: + text_far _Route1SignText text_end -- cgit v1.3.1-sl0p