aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/BluesHouse.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/BluesHouse.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/BluesHouse.asm')
-rw-r--r--scripts/BluesHouse.asm42
1 files changed, 22 insertions, 20 deletions
diff --git a/scripts/BluesHouse.asm b/scripts/BluesHouse.asm
index 1ab0fd06..0a16abbf 100644
--- a/scripts/BluesHouse.asm
+++ b/scripts/BluesHouse.asm
@@ -5,22 +5,24 @@ BluesHouse_Script:
jp CallFunctionInTable
BluesHouse_ScriptPointers:
- dw BluesHouseScript0
- dw BluesHouseScript1
+ def_script_pointers
+ dw_const BluesHouseDefaultScript, SCRIPT_BLUESHOUSE_DEFAULT
+ dw_const BluesHouseNoopScript, SCRIPT_BLUESHOUSE_NOOP
-BluesHouseScript0:
+BluesHouseDefaultScript:
SetEvent EVENT_ENTERED_BLUES_HOUSE
- ld a, $1
+ ld a, SCRIPT_BLUESHOUSE_NOOP
ld [wBluesHouseCurScript], a
ret
-BluesHouseScript1:
+BluesHouseNoopScript:
ret
BluesHouse_TextPointers:
- dw BluesHouseDaisySittingText
- dw BluesHouseDaisyWalkingText
- dw BluesHouseTownMapText
+ def_text_pointers
+ dw_const BluesHouseDaisySittingText, TEXT_BLUESHOUSE_DAISY_SITTING
+ dw_const BluesHouseDaisyWalkingText, TEXT_BLUESHOUSE_DAISY_WALKING
+ dw_const BluesHouseTownMapText, TEXT_BLUESHOUSE_TOWN_MAP
BluesHouseDaisySittingText:
text_asm
@@ -28,12 +30,12 @@ BluesHouseDaisySittingText:
jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX
jr nz, .give_town_map
- ld hl, DaisyInitialText
+ ld hl, BluesHouseDaisyRivalAtLabText
call PrintText
jr .done
.give_town_map
- ld hl, DaisyOfferMapText
+ ld hl, BluesHouseDaisyOfferMapText
call PrintText
lb bc, TOWN_MAP, 1
call GiveItem
@@ -47,22 +49,22 @@ BluesHouseDaisySittingText:
jr .done
.got_town_map
- ld hl, DaisyUseMapText
+ ld hl, BluesHouseDaisyUseMapText
call PrintText
jr .done
.bag_full
- ld hl, DaisyBagFullText
+ ld hl, BluesHouseDaisyBagFullText
call PrintText
.done
jp TextScriptEnd
-DaisyInitialText:
- text_far _DaisyInitialText
+BluesHouseDaisyRivalAtLabText:
+ text_far _BluesHouseDaisyRivalAtLabText
text_end
-DaisyOfferMapText:
- text_far _DaisyOfferMapText
+BluesHouseDaisyOfferMapText:
+ text_far _BluesHouseDaisyOfferMapText
text_end
GotMapText:
@@ -70,12 +72,12 @@ GotMapText:
sound_get_key_item
text_end
-DaisyBagFullText:
- text_far _DaisyBagFullText
+BluesHouseDaisyBagFullText:
+ text_far _BluesHouseDaisyBagFullText
text_end
-DaisyUseMapText:
- text_far _DaisyUseMapText
+BluesHouseDaisyUseMapText:
+ text_far _BluesHouseDaisyUseMapText
text_end
BluesHouseDaisyWalkingText: