aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Route11Gate2F.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/Route11Gate2F.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/Route11Gate2F.asm')
-rw-r--r--scripts/Route11Gate2F.asm45
1 files changed, 23 insertions, 22 deletions
diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm
index 47c8db22..9c223c87 100644
--- a/scripts/Route11Gate2F.asm
+++ b/scripts/Route11Gate2F.asm
@@ -2,20 +2,21 @@ Route11Gate2F_Script:
jp DisableAutoTextBoxDrawing
Route11Gate2F_TextPointers:
- dw Route11GateUpstairsText1
- dw Route11GateUpstairsText2
- dw Route11GateUpstairsText3
- dw Route11GateUpstairsText4
+ def_text_pointers
+ dw_const Route11Gate2FYoungsterText, TEXT_ROUTE11GATE2F_YOUNGSTER
+ dw_const Route11Gate2FOaksAideText, TEXT_ROUTE11GATE2F_OAKS_AIDE
+ dw_const Route11Gate2FLeftBinocularsText, TEXT_ROUTE11GATE2F_LEFT_BINOCULARS
+ dw_const Route11Gate2FRightBinocularsText, TEXT_ROUTE11GATE2F_RIGHT_BINOCULARS
-Route11GateUpstairsText1:
+Route11Gate2FYoungsterText:
text_asm
xor a ; TRADE_FOR_TERRY
ld [wWhichTrade], a
predef DoInGameTradeDialogue
-Route11GateUpstairsScriptEnd:
+Route11Gate2FScriptEnd:
jp TextScriptEnd
-Route11GateUpstairsText2:
+Route11Gate2FOaksAideText:
text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1
jr c, .got_item
@@ -36,41 +37,41 @@ Route11GateUpstairsText2:
jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER
.got_item
- ld hl, Route11GateUpstairsText_494a3
+ ld hl, .ItemfinderDescriptionText
call PrintText
.no_item
- jr Route11GateUpstairsScriptEnd
+ jr Route11Gate2FScriptEnd
-Route11GateUpstairsText_494a3:
- text_far _Route11GateUpstairsText_494a3
+.ItemfinderDescriptionText:
+ text_far _Route11Gate2FOaksAideItemfinderDescriptionText
text_end
-Route11GateUpstairsText3:
+Route11Gate2FLeftBinocularsText:
text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jp nz, GateUpstairsScript_PrintIfFacingUp
CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
- ld hl, BinocularsSnorlaxText
+ ld hl, .SnorlaxText
jr z, .print
- ld hl, BinocularsNoSnorlaxText
+ ld hl, .NoSnorlaxText
.print
call PrintText
jp TextScriptEnd
-BinocularsSnorlaxText:
- text_far _BinocularsSnorlaxText
+.SnorlaxText:
+ text_far _Route11Gate2FLeftBinocularsSnorlaxText
text_end
-BinocularsNoSnorlaxText:
- text_far _BinocularsNoSnorlaxText
+.NoSnorlaxText:
+ text_far _Route11Gate2FLeftBinocularsNoSnorlaxText
text_end
-Route11GateUpstairsText4:
+Route11Gate2FRightBinocularsText:
text_asm
- ld hl, Route11GateUpstairsText_494d5
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route11GateUpstairsText_494d5:
- text_far _Route11GateUpstairsText_494d5
+.Text:
+ text_far _Route11Gate2FRightBinocularsText
text_end