aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Route1.asm
diff options
context:
space:
mode:
authorvulcandth <vulcandth@gmail.com>2023-07-13 20:27:56 -0500
committerGitHub <noreply@github.com>2023-07-13 21:27:56 -0400
commitd001ced41b53271373753de835a9c3b3413dc318 (patch)
treeff2db7f403bddfcdeb12e50def8411cafedcdd5e /scripts/Route1.asm
parentMake wCurrentBoxNum a byte instead of word (#414) (diff)
downloadpokeyellow-d001ced41b53271373753de835a9c3b3413dc318.tar.gz
pokeyellow-d001ced41b53271373753de835a9c3b3413dc318.tar.xz
pokeyellow-d001ced41b53271373753de835a9c3b3413dc318.zip
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.
Diffstat (limited to 'scripts/Route1.asm')
-rw-r--r--scripts/Route1.asm41
1 files changed, 21 insertions, 20 deletions
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