aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/AgathasRoom.asm44
-rw-r--r--scripts/BikeShop.asm79
-rw-r--r--scripts/BillsHouse.asm82
-rw-r--r--scripts/BillsHouse_2.asm (renamed from scripts/BillsHouse2.asm)84
-rw-r--r--scripts/BluesHouse.asm42
-rw-r--r--scripts/BrunosRoom.asm42
-rw-r--r--scripts/CeladonChiefHouse.asm19
-rw-r--r--scripts/CeladonCity.asm131
-rw-r--r--scripts/CeladonCity2.asm8
-rw-r--r--scripts/CeladonCity_2.asm8
-rw-r--r--scripts/CeladonDiner.asm31
-rw-r--r--scripts/CeladonDiner2.asm38
-rw-r--r--scripts/CeladonDiner_2.asm38
-rw-r--r--scripts/CeladonGym.asm94
-rw-r--r--scripts/CeladonHotel.asm19
-rw-r--r--scripts/CeladonMansion1F.asm31
-rw-r--r--scripts/CeladonMansion1F_2.asm2
-rw-r--r--scripts/CeladonMansion2F.asm7
-rw-r--r--scripts/CeladonMansion3F.asm97
-rw-r--r--scripts/CeladonMansion3F_2.asm32
-rw-r--r--scripts/CeladonMansionRoof.asm7
-rw-r--r--scripts/CeladonMansionRoofHouse.asm11
-rw-r--r--scripts/CeladonMart1F.asm19
-rw-r--r--scripts/CeladonMart2F.asm23
-rw-r--r--scripts/CeladonMart3F.asm88
-rw-r--r--scripts/CeladonMart3F_2.asm26
-rw-r--r--scripts/CeladonMart4F.asm21
-rw-r--r--scripts/CeladonMart5F.asm23
-rw-r--r--scripts/CeladonMartElevator.asm27
-rw-r--r--scripts/CeladonMartRoof.asm97
-rw-r--r--scripts/CeladonPokecenter.asm25
-rw-r--r--scripts/CeruleanBadgeHouse.asm93
-rw-r--r--scripts/CeruleanCave1F.asm9
-rw-r--r--scripts/CeruleanCave2F.asm9
-rw-r--r--scripts/CeruleanCaveB1F.asm20
-rw-r--r--scripts/CeruleanCity.asm259
-rw-r--r--scripts/CeruleanGym.asm90
-rw-r--r--scripts/CeruleanMart.asm15
-rw-r--r--scripts/CeruleanMelaniesHouse.asm17
-rw-r--r--scripts/CeruleanPokecenter.asm25
-rw-r--r--scripts/CeruleanTrashedHouse.asm29
-rw-r--r--scripts/ChampionsRoom.asm190
-rw-r--r--scripts/CinnabarGym.asm329
-rw-r--r--scripts/CinnabarGym_3.asm (renamed from scripts/CinnabarGym3.asm)14
-rw-r--r--scripts/CinnabarIsland.asm56
-rw-r--r--scripts/CinnabarLab.asm31
-rw-r--r--scripts/CinnabarLabFossilRoom.asm55
-rw-r--r--scripts/CinnabarLabMetronomeRoom.asm50
-rw-r--r--scripts/CinnabarLabTradeRoom.asm19
-rw-r--r--scripts/CinnabarMart.asm15
-rw-r--r--scripts/CinnabarPokecenter.asm25
-rw-r--r--scripts/Colosseum.asm7
-rw-r--r--scripts/CopycatsHouse1F.asm19
-rw-r--r--scripts/CopycatsHouse2F.asm79
-rw-r--r--scripts/Daycare.asm97
-rw-r--r--scripts/DiglettsCave.asm1
-rw-r--r--scripts/DiglettsCaveRoute11.asm7
-rw-r--r--scripts/DiglettsCaveRoute2.asm7
-rw-r--r--scripts/FightingDojo.asm187
-rw-r--r--scripts/FuchsiaBillsGrandpasHouse.asm19
-rw-r--r--scripts/FuchsiaCity.asm171
-rw-r--r--scripts/FuchsiaGoodRodHouse.asm37
-rw-r--r--scripts/FuchsiaGym.asm194
-rw-r--r--scripts/FuchsiaMart.asm15
-rw-r--r--scripts/FuchsiaMeetingRoom.asm19
-rw-r--r--scripts/FuchsiaPokecenter.asm25
-rw-r--r--scripts/GameCorner.asm388
-rw-r--r--scripts/GameCornerPrizeRoom.asm21
-rw-r--r--scripts/GameCorner_2.asm (renamed from scripts/GameCorner2.asm)6
-rw-r--r--scripts/HallOfFame.asm46
-rw-r--r--scripts/IndigoPlateau.asm1
-rw-r--r--scripts/IndigoPlateauLobby.asm27
-rw-r--r--scripts/LancesRoom.asm50
-rw-r--r--scripts/LavenderCuboneHouse.asm23
-rw-r--r--scripts/LavenderMart.asm17
-rw-r--r--scripts/LavenderPokecenter.asm25
-rw-r--r--scripts/LavenderTown.asm63
-rw-r--r--scripts/LoreleisRoom.asm54
-rw-r--r--scripts/MrFujisHouse.asm81
-rw-r--r--scripts/MrPsychicsHouse.asm29
-rw-r--r--scripts/MtMoon1F.asm152
-rw-r--r--scripts/MtMoonB1F.asm7
-rw-r--r--scripts/MtMoonB2F.asm394
-rw-r--r--scripts/MtMoonB2F_2.asm2
-rw-r--r--scripts/MtMoonPokecenter.asm35
-rw-r--r--scripts/MtMoonPokecenter_2.asm (renamed from scripts/MtMoonPokecenter2.asm)22
-rw-r--r--scripts/Museum1F.asm46
-rw-r--r--scripts/Museum1F2.asm209
-rw-r--r--scripts/Museum1F_2.asm202
-rw-r--r--scripts/Museum2F.asm43
-rw-r--r--scripts/NameRatersHouse.asm86
-rw-r--r--scripts/OaksLab.asm646
-rw-r--r--scripts/OaksLab_2.asm (renamed from scripts/OaksLab2.asm)14
-rw-r--r--scripts/PalletTown.asm155
-rw-r--r--scripts/PewterCity.asm194
-rw-r--r--scripts/PewterGym.asm90
-rw-r--r--scripts/PewterMart.asm19
-rw-r--r--scripts/PewterNidoranHouse.asm19
-rw-r--r--scripts/PewterPokecenter.asm29
-rw-r--r--scripts/PewterPokecenter_2.asm (renamed from scripts/PewterPokecenter2.asm)22
-rw-r--r--scripts/PewterSpeechHouse.asm13
-rw-r--r--scripts/PokemonFanClub.asm135
-rw-r--r--scripts/PokemonMansion1F.asm92
-rw-r--r--scripts/PokemonMansion2F.asm97
-rw-r--r--scripts/PokemonMansion3F.asm88
-rw-r--r--scripts/PokemonMansionB1F.asm88
-rw-r--r--scripts/PokemonTower1F.asm31
-rw-r--r--scripts/PokemonTower2F.asm100
-rw-r--r--scripts/PokemonTower2F_2.asm6
-rw-r--r--scripts/PokemonTower3F.asm64
-rw-r--r--scripts/PokemonTower4F.asm68
-rw-r--r--scripts/PokemonTower5F.asm108
-rw-r--r--scripts/PokemonTower6F.asm128
-rw-r--r--scripts/PokemonTower7F.asm188
-rw-r--r--scripts/PowerPlant.asm100
-rw-r--r--scripts/RedsHouse1F.asm9
-rw-r--r--scripts/RedsHouse1F2.asm57
-rw-r--r--scripts/RedsHouse1F_2.asm57
-rw-r--r--scripts/RedsHouse2F.asm18
-rw-r--r--scripts/RockTunnel1F.asm154
-rw-r--r--scripts/RockTunnelB1F.asm152
-rw-r--r--scripts/RockTunnelPokecenter.asm25
-rw-r--r--scripts/RocketHideoutB1F.asm126
-rw-r--r--scripts/RocketHideoutB2F.asm46
-rw-r--r--scripts/RocketHideoutB3F.asm54
-rw-r--r--scripts/RocketHideoutB4F.asm260
-rw-r--r--scripts/RocketHideoutElevator.asm41
-rw-r--r--scripts/Route1.asm19
-rw-r--r--scripts/Route10.asm133
-rw-r--r--scripts/Route11.asm194
-rw-r--r--scripts/Route11Gate1F.asm7
-rw-r--r--scripts/Route11Gate2F.asm45
-rw-r--r--scripts/Route12.asm190
-rw-r--r--scripts/Route12Gate1F.asm7
-rw-r--r--scripts/Route12Gate2F.asm49
-rw-r--r--scripts/Route12SuperRodHouse.asm37
-rw-r--r--scripts/Route13.asm206
-rw-r--r--scripts/Route14.asm194
-rw-r--r--scripts/Route15.asm196
-rw-r--r--scripts/Route15Gate1F.asm7
-rw-r--r--scripts/Route15Gate2F.asm21
-rw-r--r--scripts/Route16.asm168
-rw-r--r--scripts/Route16FlyHouse.asm39
-rw-r--r--scripts/Route16Gate1F.asm82
-rw-r--r--scripts/Route16Gate2F.asm41
-rw-r--r--scripts/Route17.asm224
-rw-r--r--scripts/Route18.asm74
-rw-r--r--scripts/Route18Gate1F.asm74
-rw-r--r--scripts/Route18Gate2F.asm25
-rw-r--r--scripts/Route19.asm194
-rw-r--r--scripts/Route1_2.asm42
-rw-r--r--scripts/Route2.asm17
-rw-r--r--scripts/Route20.asm229
-rw-r--r--scripts/Route21.asm170
-rw-r--r--scripts/Route22.asm242
-rw-r--r--scripts/Route22Gate.asm60
-rw-r--r--scripts/Route22_2.asm30
-rw-r--r--scripts/Route23.asm118
-rw-r--r--scripts/Route24.asm200
-rw-r--r--scripts/Route25.asm192
-rw-r--r--scripts/Route2Gate.asm17
-rw-r--r--scripts/Route2TradeHouse.asm11
-rw-r--r--scripts/Route3.asm162
-rw-r--r--scripts/Route4.asm48
-rw-r--r--scripts/Route5.asm7
-rw-r--r--scripts/Route5Gate.asm79
-rw-r--r--scripts/Route6.asm122
-rw-r--r--scripts/Route6Gate.asm36
-rw-r--r--scripts/Route7.asm7
-rw-r--r--scripts/Route7Gate.asm36
-rw-r--r--scripts/Route8.asm176
-rw-r--r--scripts/Route8Gate.asm36
-rw-r--r--scripts/Route9.asm178
-rw-r--r--scripts/SSAnne1F.asm13
-rw-r--r--scripts/SSAnne1FRooms.asm118
-rw-r--r--scripts/SSAnne2F.asm136
-rw-r--r--scripts/SSAnne2FRooms.asm138
-rw-r--r--scripts/SSAnne2FRooms_2.asm32
-rw-r--r--scripts/SSAnne3F.asm7
-rw-r--r--scripts/SSAnneB1F.asm1
-rw-r--r--scripts/SSAnneB1FRooms.asm134
-rw-r--r--scripts/SSAnneBow.asm62
-rw-r--r--scripts/SSAnneCaptainsRoom.asm59
-rw-r--r--scripts/SSAnneKitchen.asm65
-rw-r--r--scripts/SafariZoneCenter.asm15
-rw-r--r--scripts/SafariZoneCenterRestHouse.asm13
-rw-r--r--scripts/SafariZoneEast.asm27
-rw-r--r--scripts/SafariZoneEastRestHouse.asm19
-rw-r--r--scripts/SafariZoneGate.asm139
-rw-r--r--scripts/SafariZoneGate_2.asm (renamed from scripts/SafariZoneGate2.asm)81
-rw-r--r--scripts/SafariZoneNorth.asm35
-rw-r--r--scripts/SafariZoneNorthRestHouse.asm19
-rw-r--r--scripts/SafariZoneSecretHouse.asm29
-rw-r--r--scripts/SafariZoneWest.asm33
-rw-r--r--scripts/SafariZoneWestRestHouse.asm19
-rw-r--r--scripts/SaffronCity.asm143
-rw-r--r--scripts/SaffronGym.asm210
-rw-r--r--scripts/SaffronMart.asm15
-rw-r--r--scripts/SaffronPidgeyHouse.asm25
-rw-r--r--scripts/SaffronPokecenter.asm25
-rw-r--r--scripts/SeafoamIslands1F.asm17
-rw-r--r--scripts/SeafoamIslandsB1F.asm17
-rw-r--r--scripts/SeafoamIslandsB2F.asm17
-rw-r--r--scripts/SeafoamIslandsB3F.asm81
-rw-r--r--scripts/SeafoamIslandsB4F.asm103
-rw-r--r--scripts/SilphCo10F.asm84
-rw-r--r--scripts/SilphCo11F.asm345
-rw-r--r--scripts/SilphCo11F_2.asm33
-rw-r--r--scripts/SilphCo1F.asm7
-rw-r--r--scripts/SilphCo2F.asm156
-rw-r--r--scripts/SilphCo3F.asm88
-rw-r--r--scripts/SilphCo4F.asm124
-rw-r--r--scripts/SilphCo5F.asm152
-rw-r--r--scripts/SilphCo6F.asm180
-rw-r--r--scripts/SilphCo7F.asm340
-rw-r--r--scripts/SilphCo8F.asm112
-rw-r--r--scripts/SilphCo9F.asm146
-rw-r--r--scripts/SilphCoElevator.asm27
-rw-r--r--scripts/SummerBeachHouse.asm67
-rw-r--r--scripts/SummerBeachHouse_2.asm (renamed from scripts/SummerBeachHouse2.asm)0
-rw-r--r--scripts/TradeCenter.asm9
-rw-r--r--scripts/UndergroundPathNorthSouth.asm1
-rw-r--r--scripts/UndergroundPathRoute5.asm5
-rw-r--r--scripts/UndergroundPathRoute6.asm7
-rw-r--r--scripts/UndergroundPathRoute7.asm7
-rw-r--r--scripts/UndergroundPathRoute7Copy.asm21
-rw-r--r--scripts/UndergroundPathRoute8.asm7
-rw-r--r--scripts/UndergroundPathWestEast.asm1
-rw-r--r--scripts/VermilionCity.asm196
-rw-r--r--scripts/VermilionCity_2.asm (renamed from scripts/VermilionCity2.asm)42
-rw-r--r--scripts/VermilionDock.asm45
-rw-r--r--scripts/VermilionGym.asm166
-rw-r--r--scripts/VermilionMart.asm15
-rw-r--r--scripts/VermilionOldRodHouse.asm49
-rw-r--r--scripts/VermilionPidgeyHouse.asm19
-rw-r--r--scripts/VermilionPokecenter.asm25
-rw-r--r--scripts/VermilionTradeHouse.asm5
-rw-r--r--scripts/VictoryRoad1F.asm60
-rw-r--r--scripts/VictoryRoad2F.asm153
-rw-r--r--scripts/VictoryRoad3F.asm126
-rw-r--r--scripts/ViridianCity.asm246
-rw-r--r--scripts/ViridianCity2.asm215
-rw-r--r--scripts/ViridianCity_2.asm215
-rw-r--r--scripts/ViridianForest.asm166
-rw-r--r--scripts/ViridianForest2.asm53
-rw-r--r--scripts/ViridianForestNorthGate.asm13
-rw-r--r--scripts/ViridianForestSouthGate.asm13
-rw-r--r--scripts/ViridianForest_2.asm53
-rw-r--r--scripts/ViridianGym.asm242
-rw-r--r--scripts/ViridianMart.asm76
-rw-r--r--scripts/ViridianNicknameHouse.asm29
-rw-r--r--scripts/ViridianPokecenter.asm25
-rw-r--r--scripts/ViridianSchoolHouse.asm19
-rw-r--r--scripts/ViridianSchoolHouse2.asm17
-rw-r--r--scripts/ViridianSchoolHouse_2.asm17
-rw-r--r--scripts/WardensHouse.asm88
256 files changed, 9962 insertions, 9684 deletions
diff --git a/scripts/AgathasRoom.asm b/scripts/AgathasRoom.asm
index abe22a4f..cf5254ac 100644
--- a/scripts/AgathasRoom.asm
+++ b/scripts/AgathasRoom.asm
@@ -26,18 +26,19 @@ AgathaShowOrHideExitBlock:
predef_jump ReplaceTileBlock
ResetAgathaScript:
- xor a
+ xor a ; SCRIPT_AGATHASROOM_DEFAULT
ld [wAgathasRoomCurScript], a
ret
AgathasRoom_ScriptPointers:
- dw AgathaScript0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw AgathaScript2
- dw AgathaScript3
- dw AgathaScript4
+ def_script_pointers
+ dw_const AgathasRoomDefaultScript, SCRIPT_AGATHASROOM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_AGATHASROOM_AGATHA_START_BATTLE
+ dw_const AgathasRoomAgathaEndBattleScript, SCRIPT_AGATHASROOM_AGATHA_END_BATTLE
+ dw_const AgathasRoomPlayerIsMovingScript, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING
+ dw_const AgathasRoomNoopScript, SCRIPT_AGATHASROOM_NOOP
-AgathaScript4:
+AgathasRoomNoopScript:
ret
AgathaScriptWalkIntoRoom:
@@ -53,12 +54,12 @@ AgathaScriptWalkIntoRoom:
ld a, $6
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING
ld [wAgathasRoomCurScript], a
ld [wCurMapScript], a
ret
-AgathaScript0:
+AgathasRoomDefaultScript:
ld hl, AgathaEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
@@ -73,15 +74,15 @@ AgathaScript0:
CheckAndSetEvent EVENT_AUTOWALKED_INTO_AGATHAS_ROOM
jr z, AgathaScriptWalkIntoRoom
.stopPlayerFromLeaving
- ld a, $2
+ ld a, TEXT_AGATHASROOM_AGATHA_DONT_RUN_AWAY
ldh [hSpriteIndexOrTextID], a
- call DisplayTextID ; "Don't run away!"
+ call DisplayTextID
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_AGATHASROOM_PLAYER_IS_MOVING
ld [wAgathasRoomCurScript], a
ld [wCurMapScript], a
ret
@@ -93,7 +94,7 @@ AgathaEntranceCoords:
dbmapcoord 5, 11
db -1 ; end
-AgathaScript3:
+AgathasRoomPlayerIsMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -104,21 +105,22 @@ AgathaScript3:
ld [wCurMapScript], a
ret
-AgathaScript2:
+AgathasRoomAgathaEndBattleScript:
call EndTrainerBattle
ld a, [wIsInBattle]
cp $ff
jp z, ResetAgathaScript
- ld a, $1
+ ld a, TEXT_AGATHASROOM_AGATHA
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $1
+ ld a, SCRIPT_CHAMPIONSROOM_PLAYER_ENTERS
ld [wChampionsRoomCurScript], a
ret
AgathasRoom_TextPointers:
- dw AgathaText1
- dw AgathaDontRunAwayText
+ def_text_pointers
+ dw_const AgathasRoomAgathaText, TEXT_AGATHASROOM_AGATHA
+ dw_const AgathasRoomAgathaDontRunAwayText, TEXT_AGATHASROOM_AGATHA_DONT_RUN_AWAY
AgathasRoomTrainerHeaders:
def_trainers
@@ -126,7 +128,7 @@ AgathasRoomTrainerHeader0:
trainer EVENT_BEAT_AGATHAS_ROOM_TRAINER_0, 0, AgathaBeforeBattleText, AgathaEndBattleText, AgathaAfterBattleText
db -1 ; end
-AgathaText1:
+AgathasRoomAgathaText:
text_asm
ld hl, AgathasRoomTrainerHeader0
call TalkToTrainer
@@ -144,6 +146,6 @@ AgathaAfterBattleText:
text_far _AgathaAfterBattleText
text_end
-AgathaDontRunAwayText:
- text_far _AgathaDontRunAwayText
+AgathasRoomAgathaDontRunAwayText:
+ text_far _AgathasRoomAgathaDontRunAwayText
text_end
diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm
index 0c5357d2..fa38701b 100644
--- a/scripts/BikeShop.asm
+++ b/scripts/BikeShop.asm
@@ -3,22 +3,23 @@ BikeShop_Script:
ret
BikeShop_TextPointers:
- dw BikeShopText1
- dw BikeShopText2
- dw BikeShopText3
+ def_text_pointers
+ dw_const BikeShopClerkText, TEXT_BIKESHOP_CLERK
+ dw_const BikeShopMiddleAgedWomanText, TEXT_BIKESHOP_MIDDLE_AGED_WOMAN
+ dw_const BikeShopYoungsterText, TEXT_BIKESHOP_YOUNGSTER
-BikeShopText1:
+BikeShopClerkText:
text_asm
CheckEvent EVENT_GOT_BICYCLE
- jr z, .asm_260d4
- ld hl, BikeShopText_1d82f
+ jr z, .dontHaveBike
+ ld hl, BikeShopClerkHowDoYouLikeYourBicycleText
call PrintText
jp .Done
-.asm_260d4
+.dontHaveBike
ld b, BIKE_VOUCHER
call IsItemInBag
- jr z, .asm_41190
- ld hl, BikeShopText_1d81f
+ jr z, .dontHaveVoucher
+ ld hl, BikeShopClerkOhThatsAVoucherText
call PrintText
lb bc, BICYCLE, 1
call GiveItem
@@ -27,15 +28,15 @@ BikeShopText1:
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GOT_BICYCLE
- ld hl, BikeShopText_1d824
+ ld hl, BikeShopExchangedVoucherText
call PrintText
jr .Done
.BagFull
- ld hl, BikeShopText_1d834
+ ld hl, BikeShopBagFullText
call PrintText
jr .Done
-.asm_41190
- ld hl, BikeShopText_1d810
+.dontHaveVoucher
+ ld hl, BikeShopClerkWelcomeText
call PrintText
xor a
ld [wCurrentMenuItem], a
@@ -60,7 +61,7 @@ BikeShopText1:
hlcoord 8, 3
ld de, BikeShopMenuPrice
call PlaceString
- ld hl, BikeShopText_1d815
+ ld hl, BikeShopClerkDoYouLikeItText
call PrintText
; This fixes the bike shop instatext glitch
ld hl, wd730
@@ -86,24 +87,24 @@ BikeShopMenuText:
BikeShopMenuPrice:
db "¥1000000@"
-BikeShopText_1d810:
- text_far _BikeShopText_1d810
+BikeShopClerkWelcomeText:
+ text_far _BikeShopClerkWelcomeText
text_end
-BikeShopText_1d815:
- text_far _BikeShopText_1d815
+BikeShopClerkDoYouLikeItText:
+ text_far _BikeShopClerkDoYouLikeItText
text_end
BikeShopCantAffordText:
text_far _BikeShopCantAffordText
text_end
-BikeShopText_1d81f:
- text_far _BikeShopText_1d81f
+BikeShopClerkOhThatsAVoucherText:
+ text_far _BikeShopClerkOhThatsAVoucherText
text_end
-BikeShopText_1d824:
- text_far _BikeShopText_1d824
+BikeShopExchangedVoucherText:
+ text_far _BikeShopExchangedVoucherText
sound_get_key_item
text_end
@@ -111,38 +112,38 @@ BikeShopComeAgainText:
text_far _BikeShopComeAgainText
text_end
-BikeShopText_1d82f:
- text_far _BikeShopText_1d82f
+BikeShopClerkHowDoYouLikeYourBicycleText:
+ text_far _BikeShopClerkHowDoYouLikeYourBicycleText
text_end
-BikeShopText_1d834:
- text_far _BikeShopText_1d834
+BikeShopBagFullText:
+ text_far _BikeShopBagFullText
text_end
-BikeShopText2:
+BikeShopMiddleAgedWomanText:
text_asm
- ld hl, BikeShopText_1d843
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-BikeShopText_1d843:
- text_far _BikeShopText_1d843
+.Text:
+ text_far _BikeShopMiddleAgedWomanText
text_end
-BikeShopText3:
+BikeShopYoungsterText:
text_asm
CheckEvent EVENT_GOT_BICYCLE
- ld hl, BikeShopText_1d861
- jr nz, .asm_34d2d
- ld hl, BikeShopText_1d85c
-.asm_34d2d
+ ld hl, .CoolBikeText
+ jr nz, .gotBike
+ ld hl, .TheseBikesAreExpensiveText
+.gotBike
call PrintText
jp TextScriptEnd
-BikeShopText_1d85c:
- text_far _BikeShopText_1d85c
+.TheseBikesAreExpensiveText:
+ text_far _BikeShopYoungsterTheseBikesAreExpensiveText
text_end
-BikeShopText_1d861:
- text_far _BikeShopText_1d861
+.CoolBikeText:
+ text_far _BikeShopYoungsterCoolBikeText
text_end
diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm
index a19317d5..c44e4e3f 100644
--- a/scripts/BillsHouse.asm
+++ b/scripts/BillsHouse.asm
@@ -7,16 +7,17 @@ BillsHouse_Script:
ret
BillsHouse_ScriptPointers:
- dw BillsHouseScript0
- dw BillsHouseScript1
- dw BillsHouseScript2
- dw BillsHouseScript3
- dw BillsHouseScript4
- dw BillsHouseScript5
- dw BillsHouseScript6
- dw BillsHouseScript7
- dw BillsHouseScript8
- dw BillsHouseScript9
+ def_script_pointers
+ dw_const BillsHouseScript0, SCRIPT_BILLSHOUSE_SCRIPT0
+ dw_const BillsHouseScript1, SCRIPT_BILLSHOUSE_SCRIPT1
+ dw_const BillsHouseScript2, SCRIPT_BILLSHOUSE_SCRIPT2
+ dw_const BillsHouseScript3, SCRIPT_BILLSHOUSE_SCRIPT3
+ dw_const BillsHouseScript4, SCRIPT_BILLSHOUSE_SCRIPT4
+ dw_const BillsHouseScript5, SCRIPT_BILLSHOUSE_SCRIPT5
+ dw_const BillsHouseScript6, SCRIPT_BILLSHOUSE_SCRIPT6
+ dw_const BillsHouseScript7, SCRIPT_BILLSHOUSE_SCRIPT7
+ dw_const BillsHouseScript8, SCRIPT_BILLSHOUSE_SCRIPT8
+ dw_const BillsHouseScript9, SCRIPT_BILLSHOUSE_SCRIPT9
BillsHouseScript_1e09e:
ld hl, wd492
@@ -28,11 +29,11 @@ BillsHouseScript_1e09e:
jr .asm_1e0b3
.asm_1e0af
- ld a, $0
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT0
jr .asm_1e0b5
.asm_1e0b3
- ld a, $9
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT9
.asm_1e0b5
ld [wBillsHouseCurScript], a
ret
@@ -47,7 +48,7 @@ BillsHouseScript0:
.asm_1e0d2
xor a
ld [wJoyIgnore], a
- ld a, $1
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT1
ld [wBillsHouseCurScript], a
ret
@@ -55,7 +56,7 @@ BillsHouseScript1:
ret
BillsHouseScript2:
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
@@ -67,10 +68,10 @@ BillsHouseScript2:
.asm_1e0f8
ld de, MovementData_1e7a0
.notDown
- ld a, $1
+ ld a, BILLSHOUSE_BILL_POKEMON
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $3
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT3
ld [wBillsHouseCurScript], a
ret
@@ -110,7 +111,7 @@ BillsHouseScript3:
xor a
ld [wJoyIgnore], a
SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR
- ld a, $4
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT4
ld [wBillsHouseCurScript], a
ret
@@ -134,14 +135,14 @@ PikachuMovementData_1e152:
BillsHouseScript4:
CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
ret z
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $5
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT5
ld [wBillsHouseCurScript], a
ret
BillsHouseScript5:
- ld a, $2
+ ld a, BILLSHOUSE_BILL1
ld [wSpriteIndex], a
ld a, $c
ldh [hSpriteScreenYCoord], a
@@ -162,7 +163,7 @@ BillsHouseScript5:
jr z, .asm_1e1c6
call CheckPikachuFollowingPlayer
jr z, .asm_1e1c6
- ld a, $2
+ ld a, BILLSHOUSE_BILL1
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
@@ -176,11 +177,11 @@ BillsHouseScript5:
predef EmotionBubble
callfar InitializePikachuTextID
.asm_1e1c6
- ld a, $2
+ ld a, BILLSHOUSE_BILL1
ldh [hSpriteIndex], a
ld de, MovementData_1e807
call MoveSprite
- ld a, $6
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT6
ld [wBillsHouseCurScript], a
ret
@@ -203,7 +204,7 @@ BillsHouseScript6:
ret nz
SetEvent EVENT_MET_BILL_2 ; this event seems redundant
SetEvent EVENT_MET_BILL
- ld a, $7
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT7
ld [wBillsHouseCurScript], a
ret
@@ -220,7 +221,7 @@ BillsHouseScript7:
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $8
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT8
ld [wBillsHouseCurScript], a
ret
@@ -236,17 +237,17 @@ BillsHouseScript8:
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_UP
ld [wSpritePlayerStateData1FacingDirection], a
- ld a, $2
+ ld a, BILLSHOUSE_BILL1
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
- ld a, $2
+ ld a, TEXT_BILLSHOUSE_BILL_SS_TICKET
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $9
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT9
ld [wBillsHouseCurScript], a
ret
@@ -254,26 +255,27 @@ BillsHouseScript9:
ret
BillsHouse_TextPointers:
- dw BillsHouseText1
- dw BillsHouseText2
- dw BillsHouseText3
- dw BillsHouseText4
+ def_text_pointers
+ dw_const BillsHouseBillPokemonText, TEXT_BILLSHOUSE_BILL_POKEMON
+ dw_const BillsHouseBillSSTicketText, TEXT_BILLSHOUSE_BILL_SS_TICKET
+ dw_const BillsHouseBillCheckOutMyRarePokemonText, TEXT_BILLSHOUSE_BILL_CHECK_OUT_MY_RARE_POKEMON
+ dw_const BillsHouseBillDontLeaveText, TEXT_BILLSHOUSE_BILL_DONT_LEAVE
-BillsHouseText4:
- text_far _BillsHouseDontLeaveText
+BillsHouseBillDontLeaveText:
+ text_far _BillsHouseBillDontLeaveText
text_end
-BillsHouseText1:
+BillsHouseBillPokemonText:
text_asm
- farcall Func_f2418
+ farcall BillsHousePrintBillPokemonText
jp TextScriptEnd
-BillsHouseText2:
+BillsHouseBillSSTicketText:
text_asm
- farcall Func_f244a
+ farcall BillsHousePrintBillSSTicketText
jp TextScriptEnd
-BillsHouseText3:
+BillsHouseBillCheckOutMyRarePokemonText:
text_asm
- farcall Func_f24a2
+ farcall BillsHousePrintBillCheckOutMyRarePokemonText
jp TextScriptEnd
diff --git a/scripts/BillsHouse2.asm b/scripts/BillsHouse_2.asm
index ca1a56ad..763747e7 100644
--- a/scripts/BillsHouse2.asm
+++ b/scripts/BillsHouse_2.asm
@@ -1,43 +1,42 @@
-Func_f2418::
- ld hl, BillsHouseText_f243b
+BillsHousePrintBillPokemonText::
+ ld hl, .ImNotAPokemonText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_f2433
-.asm_f2427
- ld hl, BillsHouseText_f2440
+ jr nz, .answered_no
+.use_machine
+ ld hl, .UseSeparationSystemText
call PrintText
- ld a, $2
+ ld a, SCRIPT_BILLSHOUSE_SCRIPT2
ld [wBillsHouseCurScript], a
ret
-
-.asm_f2433
- ld hl, BillsHouseText_f2445
+.answered_no
+ ld hl, .NoYouGottaHelpText
call PrintText
- jr .asm_f2427
+ jr .use_machine
-BillsHouseText_f243b:
- text_far _BillsHouseText_1e865
+.ImNotAPokemonText:
+ text_far _BillsHouseBillImNotAPokemonText
text_end
-BillsHouseText_f2440:
- text_far _BillsHouseText_1e86a
+.UseSeparationSystemText:
+ text_far _BillsHouseBillUseSeparationSystemText
text_end
-BillsHouseText_f2445:
- text_far _BillsHouseText_1e86f
+.NoYouGottaHelpText:
+ text_far _BillsHouseBillNoYouGottaHelpText
text_end
-Func_f244a::
+BillsHousePrintBillSSTicketText::
CheckEvent EVENT_GOT_SS_TICKET
- jr nz, .asm_f247e
- ld hl, BillsHouseText_f248c
+ jr nz, .got_ss_ticket
+ ld hl, .ThankYouText
call PrintText
lb bc, S_S_TICKET, 1
call GiveItem
- jr nc, .asm_f2485
- ld hl, BillsHouseText_f2491
+ jr nc, .bag_full
+ ld hl, .SSTicketReceivedText
call PrintText
SetEvent EVENT_GOT_SS_TICKET
ld a, HS_CERULEAN_GUARD_1
@@ -46,41 +45,40 @@ Func_f244a::
ld a, HS_CERULEAN_GUARD_2
ld [wMissableObjectIndex], a
predef HideObject
-.asm_f247e
- ld hl, BillsHouseText_f249d
+.got_ss_ticket
+ ld hl, .WhyDontYouGoInsteadOfMeText
call PrintText
ret
-
-.asm_f2485
- ld hl, BillsHouseText_f2498
+.bag_full
+ ld hl, .SSTicketNoRoomText
call PrintText
ret
-BillsHouseText_f248c:
- text_far _BillThankYouText
+.ThankYouText:
+ text_far _BillsHouseBillThankYouText
text_end
-BillsHouseText_f2491:
+.SSTicketReceivedText:
text_far _SSTicketReceivedText
sound_get_key_item
text_promptbutton
text_end
-BillsHouseText_f2498:
+.SSTicketNoRoomText:
text_far _SSTicketNoRoomText
text_end
-BillsHouseText_f249d:
- text_far _BillsHouseText_1e8cb
+.WhyDontYouGoInsteadOfMeText:
+ text_far _BillsHouseBillWhyDontYouGoInsteadOfMeText
text_end
-Func_f24a2::
- ld hl, BillsHouseText_f24a9
+BillsHousePrintBillCheckOutMyRarePokemonText::
+ ld hl, .text
call PrintText
ret
-BillsHouseText_f24a9:
- text_far _BillsHouseText_1e8da
+.text
+ text_far _BillsHouseBillCheckOutMyRarePokemonText
text_end
Func_f24ae::
@@ -90,16 +88,16 @@ Func_f24ae::
call CheckPikachuFollowingPlayer
jr z, .asm_f24d2
ld a, [wBillsHouseCurScript]
- cp $5
- ld e, $1b
+ cp SCRIPT_BILLSHOUSE_SCRIPT5
+ ldpikaemotion e, PikachuEmotion27
ret z
- cp $0
- ld e, $17
+ cp SCRIPT_BILLSHOUSE_SCRIPT0
+ ldpikaemotion e, PikachuEmotion23
ret z
CheckEventHL EVENT_MET_BILL_2
- ld e, $20
+ ldpikaemotion e, PikachuEmotion32
ret z
- ld e, $1f
+ ldpikaemotion e, PikachuEmotion31
ret
.asm_f24d2
@@ -107,7 +105,7 @@ Func_f24ae::
ret
Func_f24d5::
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
xor a
ld [wPlayerMovingDirection], a
diff --git a/scripts/BluesHouse.asm b/scripts/BluesHouse.asm
index 9d9bf33a..834a24e4 100644
--- a/scripts/BluesHouse.asm
+++ b/scripts/BluesHouse.asm
@@ -6,20 +6,22 @@ BluesHouse_Script:
ret
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
-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
@@ -27,12 +29,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
@@ -46,22 +48,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:
@@ -69,12 +71,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:
diff --git a/scripts/BrunosRoom.asm b/scripts/BrunosRoom.asm
index ca8f5418..2a4ed6e6 100644
--- a/scripts/BrunosRoom.asm
+++ b/scripts/BrunosRoom.asm
@@ -26,18 +26,19 @@ BrunoShowOrHideExitBlock:
predef_jump ReplaceTileBlock
ResetBrunoScript:
- xor a
+ xor a ; SCRIPT_BRUNOSROOM_DEFAULT
ld [wBrunosRoomCurScript], a
ret
BrunosRoom_ScriptPointers:
- dw BrunoScript0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw BrunoScript2
- dw BrunoScript3
- dw BrunoScript4
+ def_script_pointers
+ dw_const BrunosRoomDefaultScript, SCRIPT_BRUNOSROOM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_BRUNOSROOM_BRUNO_START_BATTLE
+ dw_const BrunosRoomBrunoEndBattleScript, SCRIPT_BRUNOSROOM_BRUNO_END_BATTLE
+ dw_const BrunosRoomPlayerIsMovingScript, SCRIPT_BRUNOSROOM_PLAYER_IS_MOVING
+ dw_const BrunosRoomNoopScript, SCRIPT_BRUNOSROOM_NOOP
-BrunoScript4:
+BrunosRoomNoopScript:
ret
BrunoScriptWalkIntoRoom:
@@ -53,12 +54,12 @@ BrunoScriptWalkIntoRoom:
ld a, $6
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_BRUNOSROOM_PLAYER_IS_MOVING
ld [wBrunosRoomCurScript], a
ld [wCurMapScript], a
ret
-BrunoScript0:
+BrunosRoomDefaultScript:
ld hl, BrunoEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
@@ -73,7 +74,7 @@ BrunoScript0:
CheckAndSetEvent EVENT_AUTOWALKED_INTO_BRUNOS_ROOM
jr z, BrunoScriptWalkIntoRoom
.stopPlayerFromLeaving
- ld a, $2
+ ld a, TEXT_BRUNOSROOM_BRUNO_DONT_RUN_AWAY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID ; "Don't run away!"
ld a, D_UP
@@ -81,7 +82,7 @@ BrunoScript0:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_BRUNOSROOM_PLAYER_IS_MOVING
ld [wBrunosRoomCurScript], a
ld [wCurMapScript], a
ret
@@ -93,29 +94,30 @@ BrunoEntranceCoords:
dbmapcoord 5, 11
db -1 ; end
-BrunoScript3:
+BrunosRoomPlayerIsMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- xor a
+ xor a ; SCRIPT_BRUNOSROOM_DEFAULT
ld [wJoyIgnore], a
ld [wBrunosRoomCurScript], a
ld [wCurMapScript], a
ret
-BrunoScript2:
+BrunosRoomBrunoEndBattleScript:
call EndTrainerBattle
ld a, [wIsInBattle]
cp $ff
jp z, ResetBrunoScript
- ld a, $1
+ ld a, TEXT_BRUNOSROOM_BRUNO
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
BrunosRoom_TextPointers:
- dw BrunoText1
- dw BrunoDontRunAwayText
+ def_text_pointers
+ dw_const BrunosRoomBrunoText, TEXT_BRUNOSROOM_BRUNO
+ dw_const BrunosRoomBrunoDontRunAwayText, TEXT_BRUNOSROOM_BRUNO_DONT_RUN_AWAY
BrunosRoomTrainerHeaders:
def_trainers
@@ -123,7 +125,7 @@ BrunosRoomTrainerHeader0:
trainer EVENT_BEAT_BRUNOS_ROOM_TRAINER_0, 0, BrunoBeforeBattleText, BrunoEndBattleText, BrunoAfterBattleText
db -1 ; end
-BrunoText1:
+BrunosRoomBrunoText:
text_asm
ld hl, BrunosRoomTrainerHeader0
call TalkToTrainer
@@ -141,6 +143,6 @@ BrunoAfterBattleText:
text_far _BrunoAfterBattleText
text_end
-BrunoDontRunAwayText:
- text_far _BrunoDontRunAwayText
+BrunosRoomBrunoDontRunAwayText:
+ text_far _BrunosRoomBrunoDontRunAwayText
text_end
diff --git a/scripts/CeladonChiefHouse.asm b/scripts/CeladonChiefHouse.asm
index ad604b98..86e3a004 100644
--- a/scripts/CeladonChiefHouse.asm
+++ b/scripts/CeladonChiefHouse.asm
@@ -3,18 +3,19 @@ CeladonChiefHouse_Script:
ret
CeladonChiefHouse_TextPointers:
- dw CeladonHouseText1
- dw CeladonHouseText2
- dw CeladonHouseText3
+ def_text_pointers
+ dw_const CeladonChiefHouseChiefText, TEXT_CELADONCHIEFHOUSE_CHIEF
+ dw_const CeladonChiefHouseRocketText, TEXT_CELADONCHIEFHOUSE_ROCKET
+ dw_const CeladonChiefHouseSailorText, TEXT_CELADONCHIEFHOUSE_SAILOR
-CeladonHouseText1:
- text_far _CeladonHouseText1
+CeladonChiefHouseChiefText:
+ text_far _CeladonChiefHouseChiefText
text_end
-CeladonHouseText2:
- text_far _CeladonHouseText2
+CeladonChiefHouseRocketText:
+ text_far _CeladonChiefHouseRocketText
text_end
-CeladonHouseText3:
- text_far _CeladonHouseText3
+CeladonChiefHouseSailorText:
+ text_far _CeladonChiefHouseSailorText
text_end
diff --git a/scripts/CeladonCity.asm b/scripts/CeladonCity.asm
index b6280980..b70a48bf 100644
--- a/scripts/CeladonCity.asm
+++ b/scripts/CeladonCity.asm
@@ -14,129 +14,130 @@ CeladonCityScript1:
ret
CeladonCity_TextPointers:
- dw CeladonCityText1
- dw CeladonCityText2
- dw CeladonCityText3
- dw CeladonCityText4
- dw CeladonCityText5
- dw CeladonCityText6
- dw CeladonCityText7
- dw CeladonCityText8
- dw CeladonCityText9
- dw CeladonCityText10
- dw CeladonCityText11
- dw PokeCenterSignText
- dw CeladonCityText13
- dw CeladonCityText14
- dw CeladonCityText15
- dw CeladonCityText16
- dw CeladonCityText17
- dw CeladonCityText18
+ def_text_pointers
+ dw_const CeladonCityLittleGirlText, TEXT_CELADONCITY_LITTLE_GIRL
+ dw_const CeladonCityGramps1Text, TEXT_CELADONCITY_GRAMPS1
+ dw_const CeladonCityGirlText, TEXT_CELADONCITY_GIRL
+ dw_const CeladonCityGramps2Text, TEXT_CELADONCITY_GRAMPS2
+ dw_const CeladonCityGramps3Text, TEXT_CELADONCITY_GRAMPS3
+ dw_const CeladonCityFisherText, TEXT_CELADONCITY_FISHER
+ dw_const CeladonCityPoliwrathText, TEXT_CELADONCITY_POLIWRATH
+ dw_const CeladonCityRocket1Text, TEXT_CELADONCITY_ROCKET1
+ dw_const CeladonCityRocket2Text, TEXT_CELADONCITY_ROCKET2
+ dw_const CeladonCityTrainerTips1Text, TEXT_CELADONCITY_TRAINER_TIPS1
+ dw_const CeladonCitySignText, TEXT_CELADONCITY_SIGN
+ dw_const PokeCenterSignText, TEXT_CELADONCITY_POKECENTER_SIGN
+ dw_const CeladonCityGymSignText, TEXT_CELADONCITY_GYM_SIGN
+ dw_const CeladonCityMansionSignText, TEXT_CELADONCITY_MANSION_SIGN
+ dw_const CeladonCityDeptStoreSignText, TEXT_CELADONCITY_DEPTSTORE_SIGN
+ dw_const CeladonCityTrainerTips2Text, TEXT_CELADONCITY_TRAINER_TIPS2
+ dw_const CeladonCityPrizeExchangeSignText, TEXT_CELADONCITY_PRIZEEXCHANGE_SIGN
+ dw_const CeladonCityGameCornerSignText, TEXT_CELADONCITY_GAMECORNER_SIGN
-CeladonCityText1:
- text_far _CeladonCityText1
+CeladonCityLittleGirlText:
+ text_far _CeladonCityLittleGirlText
text_end
-CeladonCityText2:
- text_far _CeladonCityText2
+CeladonCityGramps1Text:
+ text_far _CeladonCityGramps1Text
text_end
-CeladonCityText3:
- text_far _CeladonCityText3
+CeladonCityGirlText:
+ text_far _CeladonCityGirlText
text_end
-CeladonCityText4:
- text_far _CeladonCityText4
+CeladonCityGramps2Text:
+ text_far _CeladonCityGramps2Text
text_end
-CeladonCityText5:
+CeladonCityGramps3Text:
text_asm
CheckEvent EVENT_GOT_TM41
- jr nz, .asm_7053f
- ld hl, TM41PreText
+ jr nz, .gotTM41
+ ld hl, .Text
call PrintText
lb bc, TM_SOFTBOILED, 1
call GiveItem
jr c, .Success
- ld hl, TM41NoRoomText
+ ld hl, .TM41NoRoomText
call PrintText
jr .Done
.Success
- ld hl, ReceivedTM41Text
+ ld hl, .ReceivedTM41Text
call PrintText
SetEvent EVENT_GOT_TM41
jr .Done
-.asm_7053f
- ld hl, TM41ExplanationText
+.gotTM41
+ ld hl, .TM41ExplanationText
call PrintText
.Done
jp TextScriptEnd
-TM41PreText:
- text_far _TM41PreText
+.Text:
+ text_far _CeladonCityGramps3Text
text_end
-ReceivedTM41Text:
- text_far _ReceivedTM41Text
+.ReceivedTM41Text:
+ text_far _CeladonCityGramps3ReceivedTM41Text
sound_get_item_1
text_end
-TM41ExplanationText:
- text_far _TM41ExplanationText
+.TM41ExplanationText:
+ text_far _CeladonCityGramps3TM41ExplanationText
text_end
-TM41NoRoomText:
- text_far _TM41NoRoomText
+.TM41NoRoomText:
+ text_far _CeladonCityGramps3TM41NoRoomText
text_end
-CeladonCityText6:
- text_far _CeladonCityText6
+CeladonCityFisherText:
+ text_far _CeladonCityFisherText
text_end
-CeladonCityText7:
- text_far _CeladonCityText7
+CeladonCityPoliwrathText:
+ text_far _CeladonCityPoliwrathText
text_asm
ld a, POLIWRATH
call PlayCry
jp TextScriptEnd
-CeladonCityText8:
- text_far _CeladonCityText8
+CeladonCityRocket1Text:
+ text_far _CeladonCityRocket1Text
text_end
-CeladonCityText9:
- text_far _CeladonCityText9
+CeladonCityRocket2Text:
+ text_far _CeladonCityRocket2Text
text_end
-CeladonCityText10:
+CeladonCityTrainerTips1Text:
text_asm
- farcall Func_f1ac6
+ farcall CeladonCityPrintTrainerTips1Text
jp TextScriptEnd
-CeladonCityText11:
- text_far _CeladonCityText11
+CeladonCitySignText:
+ text_far _CeladonCitySignText
text_end
-CeladonCityText13:
- text_far _CeladonCityText13
+CeladonCityGymSignText:
+ text_far _CeladonCityGymSignText
text_end
-CeladonCityText14:
- text_far _CeladonCityText14
+CeladonCityMansionSignText:
+ text_far _CeladonCityMansionSignText
text_end
-CeladonCityText15:
- text_far _CeladonCityText15
+CeladonCityDeptStoreSignText:
+ text_far _CeladonCityDeptStoreSignText
text_end
-CeladonCityText16:
- text_far _CeladonCityText16
+CeladonCityTrainerTips2Text:
+ text_far _CeladonCityTrainerTips2Text
text_end
-CeladonCityText17:
- text_far _CeladonCityText17
+CeladonCityPrizeExchangeSignText:
+ text_far _CeladonCityPrizeExchangeSignText
text_end
-CeladonCityText18:
- text_far _CeladonCityText18
+CeladonCityGameCornerSignText:
+ text_far _CeladonCityGameCornerSignText
text_end
diff --git a/scripts/CeladonCity2.asm b/scripts/CeladonCity2.asm
deleted file mode 100644
index 56824c9a..00000000
--- a/scripts/CeladonCity2.asm
+++ /dev/null
@@ -1,8 +0,0 @@
-Func_f1ac6::
- ld hl, Text_f1acd
- call PrintText
- ret
-
-Text_f1acd:
- text_far _CeladonCityText10
- text_end
diff --git a/scripts/CeladonCity_2.asm b/scripts/CeladonCity_2.asm
new file mode 100644
index 00000000..d2c1c4a3
--- /dev/null
+++ b/scripts/CeladonCity_2.asm
@@ -0,0 +1,8 @@
+CeladonCityPrintTrainerTips1Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _CeladonCityTrainerTips1Text
+ text_end
diff --git a/scripts/CeladonDiner.asm b/scripts/CeladonDiner.asm
index b4936e75..426d6296 100644
--- a/scripts/CeladonDiner.asm
+++ b/scripts/CeladonDiner.asm
@@ -3,29 +3,30 @@ CeladonDiner_Script:
ret
CeladonDiner_TextPointers:
- dw CeladonDinerText1
- dw CeladonDinerText2
- dw CeladonDinerText3
- dw CeladonDinerText4
- dw CeladonDinerText5
+ def_text_pointers
+ dw_const CeladonDinerCookText, TEXT_CELADONDINER_COOK
+ dw_const CeladonDinerMiddleAgedWomanText, TEXT_CELADONDINER_MIDDLE_AGED_WOMAN
+ dw_const CeladonDinerMiddleAgedManText, TEXT_CELADONDINER_MIDDLE_AGED_MAN
+ dw_const CeladonDinerFisherText, TEXT_CELADONDINER_FISHER
+ dw_const CeladonDinerGymGuideText, TEXT_CELADONDINER_GYM_GUIDE
-CeladonDinerText1:
- text_far _CeladonDinerText1
+CeladonDinerCookText:
+ text_far _CeladonDinerCookText
text_end
-CeladonDinerText2:
- text_far _CeladonDinerText2
+CeladonDinerMiddleAgedWomanText:
+ text_far _CeladonDinerMiddleAgedWomanText
text_end
-CeladonDinerText3:
- text_far _CeladonDinerText3
+CeladonDinerMiddleAgedManText:
+ text_far _CeladonDinerMiddleAgedManText
text_end
-CeladonDinerText4:
- text_far _CeladonDinerText4
+CeladonDinerFisherText:
+ text_far _CeladonDinerFisherText
text_end
-CeladonDinerText5:
+CeladonDinerGymGuideText:
text_asm
- callfar Func_f1f31
+ callfar CeladonDinerPrintGymGuideText
jp TextScriptEnd
diff --git a/scripts/CeladonDiner2.asm b/scripts/CeladonDiner2.asm
deleted file mode 100644
index ceef9f52..00000000
--- a/scripts/CeladonDiner2.asm
+++ /dev/null
@@ -1,38 +0,0 @@
-Func_f1f31::
- CheckEvent EVENT_GOT_COIN_CASE
- jr nz, .got_item
- ld hl, CeladonDinerText_491a7
- call PrintText
- lb bc, COIN_CASE, 1
- call GiveItem
- jr nc, .bag_full
- SetEvent EVENT_GOT_COIN_CASE
- ld hl, ReceivedCoinCaseText
- call PrintText
- jr .done
-.bag_full
- ld hl, CoinCaseNoRoomText
- call PrintText
- jr .done
-.got_item
- ld hl, CeladonDinerText_491b7
- call PrintText
-.done
- ret
-
-CeladonDinerText_491a7:
- text_far _CeladonDinerText_491a7
- text_end
-
-ReceivedCoinCaseText:
- text_far _ReceivedCoinCaseText
- sound_get_key_item
- text_end
-
-CoinCaseNoRoomText:
- text_far _CoinCaseNoRoomText
- text_end
-
-CeladonDinerText_491b7:
- text_far _CeladonDinerText_491b7
- text_end
diff --git a/scripts/CeladonDiner_2.asm b/scripts/CeladonDiner_2.asm
new file mode 100644
index 00000000..28e6f11a
--- /dev/null
+++ b/scripts/CeladonDiner_2.asm
@@ -0,0 +1,38 @@
+CeladonDinerPrintGymGuideText::
+ CheckEvent EVENT_GOT_COIN_CASE
+ jr nz, .got_item
+ ld hl, .ImFlatOutBustedText
+ call PrintText
+ lb bc, COIN_CASE, 1
+ call GiveItem
+ jr nc, .bag_full
+ SetEvent EVENT_GOT_COIN_CASE
+ ld hl, .ReceivedCoinCaseText
+ call PrintText
+ jr .done
+.bag_full
+ ld hl, .CoinCaseNoRoomText
+ call PrintText
+ jr .done
+.got_item
+ ld hl, .WinItBackText
+ call PrintText
+.done
+ ret
+
+.ImFlatOutBustedText:
+ text_far _CeladonDinerGymGuideImFlatOutBustedText
+ text_end
+
+.ReceivedCoinCaseText:
+ text_far _CeladonDinerGymGuideReceivedCoinCaseText
+ sound_get_key_item
+ text_end
+
+.CoinCaseNoRoomText:
+ text_far _CeladonDinerGymGuideCoinCaseNoRoomText
+ text_end
+
+.WinItBackText:
+ text_far _CeladonDinerGymGuideWinItBackText
+ text_end
diff --git a/scripts/CeladonGym.asm b/scripts/CeladonGym.asm
index 2ffa1995..0195d0b9 100644
--- a/scripts/CeladonGym.asm
+++ b/scripts/CeladonGym.asm
@@ -23,40 +23,41 @@ CeladonGym_Script:
db "ERIKA@"
CeladonGymResetScripts:
- xor a
+ xor a ; SCRIPT_CELADONGYM_DEFAULT
ld [wJoyIgnore], a
ld [wCeladonGymCurScript], a
ld [wCurMapScript], a
ret
CeladonGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw CeladonGymErikaPostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_CELADONGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_CELADONGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_CELADONGYM_END_BATTLE
+ dw_const CeladonGymErikaPostBattleScript, SCRIPT_CELADONGYM_ERIKA_POST_BATTLE
-CeladonGymErikaPostBattle:
+CeladonGymErikaPostBattleScript:
ld a, [wIsInBattle]
cp $ff
jp z, CeladonGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
CeladonGymReceiveTM21:
- ld a, $9
+ ld a, TEXT_CELADONGYM_RAINBOWBADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_ERIKA
lb bc, TM_MEGA_DRAIN, 1
call GiveItem
jr nc, .BagFull
- ld a, $a
+ ld a, TEXT_CELADONGYM_RECEIVED_TM21
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM21
jr .gymVictory
.BagFull
- ld a, $b
+ ld a, TEXT_CELADONGYM_TM21_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -71,17 +72,18 @@ CeladonGymReceiveTM21:
jp CeladonGymResetScripts
CeladonGym_TextPointers:
- dw ErikaText
- dw CeladonGymTrainerText1
- dw CeladonGymTrainerText2
- dw CeladonGymTrainerText3
- dw CeladonGymTrainerText4
- dw CeladonGymTrainerText5
- dw CeladonGymTrainerText6
- dw CeladonGymTrainerText7
- dw ErikaRainbowBadgeInfoText
- dw ReceivedTM21Text
- dw TM21NoRoomText
+ def_text_pointers
+ dw_const CeladonGymErikaText, TEXT_CELADONGYM_ERIKA
+ dw_const CeladonGymCooltrainerF1Text, TEXT_CELADONGYM_COOLTRAINER_F1
+ dw_const CeladonGymBeauty1Text, TEXT_CELADONGYM_BEAUTY1
+ dw_const CeladonGymCooltrainerF2Text, TEXT_CELADONGYM_COOLTRAINER_F2
+ dw_const CeladonGymBeauty2Text, TEXT_CELADONGYM_BEAUTY2
+ dw_const CeladonGymCooltrainerF3Text, TEXT_CELADONGYM_COOLTRAINER_F3
+ dw_const CeladonGymBeauty3Text, TEXT_CELADONGYM_BEAUTY3
+ dw_const CeladonGymCooltrainerF4Text, TEXT_CELADONGYM_COOLTRAINER_F4
+ dw_const CeladonGymRainbowBadgeInfoText, TEXT_CELADONGYM_RAINBOWBADGE_INFO
+ dw_const CeladonGymReceivedTM21Text, TEXT_CELADONGYM_RECEIVED_TM21
+ dw_const CeladonGymTM21NoRoomText, TEXT_CELADONGYM_TM21_NO_ROOM
CeladonGymTrainerHeaders:
def_trainers 2
@@ -101,7 +103,7 @@ CeladonGymTrainerHeader6:
trainer EVENT_BEAT_CELADON_GYM_TRAINER_6, 3, CeladonGymBattleText8, CeladonGymEndBattleText8, CeladonGymAfterBattleText8
db -1 ; end
-ErikaText:
+CeladonGymErikaText:
text_asm
CheckEvent EVENT_BEAT_ERIKA
jr z, .beforeBeat
@@ -111,17 +113,17 @@ ErikaText:
call DisableWaitingAfterTextDisplay
jr .done
.afterBeat
- ld hl, ErikaPostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
jr .done
.beforeBeat
- ld hl, ErikaPreBattleText
+ ld hl, .PreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedRainbowBadgeText
- ld de, ReceivedRainbowBadgeText
+ ld hl, .ReceivedRainbowBadgeText
+ ld de, .ReceivedRainbowBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -129,39 +131,39 @@ ErikaText:
call InitBattleEnemyParameters
ld a, $4
ld [wGymLeaderNo], a
- ld a, $3
+ ld a, SCRIPT_CELADONGYM_ERIKA_POST_BATTLE
ld [wCeladonGymCurScript], a
ld [wCurMapScript], a
.done
jp TextScriptEnd
-ErikaPreBattleText:
- text_far _ErikaPreBattleText
+.PreBattleText:
+ text_far _CeladonGymErikaPreBattleText
text_end
-ReceivedRainbowBadgeText:
- text_far _ReceivedRainbowBadgeText
+.ReceivedRainbowBadgeText:
+ text_far _CeladonGymErikaReceivedRainbowBadgeText
text_end
-ErikaPostBattleAdviceText:
- text_far _ErikaPostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _CeladonGymErikaPostBattleAdviceText
text_end
-ErikaRainbowBadgeInfoText:
- text_far _ErikaRainbowBadgeInfoText
+CeladonGymRainbowBadgeInfoText:
+ text_far _CeladonGymRainbowBadgeInfoText
text_end
-ReceivedTM21Text:
- text_far _ReceivedTM21Text
+CeladonGymReceivedTM21Text:
+ text_far _CeladonGymReceivedTM21Text
sound_get_item_1
text_far _TM21ExplanationText
text_end
-TM21NoRoomText:
- text_far _TM21NoRoomText
+CeladonGymTM21NoRoomText:
+ text_far _CeladonGymTM21NoRoomText
text_end
-CeladonGymTrainerText1:
+CeladonGymCooltrainerF1Text:
text_asm
ld hl, CeladonGymTrainerHeader0
call TalkToTrainer
@@ -179,7 +181,7 @@ CeladonGymAfterBattleText2:
text_far _CeladonGymAfterBattleText2
text_end
-CeladonGymTrainerText2:
+CeladonGymBeauty1Text:
text_asm
ld hl, CeladonGymTrainerHeader1
call TalkToTrainer
@@ -197,7 +199,7 @@ CeladonGymAfterBattleText3:
text_far _CeladonGymAfterBattleText3
text_end
-CeladonGymTrainerText3:
+CeladonGymCooltrainerF2Text:
text_asm
ld hl, CeladonGymTrainerHeader2
call TalkToTrainer
@@ -215,7 +217,7 @@ CeladonGymAfterBattleText4:
text_far _CeladonGymAfterBattleText4
text_end
-CeladonGymTrainerText4:
+CeladonGymBeauty2Text:
text_asm
ld hl, CeladonGymTrainerHeader3
call TalkToTrainer
@@ -233,7 +235,7 @@ CeladonGymAfterBattleText5:
text_far _CeladonGymAfterBattleText5
text_end
-CeladonGymTrainerText5:
+CeladonGymCooltrainerF3Text:
text_asm
ld hl, CeladonGymTrainerHeader4
call TalkToTrainer
@@ -251,7 +253,7 @@ CeladonGymAfterBattleText6:
text_far _CeladonGymAfterBattleText6
text_end
-CeladonGymTrainerText6:
+CeladonGymBeauty3Text:
text_asm
ld hl, CeladonGymTrainerHeader5
call TalkToTrainer
@@ -269,7 +271,7 @@ CeladonGymAfterBattleText7:
text_far _CeladonGymAfterBattleText7
text_end
-CeladonGymTrainerText7:
+CeladonGymCooltrainerF4Text:
text_asm
ld hl, CeladonGymTrainerHeader6
call TalkToTrainer
diff --git a/scripts/CeladonHotel.asm b/scripts/CeladonHotel.asm
index 2cdd95b0..1bb90965 100644
--- a/scripts/CeladonHotel.asm
+++ b/scripts/CeladonHotel.asm
@@ -2,18 +2,19 @@ CeladonHotel_Script:
jp EnableAutoTextBoxDrawing
CeladonHotel_TextPointers:
- dw CeladonHotelText1
- dw CeladonHotelText2
- dw CeladonHotelText3
+ def_text_pointers
+ dw_const CeladonHotelGrannyText, TEXT_CELADONHOTEL_GRANNY
+ dw_const CeladonHotelBeautyText, TEXT_CELADONHOTEL_BEAUTY
+ dw_const CeladonHotelSuperNerdText, TEXT_CELADONHOTEL_SUPER_NERD
-CeladonHotelText1:
- text_far _CeladonHotelText1
+CeladonHotelGrannyText:
+ text_far _CeladonHotelGrannyText
text_end
-CeladonHotelText2:
- text_far _CeladonHotelText2
+CeladonHotelBeautyText:
+ text_far _CeladonHotelBeautyText
text_end
-CeladonHotelText3:
- text_far _CeladonHotelText3
+CeladonHotelSuperNerdText:
+ text_far _CeladonHotelSuperNerdText
text_end
diff --git a/scripts/CeladonMansion1F.asm b/scripts/CeladonMansion1F.asm
index 61d53da7..ca276973 100644
--- a/scripts/CeladonMansion1F.asm
+++ b/scripts/CeladonMansion1F.asm
@@ -3,22 +3,23 @@ CeladonMansion1F_Script:
ret
CeladonMansion1F_TextPointers:
- dw CeladonMansion1Text1
- dw CeladonMansion1Text2
- dw CeladonMansion1Text3
- dw CeladonMansion1Text4
- dw CeladonMansion1Text5
+ def_text_pointers
+ dw_const CeladonMansion1FMeowthText, TEXT_CELADONMANSION1F_MEOWTH
+ dw_const CeladonMansion1FGrannyText, TEXT_CELADONMANSION1F_GRANNY
+ dw_const CeladonMansion1FClefairyText, TEXT_CELADONMANSION1F_CLEFAIRY
+ dw_const CeladonMansion1FNidoranFText, TEXT_CELADONMANSION1F_NIDORANF
+ dw_const CeladonMansion1FManagersSuiteSignText, TEXT_CELADONMANSION1F_MANAGERS_SUITE_SIGN
-CeladonMansion1Text1:
- text_far _CeladonMansion1Text1
+CeladonMansion1FMeowthText:
+ text_far _CeladonMansion1FMeowthText
text_asm
ld a, MEOWTH
call PlayCry
jp TextScriptEnd
-CeladonMansion1Text2:
+CeladonMansion1FGrannyText:
text_asm
- farcall Func_f1e70
+ farcall CeladonMansion1FPrintGrannyText
ld a, [wPikachuHappiness]
cp 251
jr c, .asm_485d9
@@ -29,20 +30,20 @@ CeladonMansion1Text2:
.asm_485d9
jp TextScriptEnd
-CeladonMansion1Text3:
- text_far _CeladonMansion1Text3
+CeladonMansion1FClefairyText:
+ text_far _CeladonMansion1FClefairyText
text_asm
ld a, CLEFAIRY
call PlayCry
jp TextScriptEnd
-CeladonMansion1Text4:
- text_far _CeladonMansion1Text4
+CeladonMansion1FNidoranFText:
+ text_far _CeladonMansion1FNidoranFText
text_asm
ld a, NIDORAN_F
call PlayCry
jp TextScriptEnd
-CeladonMansion1Text5:
- text_far _CeladonMansion1Text5
+CeladonMansion1FManagersSuiteSignText:
+ text_far _CeladonMansion1FManagersSuiteSignText
text_end
diff --git a/scripts/CeladonMansion1F_2.asm b/scripts/CeladonMansion1F_2.asm
index 4cddf268..7fe8409f 100644
--- a/scripts/CeladonMansion1F_2.asm
+++ b/scripts/CeladonMansion1F_2.asm
@@ -1,4 +1,4 @@
-Func_f1e70::
+CeladonMansion1FPrintGrannyText::
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonMansion1Text_f1e96
diff --git a/scripts/CeladonMansion2F.asm b/scripts/CeladonMansion2F.asm
index 8f83e86a..67ec71c4 100644
--- a/scripts/CeladonMansion2F.asm
+++ b/scripts/CeladonMansion2F.asm
@@ -3,8 +3,9 @@ CeladonMansion2F_Script:
ret
CeladonMansion2F_TextPointers:
- dw CeladonMansion2Text1
+ def_text_pointers
+ dw_const CeladonMansion2FMeetingRoomSignText, TEXT_CELADONMANSION2F_MEETING_ROOM_SIGN
-CeladonMansion2Text1:
- text_far _CeladonMansion2Text1
+CeladonMansion2FMeetingRoomSignText:
+ text_far _CeladonMansion2FMeetingRoomSignText
text_end
diff --git a/scripts/CeladonMansion3F.asm b/scripts/CeladonMansion3F.asm
index ae1718a0..824f4883 100644
--- a/scripts/CeladonMansion3F.asm
+++ b/scripts/CeladonMansion3F.asm
@@ -10,16 +10,17 @@ CeladonMansion3_PokedexCount:
ret
CeladonMansion3F_TextPointers:
- dw ProgrammerText
- dw GraphicArtistText
- dw WriterText
- dw DirectorText
- dw GameFreakPCText1
- dw GameFreakPCText2
- dw GameFreakPCText3
- dw GameFreakSignText
+ def_text_pointers
+ dw_const CeladonMansion3FProgrammerText, TEXT_CELADONMANSION3F_PROGRAMMER
+ dw_const CeladonMansion3FGraphicArtistText, TEXT_CELADONMANSION3F_GRAPHIC_ARTIST
+ dw_const CeladonMansion3FWriterText, TEXT_CELADONMANSION3F_WRITER
+ dw_const CeladonMansion3FGameDesignerText, TEXT_CELADONMANSION3F_GAME_DESIGNER
+ dw_const CeladonMansion3FGameProgramPCText, TEXT_CELADONMANSION3F_GAME_PROGRAM_PC
+ dw_const CeladonMansion3FPlayingGamePCText, TEXT_CELADONMANSION3F_PLAYING_GAME_PC
+ dw_const CeladonMansion3FGameScriptPCText, TEXT_CELADONMANSION3F_GAME_SCRIPT_PC
+ dw_const CeladonMansion3FDevRoomSignText, TEXT_CELADONMANSION3F_DEV_ROOM_SIGN
-ProgrammerText:
+CeladonMansion3FProgrammerText:
text_asm
call CeladonMansion3_PokedexCount
cp NUM_POKEMON - 1 ; discount Mew
@@ -31,23 +32,23 @@ ProgrammerText:
jp TextScriptEnd
CeladonMansion3Text_486f0:
- text_far _ProgrammerText
+ text_far _CeladonMansion3FProgrammerText
text_end
CeladonMansion3Text_486f5:
- text_far _ProgrammerText2
+ text_far _CeladonMansion3FProgrammerText2
text_end
-GraphicArtistText:
+CeladonMansion3FGraphicArtistText:
text_asm
call CeladonMansion3_PokedexCount
cp NUM_POKEMON - 1 ; discount Mew
jr nc, .completed
- ld hl, CeladonMansion3Text_48757
+ ld hl, .Text1
jr .print
.completed
- ld hl, CeladonMansion3Text_4875c
+ ld hl, .Text2
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -67,64 +68,64 @@ GraphicArtistText:
call LoadScreenTilesFromBuffer2
call Delay3
call GBPalNormal
- ld hl, CeladonMansion3Text_4876b
+ ld hl, .Text5
ldh a, [hCanceledPrinting]
and a
jr nz, .print
- ld hl, CeladonMansion3Text_48766
+ ld hl, .Text4
jr .print
.declined_print
- ld hl, CeladonMansion3Text_48761
+ ld hl, .Text3
.print
call PrintText
jp TextScriptEnd
-CeladonMansion3Text_48757:
- text_far _GraphicArtistText
+.Text1:
+ text_far _CeladonMansion3FGraphicArtistText
text_end
-CeladonMansion3Text_4875c:
- text_far _GraphicArtistText2
+.Text2:
+ text_far _CeladonMansion3FGraphicArtistText2
text_end
-CeladonMansion3Text_48761:
- text_far _GraphicArtistText3
+.Text3:
+ text_far _CeladonMansion3FGraphicArtistText3
text_end
-CeladonMansion3Text_48766:
- text_far _GraphicArtistText4
+.Text4:
+ text_far _CeladonMansion3FGraphicArtistText4
text_end
-CeladonMansion3Text_4876b:
- text_far _GraphicArtistText5
+.Text5:
+ text_far _CeladonMansion3FGraphicArtistText5
text_end
-WriterText:
+CeladonMansion3FWriterText:
text_asm
call CeladonMansion3_PokedexCount
cp NUM_POKEMON - 1 ; discount Mew
- ld hl, CeladonMansion3Text_48789
+ ld hl, .Text2
jr nc, .print
- ld hl, CeladonMansion3Text_48784
+ ld hl, .Text1
.print
call PrintText
jp TextScriptEnd
-CeladonMansion3Text_48784:
- text_far _WriterText
+.Text1:
+ text_far _CeladonMansion3FWriterText
text_end
-CeladonMansion3Text_48789:
- text_far _WriterText2
+.Text2:
+ text_far _CeladonMansion3FWriterText2
text_end
-DirectorText:
+CeladonMansion3FGameDesignerText:
text_asm
call CeladonMansion3_PokedexCount
cp NUM_POKEMON - 1 ; discount Mew
jr nc, .completed_dex
- ld hl, .GameDesignerText
+ ld hl, .Text
jr .done
.completed_dex
ld hl, .CompletedDexText
@@ -137,12 +138,12 @@ DirectorText:
call PrintText
jp TextScriptEnd
-.GameDesignerText:
- text_far _GameDesignerText
+.Text:
+ text_far _CeladonMansion3FGameDesignerText
text_end
.CompletedDexText:
- text_far _CompletedDexText
+ text_far _CeladonMansion3FGameDesignerCompletedDexText
text_promptbutton
text_asm
callfar DisplayDiploma
@@ -151,25 +152,25 @@ DirectorText:
jp TextScriptEnd
.UnlockedDiplomaPrinting
- text_far _CompletedDexText2
+ text_far _CeladonMansion3FGameDesignerCompletedDexText2
text_end
-GameFreakPCText1:
+CeladonMansion3FGameProgramPCText:
text_asm
- farcall Func_f1ef3
+ farcall CeladonMansion3FPrintGameProgramPCText
jp TextScriptEnd
-GameFreakPCText2:
+CeladonMansion3FPlayingGamePCText:
text_asm
- farcall Func_f1eff
+ farcall CeladonMansion3FPrintPlayingGamePCText
jp TextScriptEnd
-GameFreakPCText3:
+CeladonMansion3FGameScriptPCText:
text_asm
- farcall Func_f1f0b
+ farcall CeladonMansion3FPrintGameScriptPCText
jp TextScriptEnd
-GameFreakSignText:
+CeladonMansion3FDevRoomSignText:
text_asm
- farcall Func_f1f17
+ farcall CeladonMansion3FPrintDevRoomSignText
jp TextScriptEnd
diff --git a/scripts/CeladonMansion3F_2.asm b/scripts/CeladonMansion3F_2.asm
index f0b7c395..cfb18988 100644
--- a/scripts/CeladonMansion3F_2.asm
+++ b/scripts/CeladonMansion3F_2.asm
@@ -1,35 +1,35 @@
-Func_f1ef3::
- ld hl, CeladonMansion3Text_f1efa
+CeladonMansion3FPrintGameProgramPCText::
+ ld hl, .text
call PrintText
ret
-CeladonMansion3Text_f1efa:
- text_far _CeladonMansion3Text5
+.text
+ text_far _CeladonMansion3FGameProgramPCText
text_end
-Func_f1eff::
- ld hl, CeladonMansion3Text_f1f06
+CeladonMansion3FPrintPlayingGamePCText::
+ ld hl, .text
call PrintText
ret
-CeladonMansion3Text_f1f06:
- text_far _CeladonMansion3Text6
+.text
+ text_far _CeladonMansion3FPlayingGamePCText
text_end
-Func_f1f0b::
- ld hl, CeladonMansion3Text_f1f12
+CeladonMansion3FPrintGameScriptPCText::
+ ld hl, .text
call PrintText
ret
-CeladonMansion3Text_f1f12:
- text_far _CeladonMansion3Text7
+.text
+ text_far _CeladonMansion3FGameScriptPCText
text_end
-Func_f1f17::
- ld hl, CeladonMansion3Text_f1f1e
+CeladonMansion3FPrintDevRoomSignText::
+ ld hl, .text
call PrintText
ret
-CeladonMansion3Text_f1f1e:
- text_far _CeladonMansion3Text8
+.text
+ text_far _CeladonMansion3FDevRoomSignText
text_end
diff --git a/scripts/CeladonMansionRoof.asm b/scripts/CeladonMansionRoof.asm
index 47c093dd..f55bfa92 100644
--- a/scripts/CeladonMansionRoof.asm
+++ b/scripts/CeladonMansionRoof.asm
@@ -3,8 +3,9 @@ CeladonMansionRoof_Script:
ret
CeladonMansionRoof_TextPointers:
- dw CeladonMansion4Text1
+ def_text_pointers
+ dw_const CeladonMansionRoofHouseSignText, TEXT_CELADONMANSIONROOF_HOUSE_SIGN
-CeladonMansion4Text1:
- text_far _CeladonMansion4Text1
+CeladonMansionRoofHouseSignText:
+ text_far _CeladonMansionRoofHouseSignText
text_end
diff --git a/scripts/CeladonMansionRoofHouse.asm b/scripts/CeladonMansionRoofHouse.asm
index 3b7e3914..e71d14d5 100644
--- a/scripts/CeladonMansionRoofHouse.asm
+++ b/scripts/CeladonMansionRoofHouse.asm
@@ -3,14 +3,15 @@ CeladonMansionRoofHouse_Script:
ret
CeladonMansionRoofHouse_TextPointers:
- dw CeladonMansion5Text1
- dw CeladonMansion5Text2
+ def_text_pointers
+ dw_const CeladonMansionRoofHouseHikerText, TEXT_CELADONMANSION_ROOF_HOUSE_HIKER
+ dw_const CeladonMansionRoofHouseEeveePokeballText, TEXT_CELADONMANSION_ROOF_HOUSE_EEVEE_POKEBALL
-CeladonMansion5Text1:
- text_far _CeladonMansion5Text1
+CeladonMansionRoofHouseHikerText:
+ text_far _CeladonMansionRoofHouseHikerText
text_end
-CeladonMansion5Text2:
+CeladonMansionRoofHouseEeveePokeballText:
text_asm
lb bc, EEVEE, 25
call GivePokemon
diff --git a/scripts/CeladonMart1F.asm b/scripts/CeladonMart1F.asm
index 54176e01..72b99423 100644
--- a/scripts/CeladonMart1F.asm
+++ b/scripts/CeladonMart1F.asm
@@ -3,18 +3,19 @@ CeladonMart1F_Script:
ret
CeladonMart1F_TextPointers:
- dw CeladonMart1Text1
- dw CeladonMart1Text2
- dw CeladonMart1Text3
+ def_text_pointers
+ dw_const CeladonMart1FReceptionistText, TEXT_CELADONMART1F_RECEPTIONIST
+ dw_const CeladonMart1FDirectorySignText, TEXT_CELADONMART1F_DIRECTORY_SIGN
+ dw_const CeladonMart1FCurrentFloorSignText, TEXT_CELADONMART1F_CURRENT_FLOOR_SIGN
-CeladonMart1Text1:
- text_far _CeladonMart1Text1
+CeladonMart1FReceptionistText:
+ text_far _CeladonMart1FReceptionistText
text_end
-CeladonMart1Text2:
- text_far _CeladonMart1Text2
+CeladonMart1FDirectorySignText:
+ text_far _CeladonMart1FDirectorySignText
text_end
-CeladonMart1Text3:
- text_far _CeladonMart1Text3
+CeladonMart1FCurrentFloorSignText:
+ text_far _CeladonMart1FCurrentFloorSignText
text_end
diff --git a/scripts/CeladonMart2F.asm b/scripts/CeladonMart2F.asm
index 11827128..fc17424e 100644
--- a/scripts/CeladonMart2F.asm
+++ b/scripts/CeladonMart2F.asm
@@ -2,20 +2,21 @@ CeladonMart2F_Script:
jp EnableAutoTextBoxDrawing
CeladonMart2F_TextPointers:
- dw CeladonMart2Clerk1Text
- dw CeladonMart2Clerk2Text
- dw CeladonMart2Text3
- dw CeladonMart2Text4
- dw CeladonMart2Text5
+ def_text_pointers
+ dw_const CeladonMart2FClerk1Text, TEXT_CELADONMART2F_CLERK1
+ dw_const CeladonMart2FClerk2Text, TEXT_CELADONMART2F_CLERK2
+ dw_const CeladonMart2FMiddleAgedManText, TEXT_CELADONMART2F_MIDDLE_AGED_MAN
+ dw_const CeladonMart2FGirlText, TEXT_CELADONMART2F_GIRL
+ dw_const CeladonMart2FCurrentFloorSignText, TEXT_CELADONMART2F_CURRENT_FLOOR_SIGN
-CeladonMart2Text3:
- text_far _CeladonMart2Text3
+CeladonMart2FMiddleAgedManText:
+ text_far _CeladonMart2FMiddleAgedManText
text_end
-CeladonMart2Text4:
- text_far _CeladonMart2Text4
+CeladonMart2FGirlText:
+ text_far _CeladonMart2FGirlText
text_end
-CeladonMart2Text5:
- text_far _CeladonMart2Text5
+CeladonMart2FCurrentFloorSignText:
+ text_far _CeladonMart2FCurrentFloorSignText
text_end
diff --git a/scripts/CeladonMart3F.asm b/scripts/CeladonMart3F.asm
index 01ab73ce..0c277d57 100644
--- a/scripts/CeladonMart3F.asm
+++ b/scripts/CeladonMart3F.asm
@@ -2,74 +2,70 @@ CeladonMart3F_Script:
jp EnableAutoTextBoxDrawing
CeladonMart3F_TextPointers:
- dw CeladonMart3Text1
- dw CeladonMart3Text2
- dw CeladonMart3Text3
- dw CeladonMart3Text4
- dw CeladonMart3Text5
- dw CeladonMart3Text6
- dw CeladonMart3Text7
- dw CeladonMart3Text8
- dw CeladonMart3Text9
- dw CeladonMart3Text10
- dw CeladonMart3Text11
- dw CeladonMart3Text12
- dw CeladonMart3Text13
- dw CeladonMart3Text14
- dw CeladonMart3Text15
- dw CeladonMart3Text16
- dw CeladonMart3Text17
+ def_text_pointers
+ dw_const CeladonMart3FClerkText, TEXT_CELADONMART3F_CLERK
+ dw_const CeladonMart3FGameBoyKid1Text, TEXT_CELADONMART3F_GAMEBOY_KID1
+ dw_const CeladonMart3FGameBoyKid2Text, TEXT_CELADONMART3F_GAMEBOY_KID2
+ dw_const CeladonMart3FGameBoyKid3Text, TEXT_CELADONMART3F_GAMEBOY_KID3
+ dw_const CeladonMart3FLittleBoyText, TEXT_CELADONMART3F_LITTLE_BOY
+ dw_const CeladonMart3FSNESText, TEXT_CELADONMART3F_SNES1
+ dw_const CeladonMart3FRPGText, TEXT_CELADONMART3F_RPG
+ dw_const CeladonMart3FSNESText, TEXT_CELADONMART3F_SNES2
+ dw_const CeladonMart3FSportsGameText, TEXT_CELADONMART3F_SPORTS_GAME
+ dw_const CeladonMart3FSNESText, TEXT_CELADONMART3F_SNES3
+ dw_const CeladonMart3FPuzzleGameText, TEXT_CELADONMART3F_PUZZLE_GAME
+ dw_const CeladonMart3FSNESText, TEXT_CELADONMART3F_SNES4
+ dw_const CeladonMart3FFightingGameText, TEXT_CELADONMART3F_FIGHTING_GAME
+ dw_const CeladonMart3FCurrentFloorSignText, TEXT_CELADONMART3F_CURRENT_FLOOR_SIGN
+ dw_const CeladonMart3FPokemonPosterText, TEXT_CELADONMART3F_POKEMON_POSTER1
+ dw_const CeladonMart3FPokemonPosterText, TEXT_CELADONMART3F_POKEMON_POSTER2
+ dw_const CeladonMart3FPokemonPosterText, TEXT_CELADONMART3F_POKEMON_POSTER3
-CeladonMart3Text1:
+CeladonMart3FClerkText:
text_asm
- callfar Func_f1e30
+ callfar CeladonMart3FPrintClerkText
jp TextScriptEnd
-CeladonMart3Text2:
- text_far _CeladonMart3Text2
+CeladonMart3FGameBoyKid1Text:
+ text_far _CeladonMart3FGameBoyKid1Text
text_end
-CeladonMart3Text3:
- text_far _CeladonMart3Text3
+CeladonMart3FGameBoyKid2Text:
+ text_far _CeladonMart3FGameBoyKid2Text
text_end
-CeladonMart3Text4:
- text_far _CeladonMart3Text4
+CeladonMart3FGameBoyKid3Text:
+ text_far _CeladonMart3FGameBoyKid3Text
text_end
-CeladonMart3Text5:
- text_far _CeladonMart3Text5
+CeladonMart3FLittleBoyText:
+ text_far _CeladonMart3FLittleBoyText
text_end
-CeladonMart3Text12:
-CeladonMart3Text10:
-CeladonMart3Text8:
-CeladonMart3Text6:
- text_far _CeladonMart3Text6
+CeladonMart3FSNESText:
+ text_far _CeladonMart3FSNESText
text_end
-CeladonMart3Text7:
- text_far _CeladonMart3Text7
+CeladonMart3FRPGText:
+ text_far _CeladonMart3FRPGText
text_end
-CeladonMart3Text9:
- text_far _CeladonMart3Text9
+CeladonMart3FSportsGameText:
+ text_far _CeladonMart3FSportsGameText
text_end
-CeladonMart3Text11:
- text_far _CeladonMart3Text11
+CeladonMart3FPuzzleGameText:
+ text_far _CeladonMart3FPuzzleGameText
text_end
-CeladonMart3Text13:
- text_far _CeladonMart3Text13
+CeladonMart3FFightingGameText:
+ text_far _CeladonMart3FFightingGameText
text_end
-CeladonMart3Text14:
- text_far _CeladonMart3Text14
+CeladonMart3FCurrentFloorSignText:
+ text_far _CeladonMart3FCurrentFloorSignText
text_end
-CeladonMart3Text17:
-CeladonMart3Text16:
-CeladonMart3Text15:
- text_far _CeladonMart3Text15
+CeladonMart3FPokemonPosterText:
+ text_far _CeladonMart3FPokemonPosterText
text_end
diff --git a/scripts/CeladonMart3F_2.asm b/scripts/CeladonMart3F_2.asm
index 239f84d1..81c219e4 100644
--- a/scripts/CeladonMart3F_2.asm
+++ b/scripts/CeladonMart3F_2.asm
@@ -1,36 +1,36 @@
-Func_f1e30::
+CeladonMart3FPrintClerkText::
CheckEvent EVENT_GOT_TM18
jr nz, .got_item
- ld hl, TM18PreReceiveText
+ ld hl, .TM18PreReceiveText
call PrintText
lb bc, TM_COUNTER, 1
call GiveItem
jr nc, .bag_full
SetEvent EVENT_GOT_TM18
- ld hl, ReceivedTM18Text
+ ld hl, .ReceivedTM18Text
jr .done
.bag_full
- ld hl, TM18NoRoomText
+ ld hl, .TM18NoRoomText
jr .done
.got_item
- ld hl, TM18ExplanationText
+ ld hl, .TM18ExplanationText
.done
call PrintText
ret
-TM18PreReceiveText:
- text_far _TM18PreReceiveText
+.TM18PreReceiveText:
+ text_far _CeladonMart3FClerkTM18PreReceiveText
text_end
-ReceivedTM18Text:
- text_far _ReceivedTM18Text
+.ReceivedTM18Text:
+ text_far _CeladonMart3FClerkReceivedTM18Text
sound_get_item_1
text_end
-TM18ExplanationText:
- text_far _TM18ExplanationText
+.TM18ExplanationText:
+ text_far _CeladonMart3FClerkTM18ExplanationText
text_end
-TM18NoRoomText:
- text_far _TM18NoRoomText
+.TM18NoRoomText:
+ text_far _CeladonMart3FClerkTM18NoRoomText
text_end
diff --git a/scripts/CeladonMart4F.asm b/scripts/CeladonMart4F.asm
index 1365dd0d..13a98cbe 100644
--- a/scripts/CeladonMart4F.asm
+++ b/scripts/CeladonMart4F.asm
@@ -2,19 +2,20 @@ CeladonMart4F_Script:
jp EnableAutoTextBoxDrawing
CeladonMart4F_TextPointers:
- dw CeladonMart4ClerkText
- dw CeladonMart4Text2
- dw CeladonMart4Text3
- dw CeladonMart4Text4
+ def_text_pointers
+ dw_const CeladonMart4FClerkText, TEXT_CELADONMART4F_CLERK
+ dw_const CeladonMart4FSuperNerdText, TEXT_CELADONMART4F_SUPER_NERD
+ dw_const CeladonMart4FYoungsterText, TEXT_CELADONMART4F_YOUNGSTER
+ dw_const CeladonMart4FCurrentFloorSignText, TEXT_CELADONMART4F_CURRENT_FLOOR_SIGN
-CeladonMart4Text2:
- text_far _CeladonMart4Text2
+CeladonMart4FSuperNerdText:
+ text_far _CeladonMart4FSuperNerdText
text_end
-CeladonMart4Text3:
- text_far _CeladonMart4Text3
+CeladonMart4FYoungsterText:
+ text_far _CeladonMart4FYoungsterText
text_end
-CeladonMart4Text4:
- text_far _CeladonMart4Text4
+CeladonMart4FCurrentFloorSignText:
+ text_far _CeladonMart4FCurrentFloorSignText
text_end
diff --git a/scripts/CeladonMart5F.asm b/scripts/CeladonMart5F.asm
index a6e97405..ae79297d 100644
--- a/scripts/CeladonMart5F.asm
+++ b/scripts/CeladonMart5F.asm
@@ -3,20 +3,21 @@ CeladonMart5F_Script:
ret
CeladonMart5F_TextPointers:
- dw CeladonMart5Text1
- dw CeladonMart5Text2
- dw CeladonMart5Clerk1Text
- dw CeladonMart5Clerk2Text
- dw CeladonMart5Text5
+ def_text_pointers
+ dw_const CeladonMart5FGentlemanText, TEXT_CELADONMART5F_GENTLEMAN
+ dw_const CeladonMart5FSailorText, TEXT_CELADONMART5F_SAILOR
+ dw_const CeladonMart5FClerk1Text, TEXT_CELADONMART5F_CLERK1
+ dw_const CeladonMart5FClerk2Text, TEXT_CELADONMART5F_CLERK2
+ dw_const CeladonMart5FCurrentFloorSignText, TEXT_CELADONMART5F_CURRENT_FLOOR_SIGN
-CeladonMart5Text1:
- text_far _CeladonMart5Text1
+CeladonMart5FGentlemanText:
+ text_far _CeladonMart5FGentlemanText
text_end
-CeladonMart5Text2:
- text_far _CeladonMart5Text2
+CeladonMart5FSailorText:
+ text_far _CeladonMart5FSailorText
text_end
-CeladonMart5Text5:
- text_far _CeladonMart5Text5
+CeladonMart5FCurrentFloorSignText:
+ text_far _CeladonMart5FCurrentFloorSignText
text_end
diff --git a/scripts/CeladonMartElevator.asm b/scripts/CeladonMartElevator.asm
index b657b3f9..9a2842f3 100644
--- a/scripts/CeladonMartElevator.asm
+++ b/scripts/CeladonMartElevator.asm
@@ -3,26 +3,26 @@ CeladonMartElevator_Script:
bit 5, [hl]
res 5, [hl]
push hl
- call nz, CeladonMartElevatorScript_4861c
+ call nz, CeladonMartElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
- call nz, CeladonMartElevatorScript_48654
+ call nz, CeladonMartElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a
inc a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ret
-CeladonMartElevatorScript_4861c:
+CeladonMartElevatorStoreWarpEntriesScript:
ld hl, wWarpEntries
ld a, [wWarpedFromWhichWarp]
ld b, a
ld a, [wWarpedFromWhichMap]
ld c, a
- call CeladonMartElevatorScript_4862a
-
-CeladonMartElevatorScript_4862a:
+ call .StoreWarpEntry
+ ; fallthrough
+.StoreWarpEntry:
inc hl
inc hl
ld a, b
@@ -31,12 +31,12 @@ CeladonMartElevatorScript_4862a:
ld [hli], a
ret
-CeladonMartElevatorScript_48631:
+CeladonMartElevatorCopyWarpMapsScript:
ld hl, CeladonMartElevatorFloors
call LoadItemList
ld hl, CeladonMartElevatorWarpMaps
ld de, wElevatorWarpMaps
- ld bc, CeladonMartElevatorWarpMapsEnd - CeladonMartElevatorWarpMaps
+ ld bc, CeladonMartElevatorWarpMaps.End - CeladonMartElevatorWarpMaps
jp CopyData
CeladonMartElevatorFloors:
@@ -56,17 +56,18 @@ CeladonMartElevatorWarpMaps:
db 2, CELADON_MART_3F
db 2, CELADON_MART_4F
db 2, CELADON_MART_5F
-CeladonMartElevatorWarpMapsEnd:
+.End:
-CeladonMartElevatorScript_48654:
+CeladonMartElevatorShakeScript:
farjp ShakeElevator
CeladonMartElevator_TextPointers:
- dw CeladonMartElevatorText1
+ def_text_pointers
+ dw_const CeladonMartElevatorText, TEXT_CELADONMARTELEVATOR
-CeladonMartElevatorText1:
+CeladonMartElevatorText:
text_asm
- call CeladonMartElevatorScript_48631
+ call CeladonMartElevatorCopyWarpMapsScript
ld hl, CeladonMartElevatorWarpMaps
predef DisplayElevatorFloorMenu
jp TextScriptEnd
diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm
index 473f5f09..56be937f 100644
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -44,7 +44,7 @@ CeladonMartRoofDrinkList:
CeladonMartRoofScript_GiveDrinkToGirl:
ld hl, wd730
set 6, [hl]
- ld hl, CeladonMartRoofText_484ee
+ ld hl, CeladonMartRoofLittleGirlGiveHerWhichDrinkText
call PrintText
xor a
ld [wCurrentMenuItem], a
@@ -88,48 +88,48 @@ CeladonMartRoofScript_GiveDrinkToGirl:
; gave Lemonade
CheckEvent EVENT_GOT_TM49
jr nz, .alreadyGaveDrink
- ld hl, CeladonMartRoofText_48515
+ ld hl, CeladonMartRoofLittleGirlYayLemonadeText
call PrintText
call RemoveItemByIDBank12
lb bc, TM_TRI_ATTACK, 1
call GiveItem
jr nc, .bagFull
- ld hl, ReceivedTM49Text
+ ld hl, CeladonMartRoofLittleGirlReceivedTM49Text
call PrintText
SetEvent EVENT_GOT_TM49
ret
.gaveSodaPop
CheckEvent EVENT_GOT_TM48
jr nz, .alreadyGaveDrink
- ld hl, CeladonMartRoofText_48504
+ ld hl, CeladonMartRoofLittleGirlYaySodaPopText
call PrintText
call RemoveItemByIDBank12
lb bc, TM_ROCK_SLIDE, 1
call GiveItem
jr nc, .bagFull
- ld hl, CeladonMartRoofText_4850a
+ ld hl, CeladonMartRoofLittleGirlReceivedTM48Text
call PrintText
SetEvent EVENT_GOT_TM48
ret
.gaveFreshWater
CheckEvent EVENT_GOT_TM13
jr nz, .alreadyGaveDrink
- ld hl, CeladonMartRoofText_484f3
+ ld hl, CeladonMartRoofLittleGirlYayFreshWaterText
call PrintText
call RemoveItemByIDBank12
lb bc, TM_ICE_BEAM, 1
call GiveItem
jr nc, .bagFull
- ld hl, CeladonMartRoofText_484f9
+ ld hl, CeladonMartRoofLittleGirlReceivedTM13Text
call PrintText
SetEvent EVENT_GOT_TM13
ret
.bagFull
- ld hl, CeladonMartRoofText_48526
+ ld hl, CeladonMartRoofLittleGirlNoRoomText
call PrintText
ret
.alreadyGaveDrink
- ld hl, CeladonMartRoofText_4852c
+ ld hl, CeladonMartRoofLittleGirlImNotThirstyText
call PrintText
ret
@@ -137,53 +137,53 @@ RemoveItemByIDBank12:
farcall RemoveItemByID
ret
-CeladonMartRoofText_484ee:
- text_far _CeladonMartRoofText_484ee
+CeladonMartRoofLittleGirlGiveHerWhichDrinkText:
+ text_far _CeladonMartRoofLittleGirlGiveHerWhichDrinkText
text_end
-CeladonMartRoofText_484f3:
- text_far _CeladonMartRoofText_484f3
+CeladonMartRoofLittleGirlYayFreshWaterText:
+ text_far _CeladonMartRoofLittleGirlYayFreshWaterText
text_waitbutton
text_end
-CeladonMartRoofText_484f9:
- text_far _CeladonMartRoofText_484f9
+CeladonMartRoofLittleGirlReceivedTM13Text:
+ text_far _CeladonMartRoofLittleGirlReceivedTM13Text
sound_get_item_1
- text_far _CeladonMartRoofText_484fe
+ text_far _CeladonMartRoofLittleGirlTM13ExplanationText
text_waitbutton
text_end
-CeladonMartRoofText_48504:
- text_far _CeladonMartRoofText_48504
+CeladonMartRoofLittleGirlYaySodaPopText:
+ text_far _CeladonMartRoofLittleGirlYaySodaPopText
text_waitbutton
text_end
-CeladonMartRoofText_4850a:
- text_far _CeladonMartRoofText_4850a
+CeladonMartRoofLittleGirlReceivedTM48Text:
+ text_far _CeladonMartRoofLittleGirlReceivedTM48Text
sound_get_item_1
- text_far _CeladonMartRoofText_4850f
+ text_far _CeladonMartRoofLittleGirlTM48ExplanationText
text_waitbutton
text_end
-CeladonMartRoofText_48515:
- text_far _CeladonMartRoofText_48515
+CeladonMartRoofLittleGirlYayLemonadeText:
+ text_far _CeladonMartRoofLittleGirlYayLemonadeText
text_waitbutton
text_end
-ReceivedTM49Text:
- text_far _ReceivedTM49Text
+CeladonMartRoofLittleGirlReceivedTM49Text:
+ text_far _CeladonMartRoofLittleGirlReceivedTM49Text
sound_get_item_1
- text_far _CeladonMartRoofText_48520
+ text_far _CeladonMartRoofLittleGirlTM49ExplanationText
text_waitbutton
text_end
-CeladonMartRoofText_48526:
- text_far _CeladonMartRoofText_48526
+CeladonMartRoofLittleGirlNoRoomText:
+ text_far _CeladonMartRoofLittleGirlNoRoomText
text_waitbutton
text_end
-CeladonMartRoofText_4852c:
- text_far _CeladonMartRoofText_4852c
+CeladonMartRoofLittleGirlImNotThirstyText:
+ text_far _CeladonMartRoofLittleGirlImNotThirstyText
text_waitbutton
text_end
@@ -210,18 +210,19 @@ CeladonMartRoofScript_PrintDrinksInBag:
jr .loop
CeladonMartRoof_TextPointers:
- dw CeladonMartRoofText1
- dw CeladonMartRoofText2
- dw CeladonMartRoofText5
- dw CeladonMartRoofText5
- dw CeladonMartRoofText5
- dw CeladonMartRoofText6
+ def_text_pointers
+ dw_const CeladonMartRoofSuperNerdText, TEXT_CELADONMARTROOF_SUPER_NERD
+ dw_const CeladonMartRoofLittleGirlText, TEXT_CELADONMARTROOF_LITTLE_GIRL
+ dw_const CeladonMartRoofVendingMachineText, TEXT_CELADONMARTROOF_VENDING_MACHINE1
+ dw_const CeladonMartRoofVendingMachineText, TEXT_CELADONMARTROOF_VENDING_MACHINE2
+ dw_const CeladonMartRoofVendingMachineText, TEXT_CELADONMARTROOF_VENDING_MACHINE3
+ dw_const CeladonMartRoofCurrentFloorSignText, TEXT_CELADONMARTROOF_CURRENT_FLOOR_SIGN
-CeladonMartRoofText1:
- text_far _CeladonMartRoofText1
+CeladonMartRoofSuperNerdText:
+ text_far _CeladonMartRoofSuperNerdText
text_end
-CeladonMartRoofText2:
+CeladonMartRoofLittleGirlText:
text_asm
call CeladonMartRoofScript_GetDrinksInBag
ld a, [wFilteredBagItemsCount]
@@ -229,7 +230,7 @@ CeladonMartRoofText2:
jr z, .noDrinksInBag
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, CeladonMartRoofText4
+ ld hl, .GiveHerADrinkText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -238,22 +239,22 @@ CeladonMartRoofText2:
call CeladonMartRoofScript_GiveDrinkToGirl
jr .done
.noDrinksInBag
- ld hl, CeladonMartRoofText3
+ ld hl, .ImThirstyText
call PrintText
.done
jp TextScriptEnd
-CeladonMartRoofText3:
- text_far _CeladonMartRoofText_48598
+.ImThirstyText:
+ text_far _CeladonMartRoofLittleGirlImThirstyText
text_end
-CeladonMartRoofText4:
- text_far _CeladonMartRoofText4
+.GiveHerADrinkText:
+ text_far _CeladonMartRoofLittleGirlGiveHerADrinkText
text_end
-CeladonMartRoofText5:
+CeladonMartRoofVendingMachineText:
script_vending_machine
-CeladonMartRoofText6:
- text_far _CeladonMartRoofText6
+CeladonMartRoofCurrentFloorSignText:
+ text_far _CeladonMartRoofCurrentFloorSignText
text_end
diff --git a/scripts/CeladonPokecenter.asm b/scripts/CeladonPokecenter.asm
index febc21f8..b9d73bc1 100644
--- a/scripts/CeladonPokecenter.asm
+++ b/scripts/CeladonPokecenter.asm
@@ -3,27 +3,28 @@ CeladonPokecenter_Script:
jp EnableAutoTextBoxDrawing
CeladonPokecenter_TextPointers:
- dw CeladonHealNurseText
- dw CeladonPokecenterText2
- dw CeladonPokecenterText3
- dw CeladonTradeNurseText
- dw CeladonPokecenterText5
+ def_text_pointers
+ dw_const CeladonPokecenterNurseText, TEXT_CELADONPOKECENTER_NURSE
+ dw_const CeladonPokecenterGentlemanText, TEXT_CELADONPOKECENTER_GENTLEMAN
+ dw_const CeladonPokecenterBeautyText, TEXT_CELADONPOKECENTER_BEAUTY
+ dw_const CeladonPokecenterLinkReceptionistText, TEXT_CELADONPOKECENTER_LINK_RECEPTIONIST
+ dw_const CeladonPokecenterChanseyText, TEXT_CELADONPOKECENTER_CHANSEY
-CeladonTradeNurseText:
+CeladonPokecenterLinkReceptionistText:
script_cable_club_receptionist
-CeladonHealNurseText:
+CeladonPokecenterNurseText:
script_pokecenter_nurse
-CeladonPokecenterText2:
- text_far _CeladonPokecenterText2
+CeladonPokecenterGentlemanText:
+ text_far _CeladonPokecenterGentlemanText
text_end
-CeladonPokecenterText3:
- text_far _CeladonPokecenterText3
+CeladonPokecenterBeautyText:
+ text_far _CeladonPokecenterBeautyText
text_end
-CeladonPokecenterText5:
+CeladonPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/CeruleanBadgeHouse.asm b/scripts/CeruleanBadgeHouse.asm
index 5e35b079..417198e1 100644
--- a/scripts/CeruleanBadgeHouse.asm
+++ b/scripts/CeruleanBadgeHouse.asm
@@ -6,19 +6,20 @@ CeruleanBadgeHouse_Script:
ret
CeruleanBadgeHouse_TextPointers:
- dw CeruleanHouse2Text1
+ def_text_pointers
+ dw_const CeruleanBadgeHouseMiddleAgedManText, TEXT_CERULEANBADGEHOUSE_MIDDLE_AGED_MAN
-CeruleanHouse2Text1:
+CeruleanBadgeHouseMiddleAgedManText:
text_asm
- ld hl, CeruleanHouse2Text_74e77
+ ld hl, .Text
call PrintText
xor a
ld [wCurrentMenuItem], a
ld [wListScrollOffset], a
-.asm_74e23
- ld hl, CeruleanHouse2Text_74e7c
+.loop
+ ld hl, .WhichBadgeText
call PrintText
- ld hl, BadgeItemList
+ ld hl, .BadgeItemList
call LoadItemList
ld hl, wItemList
ld a, l
@@ -31,8 +32,8 @@ CeruleanHouse2Text1:
ld a, SPECIALLISTMENU
ld [wListMenuID], a
call DisplayListMenuID
- jr c, .asm_74e60
- ld hl, TextPointers_74e86
+ jr c, .done
+ ld hl, CeruleanBadgeHouseBadgeTextPointers
ld a, [wcf91]
sub BOULDERBADGE
add a
@@ -43,16 +44,17 @@ CeruleanHouse2Text1:
ld h, [hl]
ld l, a
call PrintText
- jr .asm_74e23
-.asm_74e60
+ jr .loop
+.done
xor a
ld [wListScrollOffset], a
- ld hl, CeruleanHouse2Text_74e81
+ ld hl, .VisitAnyTimeText
call PrintText
jp TextScriptEnd
-BadgeItemList:
- db 8 ; #
+.BadgeItemList:
+ table_width 1, .BadgeItemList
+ db NUM_BADGES ; #
db BOULDERBADGE
db CASCADEBADGE
db THUNDERBADGE
@@ -62,57 +64,60 @@ BadgeItemList:
db VOLCANOBADGE
db EARTHBADGE
db -1 ; end
+ assert_table_length NUM_BADGES + 2
-CeruleanHouse2Text_74e77:
- text_far _CeruleanHouse2Text_74e77
+.Text:
+ text_far _CeruleanBadgeHouseMiddleAgedManText
text_end
-CeruleanHouse2Text_74e7c:
- text_far _CeruleanHouse2Text_74e7c
+.WhichBadgeText:
+ text_far _CeruleanBadgeHouseMiddleAgedManWhichBadgeText
text_end
-CeruleanHouse2Text_74e81:
- text_far _CeruleanHouse2Text_74e81
+.VisitAnyTimeText:
+ text_far _CeruleanBadgeHouseMiddleAgedManVisitAnyTimeText
text_end
-TextPointers_74e86:
- dw CeruleanHouse2Text_74e96
- dw CeruleanHouse2Text_74e9b
- dw CeruleanHouse2Text_74ea0
- dw CeruleanHouse2Text_74ea5
- dw CeruleanHouse2Text_74eaa
- dw CeruleanHouse2Text_74eaf
- dw CeruleanHouse2Text_74eb4
- dw CeruleanHouse2Text_74eb9
+CeruleanBadgeHouseBadgeTextPointers:
+ table_width 2, CeruleanBadgeHouseBadgeTextPointers
+ dw CeruleanBadgeHouseBoulderBadgeText
+ dw CeruleanBadgeHouseCascadeBadgeText
+ dw CeruleanBadgeHouseThunderBadgeText
+ dw CeruleanBadgeHouseRainbowBadgeText
+ dw CeruleanBadgeHouseSoulBadgeText
+ dw CeruleanBadgeHouseMarshBadgeText
+ dw CeruleanBadgeHouseVolcanoBadgeText
+ dw CeruleanBadgeHouseEarthBadgeText
+ assert_table_length NUM_BADGES
-CeruleanHouse2Text_74e96:
- text_far _CeruleanHouse2Text_74e96
+CeruleanBadgeHouseBoulderBadgeText:
+ text_far _CeruleanBadgeHouseBoulderBadgeText
text_end
-CeruleanHouse2Text_74e9b:
- text_far _CeruleanHouse2Text_74e9b
+CeruleanBadgeHouseCascadeBadgeText:
+ text_far _CeruleanBadgeHouseCascadeBadgeText
text_end
-CeruleanHouse2Text_74ea0:
- text_far _CeruleanHouse2Text_74ea0
+CeruleanBadgeHouseThunderBadgeText:
+ text_far _CeruleanBadgeHouseThunderBadgeText
text_end
-CeruleanHouse2Text_74ea5:
- text_far _CeruleanHouse2Text_74ea5
+CeruleanBadgeHouseRainbowBadgeText:
+ text_far _CeruleanBadgeHouseRainbowBadgeText
text_end
-CeruleanHouse2Text_74eaa:
- text_far _CeruleanHouse2Text_74eaa
+CeruleanBadgeHouseSoulBadgeText:
+ text_far _CeruleanBadgeHouseSoulBadgeText
text_end
-CeruleanHouse2Text_74eaf:
- text_far _CeruleanHouse2Text_74eaf
+CeruleanBadgeHouseMarshBadgeText:
+ text_far _CeruleanBadgeHouseMarshBadgeText
text_end
-CeruleanHouse2Text_74eb4:
- text_far _CeruleanHouse2Text_74eb4
+CeruleanBadgeHouseVolcanoBadgeText:
+ text_far _CeruleanBadgeHouseVolcanoBadgeText
text_end
-CeruleanHouse2Text_74eb9:
- text_far _CeruleanHouse2Text_74eb9
+CeruleanBadgeHouseEarthBadgeText:
+ text_far _CeruleanBadgeHouseEarthBadgeText
text_end
diff --git a/scripts/CeruleanCave1F.asm b/scripts/CeruleanCave1F.asm
index e2803587..835c6977 100644
--- a/scripts/CeruleanCave1F.asm
+++ b/scripts/CeruleanCave1F.asm
@@ -2,7 +2,8 @@ CeruleanCave1F_Script:
jp EnableAutoTextBoxDrawing
CeruleanCave1F_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_CERULEANCAVE1F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_CERULEANCAVE1F_MAX_ELIXER
+ dw_const PickUpItemText, TEXT_CERULEANCAVE1F_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_CERULEANCAVE1F_ULTRA_BALL
diff --git a/scripts/CeruleanCave2F.asm b/scripts/CeruleanCave2F.asm
index e6a70082..7170c2a9 100644
--- a/scripts/CeruleanCave2F.asm
+++ b/scripts/CeruleanCave2F.asm
@@ -2,7 +2,8 @@ CeruleanCave2F_Script:
jp EnableAutoTextBoxDrawing
CeruleanCave2F_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_CERULEANCAVE2F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_CERULEANCAVE2F_ULTRA_BALL
+ dw_const PickUpItemText, TEXT_CERULEANCAVE2F_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_CERULEANCAVE2F_FULL_RESTORE
diff --git a/scripts/CeruleanCaveB1F.asm b/scripts/CeruleanCaveB1F.asm
index 03d6f38c..401ba44f 100644
--- a/scripts/CeruleanCaveB1F.asm
+++ b/scripts/CeruleanCaveB1F.asm
@@ -8,16 +8,18 @@ CeruleanCaveB1F_Script:
ret
CeruleanCaveB1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_CERULEANCAVEB1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_CERULEANCAVEB1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_CERULEANCAVEB1F_END_BATTLE
CeruleanCaveB1F_TextPointers:
- dw MewtwoText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const CeruleanCaveB1FMewtwoText, TEXT_CERULEANCAVEB1F_MEWTWO
+ dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_ULTRA_BALL1
+ dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_ULTRA_BALL2
+ dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_CERULEANCAVEB1F_MAX_ELIXER
CeruleanCaveB1FTrainerHeaders:
def_trainers
@@ -25,7 +27,7 @@ MewtwoTrainerHeader:
trainer EVENT_BEAT_MEWTWO, 0, MewtwoBattleText, MewtwoBattleText, MewtwoBattleText
db -1 ; end
-MewtwoText:
+CeruleanCaveB1FMewtwoText:
text_asm
ld hl, MewtwoTrainerHeader
call TalkToTrainer
diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm
index a9f62baa..45685f83 100644
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -4,8 +4,8 @@ CeruleanCity_Script:
ld a, [wCeruleanCityCurScript]
jp CallFunctionInTable
-CeruleanCityScript_1948c:
- xor a
+CeruleanCityClearScripts:
+ xor a ; SCRIPT_CERULEANCITY_DEFAULT
ld [wJoyIgnore], a
ld [wCeruleanCityCurScript], a
ld a, HS_CERULEAN_RIVAL
@@ -13,28 +13,29 @@ CeruleanCityScript_1948c:
predef_jump HideObject
CeruleanCity_ScriptPointers:
- dw CeruleanCityScript0
- dw CeruleanCityScript1
- dw CeruleanCityScript2
- dw CeruleanCityScript3
- dw CeruleanCityScript4
+ def_script_pointers
+ dw_const CeruleanCityDefaultScript, SCRIPT_CERULEANCITY_DEFAULT
+ dw_const CeruleanCityRivalBattleScript, SCRIPT_CERULEANCITY_RIVAL_BATTLE
+ dw_const CeruleanCityRivalDefeatedScript, SCRIPT_CERULEANCITY_RIVAL_DEFEATED
+ dw_const CeruleanCityRivalCleanupScript, SCRIPT_CERULEANCITY_RIVAL_CLEANUP
+ dw_const CeruleanCityRocketDefeatedScript, SCRIPT_CERULEANCITY_ROCKET_DEFEATED
-CeruleanCityScript4:
+CeruleanCityRocketDefeatedScript:
ld a, [wIsInBattle]
cp $ff
- jp z, CeruleanCityScript_1948c
- ld a, $f0
+ jp z, CeruleanCityClearScripts
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
- ld a, $2
+ ld a, TEXT_CERULEANCITY_ROCKET
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- xor a
+ xor a ; SCRIPT_CERULEANCITY_DEFAULT
ld [wJoyIgnore], a
ld [wCeruleanCityCurScript], a
ret
-CeruleanCityScript0:
+CeruleanCityDefaultScript:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
@@ -56,7 +57,7 @@ ENDC
ld a, b
ld [wSprite02StateData1FacingDirection], a
call Delay3
- ld a, $2
+ ld a, TEXT_CERULEANCITY_ROCKET
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
.skipRocketThiefEncounter
@@ -75,12 +76,12 @@ ENDC
call PlayMusic
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wXCoord]
cp 20 ; is the player standing on the right side of the bridge?
jr z, .playerOnRightSideOfBridge
- ld a, $1
+ ld a, CERULEANCITY_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITESTATEDATA2_MAPX
ldh [hSpriteDataOffset], a
@@ -91,10 +92,10 @@ ENDC
ld [wMissableObjectIndex], a
predef ShowObject
ld de, CeruleanCityMovement1
- ld a, $1
+ ld a, CERULEANCITY_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $1
+ ld a, SCRIPT_CERULEANCITY_RIVAL_BATTLE
ld [wCeruleanCityCurScript], a
ret
@@ -114,27 +115,27 @@ CeruleanCityMovement1:
db NPC_MOVEMENT_DOWN
db -1 ; end
-CeruleanCityScript_1955d:
- ld a, 1
+CeruleanCityFaceRivalScript:
+ ld a, CERULEANCITY_RIVAL
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay ; face object
-CeruleanCityScript1:
+CeruleanCityRivalBattleScript:
ld a, [wd730]
bit 0, a
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $1
+ ld a, TEXT_CERULEANCITY_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, CeruleanCityText_1966d
- ld de, CeruleanCityText_19672
+ ld hl, CeruleanCityRivalDefeatedText
+ ld de, CeruleanCityRivalVictoryText
call SaveEndBattleTextPointers
ld a, OPP_RIVAL1
ld [wCurOpponent], a
@@ -142,25 +143,25 @@ CeruleanCityScript1:
ld [wTrainerNo], a
xor a
ldh [hJoyHeld], a
- call CeruleanCityScript_1955d
- ld a, $2
+ call CeruleanCityFaceRivalScript
+ ld a, SCRIPT_CERULEANCITY_RIVAL_DEFEATED
ld [wCeruleanCityCurScript], a
ret
-CeruleanCityScript2:
+CeruleanCityRivalDefeatedScript:
ld a, [wIsInBattle]
cp $ff
- jp z, CeruleanCityScript_1948c
- call CeruleanCityScript_1955d
- ld a, $f0
+ jp z, CeruleanCityClearScripts
+ call CeruleanCityFaceRivalScript
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_CERULEAN_RIVAL
- ld a, $1
+ ld a, TEXT_CERULEANCITY_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
farcall Music_RivalAlternateStart
- ld a, $1
+ ld a, CERULEANCITY_RIVAL
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wXCoord]
@@ -171,10 +172,10 @@ CeruleanCityScript2:
.playerOnRightSideOfBridge
ld de, CeruleanCityMovement3
.skip
- ld a, $1
+ ld a, CERULEANCITY_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $3
+ ld a, SCRIPT_CERULEANCITY_RIVAL_CLEANUP
ld [wCeruleanCityCurScript], a
ret
@@ -198,7 +199,7 @@ CeruleanCityMovement4:
db NPC_MOVEMENT_DOWN
db -1 ; end
-CeruleanCityScript3:
+CeruleanCityRivalCleanupScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -208,233 +209,233 @@ CeruleanCityScript3:
xor a
ld [wJoyIgnore], a
call PlayDefaultMusic
- ld a, $0
+ ld a, SCRIPT_CERULEANCITY_DEFAULT
ld [wCeruleanCityCurScript], a
ret
CeruleanCity_TextPointers:
- dw CeruleanCityText1
- dw CeruleanCityText2
- dw CeruleanCityText3
- dw CeruleanCityText4
- dw CeruleanCityText5
- dw CeruleanCityText6
- dw CeruleanCityText7
- dw CeruleanCityText8
- dw CeruleanCityText9
- dw CeruleanCityText10
- dw CeruleanCityText11
- dw CeruleanCityText12
- dw CeruleanCityText13
- dw MartSignText
- dw PokeCenterSignText
- dw CeruleanCityText16
- dw CeruleanCityText17
+ def_text_pointers
+ dw_const CeruleanCityRivalText, TEXT_CERULEANCITY_RIVAL
+ dw_const CeruleanCityRocketText, TEXT_CERULEANCITY_ROCKET
+ dw_const CeruleanCityCooltrainerMText, TEXT_CERULEANCITY_COOLTRAINER_M
+ dw_const CeruleanCitySuperNerd1Text, TEXT_CERULEANCITY_SUPER_NERD1
+ dw_const CeruleanCitySuperNerd2Text, TEXT_CERULEANCITY_SUPER_NERD2
+ dw_const CeruleanCityGuardText, TEXT_CERULEANCITY_GUARD1
+ dw_const CeruleanCityCooltrainerF1Text, TEXT_CERULEANCITY_COOLTRAINER_F1
+ dw_const CeruleanCityElectrodeText, TEXT_CERULEANCITY_ELECTRODE
+ dw_const CeruleanCityCooltrainerF2Text, TEXT_CERULEANCITY_COOLTRAINER_F2
+ dw_const CeruleanCitySuperNerd3Text, TEXT_CERULEANCITY_SUPER_NERD3
+ dw_const CeruleanCityGuardText, TEXT_CERULEANCITY_GUARD2
+ dw_const CeruleanCitySignText, TEXT_CERULEANCITY_SIGN
+ dw_const CeruleanCityTrainerTipsText, TEXT_CERULEANCITY_TRAINER_TIPS
+ dw_const MartSignText, TEXT_CERULEANCITY_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_CERULEANCITY_POKECENTER_SIGN
+ dw_const CeruleanCityBikeShopSign, TEXT_CERULEANCITY_BIKESHOP_SIGN
+ dw_const CeruleanCityGymSign, TEXT_CERULEANCITY_GYM_SIGN
-CeruleanCityText1:
+CeruleanCityRivalText:
text_asm
CheckEvent EVENT_BEAT_CERULEAN_RIVAL
; do pre-battle text
- jr z, .PreBattleText
+ jr z, .PreBattle
; or talk about bill
- ld hl, CeruleanCityText_19677
+ ld hl, CeruleanCityRivalIWentToBillsText
call PrintText
jr .end
-.PreBattleText
- ld hl, CeruleanCityText_19668
+.PreBattle
+ ld hl, .PreBattleText
call PrintText
.end
jp TextScriptEnd
-CeruleanCityText_19668:
- text_far _CeruleanCityText_19668
+.PreBattleText:
+ text_far _CeruleanCityRivalPreBattleText
text_end
-CeruleanCityText_1966d:
- text_far _CeruleanCityText_1966d
+CeruleanCityRivalDefeatedText:
+ text_far _CeruleanCityRivalDefeatedText
text_end
-CeruleanCityText_19672:
- text_far _CeruleanCityText_19672
+CeruleanCityRivalVictoryText:
+ text_far _CeruleanCityRivalVictoryText
text_end
-CeruleanCityText_19677:
- text_far _CeruleanCityText_19677
+CeruleanCityRivalIWentToBillsText:
+ text_far _CeruleanCityRivalIWentToBillsText
text_end
-CeruleanCityText2:
+CeruleanCityRocketText:
text_asm
CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
jr nz, .beatRocketThief
- ld hl, CeruleanCityText_196d9
+ ld hl, .Text
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, CeruleanCityText_196ee
- ld de, CeruleanCityText_196ee
+ ld hl, .IGiveUpText
+ ld de, .IGiveUpText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
- ld a, $4
+ ld a, SCRIPT_CERULEANCITY_ROCKET_DEFEATED
ld [wCeruleanCityCurScript], a
jp TextScriptEnd
.beatRocketThief
- ld hl, CeruleanCityText_196f3
+ ld hl, .IllReturnTheTMText
call PrintText
lb bc, TM_DIG, 1
call GiveItem
jr c, .Success
- ld hl, TM28NoRoomText
+ ld hl, .TM28NoRoomText
call PrintText
jr .Done
.Success
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, ReceivedTM28Text
+ ld hl, .ReceivedTM28Text
call PrintText
farcall CeruleanHideRocket
.Done
jp TextScriptEnd
-CeruleanCityText_196d9:
- text_far _CeruleanCityText_196d9
+.Text:
+ text_far _CeruleanCityRocketText
text_end
-ReceivedTM28Text:
- text_far _ReceivedTM28Text
+.ReceivedTM28Text:
+ text_far _CeruleanCityRocketReceivedTM28Text
sound_get_item_1
- text_far _ReceivedTM28Text2
+ text_far _CeruleanCityRocketIBetterGetMovingText
text_waitbutton
text_end
-TM28NoRoomText:
- text_far _TM28NoRoomText
+.TM28NoRoomText:
+ text_far _CeruleanCityRocketTM28NoRoomText
text_end
-CeruleanCityText_196ee:
- text_far _CeruleanCityText_196ee
+.IGiveUpText:
+ text_far _CeruleanCityRocketIGiveUpText
text_end
-CeruleanCityText_196f3:
- text_far _CeruleanCityText_196f3
+.IllReturnTheTMText:
+ text_far _CeruleanCityRocketIllReturnTheTMText
text_end
-CeruleanCityText3:
- text_far _CeruleanCityText3
+CeruleanCityCooltrainerMText:
+ text_far _CeruleanCityCooltrainerMText
text_end
-CeruleanCityText4:
- text_far _CeruleanCityText4
+CeruleanCitySuperNerd1Text:
+ text_far _CeruleanCitySuperNerd1Text
text_end
-CeruleanCityText5:
- text_far _CeruleanCityText5
+CeruleanCitySuperNerd2Text:
+ text_far _CeruleanCitySuperNerd2Text
text_end
-CeruleanCityText11:
-CeruleanCityText6:
- text_far _CeruleanCityText6
+CeruleanCityGuardText:
+ text_far _CeruleanCityGuardText
text_end
-CeruleanCityText7:
+CeruleanCityCooltrainerF1Text:
text_asm
ldh a, [hRandomAdd]
cp 180 ; 76/256 chance of 1st dialogue
jr c, .notFirstText
- ld hl, CeruleanCityText_19730
+ ld hl, .ElectrodeUseSonicboomText
call PrintText
jr .end
.notFirstText
cp 100 ; 80/256 chance of 2nd dialogue
jr c, .notSecondText
- ld hl, CeruleanCityText_19735
+ ld hl, .ElectrodePunchText
call PrintText
jr .end
.notSecondText
; 100/256 chance of 3rd dialogue
- ld hl, CeruleanCityText_1973a
+ ld hl, .ElectrodeWithdrawText
call PrintText
.end
jp TextScriptEnd
-CeruleanCityText_19730:
- text_far _CeruleanCityText_19730
+.ElectrodeUseSonicboomText:
+ text_far _CeruleanCityCooltrainerF1ElectrodeUseSonicboomText
text_end
-CeruleanCityText_19735:
- text_far _CeruleanCityText_19735
+.ElectrodePunchText:
+ text_far _CeruleanCityCooltrainerF1ElectrodePunchText
text_end
-CeruleanCityText_1973a:
- text_far _CeruleanCityText_1973a
+.ElectrodeWithdrawText:
+ text_far _CeruleanCityCooltrainerF1ElectrodeWithdrawText
text_end
-CeruleanCityText8:
+CeruleanCityElectrodeText:
text_asm
ldh a, [hRandomAdd]
cp 180 ; 76/256 chance of 1st dialogue
jr c, .notFirstText
- ld hl, CeruleanCityText_1976f
+ ld hl, .TookASnoozeText
call PrintText
jr .end
.notFirstText
cp 120 ; 60/256 chance of 2nd dialogue
jr c, .notSecondText
- ld hl, CeruleanCityText_19774
+ ld hl, .IsLoafingAroundText
call PrintText
jr .end
.notSecondText
cp 60 ; 60/256 chance of 3rd dialogue
jr c, .notThirdText
- ld hl, CeruleanCityText_19779
+ ld hl, .TurnedAwayText
call PrintText
jr .end
.notThirdText
; 60/256 chance of 4th dialogue
- ld hl, CeruleanCityText_1977e
+ ld hl, .IgnoredOrdersText
call PrintText
.end
jp TextScriptEnd
-CeruleanCityText_1976f:
- text_far _CeruleanCityText_1976f
+.TookASnoozeText:
+ text_far _CeruleanCityElectrodeTookASnoozeText
text_end
-CeruleanCityText_19774:
- text_far _CeruleanCityText_19774
+.IsLoafingAroundText:
+ text_far _CeruleanCityElectrodeIsLoafingAroundText
text_end
-CeruleanCityText_19779:
- text_far _CeruleanCityText_19779
+.TurnedAwayText:
+ text_far _CeruleanCityElectrodeTurnedAwayText
text_end
-CeruleanCityText_1977e:
- text_far _CeruleanCityText_1977e
+.IgnoredOrdersText:
+ text_far _CeruleanCityElectrodeIgnoredOrdersText
text_end
-CeruleanCityText9:
- text_far _CeruleanCityText9
+CeruleanCityCooltrainerF2Text:
+ text_far _CeruleanCityCooltrainerF2Text
text_end
-CeruleanCityText10:
- text_far _CeruleanCityText10
+CeruleanCitySuperNerd3Text:
+ text_far _CeruleanCitySuperNerd3Text
text_end
-CeruleanCityText12:
- text_far _CeruleanCityText12
+CeruleanCitySignText:
+ text_far _CeruleanCitySignText
text_end
-CeruleanCityText13:
- text_far _CeruleanCityText13
+CeruleanCityTrainerTipsText:
+ text_far _CeruleanCityTrainerTipsText
text_end
-CeruleanCityText16:
- text_far _CeruleanCityText16
+CeruleanCityBikeShopSign:
+ text_far _CeruleanCityBikeShopSign
text_end
-CeruleanCityText17:
- text_far _CeruleanCityText17
+CeruleanCityGymSign:
+ text_far _CeruleanCityGymSign
text_end
diff --git a/scripts/CeruleanGym.asm b/scripts/CeruleanGym.asm
index 388e128a..b4bed363 100644
--- a/scripts/CeruleanGym.asm
+++ b/scripts/CeruleanGym.asm
@@ -23,40 +23,41 @@ CeruleanGym_Script:
db "MISTY@"
CeruleanGymResetScripts:
- xor a
+ xor a ; SCRIPT_CERULEANGYM_DEFAULT
ld [wJoyIgnore], a
ld [wCeruleanGymCurScript], a
ld [wCurMapScript], a
ret
CeruleanGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw CeruleanGymMistyPostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_CERULEANGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_CERULEANGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_CERULEANGYM_END_BATTLE
+ dw_const CeruleanGymMistyPostBattleScript, SCRIPT_CERULEANGYM_MISTY_POST_BATTLE
-CeruleanGymMistyPostBattle:
+CeruleanGymMistyPostBattleScript:
ld a, [wIsInBattle]
cp $ff
jp z, CeruleanGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
CeruleanGymReceiveTM11:
- ld a, $5
+ ld a, TEXT_CERULEANGYM_MISTY_CASCADE_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_MISTY
lb bc, TM_BUBBLEBEAM, 1
call GiveItem
jr nc, .BagFull
- ld a, $6
+ ld a, TEXT_CERULEANGYM_MISTY_RECEIVED_TM11
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM11
jr .gymVictory
.BagFull
- ld a, $7
+ ld a, TEXT_CERULEANGYM_MISTY_TM11_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -71,13 +72,14 @@ CeruleanGymReceiveTM11:
jp CeruleanGymResetScripts
CeruleanGym_TextPointers:
- dw MistyText
- dw CeruleanGymTrainerText1
- dw CeruleanGymTrainerText2
- dw CeruleanGymGuideText
- dw MistyCascadeBadgeInfoText
- dw ReceivedTM11Text
- dw TM11NoRoomText
+ def_text_pointers
+ dw_const CeruleanGymMistyText, TEXT_CERULEANGYM_MISTY
+ dw_const CeruleanGymCooltrainerFText, TEXT_CERULEANGYM_COOLTRAINER_F
+ dw_const CeruleanGymSwimmerText, TEXT_CERULEANGYM_SWIMMER
+ dw_const CeruleanGymGymGuideText, TEXT_CERULEANGYM_GYM_GUIDE
+ dw_const CeruleanGymMistyCascadeBadgeInfoText, TEXT_CERULEANGYM_MISTY_CASCADE_BADGE_INFO
+ dw_const CeruleanGymMistyReceivedTM11Text, TEXT_CERULEANGYM_MISTY_RECEIVED_TM11
+ dw_const CeruleanGymMistyTM11NoRoomText, TEXT_CERULEANGYM_MISTY_TM11_NO_ROOM
CeruleanGymTrainerHeaders:
def_trainers 2
@@ -87,7 +89,7 @@ CeruleanGymTrainerHeader1:
trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_1, 3, CeruleanGymBattleText2, CeruleanGymEndBattleText2, CeruleanGymAfterBattleText2
db -1 ; end
-MistyText:
+CeruleanGymMistyText:
text_asm
CheckEvent EVENT_BEAT_MISTY
jr z, .beforeBeat
@@ -97,17 +99,17 @@ MistyText:
call DisableWaitingAfterTextDisplay
jr .done
.afterBeat
- ld hl, TM11ExplanationText
+ ld hl, .TM11ExplanationText
call PrintText
jr .done
.beforeBeat
- ld hl, MistyPreBattleText
+ ld hl, .PreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedCascadeBadgeText
- ld de, ReceivedCascadeBadgeText
+ ld hl, CeruleanGymMistyReceivedCascadeBadgeText
+ ld de, CeruleanGymMistyReceivedCascadeBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -117,37 +119,37 @@ MistyText:
ld [wGymLeaderNo], a
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_CERULEANGYM_MISTY_POST_BATTLE
ld [wCeruleanGymCurScript], a
.done
jp TextScriptEnd
-MistyPreBattleText:
- text_far _MistyPreBattleText
+.PreBattleText:
+ text_far _CeruleanGymMistyPreBattleText
text_end
-TM11ExplanationText:
- text_far _TM11ExplanationText
+.TM11ExplanationText:
+ text_far _CeruleanGymMistyTM11ExplanationText
text_end
-MistyCascadeBadgeInfoText:
- text_far _MistyCascadeBadgeInfoText
+CeruleanGymMistyCascadeBadgeInfoText:
+ text_far _CeruleanGymMistyCascadeBadgeInfoText
text_end
-ReceivedTM11Text:
- text_far _ReceivedTM11Text
+CeruleanGymMistyReceivedTM11Text:
+ text_far _CeruleanGymMistyReceivedTM11Text
sound_get_item_1
text_end
-TM11NoRoomText:
- text_far _TM11NoRoomText
+CeruleanGymMistyTM11NoRoomText:
+ text_far _CeruleanGymMistyTM11NoRoomText
text_end
-ReceivedCascadeBadgeText:
- text_far _ReceivedCascadeBadgeText
+CeruleanGymMistyReceivedCascadeBadgeText:
+ text_far _CeruleanGymMistyReceivedCascadeBadgeText
text_end
-CeruleanGymTrainerText1:
+CeruleanGymCooltrainerFText:
text_asm
ld hl, CeruleanGymTrainerHeader0
call TalkToTrainer
@@ -165,7 +167,7 @@ CeruleanGymAfterBattleText1:
text_far _CeruleanGymAfterBattleText1
text_end
-CeruleanGymTrainerText2:
+CeruleanGymSwimmerText:
text_asm
ld hl, CeruleanGymTrainerHeader1
call TalkToTrainer
@@ -183,23 +185,23 @@ CeruleanGymAfterBattleText2:
text_far _CeruleanGymAfterBattleText2
text_end
-CeruleanGymGuideText:
+CeruleanGymGymGuideText:
text_asm
CheckEvent EVENT_BEAT_MISTY
jr nz, .afterBeat
- ld hl, CeruleanGymGuidePreBattleText
+ ld hl, .ChampInMakingText
call PrintText
jr .done
.afterBeat
- ld hl, CeruleanGymGuidePostBattleText
+ ld hl, .BeatMistyText
call PrintText
.done
jp TextScriptEnd
-CeruleanGymGuidePreBattleText:
- text_far _CeruleanGymGuidePreBattleText
+.ChampInMakingText:
+ text_far _CeruleanGymGymGuideChampInMakingText
text_end
-CeruleanGymGuidePostBattleText:
- text_far _CeruleanGymGuidePostBattleText
+.BeatMistyText:
+ text_far _CeruleanGymGymGuideBeatMistyText
text_end
diff --git a/scripts/CeruleanMart.asm b/scripts/CeruleanMart.asm
index beb0fa1b..57907e6f 100644
--- a/scripts/CeruleanMart.asm
+++ b/scripts/CeruleanMart.asm
@@ -2,14 +2,15 @@ CeruleanMart_Script:
jp EnableAutoTextBoxDrawing
CeruleanMart_TextPointers:
- dw CeruleanCashierText
- dw CeruleanMartText2
- dw CeruleanMartText3
+ def_text_pointers
+ dw_const CeruleanMartClerkText, TEXT_CERULEANMART_CLERK
+ dw_const CeruleanMartCooltrainerMText, TEXT_CERULEANMART_COOLTRAINER_M
+ dw_const CeruleanMartCooltrainerFText, TEXT_CERULEANMART_COOLTRAINER_F
-CeruleanMartText2:
- text_far _CeruleanMartText2
+CeruleanMartCooltrainerMText:
+ text_far _CeruleanMartCooltrainerMText
text_end
-CeruleanMartText3:
- text_far _CeruleanMartText3
+CeruleanMartCooltrainerFText:
+ text_far _CeruleanMartCooltrainerFText
text_end
diff --git a/scripts/CeruleanMelaniesHouse.asm b/scripts/CeruleanMelaniesHouse.asm
index ca006506..eec62f92 100644
--- a/scripts/CeruleanMelaniesHouse.asm
+++ b/scripts/CeruleanMelaniesHouse.asm
@@ -3,12 +3,13 @@ CeruleanMelaniesHouse_Script:
ret
CeruleanMelaniesHouse_TextPointers:
- dw CeruleanHouse1Text1
- dw CeruleanHouse1Text2
- dw CeruleanHouse1Text3
- dw CeruleanHouse1Text4
+ def_text_pointers
+ dw_const CeruleanMelanieHouseMelanieText, TEXT_CERULEANMELANIESHOUSE_MELANIE
+ dw_const CeruleanMelanieHouseBulbasaurText, TEXT_CERULEANMELANIESHOUSE_BULBASAUR
+ dw_const CeruleanMelanieHouseOddishText, TEXT_CERULEANMELANIESHOUSE_ODDISH
+ dw_const CeruleanMelanieHouseSandshrewText, TEXT_CERULEANMELANIESHOUSE_SANDSHREW
-CeruleanHouse1Text1:
+CeruleanMelanieHouseMelanieText:
text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -84,21 +85,21 @@ CeruleanHouse1Text_1cfdf:
text_waitbutton
text_end
-CeruleanHouse1Text2:
+CeruleanMelanieHouseBulbasaurText:
text_far MelanieBulbasaurText
text_asm
ld a, BULBASAUR
call PlayCry
jp TextScriptEnd
-CeruleanHouse1Text3:
+CeruleanMelanieHouseOddishText:
text_far MelanieOddishText
text_asm
ld a, ODDISH
call PlayCry
jp TextScriptEnd
-CeruleanHouse1Text4:
+CeruleanMelanieHouseSandshrewText:
text_far MelanieSandshrewText
text_asm
ld a, SANDSHREW
diff --git a/scripts/CeruleanPokecenter.asm b/scripts/CeruleanPokecenter.asm
index 3aa465ca..65154e43 100644
--- a/scripts/CeruleanPokecenter.asm
+++ b/scripts/CeruleanPokecenter.asm
@@ -3,27 +3,28 @@ CeruleanPokecenter_Script:
jp EnableAutoTextBoxDrawing
CeruleanPokecenter_TextPointers:
- dw CeruleanHealNurseText
- dw CeruleanPokecenterText2
- dw CeruleanPokecenterText3
- dw CeruleanTradeNurseText
- dw CeruleanPokecenterText5
+ def_text_pointers
+ dw_const CeruleanPokecenterNurseText, TEXT_CERULEANPOKECENTER_NURSE
+ dw_const CeruleanPokecenterSuperNerdText, TEXT_CERULEANPOKECENTER_SUPER_NERD
+ dw_const CeruleanPokecenterGentlemanText, TEXT_CERULEANPOKECENTER_GENTLEMAN
+ dw_const CeruleanPokecenterLinkReceptionistText, TEXT_CERULEANPOKECENTER_LINK_RECEPTIONIST
+ dw_const CeruleanPokecenterChanseyText, TEXT_CERULEANPOKECENTER_CHANSEY
-CeruleanTradeNurseText:
+CeruleanPokecenterLinkReceptionistText:
script_cable_club_receptionist
-CeruleanHealNurseText:
+CeruleanPokecenterNurseText:
script_pokecenter_nurse
-CeruleanPokecenterText2:
- text_far _CeruleanPokecenterText2
+CeruleanPokecenterSuperNerdText:
+ text_far _CeruleanPokecenterSuperNerdText
text_end
-CeruleanPokecenterText3:
- text_far _CeruleanPokecenterText3
+CeruleanPokecenterGentlemanText:
+ text_far _CeruleanPokecenterGentlemanText
text_end
-CeruleanPokecenterText5:
+CeruleanPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/CeruleanTrashedHouse.asm b/scripts/CeruleanTrashedHouse.asm
index d11c7721..f15cddc8 100644
--- a/scripts/CeruleanTrashedHouse.asm
+++ b/scripts/CeruleanTrashedHouse.asm
@@ -3,37 +3,38 @@ CeruleanTrashedHouse_Script:
ret
CeruleanTrashedHouse_TextPointers:
- dw CeruleanHouseTrashedText1
- dw CeruleanHouseTrashedText2
- dw CeruleanHouseTrashedText3
+ def_text_pointers
+ dw_const CeruleanTrashedHouseFishingGuruText, TEXT_CERULEANTRASHEDHOUSE_FISHING_GURU
+ dw_const CeruleanTrashedHouseGirlText, TEXT_CERULEANTRASHEDHOUSE_GIRL
+ dw_const CeruleanTrashedHouseWallHoleText, TEXT_CERULEANTRASHEDHOUSE_WALL_HOLE
-CeruleanHouseTrashedText1:
+CeruleanTrashedHouseFishingGuruText:
text_asm
ld b, TM_DIG
predef GetQuantityOfItemInBag
and b
jr z, .no_dig_tm
- ld hl, CeruleanHouseTrashedText_1d6b0
+ ld hl, .WhatsLostIsLostText
call PrintText
jr .done
.no_dig_tm
- ld hl, CeruleanHouseTrashedText_1d6ab
+ ld hl, .TheyStoleATMText
call PrintText
.done
jp TextScriptEnd
-CeruleanHouseTrashedText_1d6ab:
- text_far _CeruleanTrashedText_1d6ab
+.TheyStoleATMText:
+ text_far _CeruleanTrashedHouseFishingGuruTheyStoleATMText
text_end
-CeruleanHouseTrashedText_1d6b0:
- text_far _CeruleanTrashedText_1d6b0
+.WhatsLostIsLostText:
+ text_far _CeruleanTrashedHouseFishingGuruWhatsLostIsLostText
text_end
-CeruleanHouseTrashedText2:
- text_far _CeruleanHouseTrashedText2
+CeruleanTrashedHouseGirlText:
+ text_far _CeruleanTrashedHouseGirlText
text_end
-CeruleanHouseTrashedText3:
- text_far _CeruleanHouseTrashedText3
+CeruleanTrashedHouseWallHoleText:
+ text_far _CeruleanTrashedHouseWallHoleText
text_end
diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm
index d500e1d2..918e9468 100644
--- a/scripts/ChampionsRoom.asm
+++ b/scripts/ChampionsRoom.asm
@@ -5,48 +5,49 @@ ChampionsRoom_Script:
call CallFunctionInTable
ret
-ResetGaryScript:
- xor a
+ResetRivalScript:
+ xor a ; SCENE_CHAMPIONSROOM_DEFAULT
ld [wJoyIgnore], a
ld [wChampionsRoomCurScript], a
ret
ChampionsRoom_ScriptPointers:
- dw GaryScript0
- dw GaryScript1
- dw GaryScript2
- dw GaryScript3
- dw GaryScript4
- dw GaryScript5
- dw GaryScript6
- dw GaryScript7
- dw GaryScript8
- dw GaryScript9
- dw GaryScript10
+ def_script_pointers
+ dw_const ChampionsRoomDefaultScript, SCRIPT_CHAMPIONSROOM_DEFAULT
+ dw_const ChampionsRoomPlayerEntersScript, SCRIPT_CHAMPIONSROOM_PLAYER_ENTERS
+ dw_const ChampionsRoomRivalReadyToBattleScript, SCRIPT_CHAMPIONSROOM_RIVAL_READY_TO_BATTLE
+ dw_const ChampionsRoomRivalDefeatedScript, SCRIPT_CHAMPIONSROOM_RIVAL_DEFEATED
+ dw_const ChampionsRoomOakArrivesScript, SCRIPT_CHAMPIONSROOM_OAK_ARRIVES
+ dw_const ChampionsRoomOakCongratulatesPlayerScript, SCRIPT_CHAMPIONSROOM_OAK_CONGRATULATES_PLAYER
+ dw_const ChampionsRoomOakDisappointedWithRivalScript, SCRIPT_CHAMPIONSROOM_OAK_DISAPPOINTED_WITH_RIVAL
+ dw_const ChampionsRoomOakComeWithMeScript, SCRIPT_CHAMPIONSROOM_OAK_COME_WITH_ME
+ dw_const ChampionsRoomOakExitsScript, SCRIPT_CHAMPIONSROOM_OAK_EXITS
+ dw_const ChampionsRoomPlayerFollowsOakScript, SCRIPT_CHAMPIONSROOM_PLAYER_FOLLOWS_OAK
+ dw_const ChampionsRoomCleanupScript, SCRIPT_CHAMPIONSROOM_CLEANUP_SCRIPT
-GaryScript0:
+ChampionsRoomDefaultScript:
ret
-GaryScript1:
- ld a, $ff
+ChampionsRoomPlayerEntersScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, GaryEntrance_RLEMovement
+ ld de, RivalEntrance_RLEMovement
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $2
+ ld a, SCRIPT_CHAMPIONSROOM_RIVAL_READY_TO_BATTLE
ld [wChampionsRoomCurScript], a
ret
-GaryEntrance_RLEMovement:
+RivalEntrance_RLEMovement:
db D_UP, 1
db D_RIGHT, 1
db D_UP, 3
db -1 ; end
-GaryScript2:
+ChampionsRoomRivalReadyToBattleScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -55,15 +56,15 @@ GaryScript2:
ld [wJoyIgnore], a
ld hl, wOptions
res 7, [hl] ; Turn on battle animations to make the battle feel more epic.
- ld a, $1
+ ld a, TEXT_CHAMPIONSROOM_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, GaryDefeatedText
- ld de, GaryVictoryText
+ ld hl, RivalDefeatedText
+ ld de, RivalVictoryText
call SaveEndBattleTextPointers
ld a, OPP_RIVAL3
ld [wCurOpponent], a
@@ -75,44 +76,44 @@ GaryScript2:
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_CHAMPIONSROOM_RIVAL_DEFEATED
ld [wChampionsRoomCurScript], a
ret
-GaryScript3:
+ChampionsRoomRivalDefeatedScript:
ld a, [wIsInBattle]
cp $ff
- jp z, ResetGaryScript
+ jp z, ResetRivalScript
call UpdateSprites
SetEvent EVENT_BEAT_CHAMPION_RIVAL
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $1
+ ld a, TEXT_CHAMPIONSROOM_RIVAL
ldh [hSpriteIndexOrTextID], a
- call GaryScript_760c8
- ld a, $1
+ call ChampionsRoom_DisplayTextID_AllowABSelectStart
+ ld a, CHAMPIONSROOM_RIVAL
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
- ld a, $4
+ ld a, SCRIPT_CHAMPIONSROOM_OAK_ARRIVES
ld [wChampionsRoomCurScript], a
ret
-GaryScript4:
+ChampionsRoomOakArrivesScript:
farcall Music_Cities1AlternateTempo
- ld a, $2
+ ld a, TEXT_CHAMPIONSROOM_OAK
ldh [hSpriteIndexOrTextID], a
- call GaryScript_760c8
- ld a, $2
+ call ChampionsRoom_DisplayTextID_AllowABSelectStart
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld de, OakEntranceAfterVictoryMovement
- ld a, $2
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
call MoveSprite
ld a, HS_CHAMPIONS_ROOM_OAK
ld [wMissableObjectIndex], a
predef ShowObject
- ld a, $5
+ ld a, SCRIPT_CHAMPIONSROOM_OAK_CONGRATULATES_PLAYER
ld [wChampionsRoomCurScript], a
ret
@@ -124,165 +125,166 @@ OakEntranceAfterVictoryMovement:
db NPC_MOVEMENT_UP
db -1 ; end
-GaryScript5:
+ChampionsRoomOakCongratulatesPlayerScript:
ld a, [wd730]
bit 0, a
ret nz
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, CHAMPIONSROOM_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $2
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $3
+ ld a, TEXT_CHAMPIONSROOM_OAK_CONGRATULATES_PLAYER
ldh [hSpriteIndexOrTextID], a
- call GaryScript_760c8
- ld a, $6
+ call ChampionsRoom_DisplayTextID_AllowABSelectStart
+ ld a, SCRIPT_CHAMPIONSROOM_OAK_DISAPPOINTED_WITH_RIVAL
ld [wChampionsRoomCurScript], a
ret
-GaryScript6:
- ld a, $2
+ChampionsRoomOakDisappointedWithRivalScript:
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_RIGHT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $4
+ ld a, TEXT_CHAMPIONSROOM_OAK_DISAPPOINTED_WITH_RIVAL
ldh [hSpriteIndexOrTextID], a
- call GaryScript_760c8
- ld a, $7
+ call ChampionsRoom_DisplayTextID_AllowABSelectStart
+ ld a, SCRIPT_CHAMPIONSROOM_OAK_COME_WITH_ME
ld [wChampionsRoomCurScript], a
ret
-GaryScript7:
- ld a, $2
+ChampionsRoomOakComeWithMeScript:
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $5
+ ld a, TEXT_CHAMPIONSROOM_OAK_COME_WITH_ME
ldh [hSpriteIndexOrTextID], a
- call GaryScript_760c8
- ld de, OakExitGaryRoomMovement
- ld a, $2
+ call ChampionsRoom_DisplayTextID_AllowABSelectStart
+ ld de, OakExitChampionsRoomMovement
+ ld a, CHAMPIONSROOM_OAK
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $8
+ ld a, SCRIPT_CHAMPIONSROOM_OAK_EXITS
ld [wChampionsRoomCurScript], a
ret
-OakExitGaryRoomMovement:
+OakExitChampionsRoomMovement:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db -1 ; end
-GaryScript8:
+ChampionsRoomOakExitsScript:
ld a, [wd730]
bit 0, a
ret nz
ld a, HS_CHAMPIONS_ROOM_OAK
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $9
+ ld a, SCRIPT_CHAMPIONSROOM_PLAYER_FOLLOWS_OAK
ld [wChampionsRoomCurScript], a
ret
-GaryScript9:
- ld a, $ff
+ChampionsRoomPlayerFollowsOakScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, WalkToHallOfFame_RLEMovment
+ ld de, WalkToHallOfFame_RLEMovement
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $a
+ ld a, SCRIPT_CHAMPIONSROOM_CLEANUP_SCRIPT
ld [wChampionsRoomCurScript], a
ret
-WalkToHallOfFame_RLEMovment:
+WalkToHallOfFame_RLEMovement:
db D_UP, 4
db D_LEFT, 1
db -1 ; end
-GaryScript10:
+ChampionsRoomCleanupScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_CHAMPIONSROOM_DEFAULT
ld [wChampionsRoomCurScript], a
ret
-GaryScript_760c8:
- ld a, $f0
+ChampionsRoom_DisplayTextID_AllowABSelectStart:
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ret
ChampionsRoom_TextPointers:
- dw GaryText1
- dw GaryText2
- dw GaryText3
- dw GaryText4
- dw GaryText5
+ def_text_pointers
+ dw_const ChampionsRoomRivalText, TEXT_CHAMPIONSROOM_RIVAL
+ dw_const ChampionsRoomOakText, TEXT_CHAMPIONSROOM_OAK
+ dw_const ChampionsRoomOakCongratulatesPlayerText, TEXT_CHAMPIONSROOM_OAK_CONGRATULATES_PLAYER
+ dw_const ChampionsRoomOakDisappointedWithRivalText, TEXT_CHAMPIONSROOM_OAK_DISAPPOINTED_WITH_RIVAL
+ dw_const ChampionsRoomOakComeWithMeText, TEXT_CHAMPIONSROOM_OAK_COME_WITH_ME
-GaryText1:
+ChampionsRoomRivalText:
text_asm
CheckEvent EVENT_BEAT_CHAMPION_RIVAL
- ld hl, GaryChampionIntroText
+ ld hl, .IntroText
jr z, .printText
- ld hl, GaryText_76103
+ ld hl, ChampionsRoomRivalAfterBattleText
.printText
call PrintText
jp TextScriptEnd
-GaryChampionIntroText:
- text_far _GaryChampionIntroText
+.IntroText:
+ text_far _ChampionsRoomRivalIntroText
text_end
-GaryDefeatedText:
- text_far _GaryDefeatedText
+RivalDefeatedText:
+ text_far _RivalDefeatedText
text_end
-GaryVictoryText:
- text_far _GaryVictoryText
+RivalVictoryText:
+ text_far _RivalVictoryText
text_end
-GaryText_76103:
- text_far _GaryText_76103
+ChampionsRoomRivalAfterBattleText:
+ text_far _ChampionsRoomRivalAfterBattleText
text_end
-GaryText2:
- text_far _GaryText2
+ChampionsRoomOakText:
+ text_far _ChampionsRoomOakText
text_end
-GaryText3:
+ChampionsRoomOakCongratulatesPlayerText:
text_asm
ld a, [wPlayerStarter]
ld [wd11e], a
call GetMonName
- ld hl, GaryText_76120
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-GaryText_76120:
- text_far _GaryText_76120
+.Text:
+ text_far _ChampionsRoomOakCongratulatesPlayerText
text_end
-GaryText4:
- text_far _GaryText_76125
+ChampionsRoomOakDisappointedWithRivalText:
+ text_far _ChampionsRoomOakDisappointedWithRivalText
text_end
-GaryText5:
- text_far _GaryText_7612a
+ChampionsRoomOakComeWithMeText:
+ text_far _ChampionsRoomOakComeWithMeText
text_end
diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm
index 63da9a86..7279c971 100644
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -30,7 +30,7 @@ CinnabarGymSetMapAndTiles:
db "BLAINE@"
CinnabarGymResetScripts:
- xor a
+ xor a ; SCRIPT_CINNABARGYM_DEFAULT
ld [wJoyIgnore], a
ld [wCinnabarGymCurScript], a
ld [wCurMapScript], a
@@ -46,18 +46,19 @@ CinnabarGymFlagAction:
predef_jump FlagActionPredef
CinnabarGym_ScriptPointers:
- dw CinnabarGymScript0
- dw CinnabarGymScript1
- dw CinnabarGymScript2
- dw CinnabarGymBlainePostBattle
+ def_script_pointers
+ dw_const CinnabarGymDefaultScript, SCRIPT_CINNABARGYM_DEFAULT
+ dw_const CinnabarGymGetOpponentTextScript, SCRIPT_CINNABARGYM_GET_OPPONENT_TEXT
+ dw_const CinnabarGymOpenGateScript, SCRIPT_CINNABARGYM_OPEN_GATE
+ dw_const CinnabarGymBlainePostBattleScript, SCRIPT_CINNABARGYM_BLAINE_POST_BATTLE
-CinnabarGymScript0:
+CinnabarGymDefaultScript:
ld a, [wOpponentAfterWrongAnswer]
and a
ret z
ldh [hSpriteIndex], a
- cp $4
- jr nz, .asm_757c3
+ cp CINNABARGYM_SUPER_NERD3
+ jr nz, .not_super_nerd3
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld hl, PikachuMovementData_74f97
@@ -65,7 +66,7 @@ CinnabarGymScript0:
call CinnabarGymScript_74fa3
ld de, MovementNpcToLeftAndUp
jr .MoveSprite
-.asm_757c3
+.not_super_nerd3
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld hl, PikachuMovementData_74f9e
@@ -74,7 +75,7 @@ CinnabarGymScript0:
ld de, MovementNpcToLeft
.MoveSprite
call MoveSprite
- ld a, $1
+ ld a, SCRIPT_CINNABARGYM_GET_OPPONENT_TEXT
ld [wCinnabarGymCurScript], a
ld [wCurMapScript], a
ret
@@ -117,7 +118,7 @@ CinnabarGymScript_74fa3:
call ApplyPikachuMovementData
ret
-CinnabarGymScript1:
+CinnabarGymGetOpponentTextScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -128,7 +129,7 @@ CinnabarGymScript1:
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
-CinnabarGymScript2:
+CinnabarGymOpenGateScript:
call CinnabarGymScript_753e9
ld a, [wIsInBattle]
cp $ff
@@ -141,10 +142,10 @@ CinnabarGymScript2:
call CinnabarGymFlagAction
ld a, c
and a
- jr nz, .asm_7500d
+ jr nz, .no_sound
ld a, [wTrainerHeaderFlagBit]
cp 2
- jr z, .asm_7500d
+ jr z, .no_sound
ld c, 30
call DelayFrames
call CinnabarGymScript_75023
@@ -154,14 +155,14 @@ CinnabarGymScript2:
call PlaySound
call WaitForSoundToFinish
jr .asm_75013
-.asm_7500d
+.no_sound
call CinnabarGymScript_75023
call CinnabarGymScript_75041
.asm_75013
xor a
ld [wJoyIgnore], a
ld [wOpponentAfterWrongAnswer], a
- ld a, $0
+ ld a, SCRIPT_CINNABARGYM_DEFAULT
ld [wCinnabarGymCurScript], a
ld [wCurMapScript], a
ret
@@ -194,29 +195,29 @@ CinnabarGymScript_75041:
call UpdateCinnabarGymGateTileBlocks
ret
-CinnabarGymBlainePostBattle:
+CinnabarGymBlainePostBattleScript:
call CinnabarGymScript_753e9
ld a, [wIsInBattle]
cp $ff
jp z, CinnabarGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; fallthrough
CinnabarGymReceiveTM38:
- ld a, $a
+ ld a, TEXT_CINNABARGYM_BLAINE_VOLCANO_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_BLAINE
lb bc, TM_FIRE_BLAST, 1
call GiveItem
jr nc, .BagFull
- ld a, $b
+ ld a, TEXT_CINNABARGYM_BLAINE_RECEIVED_TM38
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM38
jr .gymVictory
.BagFull
- ld a, $c
+ ld a, TEXT_CINNABARGYM_BLAINE_TM38_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -234,20 +235,21 @@ CinnabarGymReceiveTM38:
jp CinnabarGymResetScripts
CinnabarGym_TextPointers:
- dw BlaineText
- dw CinnabarGymTrainerText1
- dw CinnabarGymTrainerText2
- dw CinnabarGymTrainerText3
- dw CinnabarGymTrainerText4
- dw CinnabarGymTrainerText5
- dw CinnabarGymTrainerText6
- dw CinnabarGymTrainerText7
- dw CinnabarGymGuideText
- dw BlaineVolcanoBadgeInfoText
- dw ReceivedTM38Text
- dw TM38NoRoomText
+ def_text_pointers
+ dw_const CinnabarGymBlaineText, TEXT_CINNABARGYM_BLAINE
+ dw_const CinnabarGymSuperNerd1, TEXT_CINNABARGYM_SUPER_NERD1
+ dw_const CinnabarGymSuperNerd2, TEXT_CINNABARGYM_SUPER_NERD2
+ dw_const CinnabarGymSuperNerd3, TEXT_CINNABARGYM_SUPER_NERD3
+ dw_const CinnabarGymSuperNerd4, TEXT_CINNABARGYM_SUPER_NERD4
+ dw_const CinnabarGymSuperNerd5, TEXT_CINNABARGYM_SUPER_NERD5
+ dw_const CinnabarGymSuperNerd6, TEXT_CINNABARGYM_SUPER_NERD6
+ dw_const CinnabarGymSuperNerd7, TEXT_CINNABARGYM_SUPER_NERD7
+ dw_const CinnabarGymGymGuideText, TEXT_CINNABARGYM_GYM_GUIDE
+ dw_const CinnabarGymBlaineVolcanoBadgeInfoText, TEXT_CINNABARGYM_BLAINE_VOLCANO_BADGE_INFO
+ dw_const CinnabarGymBlaineReceivedTM38Text, TEXT_CINNABARGYM_BLAINE_RECEIVED_TM38
+ dw_const CinnabarGymBlaineTM38NoRoomText, TEXT_CINNABARGYM_BLAINE_TM38_NO_ROOM
-CinnabarGymScript_750c3:
+CinnabarGymStartBattleScript:
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
@@ -256,18 +258,18 @@ CinnabarGymScript_750c3:
set 6, [hl]
set 7, [hl]
ld a, [wSpriteIndex]
- cp $1
- jr z, .asm_758d4
- ld a, $2
- jr .asm_758d6
-.asm_758d4
- ld a, $3
-.asm_758d6
+ cp CINNABARGYM_BLAINE
+ jr z, .blaine
+ ld a, SCRIPT_CINNABARGYM_OPEN_GATE
+ jr .not_blaine
+.blaine
+ ld a, SCRIPT_CINNABARGYM_BLAINE_POST_BATTLE
+.not_blaine
ld [wCinnabarGymCurScript], a
ld [wCurMapScript], a
jp TextScriptEnd
-BlaineText:
+CinnabarGymBlaineText:
text_asm
CheckEvent EVENT_BEAT_BLAINE
jr z, .beforeBeat
@@ -277,293 +279,286 @@ BlaineText:
call DisableWaitingAfterTextDisplay
jp TextScriptEnd
.afterBeat
- ld hl, BlainePostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
jp TextScriptEnd
.beforeBeat
- ld hl, BlainePreBattleText
+ ld hl, .PreBattleText
call PrintText
- ld hl, ReceivedVolcanoBadgeText
- ld de, ReceivedVolcanoBadgeText
+ ld hl, .ReceivedVolcanoBadgeText
+ ld de, .ReceivedVolcanoBadgeText
call SaveEndBattleTextPointers
ld a, $7
ld [wGymLeaderNo], a
- jp CinnabarGymScript_750c3
+ jp CinnabarGymStartBattleScript
-BlainePreBattleText:
- text_far _BlainePreBattleText
+.PreBattleText:
+ text_far _CinnabarGymBlainePreBattleText
text_end
-ReceivedVolcanoBadgeText:
- text_far _ReceivedVolcanoBadgeText
+.ReceivedVolcanoBadgeText:
+ text_far _CinnabarGymBlaineReceivedVolcanoBadgeText
sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
text_waitbutton
text_end
-BlainePostBattleAdviceText:
- text_far _BlainePostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _CinnabarGymBlainePostBattleAdviceText
text_end
-BlaineVolcanoBadgeInfoText:
- text_far _BlaineVolcanoBadgeInfoText
+CinnabarGymBlaineVolcanoBadgeInfoText:
+ text_far _CinnabarGymBlaineVolcanoBadgeInfoText
text_end
-ReceivedTM38Text:
- text_far _ReceivedTM38Text
+CinnabarGymBlaineReceivedTM38Text:
+ text_far _CinnabarGymBlaineReceivedTM38Text
sound_get_item_1
- text_far _TM38ExplanationText
+ text_far _CinnabarGymBlaineTM38ExplanationText
text_end
-TM38NoRoomText:
- text_far _TM38NoRoomText
+CinnabarGymBlaineTM38NoRoomText:
+ text_far _CinnabarGymBlaineTM38NoRoomText
text_end
-CinnabarGymTrainerText1:
+CinnabarGymSuperNerd1:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_0
- jr nz, .asm_46bb4
- ld hl, CinnabarGymBattleText2
+ jr nz, .defeated
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText2
- ld de, CinnabarGymEndBattleText2
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.asm_46bb4
- ld hl, CinnabarGymAfterBattleText2
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText2:
- text_far _CinnabarGymBattleText2
+.BattleText:
+ text_far _CinnabarGymSuperNerd1BattleText
text_end
-CinnabarGymEndBattleText2:
- text_far _CinnabarGymEndBattleText2
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd1EndBattleText
text_end
-CinnabarGymAfterBattleText2:
- text_far _CinnabarGymAfterBattleText2
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd1AfterBattleText
text_end
-CinnabarGymTrainerText2:
+CinnabarGymSuperNerd2:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_1
- jr nz, .asm_751a8
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_75196
CheckEvent EVENT_CINNABAR_GYM_GATE1_UNLOCKED
jr nz, .asm_75196
ld e, $00
jp CinnabarGymScript_753de
-
.asm_75196
- ld hl, CinnabarGymBattleText1
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText1
- ld de, CinnabarGymEndBattleText1
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-
-.asm_751a8
- ld hl, CinnabarGymAfterBattleText1
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText1:
- text_far _CinnabarGymBattleText1
+.BattleText:
+ text_far _CinnabarGymSuperNerd2BattleText
text_end
-CinnabarGymEndBattleText1:
- text_far _CinnabarGymEndBattleText1
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd2EndBattleText
text_end
-CinnabarGymAfterBattleText1:
- text_far _CinnabarGymAfterBattleText1
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd2AfterBattleText
text_end
-CinnabarGymTrainerText3:
+CinnabarGymSuperNerd3:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_2
- jr nz, .afterBeat
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_751dc
CheckEvent EVENT_CINNABAR_GYM_GATE2_UNLOCKED
jr nz, .asm_751dc
ld e, $1
jp CinnabarGymScript_753de
-
.asm_751dc
- ld hl, CinnabarGymBattleText3
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText3
- ld de, CinnabarGymEndBattleText3
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.afterBeat
- ld hl, CinnabarGymAfterBattleText3
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText3:
- text_far _CinnabarGymBattleText3
+.BattleText:
+ text_far _CinnabarGymSuperNerd3BattleText
text_end
-CinnabarGymEndBattleText3:
- text_far _CinnabarGymEndBattleText3
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd3EndBattleText
text_end
-CinnabarGymAfterBattleText3:
- text_far _CinnabarGymAfterBattleText3
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd3AfterBattleText
text_end
-CinnabarGymTrainerText4:
+CinnabarGymSuperNerd4:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_3
- jr nz, .afterBeat
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_75222
CheckEvent EVENT_CINNABAR_GYM_GATE3_UNLOCKED
jr nz, .asm_75222
ld e, $2
jp CinnabarGymScript_753de
-
.asm_75222
- ld hl, CinnabarGymBattleText4
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText4
- ld de, CinnabarGymEndBattleText4
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.afterBeat
- ld hl, CinnabarGymAfterBattleText4
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText4:
- text_far _CinnabarGymBattleText4
+.BattleText:
+ text_far _CinnabarGymSuperNerd4BattleText
text_end
-CinnabarGymEndBattleText4:
- text_far _CinnabarGymEndBattleText4
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd4EndBattleText
text_end
-CinnabarGymAfterBattleText4:
- text_far _CinnabarGymAfterBattleText4
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd4AfterBattleText
text_end
-CinnabarGymTrainerText5:
+CinnabarGymSuperNerd5:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_4
- jr nz, .afterBeat
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_75222
CheckEvent EVENT_CINNABAR_GYM_GATE4_UNLOCKED
jr nz, .asm_75222
ld e, $3
jp CinnabarGymScript_753de
-
.asm_75222
- ld hl, CinnabarGymBattleText5
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText5
- ld de, CinnabarGymEndBattleText5
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.afterBeat
- ld hl, CinnabarGymAfterBattleText5
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText5:
- text_far _CinnabarGymBattleText5
+.BattleText:
+ text_far _CinnabarGymSuperNerd5BattleText
text_end
-CinnabarGymEndBattleText5:
- text_far _CinnabarGymEndBattleText5
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd5EndBattleText
text_end
-CinnabarGymAfterBattleText5:
- text_far _CinnabarGymAfterBattleText5
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd5AfterBattleText
text_end
-CinnabarGymTrainerText6:
+CinnabarGymSuperNerd6:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_5
- jr nz, .afterBeat
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_75222
CheckEvent EVENT_CINNABAR_GYM_GATE5_UNLOCKED
jr nz, .asm_75222
ld e, $4
jp CinnabarGymScript_753de
-
.asm_75222
- ld hl, CinnabarGymBattleText6
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText6
- ld de, CinnabarGymEndBattleText6
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.afterBeat
- ld hl, CinnabarGymAfterBattleText6
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText6:
- text_far _CinnabarGymBattleText6
+.BattleText:
+ text_far _CinnabarGymSuperNerd6BattleText
text_end
-CinnabarGymEndBattleText6:
- text_far _CinnabarGymEndBattleText6
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd6EndBattleText
text_end
-CinnabarGymAfterBattleText6:
- text_far _CinnabarGymAfterBattleText6
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd6AfterBattleText
text_end
-CinnabarGymTrainerText7:
+CinnabarGymSuperNerd7:
text_asm
call CinnabarGymSetTrainerHeader
CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_6
- jr nz, .afterBeat
+ jr nz, .defeated
call CinnabarGymScript_753f3
jr nz, .asm_75222
CheckEvent EVENT_CINNABAR_GYM_GATE6_UNLOCKED
jr nz, .asm_75222
ld e, $5
jp CinnabarGymScript_753de
-
.asm_75222
- ld hl, CinnabarGymBattleText7
+ ld hl, .BattleText
call PrintText
- ld hl, CinnabarGymEndBattleText7
- ld de, CinnabarGymEndBattleText7
+ ld hl, .EndBattleText
+ ld de, .EndBattleText
call SaveEndBattleTextPointers
- jp CinnabarGymScript_750c3
-.afterBeat
- ld hl, CinnabarGymAfterBattleText7
+ jp CinnabarGymStartBattleScript
+.defeated
+ ld hl, .AfterBattleText
call PrintText
jp TextScriptEnd
-CinnabarGymBattleText7:
- text_far _CinnabarGymBattleText7
+.BattleText:
+ text_far _CinnabarGymSuperNerd7BattleText
text_end
-CinnabarGymEndBattleText7:
- text_far _CinnabarGymEndBattleText7
+.EndBattleText:
+ text_far _CinnabarGymSuperNerd7EndBattleText
text_end
-CinnabarGymAfterBattleText7:
- text_far _CinnabarGymAfterBattleText7
+.AfterBattleText:
+ text_far _CinnabarGymSuperNerd7AfterBattleText
text_end
-CinnabarGymGuideText:
+CinnabarGymGymGuideText:
text_asm
- callfar Func_f2133
+ callfar CinnabarGymPrintGymGuideText
jp TextScriptEnd
diff --git a/scripts/CinnabarGym3.asm b/scripts/CinnabarGym_3.asm
index dae792df..a738de89 100644
--- a/scripts/CinnabarGym3.asm
+++ b/scripts/CinnabarGym_3.asm
@@ -1,20 +1,20 @@
-Func_f2133::
+CinnabarGymPrintGymGuideText::
CheckEvent EVENT_BEAT_BLAINE
jr nz, .afterBeat
- ld hl, CinnabarGymGuidePreBattleText
+ ld hl, .ChampInMakingText
jr .done
.afterBeat
- ld hl, CinnabarGymGuidePostBattleText
+ ld hl, .BeatBlaineText
.done
call PrintText
ret
-CinnabarGymGuidePreBattleText:
- text_far _CinnabarGymGuidePreBattleText
+.ChampInMakingText:
+ text_far _CinnabarGymGymGuideChampInMakingText
text_end
-CinnabarGymGuidePostBattleText:
- text_far _CinnabarGymGuidePostBattleText
+.BeatBlaineText:
+ text_far _CinnabarGymGymGuideBeatBlaineText
text_end
Func_f2150::
diff --git a/scripts/CinnabarIsland.asm b/scripts/CinnabarIsland.asm
index a1b20cd3..aca1b995 100644
--- a/scripts/CinnabarIsland.asm
+++ b/scripts/CinnabarIsland.asm
@@ -9,10 +9,11 @@ CinnabarIsland_Script:
jp CallFunctionInTable
CinnabarIsland_ScriptPointers:
- dw CinnabarIslandScript0
- dw CinnabarIslandScript1
+ def_script_pointers
+ dw_const CinnabarIslandDefaultScript, SCRIPT_CINNABARISLAND_DEFAULT
+ dw_const CinnabarIslandPlayerMovingScript, SCRIPT_CINNABARISLAND_PLAYER_MOVING
-CinnabarIslandScript0:
+CinnabarIslandDefaultScript:
ld b, SECRET_KEY
call IsItemInBag
ret nz
@@ -24,7 +25,7 @@ CinnabarIslandScript0:
ret nz
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
- ld a, $8
+ ld a, TEXT_CINNABARISLAND_DOOR_IS_LOCKED
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -37,49 +38,50 @@ CinnabarIslandScript0:
xor a
ld [wSpritePlayerStateData1FacingDirection], a
ld [wJoyIgnore], a
- ld a, $1
+ ld a, SCRIPT_CINNABARISLAND_PLAYER_MOVING
ld [wCinnabarIslandCurScript], a
ret
-CinnabarIslandScript1:
+CinnabarIslandPlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $0
+ ld a, SCRIPT_CINNABARISLAND_DEFAULT
ld [wCinnabarIslandCurScript], a
ret
CinnabarIsland_TextPointers:
- dw CinnabarIslandText1
- dw CinnabarIslandText2
- dw CinnabarIslandText3
- dw MartSignText
- dw PokeCenterSignText
- dw CinnabarIslandText6
- dw CinnabarIslandText7
- dw CinnabarIslandText8
+ def_text_pointers
+ dw_const CinnabarIslandGirlText, TEXT_CINNABARISLAND_GIRL
+ dw_const CinnabarIslandGamblerText, TEXT_CINNABARISLAND_GAMBLER
+ dw_const CinnabarIslandSignText, TEXT_CINNABARISLAND_SIGN
+ dw_const MartSignText, TEXT_CINNABARISLAND_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_CINNABARISLAND_POKECENTER_SIGN
+ dw_const CinnabarIslandPokemonLabSignText, TEXT_CINNABARISLAND_POKEMONLAB_SIGN
+ dw_const CinnabarIslandGymSignText, TEXT_CINNABARISLAND_GYM_SIGN
+ dw_const CinnabarIslandDoorIsLockedText, TEXT_CINNABARISLAND_DOOR_IS_LOCKED
-CinnabarIslandText8:
- text_far _CinnabarIslandText8
+CinnabarIslandDoorIsLockedText:
+ text_far _CinnabarIslandDoorIsLockedText
text_end
-CinnabarIslandText1:
- text_far _CinnabarIslandText1
+CinnabarIslandGirlText:
+ text_far _CinnabarIslandGirlText
text_end
-CinnabarIslandText2:
- text_far _CinnabarIslandText2
+CinnabarIslandGamblerText:
+ text_far _CinnabarIslandGamblerText
text_end
-CinnabarIslandText3:
- text_far _CinnabarIslandText3
+CinnabarIslandSignText:
+ text_far _CinnabarIslandSignText
text_end
-CinnabarIslandText6:
- text_far _CinnabarIslandText6
+CinnabarIslandPokemonLabSignText:
+ text_far _CinnabarIslandPokemonLabSignText
text_end
-CinnabarIslandText7:
- text_far _CinnabarIslandText7
+CinnabarIslandGymSignText:
+ text_far _CinnabarIslandGymSignText
text_end
diff --git a/scripts/CinnabarLab.asm b/scripts/CinnabarLab.asm
index 2f4be7f2..baf9b40a 100644
--- a/scripts/CinnabarLab.asm
+++ b/scripts/CinnabarLab.asm
@@ -3,28 +3,29 @@ CinnabarLab_Script:
ret
CinnabarLab_TextPointers:
- dw Lab1Text1
- dw Lab1Text2
- dw Lab1Text3
- dw Lab1Text4
- dw Lab1Text5
+ def_text_pointers
+ dw_const CinnabarLabFishingGuruText, TEXT_CINNABARLAB_FISHING_GURU
+ dw_const CinnabarLabPhotoText, TEXT_CINNABARLAB_PHOTO
+ dw_const CinnabarLabMeetingRoomSignText, TEXT_CINNABARLAB_MEETING_ROOM_SIGN
+ dw_const CinnabarLabRAndDSignText, TEXT_CINNABARLAB_R_AND_D_SIGN
+ dw_const CinnabarLabTestingRoomSignText, TEXT_CINNABARLAB_TESTING_ROOM_SIGN
-Lab1Text1:
- text_far _Lab1Text1
+CinnabarLabFishingGuruText:
+ text_far _CinnabarLabFishingGuruText
text_end
-Lab1Text2:
- text_far _Lab1Text2
+CinnabarLabPhotoText:
+ text_far _CinnabarLabPhotoText
text_end
-Lab1Text3:
- text_far _Lab1Text3
+CinnabarLabMeetingRoomSignText:
+ text_far _CinnabarLabMeetingRoomSignText
text_end
-Lab1Text4:
- text_far _Lab1Text4
+CinnabarLabRAndDSignText:
+ text_far _CinnabarLabRAndDSignText
text_end
-Lab1Text5:
- text_far _Lab1Text5
+CinnabarLabTestingRoomSignText:
+ text_far _CinnabarLabTestingRoomSignText
text_end
diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm
index 7ed9b1a9..7e1f57f0 100644
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -2,8 +2,9 @@ CinnabarLabFossilRoom_Script:
jp EnableAutoTextBoxDrawing
CinnabarLabFossilRoom_TextPointers:
- dw Lab4Text1
- dw Lab4Text2
+ def_text_pointers
+ dw_const CinnabarLabFossilRoomScientist1Text, TEXT_CINNABARLABFOSSILROOM_SCIENTIST1
+ dw_const CinnabarLabFossilRoomScientist2Text, TEXT_CINNABARLABFOSSILROOM_SCIENTIST2
Lab4Script_GetFossilsInBag:
; construct a list of all fossils in the player's bag
@@ -46,59 +47,59 @@ FossilsList:
db OLD_AMBER
db 0 ; end
-Lab4Text1:
+CinnabarLabFossilRoomScientist1Text:
text_asm
CheckEvent EVENT_GAVE_FOSSIL_TO_LAB
- jr nz, .asm_75d96
- ld hl, Lab4Text_75dc6
+ jr nz, .check_done_reviving
+ ld hl, .Text
call PrintText
call Lab4Script_GetFossilsInBag
ld a, [wFilteredBagItemsCount]
and a
- jr z, .asm_75d8d
+ jr z, .no_fossils
farcall GiveFossilToCinnabarLab
- jr .asm_75d93
-.asm_75d8d
- ld hl, Lab4Text_75dcb
+ jr .done
+.no_fossils
+ ld hl, .NoFossilsText
call PrintText
-.asm_75d93
+.done
jp TextScriptEnd
-.asm_75d96
+.check_done_reviving
CheckEventAfterBranchReuseA EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_GAVE_FOSSIL_TO_LAB
- jr z, .asm_75da2
- ld hl, Lab4Text_75dd0
+ jr z, .done_reviving
+ ld hl, .GoForAWalkText
call PrintText
- jr .asm_75d93
-.asm_75da2
+ jr .done
+.done_reviving
call LoadFossilItemAndMonNameBank1D
- ld hl, Lab4Text_75dd5
+ ld hl, .FossilIsBackToLifeText
call PrintText
SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON
ld a, [wFossilMon]
ld b, a
ld c, 30
call GivePokemon
- jr nc, .asm_75d93
+ jr nc, .done
ResetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL, EVENT_LAB_HANDING_OVER_FOSSIL_MON
- jr .asm_75d93
+ jr .done
-Lab4Text_75dc6:
- text_far _Lab4Text_75dc6
+.Text:
+ text_far _CinnabarLabFossilRoomScientist1Text
text_end
-Lab4Text_75dcb:
- text_far _Lab4Text_75dcb
+.NoFossilsText:
+ text_far _CinnabarLabFossilRoomScientist1NoFossilsText
text_end
-Lab4Text_75dd0:
- text_far _Lab4Text_75dd0
+.GoForAWalkText:
+ text_far _CinnabarLabFossilRoomScientist1GoForAWalkText
text_end
-Lab4Text_75dd5:
- text_far _Lab4Text_75dd5
+.FossilIsBackToLifeText:
+ text_far _CinnabarLabFossilRoomScientist1FossilIsBackToLifeText
text_end
-Lab4Text2:
+CinnabarLabFossilRoomScientist2Text:
text_asm
ld a, TRADE_FOR_STICKY
ld [wWhichTrade], a
diff --git a/scripts/CinnabarLabMetronomeRoom.asm b/scripts/CinnabarLabMetronomeRoom.asm
index b43f98e2..8375eb39 100644
--- a/scripts/CinnabarLabMetronomeRoom.asm
+++ b/scripts/CinnabarLabMetronomeRoom.asm
@@ -2,61 +2,61 @@ CinnabarLabMetronomeRoom_Script:
jp EnableAutoTextBoxDrawing
CinnabarLabMetronomeRoom_TextPointers:
- dw Lab3Text1
- dw Lab3Text2
- dw Lab3Text3
- dw Lab3Text4
- dw Lab3Text5
+ def_text_pointers
+ dw_const CinnabarLabMetronomeRoomScientist1Text, TEXT_CINNABARLABMETRONOMEROOM_SCIENTIST1
+ dw_const CinnabarLabMetronomeRoomScientist2Text, TEXT_CINNABARLABMETRONOMEROOM_SCIENTIST2
+ dw_const CinnabarLabMetronomeRoomPCText, TEXT_CINNABARLABMETRONOMEROOM_PC_KEYBOARD
+ dw_const CinnabarLabMetronomeRoomPCText, TEXT_CINNABARLABMETRONOMEROOM_PC_MONITOR
+ dw_const CinnabarLabMetronomeRoomAmberPipeText, TEXT_CINNABARLABMETRONOMEROOM_AMBER_PIPE
-Lab3Text1:
+CinnabarLabMetronomeRoomScientist1Text:
text_asm
CheckEvent EVENT_GOT_TM35
jr nz, .got_item
- ld hl, TM35PreReceiveText
+ ld hl, .Text
call PrintText
lb bc, TM_METRONOME, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedTM35Text
+ ld hl, .ReceivedTM35Text
call PrintText
SetEvent EVENT_GOT_TM35
jr .done
.bag_full
- ld hl, TM35NoRoomText
+ ld hl, .TM35NoRoomText
call PrintText
jr .done
.got_item
- ld hl, TM35ExplanationText
+ ld hl, .TM35ExplanationText
call PrintText
.done
jp TextScriptEnd
-TM35PreReceiveText:
- text_far _TM35PreReceiveText
+.Text:
+ text_far _CinnabarLabMetronomeRoomScientist1Text
text_end
-ReceivedTM35Text:
- text_far _ReceivedTM35Text
+.ReceivedTM35Text:
+ text_far _CinnabarLabMetronomeRoomScientist1ReceivedTM35Text
sound_get_item_1
text_end
-TM35ExplanationText:
- text_far _TM35ExplanationText
+.TM35ExplanationText:
+ text_far _CinnabarLabMetronomeRoomScientist1TM35ExplanationText
text_end
-TM35NoRoomText:
- text_far _TM35NoRoomText
+.TM35NoRoomText:
+ text_far _CinnabarLabMetronomeRoomScientist1TM35NoRoomText
text_end
-Lab3Text2:
- text_far _Lab3Text2
+CinnabarLabMetronomeRoomScientist2Text:
+ text_far _CinnabarLabMetronomeRoomScientist2Text
text_end
-Lab3Text4:
-Lab3Text3:
- text_far _Lab3Text3
+CinnabarLabMetronomeRoomPCText:
+ text_far _CinnabarLabMetronomeRoomPCText
text_end
-Lab3Text5:
- text_far _Lab3Text5
+CinnabarLabMetronomeRoomAmberPipeText:
+ text_far _CinnabarLabMetronomeRoomAmberPipeText
text_end
diff --git a/scripts/CinnabarLabTradeRoom.asm b/scripts/CinnabarLabTradeRoom.asm
index 64f1975d..452aff5d 100644
--- a/scripts/CinnabarLabTradeRoom.asm
+++ b/scripts/CinnabarLabTradeRoom.asm
@@ -2,24 +2,25 @@ CinnabarLabTradeRoom_Script:
jp EnableAutoTextBoxDrawing
CinnabarLabTradeRoom_TextPointers:
- dw Lab2Text1
- dw Lab2Text2
- dw Lab2Text3
+ def_text_pointers
+ dw_const CinnabarLabTradeRoomSuperNerdText, TEXT_CINNABARLABTRADEROOM_SUPER_NERD
+ dw_const CinnabarLabTradeRoomGrampsText, TEXT_CINNABARLABTRADEROOM_GRAMPS
+ dw_const CinnabarLabTradeRoomBeautyText, TEXT_CINNABARLABTRADEROOM_BEAUTY
-Lab2Text1:
- text_far _Lab2Text1
+CinnabarLabTradeRoomSuperNerdText:
+ text_far _CinnabarLabTradeRoomSuperNerdText
text_end
-Lab2Text2:
+CinnabarLabTradeRoomGrampsText:
text_asm
ld a, TRADE_FOR_BUFFY
ld [wWhichTrade], a
- jr Lab2DoTrade
+ jr CinnabarLabTradeRoomDoTrade
-Lab2Text3:
+CinnabarLabTradeRoomBeautyText:
text_asm
ld a, TRADE_FOR_CEZANNE
ld [wWhichTrade], a
-Lab2DoTrade:
+CinnabarLabTradeRoomDoTrade:
predef DoInGameTradeDialogue
jp TextScriptEnd
diff --git a/scripts/CinnabarMart.asm b/scripts/CinnabarMart.asm
index e614bd29..29b8b7ae 100644
--- a/scripts/CinnabarMart.asm
+++ b/scripts/CinnabarMart.asm
@@ -2,14 +2,15 @@ CinnabarMart_Script:
jp EnableAutoTextBoxDrawing
CinnabarMart_TextPointers:
- dw CinnabarCashierText
- dw CinnabarMartText2
- dw CinnabarMartText3
+ def_text_pointers
+ dw_const CinnabarMartClerkText, TEXT_CINNABARMART_CLERK
+ dw_const CinnabarMartSilphWorkerFText, TEXT_CINNABARMART_SILPH_WORKER_F
+ dw_const CinnabarMartScientistText, TEXT_CINNABARMART_SCIENTIST
-CinnabarMartText2:
- text_far _CinnabarMartText2
+CinnabarMartSilphWorkerFText:
+ text_far _CinnabarMartSilphWorkerFText
text_end
-CinnabarMartText3:
- text_far _CinnabarMartText3
+CinnabarMartScientistText:
+ text_far _CinnabarMartScientistText
text_end
diff --git a/scripts/CinnabarPokecenter.asm b/scripts/CinnabarPokecenter.asm
index 3a229ca3..8197a94d 100644
--- a/scripts/CinnabarPokecenter.asm
+++ b/scripts/CinnabarPokecenter.asm
@@ -3,27 +3,28 @@ CinnabarPokecenter_Script:
jp EnableAutoTextBoxDrawing
CinnabarPokecenter_TextPointers:
- dw CinnabarHealNurseText
- dw CinnabarPokecenterText2
- dw CinnabarPokecenterText3
- dw CinnabarTradeNurseText
- dw CinnabarPokecenterText5
+ def_text_pointers
+ dw_const CinnabarPokecenterNurseText, TEXT_CINNABARPOKECENTER_NURSE
+ dw_const CinnabarPokecenterCooltrainerFText, TEXT_CINNABARPOKECENTER_COOLTRAINER_F
+ dw_const CinnabarPokecenterGentlemanText, TEXT_CINNABARPOKECENTER_GENTLEMAN
+ dw_const CinnabarPokecenterLinkReceptionistText, TEXT_CINNABARPOKECENTER_LINK_RECEPTIONIST
+ dw_const CinnabarPokecenterChanseyText, TEXT_CINNABARPOKECENTER_CHANSEY
-CinnabarHealNurseText:
+CinnabarPokecenterNurseText:
script_pokecenter_nurse
-CinnabarPokecenterText2:
- text_far _CinnabarPokecenterText2
+CinnabarPokecenterCooltrainerFText:
+ text_far _CinnabarPokecenterCooltrainerFText
text_end
-CinnabarPokecenterText3:
- text_far _CinnabarPokecenterText3
+CinnabarPokecenterGentlemanText:
+ text_far _CinnabarPokecenterGentlemanText
text_end
-CinnabarTradeNurseText:
+CinnabarPokecenterLinkReceptionistText:
script_cable_club_receptionist
-CinnabarPokecenterText5:
+CinnabarPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/Colosseum.asm b/scripts/Colosseum.asm
index 83d41bdc..4aaa4236 100644
--- a/scripts/Colosseum.asm
+++ b/scripts/Colosseum.asm
@@ -2,8 +2,9 @@ Colosseum_Script:
jp TradeCenter_Script
Colosseum_TextPointers:
- dw ColosseumText1
+ def_text_pointers
+ dw_const ColosseumOpponentText, TEXT_COLOSSEUM_OPPONENT
-ColosseumText1:
- text_far _ColosseumText1
+ColosseumOpponentText:
+ text_far _ColosseumOpponentText
text_end
diff --git a/scripts/CopycatsHouse1F.asm b/scripts/CopycatsHouse1F.asm
index fc5ff3cf..b321c49b 100644
--- a/scripts/CopycatsHouse1F.asm
+++ b/scripts/CopycatsHouse1F.asm
@@ -2,20 +2,21 @@ CopycatsHouse1F_Script:
jp EnableAutoTextBoxDrawing
CopycatsHouse1F_TextPointers:
- dw CopycatsHouse1FText1
- dw CopycatsHouse1FText2
- dw CopycatsHouse1FText3
+ def_text_pointers
+ dw_const CopycatsHouse1FMiddleAgedWomanText, TEXT_COPYCATSHOUSE1F_MIDDLE_AGED_WOMAN
+ dw_const CopycatsHouse1FMiddleAgedManText, TEXT_COPYCATSHOUSE1F_MIDDLE_AGED_MAN
+ dw_const CopycatsHouse1FChanseyText, TEXT_COPYCATSHOUSE1F_CHANSEY
-CopycatsHouse1FText1:
- text_far _CopycatsHouse1FText1
+CopycatsHouse1FMiddleAgedWomanText:
+ text_far _CopycatsHouse1FMiddleAgedWomanText
text_end
-CopycatsHouse1FText2:
- text_far _CopycatsHouse1FText2
+CopycatsHouse1FMiddleAgedManText:
+ text_far _CopycatsHouse1FMiddleAgedManText
text_end
-CopycatsHouse1FText3:
- text_far _CopycatsHouse1FText3
+CopycatsHouse1FChanseyText:
+ text_far _CopycatsHouse1FChanseyText
text_asm
ld a, CHANSEY
call PlayCry
diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm
index ef0742ab..85da9a63 100644
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -2,31 +2,32 @@ CopycatsHouse2F_Script:
jp EnableAutoTextBoxDrawing
CopycatsHouse2F_TextPointers:
- dw CopycatsHouse2FText1
- dw CopycatsHouse2FText2
- dw CopycatsHouse2FText3
- dw CopycatsHouse2FText4
- dw CopycatsHouse2FText5
- dw CopycatsHouse2FText6
- dw CopycatsHouse2FText7
+ def_text_pointers
+ dw_const CopycatsHouse2FCopycatText, TEXT_COPYCATSHOUSE2F_COPYCAT
+ dw_const CopycatsHouse2FDoduoText, TEXT_COPYCATSHOUSE2F_DODUO
+ dw_const CopycatsHouse2FRareDollText, TEXT_COPYCATSHOUSE2F_MONSTER
+ dw_const CopycatsHouse2FRareDollText, TEXT_COPYCATSHOUSE2F_BIRD
+ dw_const CopycatsHouse2FRareDollText, TEXT_COPYCATSHOUSE2F_FAIRY
+ dw_const CopycatsHouse2FSNESText, TEXT_COPYCATSHOUSE2F_SNES
+ dw_const CopycatsHouse2FPCText, TEXT_COPYCATSHOUSE2F_PC
-CopycatsHouse2FText1:
+CopycatsHouse2FCopycatText:
text_asm
CheckEvent EVENT_GOT_TM31
jr nz, .got_item
ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, CopycatsHouse2FText_5ccd4
+ ld hl, .DoYouLikePokemonText
call PrintText
ld b, POKE_DOLL
call IsItemInBag
jr z, .done
- ld hl, TM31PreReceiveText
+ ld hl, .TM31PreReceiveText
call PrintText
lb bc, TM_MIMIC, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedTM31Text
+ ld hl, .ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
ldh [hItemToRemoveID], a
@@ -34,69 +35,67 @@ CopycatsHouse2FText1:
SetEvent EVENT_GOT_TM31
jr .done
.bag_full
- ld hl, TM31NoRoomText
+ ld hl, .TM31NoRoomText
call PrintText
jr .done
.got_item
- ld hl, TM31ExplanationText2
+ ld hl, .TM31Explanation2Text
call PrintText
.done
jp TextScriptEnd
-CopycatsHouse2FText_5ccd4:
- text_far _CopycatsHouse2FText_5ccd4
+.DoYouLikePokemonText:
+ text_far _CopycatsHouse2FCopycatDoYouLikePokemonText
text_end
-TM31PreReceiveText:
- text_far _TM31PreReceiveText
+.TM31PreReceiveText:
+ text_far _CopycatsHouse2FCopycatTM31PreReceiveText
text_end
-ReceivedTM31Text:
- text_far _ReceivedTM31Text
+.ReceivedTM31Text:
+ text_far _CopycatsHouse2FCopycatReceivedTM31Text
sound_get_item_1
-TM31ExplanationText1:
- text_far _TM31ExplanationText1
+.TM31Explanation1Text:
+ text_far _CopycatsHouse2FCopycatTM31Explanation1Text
text_waitbutton
text_end
-TM31ExplanationText2:
- text_far _TM31ExplanationText2
+.TM31Explanation2Text:
+ text_far _CopycatsHouse2FCopycatTM31Explanation2Text
text_end
-TM31NoRoomText:
- text_far _TM31NoRoomText
+.TM31NoRoomText:
+ text_far _CopycatsHouse2FCopycatTM31NoRoomText
text_waitbutton
text_end
-CopycatsHouse2FText2:
- text_far _CopycatsHouse2FText2
+CopycatsHouse2FDoduoText:
+ text_far _CopycatsHouse2FDoduoText
text_end
-CopycatsHouse2FText5:
-CopycatsHouse2FText4:
-CopycatsHouse2FText3:
- text_far _CopycatsHouse2FText3
+CopycatsHouse2FRareDollText:
+ text_far _CopycatsHouse2FRareDollText
text_end
-CopycatsHouse2FText6:
- text_far _CopycatsHouse2FText6
+CopycatsHouse2FSNESText:
+ text_far _CopycatsHouse2FSNESText
text_end
-CopycatsHouse2FText7:
+CopycatsHouse2FPCText:
text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
- ld hl, CopycatsHouse2FText_5cd1c
+ ld hl, .CantSeeText
jr nz, .notUp
- ld hl, CopycatsHouse2FText_5cd17
+ ld hl, .MySecretsText
.notUp
call PrintText
jp TextScriptEnd
-CopycatsHouse2FText_5cd17:
- text_far _CopycatsHouse2FText_5cd17
+.MySecretsText:
+ text_far _CopycatsHouse2FPCMySecretsText
text_end
-CopycatsHouse2FText_5cd1c:
- text_far _CopycatsHouse2FText_5cd1c
+.CantSeeText:
+ text_far _CopycatsHouse2FPCCantSeeText
text_end
diff --git a/scripts/Daycare.asm b/scripts/Daycare.asm
index 164664b4..26f4342a 100644
--- a/scripts/Daycare.asm
+++ b/scripts/Daycare.asm
@@ -2,26 +2,27 @@ Daycare_Script:
jp EnableAutoTextBoxDrawing
Daycare_TextPointers:
- dw DayCareMText1
+ def_text_pointers
+ dw_const DaycareGentlemanText, TEXT_DAYCARE_GENTLEMAN
-DayCareMText1:
+DaycareGentlemanText:
text_asm
call SaveScreenTilesToBuffer2
ld a, [wDayCareInUse]
and a
jp nz, .daycareInUse
- ld hl, DayCareIntroText
+ ld hl, .IntroText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- ld hl, DayCareComeAgainText
+ ld hl, .ComeAgainText
jp nz, .done
ld a, [wPartyCount]
dec a
- ld hl, DayCareOnlyHaveOneMonText
+ ld hl, .OnlyHaveOneMonText
jp z, .done
- ld hl, DayCareWhichMonText
+ ld hl, .WhichMonText
call PrintText
xor a
ld [wUpdateSpritesEnabled], a
@@ -33,17 +34,17 @@ DayCareMText1:
call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal
pop af
- ld hl, DayCareAllRightThenText
+ ld hl, .AllRightThenText
jp c, .done
callfar KnowsHMMove
- ld hl, DayCareCantAcceptMonWithHMText
+ ld hl, .CantAcceptMonWithHMText
jp c, .done
xor a
ld [wPartyAndBillsPCSavedMenuItem], a
ld a, [wWhichPokemon]
ld hl, wPartyMonNicks
call GetPartyMonName
- ld hl, DayCareWillLookAfterMonText
+ ld hl, .WillLookAfterMonText
call PrintText
ld a, 1
ld [wDayCareInUse], a
@@ -65,7 +66,7 @@ DayCareMText1:
ldpikacry e, PikachuCry28
callfar PlayPikachuSoundClip
.asm_562e3
- ld hl, DayCareComeSeeMeInAWhileText
+ ld hl, .ComeSeeMeInAWhileText
jp .done
.daycareInUse
@@ -99,20 +100,20 @@ DayCareMText1:
ld [wDayCareStartLevel], a
cp d
ld [hl], d
- ld hl, DayCareMonNeedsMoreTimeText
+ ld hl, .MonNeedsMoreTimeText
jr z, .next
ld a, [wDayCareStartLevel]
ld b, a
ld a, d
sub b
ld [wDayCareNumLevelsGrown], a
- ld hl, DayCareMonHasGrownText
+ ld hl, .MonHasGrownText
.next
call PrintText
ld a, [wPartyCount]
cp PARTY_LENGTH
- ld hl, DayCareNoRoomForMonText
+ ld hl, .NoRoomForMonText
jp z, .leaveMonInDayCare
ld de, wDayCareTotalCost
xor a
@@ -137,13 +138,13 @@ DayCareMText1:
pop hl
dec b
jr nz, .calcPriceLoop
- ld hl, DayCareOweMoneyText
+ ld hl, .OweMoneyText
call PrintText
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
call YesNoChoice
- ld hl, DayCareAllRightThenText
+ ld hl, .AllRightThenText
ld a, [wCurrentMenuItem]
and a
jp nz, .leaveMonInDayCare
@@ -155,7 +156,7 @@ DayCareMText1:
ldh [hMoney + 2], a
call HasEnoughMoney
jr nc, .enoughMoney
- ld hl, DayCareNotEnoughMoneyText
+ ld hl, .NotEnoughMoneyText
jp .leaveMonInDayCare
.enoughMoney
@@ -172,7 +173,7 @@ DayCareMText1:
ld a, MONEY_BOX
ld [wTextBoxID], a
call DisplayTextBoxID
- ld hl, DayCareHeresYourMonText
+ ld hl, .HeresYourMonText
call PrintText
ld a, DAYCARE_TO_PARTY
ld [wMoveMonType], a
@@ -228,7 +229,7 @@ DayCareMText1:
ldpikacry e, PikachuCry35
callfar PlayPikachuSoundClip
.asm_56430
- ld hl, DayCareGotMonBackText
+ ld hl, .GotMonBackText
jr .done
.leaveMonInDayCare
@@ -239,60 +240,60 @@ DayCareMText1:
call PrintText
jp TextScriptEnd
-DayCareIntroText:
- text_far _DayCareIntroText
+.IntroText:
+ text_far _DaycareGentlemanIntroText
text_end
-DayCareWhichMonText:
- text_far _DayCareWhichMonText
+.WhichMonText:
+ text_far _DaycareGentlemanWhichMonText
text_end
-DayCareWillLookAfterMonText:
- text_far _DayCareWillLookAfterMonText
+.WillLookAfterMonText:
+ text_far _DaycareGentlemanWillLookAfterMonText
text_end
-DayCareComeSeeMeInAWhileText:
- text_far _DayCareComeSeeMeInAWhileText
+.ComeSeeMeInAWhileText:
+ text_far _DaycareGentlemanComeSeeMeInAWhileText
text_end
-DayCareMonHasGrownText:
- text_far _DayCareMonHasGrownText
+.MonHasGrownText:
+ text_far _DaycareGentlemanMonHasGrownText
text_end
-DayCareOweMoneyText:
- text_far _DayCareOweMoneyText
+.OweMoneyText:
+ text_far _DaycareGentlemanOweMoneyText
text_end
-DayCareGotMonBackText:
- text_far _DayCareGotMonBackText
+.GotMonBackText:
+ text_far _DaycareGentlemanGotMonBackText
text_end
-DayCareMonNeedsMoreTimeText:
- text_far _DayCareMonNeedsMoreTimeText
+.MonNeedsMoreTimeText:
+ text_far _DaycareGentlemanMonNeedsMoreTimeText
text_end
-DayCareAllRightThenText:
- text_far _DayCareAllRightThenText
-DayCareComeAgainText:
- text_far _DayCareComeAgainText
+.AllRightThenText:
+ text_far _DaycareGentlemanAllRightThenText
+.ComeAgainText:
+ text_far _DaycareGentlemanComeAgainText
text_end
-DayCareNoRoomForMonText:
- text_far _DayCareNoRoomForMonText
+.NoRoomForMonText:
+ text_far _DaycareGentlemanNoRoomForMonText
text_end
-DayCareOnlyHaveOneMonText:
- text_far _DayCareOnlyHaveOneMonText
+.OnlyHaveOneMonText:
+ text_far _DaycareGentlemanOnlyHaveOneMonText
text_end
-DayCareCantAcceptMonWithHMText:
- text_far _DayCareCantAcceptMonWithHMText
+.CantAcceptMonWithHMText:
+ text_far _DaycareGentlemanCantAcceptMonWithHMText
text_end
-DayCareHeresYourMonText:
- text_far _DayCareHeresYourMonText
+.HeresYourMonText:
+ text_far _DaycareGentlemanHeresYourMonText
text_end
-DayCareNotEnoughMoneyText:
- text_far _DayCareNotEnoughMoneyText
+.NotEnoughMoneyText:
+ text_far _DaycareGentlemanNotEnoughMoneyText
text_end
diff --git a/scripts/DiglettsCave.asm b/scripts/DiglettsCave.asm
index f9f2e590..96a60791 100644
--- a/scripts/DiglettsCave.asm
+++ b/scripts/DiglettsCave.asm
@@ -2,5 +2,6 @@ DiglettsCave_Script:
jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers:
+ def_text_pointers
text_end ; unused
diff --git a/scripts/DiglettsCaveRoute11.asm b/scripts/DiglettsCaveRoute11.asm
index 648fe2bc..826d64b2 100644
--- a/scripts/DiglettsCaveRoute11.asm
+++ b/scripts/DiglettsCaveRoute11.asm
@@ -5,8 +5,9 @@ DiglettsCaveRoute11_Script:
ret
DiglettsCaveRoute11_TextPointers:
- dw DiglettsCaveEntranceRoute11Text1
+ def_text_pointers
+ dw_const DiglettsCaveRoute11GamblerText, TEXT_DIGLETTSCAVEROUTE11_GAMBLER
-DiglettsCaveEntranceRoute11Text1:
- text_far _DiglettsCaveEntRoute11Text1
+DiglettsCaveRoute11GamblerText:
+ text_far _DiglettsCaveRoute11GamblerText
text_end
diff --git a/scripts/DiglettsCaveRoute2.asm b/scripts/DiglettsCaveRoute2.asm
index 32f17d65..46b29452 100644
--- a/scripts/DiglettsCaveRoute2.asm
+++ b/scripts/DiglettsCaveRoute2.asm
@@ -4,8 +4,9 @@ DiglettsCaveRoute2_Script:
jp EnableAutoTextBoxDrawing
DiglettsCaveRoute2_TextPointers:
- dw DiglettsCaveRoute2Text1
+ def_text_pointers
+ dw_const DiglettsCaveRoute2FishingGuruText, TEXT_DIGLETTSCAVEROUTE2_FISHING_GURU
-DiglettsCaveRoute2Text1:
- text_far _DiglettsCaveRoute2Text1
+DiglettsCaveRoute2FishingGuruText:
+ text_far _DiglettsCaveRoute2FishingGuruText
text_end
diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm
index fc9f68ea..298c2fcb 100644
--- a/scripts/FightingDojo.asm
+++ b/scripts/FightingDojo.asm
@@ -7,20 +7,21 @@ FightingDojo_Script:
ld [wFightingDojoCurScript], a
ret
-FightingDojoScript_5cd70:
- xor a
+FightingDojoResetScripts:
+ xor a ; SCRIPT_FIGHTINGDOJO_DEFAULT
ld [wJoyIgnore], a
ld [wFightingDojoCurScript], a
ld [wCurMapScript], a
ret
FightingDojo_ScriptPointers:
- dw FightingDojoScript1
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw FightingDojoScript3
+ def_script_pointers
+ dw_const FightingDojoDefaultScript, SCRIPT_FIGHTINGDOJO_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_FIGHTINGDOJO_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_FIGHTINGDOJO_END_BATTLE
+ dw_const FightingDojoKarateMasterPostBattleScript, SCRIPT_FIGHTINGDOJO_KARATE_MASTER_POST_BATTLE
-FightingDojoScript1:
+FightingDojoDefaultScript:
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
ret nz
call CheckFightingMapTrainers
@@ -42,198 +43,197 @@ FightingDojoScript1:
ld [wcf0d], a
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, FIGHTINGDOJO_KARATE_MASTER
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $1
+ ld a, TEXT_FIGHTINGDOJO_KARATE_MASTER
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
-FightingDojoScript3:
+FightingDojoKarateMasterPostBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, FightingDojoScript_5cd70
+ jp z, FightingDojoResetScripts
ld a, [wcf0d]
and a
- jr z, .asm_5cde4
+ jr z, .already_facing
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, FIGHTINGDOJO_KARATE_MASTER
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
-
-.asm_5cde4
- ld a, $f0
+.already_facing
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3
- ld a, $8
+ ld a, TEXT_FIGHTINGDOJO_KARATE_MASTER_I_WILL_GIVE_YOU_A_POKEMON
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- xor a
+ xor a ; SCRIPT_FIGHTINGDOJO_DEFAULT
ld [wJoyIgnore], a
ld [wFightingDojoCurScript], a
ld [wCurMapScript], a
ret
FightingDojo_TextPointers:
- dw FightingDojoText1
- dw FightingDojoText2
- dw FightingDojoText3
- dw FightingDojoText4
- dw FightingDojoText5
- dw FightingDojoText6
- dw FightingDojoText7
- dw FightingDojoText8
+ def_text_pointers
+ dw_const FightingDojoKarateMasterText, TEXT_FIGHTINGDOJO_KARATE_MASTER
+ dw_const FightingDojoBlackbelt1Text, TEXT_FIGHTINGDOJO_BLACKBELT1
+ dw_const FightingDojoBlackbelt2Text, TEXT_FIGHTINGDOJO_BLACKBELT2
+ dw_const FightingDojoBlackbelt3Text, TEXT_FIGHTINGDOJO_BLACKBELT3
+ dw_const FightingDojoBlackbelt4Text, TEXT_FIGHTINGDOJO_BLACKBELT4
+ dw_const FightingDojoHitmonleePokeBallText, TEXT_FIGHTINGDOJO_HITMONLEE_POKE_BALL
+ dw_const FightingDojoHitmonchanPokeBallText, TEXT_FIGHTINGDOJO_HITMONCHAN_POKE_BALL
+ dw_const FightingDojoKarateMasterText.IWillGiveYouAPokemonText, TEXT_FIGHTINGDOJO_KARATE_MASTER_I_WILL_GIVE_YOU_A_POKEMON
FightingDojoTrainerHeaders:
def_trainers 2
FightingDojoTrainerHeader0:
- trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBattleText1, FightingDojoEndBattleText1, FightingDojoAfterBattleText1
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBlackbelt1BattleText, FightingDojoBlackbelt1EndBattleText, FightingDojoBlackbelt1AfterBattleText
FightingDojoTrainerHeader1:
- trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBattleText2, FightingDojoEndBattleText2, FightingDojoAfterBattleText2
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBlackbelt2BattleText, FightingDojoBlackbelt2EndBattleText, FightingDojoBlackbelt2AfterBattleText
FightingDojoTrainerHeader2:
- trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBattleText3, FightingDojoEndBattleText3, FightingDojoAfterBattleText3
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBlackbelt3BattleText, FightingDojoBlackbelt3EndBattleText, FightingDojoBlackbelt3AfterBattleText
FightingDojoTrainerHeader3:
- trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBattleText4, FightingDojoEndBattleText4, FightingDojoAfterBattleText4
+ trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBlackbelt4BattleText, FightingDojoBlackbelt4EndBattleText, FightingDojoBlackbelt4AfterBattleText
db -1 ; end
-FightingDojoText1:
+FightingDojoKarateMasterText:
text_asm
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
- jp nz, .continue1
+ jp nz, .defeated_dojo
CheckEventReuseA EVENT_BEAT_KARATE_MASTER
- jp nz, .continue2
- ld hl, FightingDojoText_5ce8e
+ jp nz, .defeated_master
+ ld hl, .Text
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, FightingDojoText_5ce93
- ld de, FightingDojoText_5ce93
+ ld hl, .DefeatedText
+ ld de, .DefeatedText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
- ld a, $3
+ ld a, SCRIPT_FIGHTINGDOJO_KARATE_MASTER_POST_BATTLE
ld [wFightingDojoCurScript], a
ld [wCurMapScript], a
- jr .asm_9dba4
-.continue1
- ld hl, FightingDojoText_5ce9d
+ jr .end
+.defeated_dojo
+ ld hl, .StayAndTrainWithUsText
call PrintText
- jr .asm_9dba4
-.continue2
- ld hl, FightingDojoText8
+ jr .end
+.defeated_master
+ ld hl, .IWillGiveYouAPokemonText
call PrintText
-.asm_9dba4
+.end
jp TextScriptEnd
-FightingDojoText_5ce8e:
- text_far _FightingDojoText_5ce8e
+.Text:
+ text_far _FightingDojoKarateMasterText
text_end
-FightingDojoText_5ce93:
- text_far _FightingDojoText_5ce93
+.DefeatedText:
+ text_far _FightingDojoKarateMasterDefeatedText
text_end
-FightingDojoText8:
- text_far _FightingDojoText_5ce98
+.IWillGiveYouAPokemonText:
+ text_far _FightingDojoKarateMasterIWillGiveYouAPokemonText
text_end
-FightingDojoText_5ce9d:
- text_far _FightingDojoText_5ce9d
+.StayAndTrainWithUsText:
+ text_far _FightingDojoKarateMasterStayAndTrainWithUsText
text_end
-FightingDojoText2:
+FightingDojoBlackbelt1Text:
text_asm
ld hl, FightingDojoTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-FightingDojoBattleText1:
- text_far _FightingDojoBattleText1
+FightingDojoBlackbelt1BattleText:
+ text_far _FightingDojoBlackbelt1BattleText
text_end
-FightingDojoEndBattleText1:
- text_far _FightingDojoEndBattleText1
+FightingDojoBlackbelt1EndBattleText:
+ text_far _FightingDojoBlackbelt1EndBattleText
text_end
-FightingDojoAfterBattleText1:
- text_far _FightingDojoAfterBattleText1
+FightingDojoBlackbelt1AfterBattleText:
+ text_far _FightingDojoBlackbelt1AfterBattleText
text_end
-FightingDojoText3:
+FightingDojoBlackbelt2Text:
text_asm
ld hl, FightingDojoTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-FightingDojoBattleText2:
- text_far _FightingDojoBattleText2
+FightingDojoBlackbelt2BattleText:
+ text_far _FightingDojoBlackbelt2BattleText
text_end
-FightingDojoEndBattleText2:
- text_far _FightingDojoEndBattleText2
+FightingDojoBlackbelt2EndBattleText:
+ text_far _FightingDojoBlackbelt2EndBattleText
text_end
-FightingDojoAfterBattleText2:
- text_far _FightingDojoAfterBattleText2
+FightingDojoBlackbelt2AfterBattleText:
+ text_far _FightingDojoBlackbelt2AfterBattleText
text_end
-FightingDojoText4:
+FightingDojoBlackbelt3Text:
text_asm
ld hl, FightingDojoTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-FightingDojoBattleText3:
- text_far _FightingDojoBattleText3
+FightingDojoBlackbelt3BattleText:
+ text_far _FightingDojoBlackbelt3BattleText
text_end
-FightingDojoEndBattleText3:
- text_far _FightingDojoEndBattleText3
+FightingDojoBlackbelt3EndBattleText:
+ text_far _FightingDojoBlackbelt3EndBattleText
text_end
-FightingDojoAfterBattleText3:
- text_far _FightingDojoAfterBattleText3
+FightingDojoBlackbelt3AfterBattleText:
+ text_far _FightingDojoBlackbelt3AfterBattleText
text_end
-FightingDojoText5:
+FightingDojoBlackbelt4Text:
text_asm
ld hl, FightingDojoTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-FightingDojoBattleText4:
- text_far _FightingDojoBattleText4
+FightingDojoBlackbelt4BattleText:
+ text_far _FightingDojoBlackbelt4BattleText
text_end
-FightingDojoEndBattleText4:
- text_far _FightingDojoEndBattleText4
+FightingDojoBlackbelt4EndBattleText:
+ text_far _FightingDojoBlackbelt4EndBattleText
text_end
-FightingDojoAfterBattleText4:
- text_far _FightingDojoAfterBattleText4
+FightingDojoBlackbelt4AfterBattleText:
+ text_far _FightingDojoBlackbelt4AfterBattleText
text_end
-FightingDojoText6:
-; Hitmonlee Poké Ball
+FightingDojoHitmonleePokeBallText:
text_asm
CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN
jr z, .GetMon
- ld hl, OtherHitmonText
+ ld hl, FightingDojoBetterNotGetGreedyText
call PrintText
jr .done
.GetMon
ld a, HITMONLEE
call DisplayPokedex
- ld hl, WantHitmonleeText
+ ld hl, .Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -253,22 +253,21 @@ FightingDojoText6:
.done
jp TextScriptEnd
-WantHitmonleeText:
- text_far _WantHitmonleeText
+.Text:
+ text_far _FightingDojoHitmonleePokeBallText
text_end
-FightingDojoText7:
-; Hitmonchan Poké Ball
+FightingDojoHitmonchanPokeBallText:
text_asm
CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN
jr z, .GetMon
- ld hl, OtherHitmonText
+ ld hl, FightingDojoBetterNotGetGreedyText
call PrintText
jr .done
.GetMon
ld a, HITMONCHAN
call DisplayPokedex
- ld hl, WantHitmonchanText
+ ld hl, .Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -288,10 +287,10 @@ FightingDojoText7:
.done
jp TextScriptEnd
-WantHitmonchanText:
- text_far _WantHitmonchanText
+.Text:
+ text_far _FightingDojoHitmonchanPokeBallText
text_end
-OtherHitmonText:
- text_far _OtherHitmonText
+FightingDojoBetterNotGetGreedyText:
+ text_far _FightingDojoBetterNotGetGreedyText
text_end
diff --git a/scripts/FuchsiaBillsGrandpasHouse.asm b/scripts/FuchsiaBillsGrandpasHouse.asm
index 69ce1cf1..cd9edfae 100644
--- a/scripts/FuchsiaBillsGrandpasHouse.asm
+++ b/scripts/FuchsiaBillsGrandpasHouse.asm
@@ -3,18 +3,19 @@ FuchsiaBillsGrandpasHouse_Script:
ret
FuchsiaBillsGrandpasHouse_TextPointers:
- dw FuchsiaHouse1Text1
- dw FuchsiaHouse1Text2
- dw FuchsiaHouse1Text3
+ def_text_pointers
+ dw_const FuchsiaBillsGrandpasHouseMiddleAgedWomanText, TEXT_FUCHSIABILLSGRANDPASHOUSE_MIDDLE_AGED_WOMAN
+ dw_const FuchsiaBillsGrandpasHouseBillsGrandpaText, TEXT_FUCHSIABILLSGRANDPASHOUSE_BILLS_GRANDPA
+ dw_const FuchsiaBillsGrandpasHouseYoungsterText, TEXT_FUCHSIABILLSGRANDPASHOUSE_YOUNGSTER
-FuchsiaHouse1Text1:
- text_far _FuchsiaHouse1Text1
+FuchsiaBillsGrandpasHouseMiddleAgedWomanText:
+ text_far _FuchsiaBillsGrandpasHouseMiddleAgedWomanText
text_end
-FuchsiaHouse1Text2:
- text_far _FuchsiaHouse1Text2
+FuchsiaBillsGrandpasHouseBillsGrandpaText:
+ text_far _FuchsiaBillsGrandpasHouseBillsGrandpaText
text_end
-FuchsiaHouse1Text3:
- text_far _FuchsiaHouse1Text3
+FuchsiaBillsGrandpasHouseYoungsterText:
+ text_far _FuchsiaBillsGrandpasHouseYoungsterText
text_end
diff --git a/scripts/FuchsiaCity.asm b/scripts/FuchsiaCity.asm
index ac9f273b..8f1f9690 100644
--- a/scripts/FuchsiaCity.asm
+++ b/scripts/FuchsiaCity.asm
@@ -2,168 +2,163 @@ FuchsiaCity_Script:
jp EnableAutoTextBoxDrawing
FuchsiaCity_TextPointers:
- dw FuchsiaCityText1
- dw FuchsiaCityText2
- dw FuchsiaCityText3
- dw FuchsiaCityText4
- dw FuchsiaCityText5
- dw FuchsiaCityText6
- dw FuchsiaCityText7
- dw FuchsiaCityText8
- dw FuchsiaCityText9
- dw FuchsiaCityText10
- dw FuchsiaCityText11
- dw FuchsiaCityText12
- dw FuchsiaCityText13
- dw MartSignText
- dw PokeCenterSignText
- dw FuchsiaCityText16
- dw FuchsiaCityText17
- dw FuchsiaCityText18
- dw FuchsiaCityText19
- dw FuchsiaCityText20
- dw FuchsiaCityText21
- dw FuchsiaCityText22
- dw FuchsiaCityText23
- dw FuchsiaCityText24
+ def_text_pointers
+ dw_const FuchsiaCityYoungster1Text, TEXT_FUCHSIACITY_YOUNGSTER1
+ dw_const FuchsiaCityGamblerText, TEXT_FUCHSIACITY_GAMBLER
+ dw_const FuchsiaCityErikText, TEXT_FUCHSIACITY_ERIK
+ dw_const FuchsiaCityYoungster2Text, TEXT_FUCHSIACITY_YOUNGSTER2
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_CHANSEY
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_VOLTORB
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_KANGASKHAN
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_SLOWPOKE
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_LAPRAS
+ dw_const FuchsiaCityPokemonText, TEXT_FUCHSIACITY_FOSSIL
+ dw_const FuchsiaCitySignText, TEXT_FUCHSIACITY_SIGN1
+ dw_const FuchsiaCitySignText, TEXT_FUCHSIACITY_SIGN2
+ dw_const FuchsiaCitySafariGameSignText, TEXT_FUCHSIACITY_SAFARI_GAME_SIGN
+ dw_const MartSignText, TEXT_FUCHSIACITY_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_FUCHSIACITY_POKECENTER_SIGN
+ dw_const FuchsiaCityWardensHomeSignText, TEXT_FUCHSIACITY_WARDENS_HOME_SIGN
+ dw_const FuchsiaCitySafariZoneSignText, TEXT_FUCHSIACITY_SAFARI_ZONE_SIGN
+ dw_const FuchsiaCityGymSignText, TEXT_FUCHSIACITY_GYM_SIGN
+ dw_const FuchsiaCityChanseySignText, TEXT_FUCHSIACITY_CHANSEY_SIGN
+ dw_const FuchsiaCityVoltorbSignText, TEXT_FUCHSIACITY_VOLTORB_SIGN
+ dw_const FuchsiaCityKangaskhanSignText, TEXT_FUCHSIACITY_KANGASKHAN_SIGN
+ dw_const FuchsiaCitySlowpokeSignText, TEXT_FUCHSIACITY_SLOWPOKE_SIGN
+ dw_const FuchsiaCityLaprasSignText, TEXT_FUCHSIACITY_LAPRAS_SIGN
+ dw_const FuchsiaCityFossilSignText, TEXT_FUCHSIACITY_FOSSIL_SIGN
-FuchsiaCityText1:
- text_far _FuchsiaCityText1
+FuchsiaCityYoungster1Text:
+ text_far _FuchsiaCityYoungster1Text
text_end
-FuchsiaCityText2:
- text_far _FuchsiaCityText2
+FuchsiaCityGamblerText:
+ text_far _FuchsiaCityGamblerText
text_end
-FuchsiaCityText3:
- text_far _FuchsiaCityText3
+FuchsiaCityErikText:
+ text_far _FuchsiaCityErikText
text_end
-FuchsiaCityText4:
- text_far _FuchsiaCityText4
+FuchsiaCityYoungster2Text:
+ text_far _FuchsiaCityYoungster2Text
text_end
-FuchsiaCityText5:
-FuchsiaCityText6:
-FuchsiaCityText7:
-FuchsiaCityText8:
-FuchsiaCityText9:
-FuchsiaCityText10:
- text_far _FuchsiaCityText5
+FuchsiaCityPokemonText:
+ text_far _FuchsiaCityPokemonText
text_end
-FuchsiaCityText12:
-FuchsiaCityText11:
- text_far _FuchsiaCityText11
+FuchsiaCitySignText:
+ text_far _FuchsiaCitySignText
text_end
-FuchsiaCityText13:
- text_far _FuchsiaCityText13
+FuchsiaCitySafariGameSignText:
+ text_far _FuchsiaCitySafariGameSignText
text_end
-FuchsiaCityText16:
- text_far _FuchsiaCityText16
+FuchsiaCityWardensHomeSignText:
+ text_far _FuchsiaCityWardensHomeSignText
text_end
-FuchsiaCityText17:
- text_far _FuchsiaCityText17
+FuchsiaCitySafariZoneSignText:
+ text_far _FuchsiaCitySafariZoneSignText
text_end
-FuchsiaCityText18:
- text_far _FuchsiaCityText18
+FuchsiaCityGymSignText:
+ text_far _FuchsiaCityGymSignText
text_end
-FuchsiaCityText19:
+FuchsiaCityChanseySignText:
text_asm
- ld hl, FuchsiaCityChanseyText
+ ld hl, .Text
call PrintText
ld a, CHANSEY
call DisplayPokedex
jp TextScriptEnd
-FuchsiaCityChanseyText:
- text_far _FuchsiaCityChanseyText
+.Text:
+ text_far _FuchsiaCityChanseySignText
text_end
-FuchsiaCityText20:
+FuchsiaCityVoltorbSignText:
text_asm
- ld hl, FuchsiaCityVoltorbText
+ ld hl, .Text
call PrintText
ld a, VOLTORB
call DisplayPokedex
jp TextScriptEnd
-FuchsiaCityVoltorbText:
- text_far _FuchsiaCityVoltorbText
+.Text:
+ text_far _FuchsiaCityVoltorbSignText
text_end
-FuchsiaCityText21:
+FuchsiaCityKangaskhanSignText:
text_asm
- ld hl, FuchsiaCityKangaskhanText
+ ld hl, .Text
call PrintText
ld a, KANGASKHAN
call DisplayPokedex
jp TextScriptEnd
-FuchsiaCityKangaskhanText:
- text_far _FuchsiaCityKangaskhanText
+.Text:
+ text_far _FuchsiaCityKangaskhanSignText
text_end
-FuchsiaCityText22:
+FuchsiaCitySlowpokeSignText:
text_asm
- ld hl, FuchsiaCitySlowpokeText
+ ld hl, .Text
call PrintText
ld a, SLOWPOKE
call DisplayPokedex
jp TextScriptEnd
-FuchsiaCitySlowpokeText:
- text_far _FuchsiaCitySlowpokeText
+.Text:
+ text_far _FuchsiaCitySlowpokeSignText
text_end
-FuchsiaCityText23:
+FuchsiaCityLaprasSignText:
text_asm
- ld hl, FuchsiaCityLaprasText
+ ld hl, .Text
call PrintText
ld a, LAPRAS
call DisplayPokedex
jp TextScriptEnd
-FuchsiaCityLaprasText:
- text_far _FuchsiaCityLaprasText
+.Text:
+ text_far _FuchsiaCityLaprasSignText
text_end
-FuchsiaCityText24:
+FuchsiaCityFossilSignText:
text_asm
CheckEvent EVENT_GOT_DOME_FOSSIL
- jr nz, .asm_3b4e8
+ jr nz, .got_dome_fossil
CheckEventReuseA EVENT_GOT_HELIX_FOSSIL
- jr nz, .asm_667d5
- ld hl, FuchsiaCityText_19b2a
+ jr nz, .got_helix_fossil
+ ld hl, .UndeterminedText
call PrintText
- jr .asm_4343f
-.asm_3b4e8
- ld hl, FuchsiaCityOmanyteText
+ jr .done
+.got_dome_fossil
+ ld hl, .OmanyteText
call PrintText
ld a, OMANYTE
- jr .asm_81556
-.asm_667d5
- ld hl, FuchsiaCityKabutoText
+ jr .display
+.got_helix_fossil
+ ld hl, .KabutoText
call PrintText
ld a, KABUTO
-.asm_81556
+.display
call DisplayPokedex
-.asm_4343f
+.done
jp TextScriptEnd
-FuchsiaCityOmanyteText:
- text_far _FuchsiaCityOmanyteText
+.OmanyteText:
+ text_far _FuchsiaCityFossilSignOmanyteText
text_end
-FuchsiaCityKabutoText:
- text_far _FuchsiaCityKabutoText
+.KabutoText:
+ text_far _FuchsiaCityFossilSignKabutoText
text_end
-FuchsiaCityText_19b2a:
- text_far _FuchsiaCityText_19b2a
+.UndeterminedText:
+ text_far _FuchsiaCityFossilSignUndeterminedText
text_end
diff --git a/scripts/FuchsiaGoodRodHouse.asm b/scripts/FuchsiaGoodRodHouse.asm
index 28f6d056..4bfd49ae 100644
--- a/scripts/FuchsiaGoodRodHouse.asm
+++ b/scripts/FuchsiaGoodRodHouse.asm
@@ -2,14 +2,15 @@ FuchsiaGoodRodHouse_Script:
jp EnableAutoTextBoxDrawing
FuchsiaGoodRodHouse_TextPointers:
- dw FuchsiaHouse3Text1
+ def_text_pointers
+ dw_const FuchsiaGoodRodHouseFishingGuruText, TEXT_FUCHSIAGOODRODHOUSE_FISHING_GURU
-FuchsiaHouse3Text1:
+FuchsiaGoodRodHouseFishingGuruText:
text_asm
ld a, [wd728]
bit 4, a ; got good rod?
jr nz, .got_item
- ld hl, FuchsiaHouse3Text_561bd
+ ld hl, .Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -20,30 +21,30 @@ FuchsiaHouse3Text1:
jr nc, .bag_full
ld hl, wd728
set 4, [hl] ; got good rod
- ld hl, FuchsiaHouse3Text_561c2
+ ld hl, .ReceivedGoodRodText
jr .done
.bag_full
- ld hl, FuchsiaHouse3Text_5621c
+ ld hl, .NoRoomText
jr .done
.refused
- ld hl, FuchsiaHouse3Text_56212
+ ld hl, .ThatsSoDisappointingText
jr .done
.got_item
- ld hl, FuchsiaHouse3Text_56217
+ ld hl, .HowAreTheFishText
.done
call PrintText
jp TextScriptEnd
-FuchsiaHouse3Text_561bd:
- text_far _FuchsiaHouse3Text_561bd
+.Text:
+ text_far _FuchsiaGoodRodHouseFishingGuruText
text_end
-FuchsiaHouse3Text_561c2:
- text_far _FuchsiaHouse3Text_561c2
+.ReceivedGoodRodText:
+ text_far _FuchsiaGoodRodHouseFishingGuruReceivedGoodRodText
sound_get_item_1
text_end
-UnusedText_561c8:
+.UnusedText:
para "つり こそ"
line "おとこの ロマン だ!"
@@ -53,14 +54,14 @@ UnusedText_561c8:
line "もっと いいもんが つれるんじゃ!"
done
-FuchsiaHouse3Text_56212:
- text_far _FuchsiaHouse3Text_56212
+.ThatsSoDisappointingText:
+ text_far _FuchsiaGoodRodHouseFishingGuruThatsSoDisappointingText
text_end
-FuchsiaHouse3Text_56217:
- text_far _FuchsiaHouse3Text_56217
+.HowAreTheFishText:
+ text_far _FuchsiaGoodRodHouseFishingGuruHowAreTheFishText
text_end
-FuchsiaHouse3Text_5621c:
- text_far _FuchsiaHouse3Text_5621c
+.NoRoomText:
+ text_far _FuchsiaGoodRodHouseFishingGuruNoRoomText
text_end
diff --git a/scripts/FuchsiaGym.asm b/scripts/FuchsiaGym.asm
index 8dc93d22..1c0f02df 100644
--- a/scripts/FuchsiaGym.asm
+++ b/scripts/FuchsiaGym.asm
@@ -25,40 +25,41 @@ FuchsiaGym_Script:
db "KOGA@"
FuchsiaGymResetScripts:
- xor a
+ xor a ; SCRIPT_FUCHSIAGYM_DEFAULT
ld [wJoyIgnore], a
ld [wFuchsiaGymCurScript], a
ld [wCurMapScript], a
ret
FuchsiaGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw FuchsiaGymKogaPostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_FUCHSIAGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_FUCHSIAGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_FUCHSIAGYM_END_BATTLE
+ dw_const FuchsiaGymKogaPostBattleScript, SCRIPT_FUCHSIAGYM_KOGA_POST_BATTLE
-FuchsiaGymKogaPostBattle:
+FuchsiaGymKogaPostBattleScript:
ld a, [wIsInBattle]
cp $ff
jp z, FuchsiaGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; fallthrough
FuchsiaGymReceiveTM06:
- ld a, $9
+ ld a, TEXT_FUCHSIAGYM_KOGA_SOUL_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_KOGA
lb bc, TM_TOXIC, 1
call GiveItem
jr nc, .BagFull
- ld a, $a
+ ld a, TEXT_FUCHSIAGYM_KOGA_RECEIVED_TM06
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM06
jr .gymVictory
.BagFull
- ld a, $b
+ ld a, TEXT_FUCHSIAGYM_KOGA_TM06_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -73,35 +74,36 @@ FuchsiaGymReceiveTM06:
jp FuchsiaGymResetScripts
FuchsiaGym_TextPointers:
- dw KogaText
- dw FuchsiaGymTrainerText1
- dw FuchsiaGymTrainerText2
- dw FuchsiaGymTrainerText3
- dw FuchsiaGymTrainerText4
- dw FuchsiaGymTrainerText5
- dw FuchsiaGymTrainerText6
- dw FuchsiaGymGuideText
- dw KogaSoulBadgeInfoText
- dw ReceivedTM06Text
- dw TM06NoRoomText
+ def_text_pointers
+ dw_const FuchsiaGymKogaText, TEXT_FUCHSIAGYM_KOGA
+ dw_const FuchsiaGymRocker1Text, TEXT_FUCHSIAGYM_ROCKER1
+ dw_const FuchsiaGymRocker2Text, TEXT_FUCHSIAGYM_ROCKER2
+ dw_const FuchsiaGymRocker3Text, TEXT_FUCHSIAGYM_ROCKER3
+ dw_const FuchsiaGymRocker4Text, TEXT_FUCHSIAGYM_ROCKER4
+ dw_const FuchsiaGymRocker5Text, TEXT_FUCHSIAGYM_ROCKER5
+ dw_const FuchsiaGymRocker6Text, TEXT_FUCHSIAGYM_ROCKER6
+ dw_const FuchsiaGymGymGuideText, TEXT_FUCHSIAGYM_GYM_GUIDE
+ dw_const FuchsiaGymKogaSoulBadgeInfoText, TEXT_FUCHSIAGYM_KOGA_SOUL_BADGE_INFO
+ dw_const FuchsiaGymKogaReceivedTM06Text, TEXT_FUCHSIAGYM_KOGA_RECEIVED_TM06
+ dw_const FuchsiaGymKogaTM06NoRoomText, TEXT_FUCHSIAGYM_KOGA_TM06_NO_ROOM
FuchsiaGymTrainerHeaders:
def_trainers 2
FuchsiaGymTrainerHeader0:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, 2, FuchsiaGymBattleText1, FuchsiaGymEndBattleText1, FuchsiaGymAfterBattleText1
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, 2, FuchsiaGymRocker1BattleText, FuchsiaGymRocker1EndBattleText, FuchsiaGymRocker1AfterBattleText
FuchsiaGymTrainerHeader1:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_1, 2, FuchsiaGymBattleText2, FuchsiaGymEndBattleText2, FuchsiaGymAfterBattleText2
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_1, 2, FuchsiaGymRocker2BattleText, FuchsiaGymRocker2EndBattleText, FuchsiaGymRocker2AfterBattleText
FuchsiaGymTrainerHeader2:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_2, 4, FuchsiaGymBattleText3, FuchsiaGymEndBattleText3, FuchsiaGymAfterBattleText3
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_2, 4, FuchsiaGymRocker3BattleText, FuchsiaGymRocker3EndBattleText, FuchsiaGymRocker3AfterBattleText
FuchsiaGymTrainerHeader3:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_3, 2, FuchsiaGymBattleText4, FuchsiaGymEndBattleText4, FuchsiaGymAfterBattleText4
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_3, 2, FuchsiaGymRocker4BattleText, FuchsiaGymRocker4EndBattleText, FuchsiaGymRocker4AfterBattleText
FuchsiaGymTrainerHeader4:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_4, 2, FuchsiaGymBattleText5, FuchsiaGymEndBattleText5, FuchsiaGymAfterBattleText5
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_4, 2, FuchsiaGymRocker5BattleText, FuchsiaGymRocker5EndBattleText, FuchsiaGymRocker5AfterBattleText
FuchsiaGymTrainerHeader5:
- trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_5, 2, FuchsiaGymBattleText6, FuchsiaGymEndBattleText6, FuchsiaGymAfterBattleText6
+ trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_5, 2, FuchsiaGymRocker6BattleText, FuchsiaGymRocker6EndBattleText, FuchsiaGymRocker6AfterBattleText
db -1 ; end
-KogaText:
+FuchsiaGymKogaText:
text_asm
CheckEvent EVENT_BEAT_KOGA
jr z, .beforeBeat
@@ -111,17 +113,17 @@ KogaText:
call DisableWaitingAfterTextDisplay
jr .done
.afterBeat
- ld hl, KogaPostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
jr .done
.beforeBeat
- ld hl, KogaBeforeBattleText
+ ld hl, .BeforeBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedSoulBadgeText
- ld de, ReceivedSoulBadgeText
+ ld hl, .ReceivedSoulBadgeText
+ ld de, .ReceivedSoulBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -131,161 +133,159 @@ KogaText:
ld [wGymLeaderNo], a
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_FUCHSIAGYM_KOGA_POST_BATTLE
ld [wFuchsiaGymCurScript], a
.done
jp TextScriptEnd
-KogaBeforeBattleText:
- text_far _KogaBeforeBattleText
+.BeforeBattleText:
+ text_far _FuchsiaGymKogaBeforeBattleText
text_end
-ReceivedSoulBadgeText:
- text_far _ReceivedSoulBadgeText
+.ReceivedSoulBadgeText:
+ text_far _FuchsiaGymKogaReceivedSoulBadgeText
text_end
-KogaPostBattleAdviceText:
- text_far _KogaPostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _FuchsiaGymKogaPostBattleAdviceText
text_end
-KogaSoulBadgeInfoText:
- text_far _KogaSoulBadgeInfoText
+FuchsiaGymKogaSoulBadgeInfoText:
+ text_far _FuchsiaGymKogaSoulBadgeInfoText
text_end
-ReceivedTM06Text:
- text_far _ReceivedTM06Text
+FuchsiaGymKogaReceivedTM06Text:
+ text_far _FuchsiaGymKogaReceivedTM06Text
sound_get_key_item
-
-TM06ExplanationText:
- text_far _TM06ExplanationText
+ text_far _FuchsiaGymKogaTM06ExplanationText
text_end
-TM06NoRoomText:
- text_far _TM06NoRoomText
+FuchsiaGymKogaTM06NoRoomText:
+ text_far _FuchsiaGymKogaTM06NoRoomText
text_end
-FuchsiaGymTrainerText1:
+FuchsiaGymRocker1Text:
text_asm
ld hl, FuchsiaGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText1:
- text_far _FuchsiaGymBattleText1
+FuchsiaGymRocker1BattleText:
+ text_far _FuchsiaGymRocker1BattleText
text_end
-FuchsiaGymEndBattleText1:
- text_far _FuchsiaGymEndBattleText1
+FuchsiaGymRocker1EndBattleText:
+ text_far _FuchsiaGymRocker1EndBattleText
text_end
-FuchsiaGymAfterBattleText1:
- text_far _FuchsiaGymAfterBattleText1
+FuchsiaGymRocker1AfterBattleText:
+ text_far _FuchsiaGymRocker1AfterBattleText
text_end
-FuchsiaGymTrainerText2:
+FuchsiaGymRocker2Text:
text_asm
ld hl, FuchsiaGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText2:
- text_far _FuchsiaGymBattleText2
+FuchsiaGymRocker2BattleText:
+ text_far _FuchsiaGymRocker2BattleText
text_end
-FuchsiaGymEndBattleText2:
- text_far _FuchsiaGymEndBattleText2
+FuchsiaGymRocker2EndBattleText:
+ text_far _FuchsiaGymRocker2EndBattleText
text_end
-FuchsiaGymAfterBattleText2:
- text_far _FuchsiaGymAfterBattleText2
+FuchsiaGymRocker2AfterBattleText:
+ text_far _FuchsiaGymRocker2AfterBattleText
text_end
-FuchsiaGymTrainerText3:
+FuchsiaGymRocker3Text:
text_asm
ld hl, FuchsiaGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText3:
- text_far _FuchsiaGymBattleText3
+FuchsiaGymRocker3BattleText:
+ text_far _FuchsiaGymRocker3BattleText
text_end
-FuchsiaGymEndBattleText3:
- text_far _FuchsiaGymEndBattleText3
+FuchsiaGymRocker3EndBattleText:
+ text_far _FuchsiaGymRocker3EndBattleText
text_end
-FuchsiaGymAfterBattleText3:
- text_far _FuchsiaGymAfterBattleText3
+FuchsiaGymRocker3AfterBattleText:
+ text_far _FuchsiaGymRocker3AfterBattleText
text_end
-FuchsiaGymTrainerText4:
+FuchsiaGymRocker4Text:
text_asm
ld hl, FuchsiaGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText4:
- text_far _FuchsiaGymBattleText4
+FuchsiaGymRocker4BattleText:
+ text_far _FuchsiaGymRocker4BattleText
text_end
-FuchsiaGymEndBattleText4:
- text_far _FuchsiaGymEndBattleText4
+FuchsiaGymRocker4EndBattleText:
+ text_far _FuchsiaGymRocker4EndBattleText
text_end
-FuchsiaGymAfterBattleText4:
- text_far _FuchsiaGymAfterBattleText4
+FuchsiaGymRocker4AfterBattleText:
+ text_far _FuchsiaGymRocker4AfterBattleText
text_end
-FuchsiaGymTrainerText5:
+FuchsiaGymRocker5Text:
text_asm
ld hl, FuchsiaGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText5:
- text_far _FuchsiaGymBattleText5
+FuchsiaGymRocker5BattleText:
+ text_far _FuchsiaGymRocker5BattleText
text_end
-FuchsiaGymEndBattleText5:
- text_far _FuchsiaGymEndBattleText5
+FuchsiaGymRocker5EndBattleText:
+ text_far _FuchsiaGymRocker5EndBattleText
text_end
-FuchsiaGymAfterBattleText5:
- text_far _FuchsiaGymAfterBattleText5
+FuchsiaGymRocker5AfterBattleText:
+ text_far _FuchsiaGymRocker5AfterBattleText
text_end
-FuchsiaGymTrainerText6:
+FuchsiaGymRocker6Text:
text_asm
ld hl, FuchsiaGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-FuchsiaGymBattleText6:
- text_far _FuchsiaGymBattleText6
+FuchsiaGymRocker6BattleText:
+ text_far _FuchsiaGymRocker6BattleText
text_end
-FuchsiaGymEndBattleText6:
- text_far _FuchsiaGymEndBattleText6
+FuchsiaGymRocker6EndBattleText:
+ text_far _FuchsiaGymRocker6EndBattleText
text_end
-FuchsiaGymAfterBattleText6:
- text_far _FuchsiaGymAfterBattleText6
+FuchsiaGymRocker6AfterBattleText:
+ text_far _FuchsiaGymRocker6AfterBattleText
text_end
-FuchsiaGymGuideText:
+FuchsiaGymGymGuideText:
text_asm
CheckEvent EVENT_BEAT_KOGA
- ld hl, FuchsiaGymGuidePostBattleText
+ ld hl, .BeatKogaText
jr nz, .afterBeat
- ld hl, FuchsiaGymGuidePreBattleText
+ ld hl, .ChampInMakingText
.afterBeat
call PrintText
jp TextScriptEnd
-FuchsiaGymGuidePreBattleText:
- text_far _FuchsiaGymGuidePreBattleText
+.ChampInMakingText:
+ text_far _FuchsiaGymGymGuideChampInMakingText
text_end
-FuchsiaGymGuidePostBattleText:
- text_far _FuchsiaGymGuidePostBattleText
+.BeatKogaText:
+ text_far _FuchsiaGymGymGuideBeatKogaText
text_end
diff --git a/scripts/FuchsiaMart.asm b/scripts/FuchsiaMart.asm
index 75e9a45d..b575d4b3 100644
--- a/scripts/FuchsiaMart.asm
+++ b/scripts/FuchsiaMart.asm
@@ -3,14 +3,15 @@ FuchsiaMart_Script:
ret
FuchsiaMart_TextPointers:
- dw FuchsiaCashierText
- dw FuchsiaMartText2
- dw FuchsiaMartText3
+ def_text_pointers
+ dw_const FuchsiaMartClerkText, TEXT_FUCHSIAMART_CLERK
+ dw_const FuchsiaMartMiddleAgedManText, TEXT_FUCHSIAMART_MIDDLE_AGED_MAN
+ dw_const FuchsiaMartCooltrainerFText, TEXT_FUCHSIAMART_COOLTRAINER_F
-FuchsiaMartText2:
- text_far _FuchsiaMartText2
+FuchsiaMartMiddleAgedManText:
+ text_far _FuchsiaMartMiddleAgedManText
text_end
-FuchsiaMartText3:
- text_far _FuchsiaMartText3
+FuchsiaMartCooltrainerFText:
+ text_far _FuchsiaMartCooltrainerFText
text_end
diff --git a/scripts/FuchsiaMeetingRoom.asm b/scripts/FuchsiaMeetingRoom.asm
index 4fc05b1f..b0ca9356 100644
--- a/scripts/FuchsiaMeetingRoom.asm
+++ b/scripts/FuchsiaMeetingRoom.asm
@@ -3,18 +3,19 @@ FuchsiaMeetingRoom_Script:
ret
FuchsiaMeetingRoom_TextPointers:
- dw FuchsiaMeetingRoomText1
- dw FuchsiaMeetingRoomText2
- dw FuchsiaMeetingRoomText3
+ def_text_pointers
+ dw_const FuchsiaMeetingRoomSafariZoneWorker1, TEXT_FUCHSIAMEETINGROOM_SAFARI_ZONE_WORKER1
+ dw_const FuchsiaMeetingRoomSafariZoneWorker2, TEXT_FUCHSIAMEETINGROOM_SAFARI_ZONE_WORKER2
+ dw_const FuchsiaMeetingRoomSafariZoneWorker3, TEXT_FUCHSIAMEETINGROOM_SAFARI_ZONE_WORKER3
-FuchsiaMeetingRoomText1:
- text_far _FuchsiaMeetingRoomText1
+FuchsiaMeetingRoomSafariZoneWorker1:
+ text_far _FuchsiaMeetingRoomSafariZoneWorker1
text_end
-FuchsiaMeetingRoomText2:
- text_far _FuchsiaMeetingRoomText2
+FuchsiaMeetingRoomSafariZoneWorker2:
+ text_far _FuchsiaMeetingRoomSafariZoneWorker2
text_end
-FuchsiaMeetingRoomText3:
- text_far _FuchsiaMeetingRoomText3
+FuchsiaMeetingRoomSafariZoneWorker3:
+ text_far _FuchsiaMeetingRoomSafariZoneWorker3
text_end
diff --git a/scripts/FuchsiaPokecenter.asm b/scripts/FuchsiaPokecenter.asm
index 2d98ca17..6b13e224 100644
--- a/scripts/FuchsiaPokecenter.asm
+++ b/scripts/FuchsiaPokecenter.asm
@@ -3,27 +3,28 @@ FuchsiaPokecenter_Script:
jp EnableAutoTextBoxDrawing
FuchsiaPokecenter_TextPointers:
- dw FuchsiaHealNurseText
- dw FuchsiaPokecenterText2
- dw FuchsiaPokecenterText3
- dw FuchsiaTradeNurseText
- dw FuchsiaPokecenterText5
+ def_text_pointers
+ dw_const FuchsiaPokecenterNurseText, TEXT_FUCHSIAPOKECENTER_NURSE
+ dw_const FuchsiaPokecenterRockerText, TEXT_FUCHSIAPOKECENTER_ROCKER
+ dw_const FuchsiaPokecenterCooltrainerFText, TEXT_FUCHSIAPOKECENTER_COOLTRAINER_F
+ dw_const FuchsiaPokecenterLinkReceptionistText, TEXT_FUCHSIAPOKECENTER_LINK_RECEPTIONIST
+ dw_const FuchsiaPokecenterChanseyText, TEXT_FUCHSIAPOKECENTER_CHANSEY
-FuchsiaHealNurseText:
+FuchsiaPokecenterNurseText:
script_pokecenter_nurse
-FuchsiaPokecenterText2:
- text_far _FuchsiaPokecenterText1
+FuchsiaPokecenterRockerText:
+ text_far _FuchsiaPokecenterRockerText
text_end
-FuchsiaPokecenterText3:
- text_far _FuchsiaPokecenterText3
+FuchsiaPokecenterCooltrainerFText:
+ text_far _FuchsiaPokecenterCooltrainerFText
text_end
-FuchsiaTradeNurseText:
+FuchsiaPokecenterLinkReceptionistText:
script_cable_club_receptionist
-FuchsiaPokecenterText5:
+FuchsiaPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/GameCorner.asm b/scripts/GameCorner.asm
index b2d4d96a..3fd58f60 100644
--- a/scripts/GameCorner.asm
+++ b/scripts/GameCorner.asm
@@ -1,12 +1,12 @@
GameCorner_Script:
- call CeladonGameCornerScript_48bcf
- call CeladonGameCornerScript_48bec
+ call GameCornerSelectLuckySlotMachine
+ call GameCornerSetRocketHideoutDoorTile
call EnableAutoTextBoxDrawing
ld hl, GameCorner_ScriptPointers
ld a, [wGameCornerCurScript]
jp CallFunctionInTable
-CeladonGameCornerScript_48bcf:
+GameCornerSelectLuckySlotMachine:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
@@ -14,16 +14,16 @@ CeladonGameCornerScript_48bcf:
call Random
ldh a, [hRandomAdd]
cp $7
- jr nc, .asm_48be2
+ jr nc, .not_max
ld a, $8
-.asm_48be2
+.not_max
srl a
srl a
srl a
ld [wLuckySlotHiddenObjectIndex], a
ret
-CeladonGameCornerScript_48bec:
+GameCornerSetRocketHideoutDoorTile:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
@@ -35,57 +35,58 @@ CeladonGameCornerScript_48bec:
lb bc, 2, 8
predef_jump ReplaceTileBlock
-CeladonGameCornerScript_48c07:
- xor a
+GameCornerReenterMapAfterPlayerLoss:
+ xor a ; SCRIPT_GAMECORNER_DEFAULT
ld [wJoyIgnore], a
ld [wGameCornerCurScript], a
ld [wCurMapScript], a
ret
GameCorner_ScriptPointers:
- dw CeladonGameCornerScript0
- dw CeladonGameCornerScript1
- dw CeladonGameCornerScript2
+ def_script_pointers
+ dw_const GameCornerDefaultScript, SCRIPT_GAMECORNER_DEFAULT
+ dw_const GameCornerRocketBattleScript, SCRIPT_GAMECORNER_ROCKET_BATTLE
+ dw_const GameCornerRocketExitScript, SCRIPT_GAMECORNER_ROCKET_EXIT
-CeladonGameCornerScript0:
+GameCornerDefaultScript:
ret
-CeladonGameCornerScript1:
+GameCornerRocketBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, CeladonGameCornerScript_48c07
- ld a, $f0
+ jp z, GameCornerReenterMapAfterPlayerLoss
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $d
+ ld a, TEXT_GAMECORNER_ROCKET_AFTER_BATTLE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $b
+ ld a, GAMECORNER_ROCKET
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
- ld de, MovementData_48c5a
+ ld de, GameCornerMovement_Rocket_WalkAroundPlayer
ld a, [wYCoord]
cp 6
- jr nz, .asm_48c43
- ld de, MovementData_48c63
- jr .asm_48c4d
-.asm_48c43
+ jr nz, .not_direct_movement
+ ld de, GameCornerMovement_Rocket_WalkDirect
+ jr .got_rocket_movement
+.not_direct_movement
ld a, [wXCoord]
cp 8
jr nz, .pikachu
- ld de, MovementData_48c63
- jr .asm_48c4d
+ ld de, GameCornerMovement_Rocket_WalkDirect
+ jr .got_rocket_movement
.pikachu
- callfar Func_f1f23
- ld de, MovementData_48c5a
-.asm_48c4d
- ld a, $b
+ callfar GameCornerPikachuMovementScript
+ ld de, GameCornerMovement_Rocket_WalkAroundPlayer
+.got_rocket_movement
+ ld a, GAMECORNER_ROCKET
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $2
+ ld a, SCRIPT_GAMECORNER_ROCKET_EXIT
ld [wGameCornerCurScript], a
ret
-MovementData_48c5a:
+GameCornerMovement_Rocket_WalkAroundPlayer:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
@@ -96,7 +97,7 @@ MovementData_48c5a:
db NPC_MOVEMENT_RIGHT
db -1 ; end
-MovementData_48c63:
+GameCornerMovement_Rocket_WalkDirect:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
@@ -104,7 +105,7 @@ MovementData_48c63:
db NPC_MOVEMENT_RIGHT
db -1 ; end
-CeladonGameCornerScript2:
+GameCornerRocketExitScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -116,53 +117,60 @@ CeladonGameCornerScript2:
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
- ld a, $0
+ ld a, SCRIPT_GAMECORNER_DEFAULT
ld [wGameCornerCurScript], a
ret
GameCorner_TextPointers:
- dw CeladonGameCornerText1
- dw CeladonGameCornerText2
- dw CeladonGameCornerText3
- dw CeladonGameCornerText4
- dw CeladonGameCornerText5
- dw CeladonGameCornerText6
- dw CeladonGameCornerText7
- dw CeladonGameCornerText8
- dw CeladonGameCornerText9
- dw CeladonGameCornerText10
- dw CeladonGameCornerText11
- dw CeladonGameCornerText12
- dw CeladonGameCornerText13
+ def_text_pointers
+ dw_const GameCornerBeauty1Text, TEXT_GAMECORNER_BEAUTY1
+ dw_const GameCornerClerkText, TEXT_GAMECORNER_CLERK
+ dw_const GameCornerMiddleAgedMan1Text, TEXT_GAMECORNER_MIDDLE_AGED_MAN1
+ dw_const GameCornerBeauty2Text, TEXT_GAMECORNER_BEAUTY2
+ dw_const GameCornerFishingGuru1Text, TEXT_GAMECORNER_FISHING_GURU1
+ dw_const GameCornerMiddleAgedWomanText, TEXT_GAMECORNER_MIDDLE_AGED_WOMAN
+ dw_const GameCornerGymGuideText, TEXT_GAMECORNER_GYM_GUIDE
+ dw_const GameCornerGamblerText, TEXT_GAMECORNER_GAMBLER
+ dw_const GameCornerMiddleAgedMan2Text, TEXT_GAMECORNER_MIDDLE_AGED_MAN2
+ dw_const GameCornerFishingGuru2Text, TEXT_GAMECORNER_FISHING_GURU2
+ dw_const GameCornerRocketText, TEXT_GAMECORNER_ROCKET
+ dw_const GameCornerPosterText, TEXT_GAMECORNER_POSTER
+ dw_const GameCornerRocketAfterBattleText, TEXT_GAMECORNER_ROCKET_AFTER_BATTLE
-CeladonGameCornerText1:
- text_far _CeladonGameCornerText1
+GameCornerBeauty1Text:
+ text_far _GameCornerBeauty1Text
text_end
-CeladonGameCornerText2:
+GameCornerClerkText:
text_asm
- call CeladonGameCornerScript_48f1e
- ld hl, CeladonGameCornerText_48d22
+ ; Show player's coins
+ call GameCornerDrawCoinBox
+ ld hl, .DoYouNeedSomeGameCoins
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_48d0f
+ jr nz, .declined
+ ; Can only get more coins if you
+ ; - have the Coin Case
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_48d19
+ jr z, .no_coin_case
+ ; - have room in the Coin Case for at least 9 coins
call Has9990Coins
- jr nc, .asm_48d14
+ jr nc, .coin_case_full
+ ; - have at least 1000 yen
xor a
ldh [hMoney], a
ldh [hMoney + 2], a
ld a, $10
ldh [hMoney + 1], a
call HasEnoughMoney
- jr nc, .asm_48cdb
- ld hl, CeladonGameCornerText_48d31
- jr .asm_48d1c
-.asm_48cdb
+ jr nc, .buy_coins
+ ld hl, .CantAffordTheCoins
+ jr .print_ret
+.buy_coins
+ ; Spend 1000 yen
xor a
ldh [hMoney], a
ldh [hMoney + 2], a
@@ -172,6 +180,7 @@ CeladonGameCornerText2:
ld de, wPlayerMoney + 2
ld c, $3
predef SubBCDPredef
+ ; Receive 50 coins
xor a
ldh [hUnusedCoinsByte], a
ldh [hCoins], a
@@ -181,64 +190,65 @@ CeladonGameCornerText2:
ld hl, hCoins + 1
ld c, $2
predef AddBCDPredef
- call CeladonGameCornerScript_48f1e
- ld hl, CeladonGameCornerText_48d27
- jr .asm_48d1c
-.asm_48d0f
- ld hl, CeladonGameCornerText_48d2c
- jr .asm_48d1c
-.asm_48d14
- ld hl, CeladonGameCornerText_48d36
- jr .asm_48d1c
-.asm_48d19
- ld hl, CeladonGameCornerText_48d3b
-.asm_48d1c
+ ; Update display
+ call GameCornerDrawCoinBox
+ ld hl, .ThanksHereAre50Coins
+ jr .print_ret
+.declined
+ ld hl, .PleaseComePlaySometime
+ jr .print_ret
+.coin_case_full
+ ld hl, .CoinCaseIsFull
+ jr .print_ret
+.no_coin_case
+ ld hl, .DontHaveCoinCase
+.print_ret
call PrintText
jp TextScriptEnd
-CeladonGameCornerText_48d22:
- text_far _CeladonGameCornerText_48d22
+.DoYouNeedSomeGameCoins:
+ text_far _GameCornerClerkDoYouNeedSomeGameCoinsText
text_end
-CeladonGameCornerText_48d27:
- text_far _CeladonGameCornerText_48d27
+.ThanksHereAre50Coins:
+ text_far _GameCornerClerkThanksHereAre50CoinsText
text_end
-CeladonGameCornerText_48d2c:
- text_far _CeladonGameCornerText_48d2c
+.PleaseComePlaySometime:
+ text_far _GameCornerClerkPleaseComePlaySometimeText
text_end
-CeladonGameCornerText_48d31:
- text_far _CeladonGameCornerText_48d31
+.CantAffordTheCoins:
+ text_far _GameCornerClerkCantAffordTheCoinsText
text_end
-CeladonGameCornerText_48d36:
- text_far _CeladonGameCornerText_48d36
+.CoinCaseIsFull:
+ text_far _GameCornerClerkCoinCaseIsFullText
text_end
-CeladonGameCornerText_48d3b:
- text_far _CeladonGameCornerText_48d3b
+.DontHaveCoinCase:
+ text_far _GameCornerClerkDontHaveCoinCaseText
text_end
-CeladonGameCornerText3:
- text_far _CeladonGameCornerText3
+GameCornerMiddleAgedMan1Text:
+ text_far _GameCornerMiddleAgedMan1Text
text_end
-CeladonGameCornerText4:
- text_far _CeladonGameCornerText4
+GameCornerBeauty2Text:
+ text_far _GameCornerBeauty2Text
text_end
-CeladonGameCornerText5:
+GameCornerFishingGuru1Text:
text_asm
CheckEvent EVENT_GOT_10_COINS
- jr nz, .asm_48d89
- ld hl, CeladonGameCornerText_48d9c
+ jr nz, .alreadyGotNpcCoins
+ ld hl, .WantToPlayText
call PrintText
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_48d93
+ jr z, .dontHaveCoinCase
call Has9990Coins
- jr nc, .asm_48d8e
+ jr nc, .coinCaseFull
xor a
ldh [hUnusedCoinsByte], a
ldh [hCoins], a
@@ -251,74 +261,74 @@ CeladonGameCornerText5:
SetEvent EVENT_GOT_10_COINS
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, Received10CoinsText
- jr .asm_48d96
-.asm_48d89
- ld hl, CeladonGameCornerText_48dac
- jr .asm_48d96
-.asm_48d8e
- ld hl, CeladonGameCornerText_48da7
- jr .asm_48d96
-.asm_48d93
- ld hl, CeladonGameCornerText_48f19
-.asm_48d96
+ ld hl, .Received10CoinsText
+ jr .print_ret
+.alreadyGotNpcCoins
+ ld hl, .WinsComeAndGoText
+ jr .print_ret
+.coinCaseFull
+ ld hl, .DontNeedMyCoinsText
+ jr .print_ret
+.dontHaveCoinCase
+ ld hl, GameCornerOopsForgotCoinCaseText
+.print_ret
call PrintText
jp TextScriptEnd
-CeladonGameCornerText_48d9c:
- text_far _CeladonGameCornerText_48d9c
+.WantToPlayText:
+ text_far _GameCornerFishingGuru1WantToPlayText
text_end
-Received10CoinsText:
- text_far _Received10CoinsText
+.Received10CoinsText:
+ text_far _GameCornerFishingGuru1Received10CoinsText
sound_get_item_1
text_end
-CeladonGameCornerText_48da7:
- text_far _CeladonGameCornerText_48da7
+.DontNeedMyCoinsText:
+ text_far _GameCornerFishingGuru1DontNeedMyCoinsText
text_end
-CeladonGameCornerText_48dac:
- text_far _CeladonGameCornerText_48dac
+.WinsComeAndGoText:
+ text_far _GameCornerFishingGuru1WinsComeAndGoText
text_end
-CeladonGameCornerText6:
- text_far _CeladonGameCornerText6
+GameCornerMiddleAgedWomanText:
+ text_far _GameCornerMiddleAgedWomanText
text_end
-CeladonGameCornerText7:
+GameCornerGymGuideText:
text_asm
CheckEvent EVENT_BEAT_ERIKA
- ld hl, CeladonGameCornerText_48dca
- jr z, .asm_48dc4
- ld hl, CeladonGameCornerText_48dcf
-.asm_48dc4
+ ld hl, GameCornerGymGuideChampInMakingText
+ jr z, .not_defeated
+ ld hl, GameCornerGymGuideTheyOfferRarePokemonText
+.not_defeated
call PrintText
jp TextScriptEnd
-CeladonGameCornerText_48dca:
- text_far _CeladonGameCornerText_48dca
+GameCornerGymGuideChampInMakingText:
+ text_far _GameCornerGymGuideChampInMakingText
text_end
-CeladonGameCornerText_48dcf:
- text_far _CeladonGameCornerText_48dcf
+GameCornerGymGuideTheyOfferRarePokemonText:
+ text_far _GameCornerGymGuideTheyOfferRarePokemonText
text_end
-CeladonGameCornerText8:
- text_far _CeladonGameCornerText8
+GameCornerGamblerText:
+ text_far _GameCornerGamblerText
text_end
-CeladonGameCornerText9:
+GameCornerMiddleAgedMan2Text:
text_asm
CheckEvent EVENT_GOT_20_COINS_2
- jr nz, .asm_48e13
- ld hl, CeladonGameCornerText_48e26
+ jr nz, .alreadyGotNpcCoins
+ ld hl, .WantSomeCoinsText
call PrintText
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_48e1d
+ jr z, .dontHaveCoinCase
call Has9990Coins
- jr nc, .asm_48e18
+ jr nc, .coinCaseFull
xor a
ldh [hUnusedCoinsByte], a
ldh [hCoins], a
@@ -329,48 +339,48 @@ CeladonGameCornerText9:
ld c, $2
predef AddBCDPredef
SetEvent EVENT_GOT_20_COINS_2
- ld hl, Received20CoinsText
- jr .asm_48e20
-.asm_48e13
- ld hl, CeladonGameCornerText_48e36
- jr .asm_48e20
-.asm_48e18
- ld hl, CeladonGameCornerText_48e31
- jr .asm_48e20
-.asm_48e1d
- ld hl, CeladonGameCornerText_48f19
-.asm_48e20
+ ld hl, .Received20CoinsText
+ jr .print_ret
+.alreadyGotNpcCoins
+ ld hl, .INeedMoreCoinsText
+ jr .print_ret
+.coinCaseFull
+ ld hl, .YouHaveLotsOfCoinsText
+ jr .print_ret
+.dontHaveCoinCase
+ ld hl, GameCornerOopsForgotCoinCaseText
+.print_ret
call PrintText
jp TextScriptEnd
-CeladonGameCornerText_48e26:
- text_far _CeladonGameCornerText_48e26
+.WantSomeCoinsText:
+ text_far _GameCornerMiddleAgedMan2WantSomeCoinsText
text_end
-Received20CoinsText:
- text_far _Received20CoinsText
+.Received20CoinsText:
+ text_far _GameCornerMiddleAgedMan2Received20CoinsText
sound_get_item_1
text_end
-CeladonGameCornerText_48e31:
- text_far _CeladonGameCornerText_48e31
+.YouHaveLotsOfCoinsText:
+ text_far _GameCornerMiddleAgedMan2YouHaveLotsOfCoinsText
text_end
-CeladonGameCornerText_48e36:
- text_far _CeladonGameCornerText_48e36
+.INeedMoreCoinsText:
+ text_far _GameCornerMiddleAgedMan2INeedMoreCoinsText
text_end
-CeladonGameCornerText10:
+GameCornerFishingGuru2Text:
text_asm
CheckEvent EVENT_GOT_20_COINS
- jr nz, .asm_48e75
- ld hl, CeladonGameCornerText_48e88
+ jr nz, .alreadyGotNpcCoins
+ ld hl, .ThrowingMeOffText
call PrintText
ld b, COIN_CASE
call IsItemInBag
- jr z, .asm_48e7f
+ jr z, .dontHaveCoinCase
call Has9990Coins
- jr z, .asm_48e7a
+ jr z, .coinCaseFull
xor a
ldh [hUnusedCoinsByte], a
ldh [hCoins], a
@@ -381,46 +391,46 @@ CeladonGameCornerText10:
ld c, $2
predef AddBCDPredef
SetEvent EVENT_GOT_20_COINS
- ld hl, CeladonGameCornerText_48e8d
- jr .asm_48e82
-.asm_48e75
- ld hl, CeladonGameCornerText_48e98
- jr .asm_48e82
-.asm_48e7a
- ld hl, CeladonGameCornerText_48e93
- jr .asm_48e82
-.asm_48e7f
- ld hl, CeladonGameCornerText_48f19
-.asm_48e82
+ ld hl, .Received20CoinsText
+ jr .print_ret
+.alreadyGotNpcCoins
+ ld hl, .CloselyWatchTheReelsText
+ jr .print_ret
+.coinCaseFull
+ ld hl, .YouGotYourOwnCoinsText
+ jr .print_ret
+.dontHaveCoinCase
+ ld hl, GameCornerOopsForgotCoinCaseText
+.print_ret
call PrintText
jp TextScriptEnd
-CeladonGameCornerText_48e88:
- text_far _CeladonGameCornerText_48e88
+.ThrowingMeOffText:
+ text_far _GameCornerFishingGuru2ThrowingMeOffText
text_end
-CeladonGameCornerText_48e8d:
- text_far _CeladonGameCornerText_48e8d
+.Received20CoinsText:
+ text_far _GameCornerFishingGuru2Received20CoinsText
sound_get_item_1
text_end
-CeladonGameCornerText_48e93:
- text_far _CeladonGameCornerText_48e93
+.YouGotYourOwnCoinsText:
+ text_far _GameCornerFishingGuru2YouGotYourOwnCoinsText
text_end
-CeladonGameCornerText_48e98:
- text_far _CeladonGameCornerText_48e98
+.CloselyWatchTheReelsText:
+ text_far _GameCornerFishingGuru2CloselyWatchTheReelsText
text_end
-CeladonGameCornerText11:
+GameCornerRocketText:
text_asm
- ld hl, CeladonGameCornerText_48ece
+ ld hl, .ImGuardingThisPosterText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, CeladonGameCornerText_48ed3
- ld de, CeladonGameCornerText_48ed3
+ ld hl, .BattleEndText
+ ld de, .BattleEndText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -430,27 +440,27 @@ CeladonGameCornerText11:
ldh [hJoyHeld], a
ldh [hJoyPressed], a
ldh [hJoyReleased], a
- ld a, $1
+ ld a, SCRIPT_GAMECORNER_ROCKET_BATTLE
ld [wGameCornerCurScript], a
jp TextScriptEnd
-CeladonGameCornerText_48ece:
- text_far _CeladonGameCornerText_48ece
+.ImGuardingThisPosterText:
+ text_far _GameCornerRocketImGuardingThisPosterText
text_end
-CeladonGameCornerText_48ed3:
- text_far _CeladonGameCornerText_48ed3
+.BattleEndText:
+ text_far _GameCornerRocketBattleEndText
text_end
-CeladonGameCornerText13:
- text_far _CeladonGameCornerText_48ed8
+GameCornerRocketAfterBattleText:
+ text_far _GameCornerRocketAfterBattleText
text_end
-CeladonGameCornerText12:
+GameCornerPosterText:
text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, CeladonGameCornerText_48f09
+ ld hl, .SwitchBehindPosterText
call PrintText
call WaitForSoundToFinish
ld a, SFX_GO_INSIDE
@@ -463,19 +473,19 @@ CeladonGameCornerText12:
predef ReplaceTileBlock
jp TextScriptEnd
-CeladonGameCornerText_48f09:
- text_far _CeladonGameCornerText_48f09
+.SwitchBehindPosterText:
+ text_far _GameCornerPosterSwitchBehindPosterText
text_asm
ld a, SFX_SWITCH
call PlaySound
call WaitForSoundToFinish
jp TextScriptEnd
-CeladonGameCornerText_48f19:
- text_far _CeladonGameCornerText_48f19
+GameCornerOopsForgotCoinCaseText:
+ text_far _GameCornerOopsForgotCoinCaseText
text_end
-CeladonGameCornerScript_48f1e:
+GameCornerDrawCoinBox:
ld hl, wd730
set 6, [hl]
hlcoord 11, 0
diff --git a/scripts/GameCornerPrizeRoom.asm b/scripts/GameCornerPrizeRoom.asm
index c8dddf71..443e0260 100644
--- a/scripts/GameCornerPrizeRoom.asm
+++ b/scripts/GameCornerPrizeRoom.asm
@@ -2,19 +2,20 @@ GameCornerPrizeRoom_Script:
jp EnableAutoTextBoxDrawing
GameCornerPrizeRoom_TextPointers:
- dw CeladonPrizeRoomText1
- dw CeladonPrizeRoomText2
- dw CeladonPrizeRoomText3
- dw CeladonPrizeRoomText3
- dw CeladonPrizeRoomText3
+ def_text_pointers
+ dw_const GameCornerPrizeRoomBaldingGuyText, TEXT_GAMECORNERPRIZEROOM_BALDING_GUY
+ dw_const GameCornerPrizeRoomGamblerText, TEXT_GAMECORNERPRIZEROOM_GAMBLER
+ dw_const GameCornerPRizeRoomPrizeVendorText, TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_1
+ dw_const GameCornerPRizeRoomPrizeVendorText, TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_2
+ dw_const GameCornerPRizeRoomPrizeVendorText, TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_3
-CeladonPrizeRoomText1:
- text_far _CeladonPrizeRoomText1
+GameCornerPrizeRoomBaldingGuyText:
+ text_far _GameCornerPrizeRoomBaldingGuyText
text_end
-CeladonPrizeRoomText2:
- text_far _CeladonPrizeRoomText2
+GameCornerPrizeRoomGamblerText:
+ text_far _GameCornerPrizeRoomGamblerText
text_end
-CeladonPrizeRoomText3:
+GameCornerPRizeRoomPrizeVendorText:
script_prize_vendor
diff --git a/scripts/GameCorner2.asm b/scripts/GameCorner_2.asm
index 3571e9d9..0569ec0f 100644
--- a/scripts/GameCorner2.asm
+++ b/scripts/GameCorner_2.asm
@@ -1,10 +1,10 @@
-Func_f1f23::
- ld hl, PikachuMovementData_f1f2c
+GameCornerPikachuMovementScript::
+ ld hl, GameCornerPikachuMovementData
ld b, SPRITE_FACING_DOWN
call TryApplyPikachuMovementData
ret
-PikachuMovementData_f1f2c:
+GameCornerPikachuMovementData:
db $00
db $20
db $1e
diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm
index 45cef29c..d5102830 100644
--- a/scripts/HallOfFame.asm
+++ b/scripts/HallOfFame.asm
@@ -4,22 +4,23 @@ HallOfFame_Script:
ld a, [wHallOfFameCurScript]
jp CallFunctionInTable
-HallofFameRoomScript_5a4aa:
+HallofFameRoomClearScripts: ; unreferenced
xor a
ld [wJoyIgnore], a
ld [wHallOfFameCurScript], a
ret
HallOfFame_ScriptPointers:
- dw HallofFameRoomScript0
- dw HallofFameRoomScript1
- dw HallofFameRoomScript2
- dw HallofFameRoomScript3
+ def_script_pointers
+ dw_const HallOfFameDefaultScript, SCRIPT_HALLOFFAME_DEFAULT
+ dw_const HallOfFameOakCongratulationsScript, SCRIPT_HALLOFFAME_OAK_CONGRATULATIONS
+ dw_const HallOfFameResetEventsAndSaveScript, SCRIPT_HALLOFFAME_RESET_EVENTS_AND_SAVE
+ dw_const HallOfFameNoopScript, SCRIPT_HALLOFFAME_NOOP
-HallofFameRoomScript3:
+HallOfFameNoopScript:
ret
-HallofFameRoomScript2:
+HallOfFameResetEventsAndSaveScript:
call Delay3
ld a, [wLetterPrintingDelayFlags]
push af
@@ -31,8 +32,8 @@ HallofFameRoomScript2:
ld hl, wFlags_D733
res 1, [hl]
inc hl
- set 0, [hl]
- xor a
+ set BIT_TEST_BATTLE, [hl] ; debug, unused?
+ xor a ; SCRIPT_*_DEFAULT
ld hl, wLoreleisRoomCurScript
ld [hli], a ; wLoreleisRoomCurScript
ld [hli], a ; wBrunosRoomCurScript
@@ -55,30 +56,30 @@ HallofFameRoomScript2:
call WaitForTextScrollButtonPress
jp Init
-HallofFameRoomScript0:
- ld a, $ff
+HallOfFameDefaultScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEMovement5a528
+ ld de, HallOfFameEntryMovement
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, SCRIPT_HALLOFFAME_OAK_CONGRATULATIONS
ld [wHallOfFameCurScript], a
ret
-RLEMovement5a528:
+HallOfFameEntryMovement:
db D_UP, 5
db -1 ; end
-HallofFameRoomScript1:
+HallOfFameOakCongratulationsScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, HALLOFFAME_OAK
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, SPRITE_FACING_LEFT
@@ -89,21 +90,22 @@ HallofFameRoomScript1:
ld [wJoyIgnore], a
inc a ; PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, TEXT_HALLOFFAME_OAK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, HS_CERULEAN_CAVE_GUY
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $2
+ ld a, SCRIPT_HALLOFFAME_RESET_EVENTS_AND_SAVE
ld [wHallOfFameCurScript], a
ret
HallOfFame_TextPointers:
- dw HallofFameRoomText1
+ def_text_pointers
+ dw_const HallOfFameOakText, TEXT_HALLOFFAME_OAK
-HallofFameRoomText1:
- text_far _HallofFameRoomText1
+HallOfFameOakText:
+ text_far _HallOfFameOakText
text_end
diff --git a/scripts/IndigoPlateau.asm b/scripts/IndigoPlateau.asm
index 86f38b2a..9ec2c5a3 100644
--- a/scripts/IndigoPlateau.asm
+++ b/scripts/IndigoPlateau.asm
@@ -2,3 +2,4 @@ IndigoPlateau_Script:
ret
IndigoPlateau_TextPointers:
+ def_text_pointers
diff --git a/scripts/IndigoPlateauLobby.asm b/scripts/IndigoPlateauLobby.asm
index f3aedbc2..0af18a96 100644
--- a/scripts/IndigoPlateauLobby.asm
+++ b/scripts/IndigoPlateauLobby.asm
@@ -15,28 +15,29 @@ IndigoPlateauLobby_Script:
ret
IndigoPlateauLobby_TextPointers:
- dw IndigoHealNurseText
- dw IndigoPlateauLobbyText2
- dw IndigoPlateauLobbyText3
- dw IndigoCashierText
- dw IndigoTradeNurseText
- dw IndigoPlateauLobbyText6
+ def_text_pointers
+ dw_const IndigoPlateauLobbyNurseText, TEXT_INDIGOPLATEAULOBBY_NURSE
+ dw_const IndigoPlateauLobbyGymGuideText, TEXT_INDIGOPLATEAULOBBY_GYM_GUIDE
+ dw_const IndigoPlateauLobbyCooltrainerFText, TEXT_INDIGOPLATEAULOBBY_COOLTRAINER_F
+ dw_const IndigoPlateauLobbyClerkText, TEXT_INDIGOPLATEAULOBBY_CLERK
+ dw_const IndigoPlateauLobbyLinkReceptionistText, TEXT_INDIGOPLATEAULOBBY_LINK_RECEPTIONIST
+ dw_const IndigoPlateauLobbyChanseyText, TEXT_INDIGOPLATEAULOBBY_CHANSEY
-IndigoHealNurseText:
+IndigoPlateauLobbyNurseText:
script_pokecenter_nurse
-IndigoPlateauLobbyText2:
- text_far _IndigoPlateauLobbyText2
+IndigoPlateauLobbyGymGuideText:
+ text_far _IndigoPlateauLobbyGymGuideText
text_end
-IndigoPlateauLobbyText3:
- text_far _IndigoPlateauLobbyText3
+IndigoPlateauLobbyCooltrainerFText:
+ text_far _IndigoPlateauLobbyCooltrainerFText
text_end
-IndigoTradeNurseText:
+IndigoPlateauLobbyLinkReceptionistText:
script_cable_club_receptionist
-IndigoPlateauLobbyText6:
+IndigoPlateauLobbyChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm
index 8a3dc31d..75215cba 100644
--- a/scripts/LancesRoom.asm
+++ b/scripts/LancesRoom.asm
@@ -36,21 +36,22 @@ LanceShowOrHideEntranceBlocks:
predef_jump ReplaceTileBlock
ResetLanceScript:
- xor a
+ xor a ; SCRIPT_LANCESROOM_DEFAULT
ld [wLancesRoomCurScript], a
ret
LancesRoom_ScriptPointers:
- dw LanceScript0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw LanceScript2
- dw LanceScript3
- dw LanceScript4
+ def_script_pointers
+ dw_const LancesRoomDefaultScript, SCRIPT_LANCESROOM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_LANCESROOM_LANCE_START_BATTLE
+ dw_const LancesRoomLanceEndBattleScript, SCRIPT_LANCESROOM_LANCE_END_BATTLE
+ dw_const LancesRoomPlayerIsMovingScript, SCRIPT_LANCESROOM_PLAYER_IS_MOVING
+ dw_const LancesRoomNoopScript, SCRIPT_LANCESROOM_NOOP
-LanceScript4:
+LancesRoomNoopScript:
ret
-LanceScript0:
+LancesRoomDefaultScript:
CheckEvent EVENT_BEAT_LANCE
ret nz
ld hl, LanceTriggerMovementCoords
@@ -61,7 +62,7 @@ LanceScript0:
ld a, [wCoordIndex]
cp $3 ; Is player standing next to Lance's sprite?
jr nc, .notStandingNextToLance
- ld a, $1
+ ld a, TEXT_LANCESROOM_LANCE
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
.notStandingNextToLance
@@ -83,18 +84,18 @@ LanceTriggerMovementCoords:
dbmapcoord 24, 16
db -1 ; end
-LanceScript2:
+LancesRoomLanceEndBattleScript:
call EndTrainerBattle
ld a, [wIsInBattle]
cp $ff
jp z, ResetLanceScript
- ld a, $1
+ ld a, TEXT_LANCESROOM_LANCE
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
WalkToLance:
; Moves the player down the hallway to Lance's room.
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
ld de, WalkToLance_RLEList
@@ -102,7 +103,7 @@ WalkToLance:
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_LANCESROOM_PLAYER_IS_MOVING
ld [wLancesRoomCurScript], a
ld [wCurMapScript], a
ret
@@ -114,42 +115,43 @@ WalkToLance_RLEList:
db D_LEFT, 6
db -1 ; end
-LanceScript3:
+LancesRoomPlayerIsMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- xor a
+ xor a ; SCRIPT_LANCESROOM_DEFAULT
ld [wJoyIgnore], a
ld [wLancesRoomCurScript], a
ld [wCurMapScript], a
ret
LancesRoom_TextPointers:
- dw LanceText1
+ def_text_pointers
+ dw_const LancesRoomLanceText, TEXT_LANCESROOM_LANCE
LancesRoomTrainerHeaders:
def_trainers
LancesRoomTrainerHeader0:
- trainer EVENT_BEAT_LANCES_ROOM_TRAINER_0, 0, LanceBeforeBattleText, LanceEndBattleText, LanceAfterBattleText
+ trainer EVENT_BEAT_LANCES_ROOM_TRAINER_0, 0, LancesRoomLanceBeforeBattleText, LancesRoomLanceEndBattleText, LancesRoomLanceAfterBattleText
db -1 ; end
-LanceText1:
+LancesRoomLanceText:
text_asm
ld hl, LancesRoomTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-LanceBeforeBattleText:
- text_far _LanceBeforeBattleText
+LancesRoomLanceBeforeBattleText:
+ text_far _LancesRoomLanceBeforeBattleText
text_end
-LanceEndBattleText:
- text_far _LanceEndBattleText
+LancesRoomLanceEndBattleText:
+ text_far _LancesRoomLanceEndBattleText
text_end
-LanceAfterBattleText:
- text_far _LanceAfterBattleText
+LancesRoomLanceAfterBattleText:
+ text_far _LancesRoomLanceAfterBattleText
text_asm
SetEvent EVENT_BEAT_LANCE
jp TextScriptEnd
diff --git a/scripts/LavenderCuboneHouse.asm b/scripts/LavenderCuboneHouse.asm
index 69d74ede..03062007 100644
--- a/scripts/LavenderCuboneHouse.asm
+++ b/scripts/LavenderCuboneHouse.asm
@@ -3,33 +3,34 @@ LavenderCuboneHouse_Script:
ret
LavenderCuboneHouse_TextPointers:
- dw LavenderHouse2Text1
- dw LavenderHouse2Text2
+ def_text_pointers
+ dw_const LavenderCuboneHouseCuboneText, TEXT_LAVENDERCUBONEHOUSE_CUBONE
+ dw_const LavenderCuboneHouseBrunetteGirlText, TEXT_LAVENDERCUBONEHOUSE_BRUNETTE_GIRL
-LavenderHouse2Text1:
- text_far _LavenderHouse2Text1
+LavenderCuboneHouseCuboneText:
+ text_far _LavenderCuboneHouseCuboneText
text_asm
ld a, CUBONE
call PlayCry
jp TextScriptEnd
-LavenderHouse2Text2:
+LavenderCuboneHouseBrunetteGirlText:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .rescued_mr_fuji
- ld hl, LavenderHouse2Text_1d9dc
+ ld hl, .PoorCubonesMotherText
call PrintText
jr .done
.rescued_mr_fuji
- ld hl, LavenderHouse2Text_1d9e1
+ ld hl, .TheGhostIsGoneText
call PrintText
.done
jp TextScriptEnd
-LavenderHouse2Text_1d9dc:
- text_far _LavenderHouse2Text_1d9dc
+.PoorCubonesMotherText:
+ text_far _LavenderCuboneHouseBrunetteGirlPoorCubonesMotherText
text_end
-LavenderHouse2Text_1d9e1:
- text_far _LavenderHouse2Text_1d9e1
+.TheGhostIsGoneText:
+ text_far _LavenderCuboneHouseBrunetteGirlGhostIsGoneText
text_end
diff --git a/scripts/LavenderMart.asm b/scripts/LavenderMart.asm
index 2b67aaa6..15da1bfc 100644
--- a/scripts/LavenderMart.asm
+++ b/scripts/LavenderMart.asm
@@ -2,15 +2,16 @@ LavenderMart_Script:
jp EnableAutoTextBoxDrawing
LavenderMart_TextPointers:
- dw LavenderCashierText
- dw LavenderMartText2
- dw LavenderMartText3
+ def_text_pointers
+ dw_const LavenderMartClerkText, TEXT_LAVENDERMART_CLERK
+ dw_const LavenderMartBaldingGuyText, TEXT_LAVENDERMART_BALDING_GUY
+ dw_const LavenderMartCooltrainerMText, TEXT_LAVENDERMART_COOLTRAINER_M
-LavenderMartText2:
- text_far _LavenderMartText2
+LavenderMartBaldingGuyText:
+ text_far _LavenderMartBaldingGuyText
text_end
-LavenderMartText3:
+LavenderMartCooltrainerMText:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .Nugget
@@ -24,9 +25,9 @@ LavenderMartText3:
jp TextScriptEnd
.ReviveText
- text_far _LavenderMartReviveText
+ text_far _LavenderMartCooltrainerMReviveText
text_end
.NuggetText
- text_far _LavenderMartNuggetText
+ text_far _LavenderMartCooltrainerMNuggetText
text_end
diff --git a/scripts/LavenderPokecenter.asm b/scripts/LavenderPokecenter.asm
index a15bfcfa..8d92c3af 100644
--- a/scripts/LavenderPokecenter.asm
+++ b/scripts/LavenderPokecenter.asm
@@ -3,27 +3,28 @@ LavenderPokecenter_Script:
jp EnableAutoTextBoxDrawing
LavenderPokecenter_TextPointers:
- dw LavenderHealNurseText
- dw LavenderPokecenterText2
- dw LavenderPokecenterText3
- dw LavenderTradeNurseText
- dw LavenderPokecenterText5
+ def_text_pointers
+ dw_const LavenderPokecenterNurseText, TEXT_LAVENDERPOKECENTER_NURSE
+ dw_const LavenderPokecenterGentlemanText, TEXT_LAVENDERPOKECENTER_GENTLEMAN
+ dw_const LavenderPokecenterLittleGirlText, TEXT_LAVENDERPOKECENTER_LITTLE_GIRL
+ dw_const LavenderPokecenterLinkReceptionistText, TEXT_LAVENDERPOKECENTER_LINK_RECEPTIONIST
+ dw_const LavenderPokecenterChanseyText, TEXT_LAVENDERPOKECENTER_CHANSEY
-LavenderTradeNurseText:
+LavenderPokecenterLinkReceptionistText:
script_cable_club_receptionist
-LavenderHealNurseText:
+LavenderPokecenterNurseText:
script_pokecenter_nurse
-LavenderPokecenterText2:
- text_far _LavenderPokecenterText2
+LavenderPokecenterGentlemanText:
+ text_far _LavenderPokecenterGentlemanText
text_end
-LavenderPokecenterText3:
- text_far _LavenderPokecenterText3
+LavenderPokecenterLittleGirlText:
+ text_far _LavenderPokecenterLittleGirlText
text_end
-LavenderPokecenterText5:
+LavenderPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/LavenderTown.asm b/scripts/LavenderTown.asm
index d0c66208..1c8b6000 100644
--- a/scripts/LavenderTown.asm
+++ b/scripts/LavenderTown.asm
@@ -2,62 +2,63 @@ LavenderTown_Script:
jp EnableAutoTextBoxDrawing
LavenderTown_TextPointers:
- dw LavenderTownText1
- dw LavenderTownText2
- dw LavenderTownText3
- dw LavenderTownText4
- dw LavenderTownText5
- dw MartSignText
- dw PokeCenterSignText
- dw LavenderTownText8
- dw LavenderTownText9
+ def_text_pointers
+ dw_const LavenderTownLittleGirlText, TEXT_LAVENDERTOWN_LITTLE_GIRL
+ dw_const LavenderTownCooltrainerMText, TEXT_LAVENDERTOWN_COOLTRAINER_M
+ dw_const LavenderTownSuperNerdText, TEXT_LAVENDERTOWN_SUPER_NERD
+ dw_const LavenderTownSignText, TEXT_LAVENDERTOWN_SIGN
+ dw_const LavenderTownSilphScopeSignText, TEXT_LAVENDERTOWN_SILPH_SCOPE_SIGN
+ dw_const MartSignText, TEXT_LAVENDERTOWN_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_LAVENDERTOWN_POKECENTER_SIGN
+ dw_const LavenderTownPokemonHouseSignText, TEXT_LAVENDERTOWN_POKEMON_HOUSE_SIGN
+ dw_const LavenderTownPokemonTowerSignText, TEXT_LAVENDERTOWN_POKEMON_TOWER_SIGN
-LavenderTownText1:
+LavenderTownLittleGirlText:
text_asm
- ld hl, LavenderTownText_4413c
+ ld hl, .DoYouBelieveInGhostsText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- ld hl, LavenderTownText_44146
+ ld hl, .HaHaGuessNotText
jr nz, .got_text
- ld hl, LavenderTownText_44141
+ ld hl, .SoThereAreBelieversText
.got_text
call PrintText
jp TextScriptEnd
-LavenderTownText_4413c:
- text_far _LavenderTownText_4413c
+.DoYouBelieveInGhostsText:
+ text_far _LavenderTownLittleGirlDoYouBelieveInGhostsText
text_end
-LavenderTownText_44141:
- text_far _LavenderTownText_44141
+.SoThereAreBelieversText:
+ text_far _LavenderTownLittleGirlSoThereAreBelieversText
text_end
-LavenderTownText_44146:
- text_far _LavenderTownText_44146
+.HaHaGuessNotText:
+ text_far _LavenderTownLittleGirlHaHaGuessNotText
text_end
-LavenderTownText2:
- text_far _LavenderTownText2
+LavenderTownCooltrainerMText:
+ text_far _LavenderTownCooltrainerMText
text_end
-LavenderTownText3:
- text_far _LavenderTownText3
+LavenderTownSuperNerdText:
+ text_far _LavenderTownSuperNerdText
text_end
-LavenderTownText4:
- text_far _LavenderTownText4
+LavenderTownSignText:
+ text_far _LavenderTownSignText
text_end
-LavenderTownText5:
- text_far _LavenderTownText5
+LavenderTownSilphScopeSignText:
+ text_far _LavenderTownSilphScopeSignText
text_end
-LavenderTownText8:
- text_far _LavenderTownText8
+LavenderTownPokemonHouseSignText:
+ text_far _LavenderTownPokemonHouseSignText
text_end
-LavenderTownText9:
- text_far _LavenderTownText9
+LavenderTownPokemonTowerSignText:
+ text_far _LavenderTownPokemonTowerSignText
text_end
diff --git a/scripts/LoreleisRoom.asm b/scripts/LoreleisRoom.asm
index 1f42fa2e..c1cc2adb 100644
--- a/scripts/LoreleisRoom.asm
+++ b/scripts/LoreleisRoom.asm
@@ -28,18 +28,19 @@ LoreleiShowOrHideExitBlock:
predef_jump ReplaceTileBlock
ResetLoreleiScript:
- xor a
+ xor a ; SCRIPT_LORELEISROOM_DEFAULT
ld [wLoreleisRoomCurScript], a
ret
LoreleisRoom_ScriptPointers:
- dw LoreleiScript0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw LoreleiScript2
- dw LoreleiScript3
- dw LoreleiScript4
+ def_script_pointers
+ dw_const LoreleisRoomDefaultScript, SCRIPT_LORELEISROOM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_LORELEISROOM_LORELEI_START_BATTLE
+ dw_const LoreleisRoomLoreleiEndBattleScript, SCRIPT_LORELEISROOM_LORELEI_END_BATTLE
+ dw_const LoreleisRoomPlayerIsMovingScript, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING
+ dw_const LoreleisRoomNoopScript, SCRIPT_LORELEISROOM_NOOP
-LoreleiScript4:
+LoreleisRoomNoopScript:
ret
LoreleiScriptWalkIntoRoom:
@@ -55,12 +56,12 @@ LoreleiScriptWalkIntoRoom:
ld a, $6
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING
ld [wLoreleisRoomCurScript], a
ld [wCurMapScript], a
ret
-LoreleiScript0:
+LoreleisRoomDefaultScript:
ld hl, LoreleiEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
@@ -75,7 +76,7 @@ LoreleiScript0:
CheckAndSetEvent EVENT_AUTOWALKED_INTO_LORELEIS_ROOM
jr z, LoreleiScriptWalkIntoRoom
.stopPlayerFromLeaving
- ld a, $2
+ ld a, TEXT_LORELEISROOM_DONT_RUN_AWAY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID ; "Don't run away!"
ld a, D_UP
@@ -83,7 +84,7 @@ LoreleiScript0:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_LORELEISROOM_PLAYER_IS_MOVING
ld [wLoreleisRoomCurScript], a
ld [wCurMapScript], a
ret
@@ -95,7 +96,7 @@ LoreleiEntranceCoords:
dbmapcoord 5, 11
db -1 ; end
-LoreleiScript3:
+LoreleisRoomPlayerIsMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -106,43 +107,44 @@ LoreleiScript3:
ld [wCurMapScript], a
ret
-LoreleiScript2:
+LoreleisRoomLoreleiEndBattleScript:
call EndTrainerBattle
ld a, [wIsInBattle]
cp $ff
jp z, ResetLoreleiScript
- ld a, $1
+ ld a, TEXT_LORELEISROOM_LORELEI
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
LoreleisRoom_TextPointers:
- dw LoreleiText1
- dw LoreleiDontRunAwayText
+ def_text_pointers
+ dw_const LoreleisRoomLoreleiText, TEXT_LORELEISROOM_LORELEI
+ dw_const LoreleisRoomLoreleiDontRunAwayText, TEXT_LORELEISROOM_DONT_RUN_AWAY
LoreleisRoomTrainerHeaders:
def_trainers
LoreleisRoomTrainerHeader0:
- trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleiBeforeBattleText, LoreleiEndBattleText, LoreleiAfterBattleText
+ trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleisRoomLoreleiBeforeBattleText, LoreleisRoomLoreleiEndBattleText, LoreleisRoomLoreleiAfterBattleText
db -1 ; end
-LoreleiText1:
+LoreleisRoomLoreleiText:
text_asm
ld hl, LoreleisRoomTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-LoreleiBeforeBattleText:
- text_far _LoreleiBeforeBattleText
+LoreleisRoomLoreleiBeforeBattleText:
+ text_far _LoreleisRoomLoreleiBeforeBattleText
text_end
-LoreleiEndBattleText:
- text_far _LoreleiEndBattleText
+LoreleisRoomLoreleiEndBattleText:
+ text_far _LoreleisRoomLoreleiEndBattleText
text_end
-LoreleiAfterBattleText:
- text_far _LoreleiAfterBattleText
+LoreleisRoomLoreleiAfterBattleText:
+ text_far _LoreleisRoomLoreleiAfterBattleText
text_end
-LoreleiDontRunAwayText:
- text_far _LoreleiDontRunAwayText
+LoreleisRoomLoreleiDontRunAwayText:
+ text_far _LoreleisRoomLoreleiDontRunAwayText
text_end
diff --git a/scripts/MrFujisHouse.asm b/scripts/MrFujisHouse.asm
index 3ef3017a..cd47df0f 100644
--- a/scripts/MrFujisHouse.asm
+++ b/scripts/MrFujisHouse.asm
@@ -3,110 +3,111 @@ MrFujisHouse_Script:
ret
MrFujisHouse_TextPointers:
- dw LavenderHouse1Text1
- dw LavenderHouse1Text2
- dw LavenderHouse1Text3
- dw LavenderHouse1Text4
- dw LavenderHouse1Text5
- dw LavenderHouse1Text6
+ def_text_pointers
+ dw_const MrFujisHouseSuperNerdText, TEXT_MRFUJISHOUSE_SUPER_NERD
+ dw_const MrFujisHouseLittleGirlText, TEXT_MRFUJISHOUSE_LITTLE_GIRL
+ dw_const MrFujisHousePsyduckText, TEXT_MRFUJISHOUSE_PSYDUCK
+ dw_const MrFujisHouseNidorinoText, TEXT_MRFUJISHOUSE_NIDORINO
+ dw_const MrFujisHouseMrFujiText, TEXT_MRFUJISHOUSE_MR_FUJI
+ dw_const MrFujisHouseMrFujiPokedexText, TEXT_MRFUJISHOUSE_POKEDEX
-LavenderHouse1Text1:
+MrFujisHouseSuperNerdText:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .rescued_mr_fuji
- ld hl, LavenderHouse1Text_1d8d1
+ ld hl, .MrFujiIsntHereText
call PrintText
jr .done
.rescued_mr_fuji
- ld hl, LavenderHouse1Text_1d8d6
+ ld hl, .MrFujiHadBeenPrayingText
call PrintText
.done
jp TextScriptEnd
-LavenderHouse1Text_1d8d1:
- text_far _LavenderHouse1Text_1d8d1
+.MrFujiIsntHereText:
+ text_far _MrFujisHouseSuperNerdMrFujiIsntHereText
text_end
-LavenderHouse1Text_1d8d6:
- text_far _LavenderHouse1Text_1d8d6
+.MrFujiHadBeenPrayingText:
+ text_far _MrFujisHouseSuperNerdMrFujiHadBeenPrayingText
text_end
-LavenderHouse1Text2:
+MrFujisHouseLittleGirlText:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
jr nz, .rescued_mr_fuji
- ld hl, LavenderHouse1Text_1d8f4
+ ld hl, .ThisIsMrFujisHouseText
call PrintText
jr .done
.rescued_mr_fuji
- ld hl, LavenderHouse1Text_1d8f9
+ ld hl, .PokemonAreNiceToHugText
call PrintText
.done
jp TextScriptEnd
-LavenderHouse1Text_1d8f4:
- text_far _LavenderHouse1Text_1d8f4
+.ThisIsMrFujisHouseText:
+ text_far _MrFujisHouseLittleGirlThisIsMrFujisHouseText
text_end
-LavenderHouse1Text_1d8f9:
- text_far _LavenderHouse1Text_1d8f9
+.PokemonAreNiceToHugText:
+ text_far _MrFujisHouseLittleGirlPokemonAreNiceToHugText
text_end
-LavenderHouse1Text3:
- text_far _LavenderHouse1Text3
+MrFujisHousePsyduckText:
+ text_far _MrFujisHousePsyduckText
text_asm
ld a, PSYDUCK
call PlayCry
jp TextScriptEnd
-LavenderHouse1Text4:
- text_far _LavenderHouse1Text4
+MrFujisHouseNidorinoText:
+ text_far _MrFujisHouseNidorinoText
text_asm
ld a, NIDORINO
call PlayCry
jp TextScriptEnd
-LavenderHouse1Text5:
+MrFujisHouseMrFujiText:
text_asm
CheckEvent EVENT_GOT_POKE_FLUTE
jr nz, .got_item
- ld hl, LavenderHouse1Text_1d94c
+ ld hl, .IThinkThisMayHelpYourQuestText
call PrintText
lb bc, POKE_FLUTE, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedFluteText
+ ld hl, .ReceivedPokeFluteText
call PrintText
SetEvent EVENT_GOT_POKE_FLUTE
jr .done
.bag_full
- ld hl, FluteNoRoomText
+ ld hl, .PokeFluteNoRoomText
call PrintText
jr .done
.got_item
- ld hl, MrFujiAfterFluteText
+ ld hl, .HasMyFluteHelpedYouText
call PrintText
.done
jp TextScriptEnd
-LavenderHouse1Text_1d94c:
- text_far _LavenderHouse1Text_1d94c
+.IThinkThisMayHelpYourQuestText:
+ text_far _MrFujisHouseMrFujiIThinkThisMayHelpYourQuestText
text_end
-ReceivedFluteText:
- text_far _ReceivedFluteText
+.ReceivedPokeFluteText:
+ text_far _MrFujisHouseMrFujiReceivedPokeFluteText
sound_get_key_item
- text_far _FluteExplanationText
+ text_far _MrFujisHouseMrFujiPokeFluteExplanationText
text_end
-FluteNoRoomText:
- text_far _FluteNoRoomText
+.PokeFluteNoRoomText:
+ text_far _MrFujisHouseMrFujiPokeFluteNoRoomText
text_end
-MrFujiAfterFluteText:
- text_far _MrFujiAfterFluteText
+.HasMyFluteHelpedYouText:
+ text_far _MrFujisHouseMrFujiHasMyFluteHelpedYouText
text_end
-LavenderHouse1Text6:
- text_far _LavenderHouse1Text6
+MrFujisHouseMrFujiPokedexText:
+ text_far _MrFujisHouseMrFujiPokedexText
text_end
diff --git a/scripts/MrPsychicsHouse.asm b/scripts/MrPsychicsHouse.asm
index 399edfbd..f5cb4b0d 100644
--- a/scripts/MrPsychicsHouse.asm
+++ b/scripts/MrPsychicsHouse.asm
@@ -2,44 +2,45 @@ MrPsychicsHouse_Script:
jp EnableAutoTextBoxDrawing
MrPsychicsHouse_TextPointers:
- dw SaffronHouse2Text1
+ def_text_pointers
+ dw_const MrPsychicsHouseMrPsychicText, TEXT_MRPSYCHICSHOUSE_MR_PSYCHIC
-SaffronHouse2Text1:
+MrPsychicsHouseMrPsychicText:
text_asm
CheckEvent EVENT_GOT_TM29
jr nz, .got_item
- ld hl, TM29PreReceiveText
+ ld hl, .YouWantedThisText
call PrintText
lb bc, TM_PSYCHIC_M, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedTM29Text
+ ld hl, .ReceivedTM29Text
call PrintText
SetEvent EVENT_GOT_TM29
jr .done
.bag_full
- ld hl, TM29NoRoomText
+ ld hl, .TM29NoRoomText
call PrintText
jr .done
.got_item
- ld hl, TM29ExplanationText
+ ld hl, .TM29ExplanationText
call PrintText
.done
jp TextScriptEnd
-TM29PreReceiveText:
- text_far _TM29PreReceiveText
+.YouWantedThisText:
+ text_far _MrPsychicsHouseMrPsychicYouWantedThisText
text_end
-ReceivedTM29Text:
- text_far _ReceivedTM29Text
+.ReceivedTM29Text:
+ text_far _MrPsychicsHouseMrPsychicReceivedTM29Text
sound_get_item_1
text_end
-TM29ExplanationText:
- text_far _TM29ExplanationText
+.TM29ExplanationText:
+ text_far _MrPsychicsHouseMrPsychicTM29ExplanationText
text_end
-TM29NoRoomText:
- text_far _TM29NoRoomText
+.TM29NoRoomText:
+ text_far _MrPsychicsHouseMrPsychicTM29NoRoomText
text_end
diff --git a/scripts/MtMoon1F.asm b/scripts/MtMoon1F.asm
index 125a8fc5..260f7b93 100644
--- a/scripts/MtMoon1F.asm
+++ b/scripts/MtMoon1F.asm
@@ -8,165 +8,167 @@ MtMoon1F_Script:
ret
MtMoon1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_MTMOON1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_MTMOON1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_MTMOON1F_END_BATTLE
MtMoon1F_TextPointers:
- dw MtMoon1Text1
- dw MtMoon1Text2
- dw MtMoon1Text3
- dw MtMoon1Text4
- dw MtMoon1Text5
- dw MtMoon1Text6
- dw MtMoon1Text7
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw MtMoon1Text14
+ def_text_pointers
+ dw_const MtMoon1FHikerText, TEXT_MTMOON1F_HIKER
+ dw_const MtMoon1FYoungster1Text, TEXT_MTMOON1F_YOUNGSTER1
+ dw_const MtMoon1FCooltrainerF1Text, TEXT_MTMOON1F_COOLTRAINER_F1
+ dw_const MtMoon1FSuperNerdText, TEXT_MTMOON1F_SUPER_NERD
+ dw_const MtMoon1FCooltrainerF2Text, TEXT_MTMOON1F_COOLTRAINER_F2
+ dw_const MtMoon1FYoungster2Text, TEXT_MTMOON1F_YOUNGSTER2
+ dw_const MtMoon1FYoungster3Text, TEXT_MTMOON1F_YOUNGSTER3
+ dw_const PickUpItemText, TEXT_MTMOON1F_POTION1
+ dw_const PickUpItemText, TEXT_MTMOON1F_MOON_STONE
+ dw_const PickUpItemText, TEXT_MTMOON1F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_MTMOON1F_ESCAPE_ROPE
+ dw_const PickUpItemText, TEXT_MTMOON1F_POTION2
+ dw_const PickUpItemText, TEXT_MTMOON1F_TM_WATER_GUN
+ dw_const MtMoon1FBewareZubatSign, TEXT_MTMOON1F_BEWARE_ZUBAT_SIGN
MtMoon1TrainerHeaders:
def_trainers
MtMoon1TrainerHeader0:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_0, 2, MtMoon1BattleText2, MtMoon1EndBattleText2, MtMoon1AfterBattleText2
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_0, 2, MtMoon1FHikerBattleText, MtMoon1FHikerEndBattleText, MtMoon1FHikerAfterBattleText
MtMoon1TrainerHeader1:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_1, 3, MtMoon1BattleText3, MtMoon1EndBattleText3, MtMoon1AfterBattleText3
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_1, 3, MtMoon1FYoungster1BattleText, MtMoon1FYoungster1EndBattleText, MtMoon1FYoungster1AfterBattleText
MtMoon1TrainerHeader2:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_2, 3, MtMoon1BattleText4, MtMoon1EndBattleText4, MtMoon1AfterBattleText4
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_2, 3, MtMoon1FCooltrainerF1BattleText, MtMoon1FCooltrainerF1EndBattleText, MtMoon1FCooltrainerF1AfterBattleText
MtMoon1TrainerHeader3:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_3, 3, MtMoon1BattleText5, MtMoon1EndBattleText5, MtMoon1AfterBattleText5
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_3, 3, MtMoon1FSuperNerdBattleText, MtMoon1FSuperNerdEndBattleText, MtMoon1FSuperNerdAfterBattleText
MtMoon1TrainerHeader4:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_4, 3, MtMoon1BattleText6, MtMoon1EndBattleText6, MtMoon1AfterBattleText6
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_4, 3, MtMoon1FCooltrainerF2BattleText, MtMoon1FCooltrainerF2EndBattleText, MtMoon1FCooltrainerF2AfterBattleText
MtMoon1TrainerHeader5:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_5, 3, MtMoon1BattleText7, MtMoon1EndBattleText7, MtMoon1AfterBattleText7
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_5, 3, MtMoon1FYoungster2BattleText, MtMoon1FYoungster2EndBattleText, MtMoon1FYoungster2AfterBattleText
MtMoon1TrainerHeader6:
- trainer EVENT_BEAT_MT_MOON_1_TRAINER_6, 3, MtMoon1BattleText8, MtMoon1EndBattleText8, MtMoon1AfterBattleText8
+ trainer EVENT_BEAT_MT_MOON_1_TRAINER_6, 3, MtMoon1FYoungster3BattleText, MtMoon1FYoungster3EndBattleText, MtMoon1FYoungster3AfterBattleText
db -1 ; end
-MtMoon1Text1:
+MtMoon1FHikerText:
text_asm
ld hl, MtMoon1TrainerHeader0
jr MtMoon1TalkToTrainer
-MtMoon1Text2:
+MtMoon1FYoungster1Text:
text_asm
ld hl, MtMoon1TrainerHeader1
jr MtMoon1TalkToTrainer
-MtMoon1Text3:
+MtMoon1FCooltrainerF1Text:
text_asm
ld hl, MtMoon1TrainerHeader2
jr MtMoon1TalkToTrainer
-MtMoon1Text4:
+MtMoon1FSuperNerdText:
text_asm
ld hl, MtMoon1TrainerHeader3
jr MtMoon1TalkToTrainer
-MtMoon1Text5:
+MtMoon1FCooltrainerF2Text:
text_asm
ld hl, MtMoon1TrainerHeader4
jr MtMoon1TalkToTrainer
-MtMoon1Text6:
+MtMoon1FYoungster2Text:
text_asm
ld hl, MtMoon1TrainerHeader5
jr MtMoon1TalkToTrainer
-MtMoon1Text7:
+MtMoon1FYoungster3Text:
text_asm
ld hl, MtMoon1TrainerHeader6
MtMoon1TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-MtMoon1BattleText2:
- text_far _MtMoon1BattleText2
+MtMoon1FHikerBattleText:
+ text_far _MtMoon1FHikerBattleText
text_end
-MtMoon1EndBattleText2:
- text_far _MtMoon1EndBattleText2
+MtMoon1FHikerEndBattleText:
+ text_far _MtMoon1FHikerEndBattleText
text_end
-MtMoon1AfterBattleText2:
- text_far _MtMoon1AfterBattleText2
+MtMoon1FHikerAfterBattleText:
+ text_far _MtMoon1FHikerAfterBattleText
text_end
-MtMoon1BattleText3:
- text_far _MtMoon1BattleText3
+MtMoon1FYoungster1BattleText:
+ text_far _MtMoon1FYoungster1BattleText
text_end
-MtMoon1EndBattleText3:
- text_far _MtMoon1EndBattleText3
+MtMoon1FYoungster1EndBattleText:
+ text_far _MtMoon1FYoungster1EndBattleText
text_end
-MtMoon1AfterBattleText3:
- text_far _MtMoon1AfterBattleText3
+MtMoon1FYoungster1AfterBattleText:
+ text_far _MtMoon1FYoungster1AfterBattleText
text_end
-MtMoon1BattleText4:
- text_far _MtMoon1BattleText4
+MtMoon1FCooltrainerF1BattleText:
+ text_far _MtMoon1FCooltrainerF1BattleText
text_end
-MtMoon1EndBattleText4:
- text_far _MtMoon1EndBattleText4
+MtMoon1FCooltrainerF1EndBattleText:
+ text_far _MtMoon1FCooltrainerF1EndBattleText
text_end
-MtMoon1AfterBattleText4:
- text_far _MtMoon1AfterBattleText4
+MtMoon1FCooltrainerF1AfterBattleText:
+ text_far _MtMoon1FCooltrainerF1AfterBattleText
text_end
-MtMoon1BattleText5:
- text_far _MtMoon1BattleText5
+MtMoon1FSuperNerdBattleText:
+ text_far _MtMoon1FSuperNerdBattleText
text_end
-MtMoon1EndBattleText5:
- text_far _MtMoon1EndBattleText5
+MtMoon1FSuperNerdEndBattleText:
+ text_far _MtMoon1FSuperNerdEndBattleText
text_end
-MtMoon1AfterBattleText5:
- text_far _MtMoon1AfterBattleText5
+MtMoon1FSuperNerdAfterBattleText:
+ text_far _MtMoon1FSuperNerdAfterBattleText
text_end
-MtMoon1BattleText6:
- text_far _MtMoon1BattleText6
+MtMoon1FCooltrainerF2BattleText:
+ text_far _MtMoon1FCooltrainerF2BattleText
text_end
-MtMoon1EndBattleText6:
- text_far _MtMoon1EndBattleText6
+MtMoon1FCooltrainerF2EndBattleText:
+ text_far _MtMoon1FCooltrainerF2EndBattleText
text_end
-MtMoon1AfterBattleText6:
- text_far _MtMoon1AfterBattleText6
+MtMoon1FCooltrainerF2AfterBattleText:
+ text_far _MtMoon1FCooltrainerF2AfterBattleText
text_end
-MtMoon1BattleText7:
- text_far _MtMoon1BattleText7
+MtMoon1FYoungster2BattleText:
+ text_far _MtMoon1FYoungster2BattleText
text_end
-MtMoon1EndBattleText7:
- text_far _MtMoon1EndBattleText7
+MtMoon1FYoungster2EndBattleText:
+ text_far _MtMoon1FYoungster2EndBattleText
text_end
-MtMoon1AfterBattleText7:
- text_far _MtMoon1AfterBattleText7
+MtMoon1FYoungster2AfterBattleText:
+ text_far _MtMoon1FYoungster2AfterBattleText
text_end
-MtMoon1BattleText8:
- text_far _MtMoon1BattleText8
+MtMoon1FYoungster3BattleText:
+ text_far _MtMoon1FYoungster3BattleText
text_end
-MtMoon1EndBattleText8:
- text_far _MtMoon1EndBattleText8
+MtMoon1FYoungster3EndBattleText:
+ text_far _MtMoon1FYoungster3EndBattleText
text_end
-MtMoon1AfterBattleText8:
- text_far _MtMoon1AfterBattleText8
+MtMoon1FYoungster3AfterBattleText:
+ text_far _MtMoon1FYoungster3AfterBattleText
text_end
-MtMoon1Text14:
- text_far _MtMoon1Text14
+MtMoon1FBewareZubatSign:
+ text_far _MtMoon1FBewareZubatSign
text_end
diff --git a/scripts/MtMoonB1F.asm b/scripts/MtMoonB1F.asm
index 06af2dd3..16ed4378 100644
--- a/scripts/MtMoonB1F.asm
+++ b/scripts/MtMoonB1F.asm
@@ -3,8 +3,9 @@ MtMoonB1F_Script:
ret
MtMoonB1F_TextPointers:
- dw MtMoonText1
+ def_text_pointers
+ dw_const MtMoonB1FUnusedText, TEXT_MTMOONB1F_UNUSED
-MtMoonText1:
- text_far _MtMoonText1
+MtMoonB1FUnusedText:
+ text_far _MtMoonB1FUnusedText
text_end
diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm
index 491ecae3..2b2dea4e 100644
--- a/scripts/MtMoonB2F.asm
+++ b/scripts/MtMoonB2F.asm
@@ -7,18 +7,18 @@ MtMoonB2F_Script:
ld [wMtMoonB2FCurScript], a
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
ret z
- ld hl, CoordsData_49d37
+ ld hl, MtMoonB2FFossilAreaCoords
call ArePlayerCoordsInArray
- jr nc, .asm_49d31
+ jr nc, .enable_battles
ld hl, wd72e
set 4, [hl]
ret
-.asm_49d31
+.enable_battles
ld hl, wd72e
res 4, [hl]
ret
-CoordsData_49d37:
+MtMoonB2FFossilAreaCoords:
dbmapcoord 11, 5
dbmapcoord 12, 5
dbmapcoord 13, 5
@@ -37,53 +37,54 @@ CoordsData_49d37:
dbmapcoord 14, 8
db -1 ; end
-MtMoon3Script_49cd7:
+MtMoonB2FResetScripts:
CheckAndResetEvent EVENT_57E
- call nz, MtMoon3Script_49cec
+ call nz, MtMoonB2FScript_HideJessieJames
xor a
ld [wJoyIgnore], a
-MtMoon3Script_49ce5:
+MtMoonB2FSetScript:
ld [wMtMoonB2FCurScript], a
ld [wCurMapScript], a
ret
-MtMoon3Script_49cec:
+MtMoonB2FScript_HideJessieJames:
ld a, HS_MT_MOON_B2F_JESSIE
- call MtMoon3Script_49f93
+ call MtMoonB2FScript_HideObject
ld a, HS_MT_MOON_B2F_JAMES
- call MtMoon3Script_49f93
+ call MtMoonB2FScript_HideObject
ret
MtMoonB2F_ScriptPointers:
- dw MtMoon3Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw MtMoon3Script3
- dw MtMoon3Script4
- dw MtMoon3Script5
- dw MtMoon3Script6
- dw MtMoon3Script7
- dw MtMoon3Script8
- dw MtMoon3Script9
- dw MtMoon3Script10
- dw MtMoon3Script11
- dw MtMoon3Script12
- dw MtMoon3Script13
- dw MtMoon3Script14
- dw MtMoon3Script15
+ def_script_pointers
+ dw_const MtMoonB2FDefaultScript, SCRIPT_MTMOONB2F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_MTMOONB2F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_MTMOONB2F_END_BATTLE
+ dw_const MtMoonB2FDefeatedSuperNerdScript, SCRIPT_MTMOONB2F_DEFEATED_SUPER_NERD
+ dw_const MtMoonB2FMoveSuperNerdScript, SCRIPT_MTMOONB2F_MOVE_SUPER_NERD
+ dw_const MtMoonB2FSuperNerdTakesOtherFossilScript, SCRIPT_MTMOONB2F_SUPER_NERD_TAKES_OTHER_FOSSIL
+ dw_const MtMoonB2FScript6, SCRIPT_MTMOONB2F_SCRIPT6
+ dw_const MtMoonB2FScript7, SCRIPT_MTMOONB2F_SCRIPT7
+ dw_const MtMoonB2FScript8, SCRIPT_MTMOONB2F_SCRIPT8
+ dw_const MtMoonB2FScript9, SCRIPT_MTMOONB2F_SCRIPT9
+ dw_const MtMoonB2FScript10, SCRIPT_MTMOONB2F_SCRIPT10
+ dw_const MtMoonB2FScript11, SCRIPT_MTMOONB2F_SCRIPT11
+ dw_const MtMoonB2FScript12, SCRIPT_MTMOONB2F_SCRIPT12
+ dw_const MtMoonB2FScript13, SCRIPT_MTMOONB2F_SCRIPT13
+ dw_const MtMoonB2FScript14, SCRIPT_MTMOONB2F_SCRIPT14
+ dw_const MtMoonB2FScript15, SCRIPT_MTMOONB2F_SCRIPT15
-MtMoon3Script0:
+MtMoonB2FDefaultScript:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEitherEventSet EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
- call z, MtMoon3Script_49d28
+ call z, MtMoonB2FScript_49d28
CheckEvent EVENT_BEAT_MT_MOON_3_TRAINER_0
- call z, MtMoon3Script_49e15
+ call z, MtMoonB2FScript_49e15
ret
-MtMoon3Script_49d28:
+MtMoonB2FScript_49d28:
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
jp nz, .asm_49d4b
ld a, [wYCoord]
@@ -94,7 +95,7 @@ MtMoon3Script_49d28:
jp nz, .asm_49d4b
xor a
ldh [hJoyHeld], a
- ld a, $1
+ ld a, TEXT_MTMOONB2F_SUPER_NERD
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
@@ -104,21 +105,21 @@ MtMoon3Script_49d28:
jp z, CheckFightingMapTrainers
ret
-MtMoon3Script3:
+MtMoonB2FDefeatedSuperNerdScript:
ld a, [wIsInBattle]
cp $ff
- jp z, MtMoon3Script_49cd7
+ jp z, MtMoonB2FResetScripts
call UpdateSprites
call Delay3
SetEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
xor a
ld [wJoyIgnore], a
- ld a, $0
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_DEFAULT
+ call MtMoonB2FSetScript
ret
-MtMoon3Script4:
- ld a, $1
+MtMoonB2FMoveSuperNerdScript:
+ ld a, MTMOONB2F_SUPER_NERD
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld hl, CoordsData_49dc7
@@ -138,7 +139,7 @@ MtMoon3Script4:
.asm_49d9b
ld b, SPRITE_FACING_LEFT
ld hl, PikachuMovementData_49dd8
- call MtMoon3Script_4a325
+ call MtMoonB2FScript_ApplyPikachuMovementData
.asm_49da3
ld de, MovementData_49ddd
jr .asm_49db3
@@ -146,15 +147,15 @@ MtMoon3Script4:
.asm_49da8
ld b, SPRITE_FACING_RIGHT
ld hl, PikachuMovementData_49dca
- call MtMoon3Script_4a325
+ call MtMoonB2FScript_ApplyPikachuMovementData
.asm_49db0
ld de, MovementData_49ddc
.asm_49db3
- ld a, $1
+ ld a, MTMOONB2F_SUPER_NERD
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $5
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SUPER_NERD_TAKES_OTHER_FOSSIL
+ call MtMoonB2FSetScript
ret
CoordsData_49dc0:
@@ -195,15 +196,15 @@ MovementData_49ddd:
db NPC_MOVEMENT_UP
db -1 ; end
-MtMoon3Script5:
+MtMoonB2FSuperNerdTakesOtherFossilScript:
ld a, [wd730]
bit 0, a
ret nz
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $b
+ ld a, TEXT_MTMOONB2F_SUPER_NERD_THEN_THIS_IS_MINE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckEvent EVENT_GOT_HELIX_FOSSIL
@@ -217,11 +218,11 @@ MtMoon3Script5:
predef HideObject
xor a
ld [wJoyIgnore], a
- ld a, $0
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_DEFAULT
+ call MtMoonB2FSetScript
ret
-MtMoon3Script_49e15:
+MtMoonB2FScript_49e15:
ld a, [wXCoord]
cp $3
ret nz
@@ -237,12 +238,12 @@ MtMoon3Script_49e15:
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, HS_MT_MOON_B2F_JESSIE
- call MtMoon3Script_49f84
+ call MtMoonB2FScript_ShowObject
ld a, HS_MT_MOON_B2F_JAMES
- call MtMoon3Script_49f84
+ call MtMoonB2FScript_ShowObject
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $c
+ ld a, TEXT_MTMOONB2F_TEXT12
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -252,10 +253,10 @@ MtMoon3Script_49e15:
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $6
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT6
+ call MtMoonB2FSetScript
ret
MovementData_f9e65:
@@ -268,52 +269,52 @@ MovementData_f9e66:
db $06
db $FF
-MtMoon3Script6:
- ld a, $ff
+MtMoonB2FScript6:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $2
+ ld a, MTMOONB2F_JESSIE
ldh [hSpriteIndex], a
ld de, MovementData_f9e65
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $7
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT7
+ call MtMoonB2FSetScript
ret
-MtMoon3Script7:
- ld a, $ff
+MtMoonB2FScript7:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-MtMoon3Script8:
+MtMoonB2FScript8:
ld a, $2
ld [wSprite02StateData1MovementStatus], a
ld a, SPRITE_FACING_DOWN
ld [wSprite02StateData1FacingDirection], a
-MtMoon3Script9:
- ld a, $6
+MtMoonB2FScript9:
+ ld a, MTMOONB2F_JAMES
ldh [hSpriteIndex], a
ld de, MovementData_f9e66
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $a
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT10
+ call MtMoonB2FSetScript
ret
-MtMoon3Script10:
- ld a, $ff
+MtMoonB2FScript10:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-MtMoon3Script11:
+MtMoonB2FScript11:
ld a, $2
ld [wSprite06StateData1MovementStatus], a
ld a, SPRITE_FACING_LEFT
@@ -321,15 +322,15 @@ MtMoon3Script11:
call Delay3
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
- ld a, $d
+ ld a, TEXT_MTMOONB2F_TEXT13
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-MtMoon3Script12:
+MtMoonB2FScript12:
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, MtMoon3JessieJamesEndBattleText
- ld de, MtMoon3JessieJamesEndBattleText
+ ld hl, MtMoonB2FJessieJamesEndBattleText
+ ld de, MtMoonB2FJessieJamesEndBattleText
call SaveEndBattleTextPointers
ld a, OPP_ROCKET
ld [wCurOpponent], a
@@ -339,16 +340,16 @@ MtMoon3Script12:
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_57E
- ld a, $d
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT13
+ call MtMoonB2FSetScript
ret
-MtMoon3Script13:
- ld a, $ff
+MtMoonB2FScript13:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wIsInBattle]
cp $ff
- jp z, MtMoon3Script_49cd7
+ jp z, MtMoonB2FResetScripts
ld a, $2
ld [wSprite02StateData1MovementStatus], a
ld [wSprite06StateData1MovementStatus], a
@@ -359,7 +360,7 @@ MtMoon3Script13:
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $e
+ ld a, TEXT_MTMOONB2F_TEXT14
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -368,81 +369,81 @@ MtMoon3Script13:
ld c, BANK(Music_MeetJessieJames)
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $e
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT14
+ call MtMoonB2FSetScript
ret
-MtMoon3Script14:
- ld a, $ff
+MtMoonB2FScript14:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call GBFadeOutToBlack
ld a, HS_MT_MOON_B2F_JESSIE
- call MtMoon3Script_49f93
+ call MtMoonB2FScript_HideObject
ld a, HS_MT_MOON_B2F_JAMES
- call MtMoon3Script_49f93
+ call MtMoonB2FScript_HideObject
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- ld a, $f
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_SCRIPT15
+ call MtMoonB2FSetScript
ret
-MtMoon3Script15:
+MtMoonB2FScript15:
call PlayDefaultMusic
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_MT_MOON_3_TRAINER_0
ResetEventReuseHL EVENT_57E
- ld a, $0
- call MtMoon3Script_49ce5
+ ld a, SCRIPT_MTMOONB2F_DEFAULT
+ call MtMoonB2FSetScript
ret
-MtMoon3Script_49f84:
+MtMoonB2FScript_ShowObject:
ld [wMissableObjectIndex], a
predef ShowObject
call UpdateSprites
call Delay3
ret
-MtMoon3Script_49f93:
+MtMoonB2FScript_HideObject:
ld [wMissableObjectIndex], a
predef HideObject
ret
MtMoonB2F_TextPointers:
- dw MtMoon3Text1
- dw MtMoon3Text2
- dw MtMoon3Text3
- dw MtMoon3Text4
- dw MtMoon3Text5
- dw MtMoon3Text6
- dw MtMoon3Text7
- dw MtMoon3Text8
- dw PickUpItemText
- dw PickUpItemText
- dw MtMoon3Text11
- dw MtMoon3Text12
- dw MtMoon3Text13
- dw MtMoon3Text14
+ def_text_pointers
+ dw_const MtMoonB2FSuperNerdText, TEXT_MTMOONB2F_SUPER_NERD
+ dw_const MtMoonB2FJessieJamesText, TEXT_MTMOONB2F_JESSIE
+ dw_const MtMoonB2FRocket1Text, TEXT_MTMOONB2F_ROCKET1
+ dw_const MtMoonB2FRocket2Text, TEXT_MTMOONB2F_ROCKET2
+ dw_const MtMoonB2FRocket3Text, TEXT_MTMOONB2F_ROCKET3
+ dw_const MtMoonB2FJessieJamesText, TEXT_MTMOONB2F_JAMES
+ dw_const MtMoonB2FDomeFossilText, TEXT_MTMOONB2F_DOME_FOSSIL
+ dw_const MtMoonB2FHelixFossilText, TEXT_MTMOONB2F_HELIX_FOSSIL
+ dw_const PickUpItemText, TEXT_MTMOONB2F_HP_UP
+ dw_const PickUpItemText, TEXT_MTMOONB2F_TM_MEGA_PUNCH
+ dw_const MtMoonB2FSuperNerdThenThisIsMineText, TEXT_MTMOONB2F_SUPER_NERD_THEN_THIS_IS_MINE
+ dw_const MtMoonB2FText12, TEXT_MTMOONB2F_TEXT12
+ dw_const MtMoonB2FText13, TEXT_MTMOONB2F_TEXT13
+ dw_const MtMoonB2FText14, TEXT_MTMOONB2F_TEXT14
MtMoon3TrainerHeaders:
def_trainers 3
MtMoon3TrainerHeader0:
- trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoon3BattleText3, MtMoon3EndBattleText3, MtMoon3AfterBattleText3
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoonB2FRocket2BattleText, MtMoonB2FRocket2EndBattleText, MtMoonB2FRocket2AfterBattleText
MtMoon3TrainerHeader1:
- trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoon3BattleText4, MtMoon3EndBattleText4, MtMoon3AfterBattleText4
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoonB2FRocket3BattleText, MtMoonB2FRocket3EndBattleText, MtMoonB2FRocket3AfterBattleText
MtMoon3TrainerHeader2:
- trainer EVENT_BEAT_MT_MOON_3_TRAINER_3, 4, MtMoon3BattleText5, MtMoon3EndBattleText5, MtMoon3AfterBattleText5
+ trainer EVENT_BEAT_MT_MOON_3_TRAINER_3, 4, MtMoonB2FRocket4BattleText, MtMoonB2FRocket4EndBattleText, MtMoonB2FRocket4AfterBattleText
db -1 ; end
-MtMoon3Text2:
-MtMoon3Text6:
+MtMoonB2FJessieJamesText:
text_end
-MtMoon3Text12:
+MtMoonB2FText12:
text_far _MtMoonJessieJamesText1
text_asm
ld c, 10
@@ -458,200 +459,197 @@ MtMoon3Text12:
call DelayFrames
jp TextScriptEnd
-MtMoon3Text13:
+MtMoonB2FText13:
text_far _MtMoonJessieJamesText2
text_end
-MtMoon3JessieJamesEndBattleText:
+MtMoonB2FJessieJamesEndBattleText:
text_far _MtMoonJessieJamesText3
text_end
-MtMoon3Text14:
+MtMoonB2FText14:
text_far _MtMoonJessieJamesText4
text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
-MtMoon3Text1:
+MtMoonB2FSuperNerdText:
text_asm
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
- jr z, .asm_4a02f
+ jr z, .beat_super_nerd
; CheckEitherEventSetReuseA EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
and (1 << (EVENT_GOT_DOME_FOSSIL % 8)) | (1 << (EVENT_GOT_HELIX_FOSSIL % 8))
- jr nz, .asm_4a057
- ld hl, MtMoon3Text_4a116
+ jr nz, .got_a_fossil
+ ld hl, MtMoonB2fSuperNerdEachTakeOneText
call PrintText
- jr .asm_4a05d
-
-.asm_4a02f
- ld hl, MtMoon3Text_4a10c
+ jr .done
+.beat_super_nerd
+ ld hl, MtMoonB2FSuperNerdTheyreBothMineText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, MtMoon3SuperNerdEndBattleText
- ld de, MtMoon3SuperNerdEndBattleText
+ ld hl, MtMoonB2FSuperNerdOkIllShareText
+ ld de, MtMoonB2FSuperNerdOkIllShareText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
- ld a, $3
- call MtMoon3Script_49ce5
- jr .asm_4a05d
-
-.asm_4a057
- ld hl, MtMoon3Text_4a11b
+ ld a, SCRIPT_MTMOONB2F_DEFEATED_SUPER_NERD
+ call MtMoonB2FSetScript
+ jr .done
+.got_a_fossil
+ ld hl, MtMoonB2FSuperNerdTheresAPokemonLabText
call PrintText
-.asm_4a05d
+.done
jp TextScriptEnd
-MtMoon3Text3:
+MtMoonB2FRocket1Text:
text_asm
ld hl, MtMoon3TrainerHeader0
- jr MtMoon3TalkToTrainer
+ jr MtMoonB2FTalkToTrainer
-MtMoon3Text4:
+MtMoonB2FRocket2Text:
text_asm
ld hl, MtMoon3TrainerHeader1
- jr MtMoon3TalkToTrainer
-
+ jr MtMoonB2FTalkToTrainer
-MtMoon3Text5:
+MtMoonB2FRocket3Text:
text_asm
ld hl, MtMoon3TrainerHeader2
-MtMoon3TalkToTrainer:
+MtMoonB2FTalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-MtMoon3Text7:
+MtMoonB2FDomeFossilText:
text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, MtMoon3Text_4a0ae
+ ld hl, .YouWantText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_4a0ab
+ jr nz, .done
lb bc, DOME_FOSSIL, 1
call GiveItem
- jp nc, MtMoon3Script_4a0fd
- call MtMoon3Script_4a0f0
+ jp nc, MtMoonB2FYouHaveNoRoomText
+ call MtMoonB2FReceivedFossilText
ld a, HS_MT_MOON_B2F_FOSSIL_1
ld [wMissableObjectIndex], a
predef HideObject
SetEvent EVENT_GOT_DOME_FOSSIL
- ld a, $4
- call MtMoon3Script_49ce5
-.asm_4a0ab
+ ld a, SCRIPT_MTMOONB2F_MOVE_SUPER_NERD
+ call MtMoonB2FSetScript
+.done
jp TextScriptEnd
-MtMoon3Text_4a0ae:
- text_far _MtMoon3Text_49f24
+.YouWantText:
+ text_far _MtMoonB2FDomeFossilYouWantText
text_end
-MtMoon3Text8:
+MtMoonB2FHelixFossilText:
text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, MtMoon3Text_4a0eb
+ ld hl, .YouWantText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_4a0e8
+ jr nz, .done
lb bc, HELIX_FOSSIL, 1
call GiveItem
- jp nc, MtMoon3Script_4a0fd
- call MtMoon3Script_4a0f0
+ jp nc, MtMoonB2FYouHaveNoRoomText
+ call MtMoonB2FReceivedFossilText
ld a, HS_MT_MOON_B2F_FOSSIL_2
ld [wMissableObjectIndex], a
predef HideObject
SetEvent EVENT_GOT_HELIX_FOSSIL
- ld a, $4
- call MtMoon3Script_49ce5
-.asm_4a0e8
+ ld a, SCRIPT_MTMOONB2F_MOVE_SUPER_NERD
+ call MtMoonB2FSetScript
+.done
jp TextScriptEnd
-MtMoon3Text_4a0eb:
- text_far _MtMoon3Text_49f64
+.YouWantText:
+ text_far _MtMoonB2FHelixFossilYouWantText
text_end
-MtMoon3Script_4a0f0:
- ld hl, MtMoon3Text_4a0f6
+MtMoonB2FReceivedFossilText:
+ ld hl, .Text
jp PrintText
-MtMoon3Text_4a0f6:
- text_far _MtMoon3Text_49f6f
+.Text:
+ text_far _MtMoonB2FReceivedFossilText
sound_get_key_item
text_waitbutton
text_end
-MtMoon3Script_4a0fd:
- ld hl, MtMoon3Text_4a106
+MtMoonB2FYouHaveNoRoomText:
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-MtMoon3Text_4a106:
- text_far _MtMoon3Text_49f7f
+.Text:
+ text_far _MtMoonB2FYouHaveNoRoomText
text_waitbutton
text_end
-MtMoon3Text_4a10c:
- text_far _MtMoon3Text_49f85
+MtMoonB2FSuperNerdTheyreBothMineText:
+ text_far _MtMoonB2FSuperNerdTheyreBothMineText
text_end
-MtMoon3SuperNerdEndBattleText:
- text_far _MtMoon3Text_49f8a
+MtMoonB2FSuperNerdOkIllShareText:
+ text_far _MtMoonB2FSuperNerdOkIllShareText
text_end
-MtMoon3Text_4a116:
- text_far _MtMoon3Text_49f8f
+MtMoonB2fSuperNerdEachTakeOneText:
+ text_far _MtMoonB2fSuperNerdEachTakeOneText
text_end
-MtMoon3Text_4a11b:
- text_far _MtMoon3Text_49f94
+MtMoonB2FSuperNerdTheresAPokemonLabText:
+ text_far _MtMoonB2FSuperNerdTheresAPokemonLabText
text_end
-MtMoon3Text11:
- text_far _MtMoon3Text_49f99
+MtMoonB2FSuperNerdThenThisIsMineText:
+ text_far _MtMoonB2FSuperNerdThenThisIsMineText
sound_get_key_item
text_end
-MtMoon3BattleText3:
- text_far _MtMoon3BattleText3
+MtMoonB2FRocket2BattleText:
+ text_far _MtMoonB2FRocket2BattleText
text_end
-MtMoon3EndBattleText3:
- text_far _MtMoon3EndBattleText3
+MtMoonB2FRocket2EndBattleText:
+ text_far _MtMoonB2FRocket2EndBattleText
text_end
-MtMoon3AfterBattleText3:
- text_far _MtMoon3AfterBattleText3
+MtMoonB2FRocket2AfterBattleText:
+ text_far _MtMoonB2FRocket2AfterBattleText
text_end
-MtMoon3BattleText4:
- text_far _MtMoon3BattleText4
+MtMoonB2FRocket3BattleText:
+ text_far _MtMoonB2FRocket3BattleText
text_end
-MtMoon3EndBattleText4:
- text_far _MtMoon3EndBattleText4
+MtMoonB2FRocket3EndBattleText:
+ text_far _MtMoonB2FRocket3EndBattleText
text_end
-MtMoon3AfterBattleText4:
- text_far _MtMoon3AfterBattleText4
+MtMoonB2FRocket3AfterBattleText:
+ text_far _MtMoonB2FRocket3AfterBattleText
text_end
-MtMoon3BattleText5:
- text_far _MtMoon3BattleText5
+MtMoonB2FRocket4BattleText:
+ text_far _MtMoonB2FRocket4BattleText
text_end
-MtMoon3EndBattleText5:
- text_far _MtMoon3EndBattleText5
+MtMoonB2FRocket4EndBattleText:
+ text_far _MtMoonB2FRocket4EndBattleText
text_end
-MtMoon3AfterBattleText5:
- text_far _MtMoon3AfterBattleText5
+MtMoonB2FRocket4AfterBattleText:
+ text_far _MtMoonB2FRocket4AfterBattleText
text_end
diff --git a/scripts/MtMoonB2F_2.asm b/scripts/MtMoonB2F_2.asm
index c983bb0d..a319b87f 100644
--- a/scripts/MtMoonB2F_2.asm
+++ b/scripts/MtMoonB2F_2.asm
@@ -1,4 +1,4 @@
-MtMoon3Script_4a325: ; pikachu-related function?
+MtMoonB2FScript_ApplyPikachuMovementData:
ld a, [wd472]
bit 7, a
ret z
diff --git a/scripts/MtMoonPokecenter.asm b/scripts/MtMoonPokecenter.asm
index 302c5f19..acf05548 100644
--- a/scripts/MtMoonPokecenter.asm
+++ b/scripts/MtMoonPokecenter.asm
@@ -3,38 +3,39 @@ MtMoonPokecenter_Script:
jp EnableAutoTextBoxDrawing
MtMoonPokecenter_TextPointers:
- dw MtMoonHealNurseText
- dw MtMoonPokecenterText2
- dw MtMoonPokecenterText3
- dw MagikarpSalesmanText
- dw MtMoonPokecenterText5
- dw MtMoonTradeNurseText
- dw MtMoonPokecenterText7
+ def_text_pointers
+ dw_const MtMoonPokecenterNurseText, TEXT_MTMOONPOKECENTER_NURSE
+ dw_const MtMoonPokecenterYoungsterText, TEXT_MTMOONPOKECENTER_YOUNGSTER
+ dw_const MtMoonPokecenterGentlemanText, TEXT_MTMOONPOKECENTER_GENTLEMAN
+ dw_const MtMoonPokecenterMagikarpSalesmanText, TEXT_MTMOONPOKECENTER_MAGIKARP_SALESMAN
+ dw_const MtMoonPokecenterClipboardText, TEXT_MTMOONPOKECENTER_CLIPBOARD
+ dw_const MtMoonPokecenterLinkReceptionistText, TEXT_MTMOONPOKECENTER_LINK_RECEPTIONIST
+ dw_const MtMoonPokecenterChanseyText, TEXT_MTMOONPOKECENTER_CHANSEY
-MtMoonHealNurseText:
+MtMoonPokecenterNurseText:
script_pokecenter_nurse
-MtMoonPokecenterText2:
- text_far _MtMoonPokecenterText1
+MtMoonPokecenterYoungsterText:
+ text_far _MtMoonPokecenterYoungsterText
text_end
-MtMoonPokecenterText3:
- text_far _MtMoonPokecenterText3
+MtMoonPokecenterGentlemanText:
+ text_far _MtMoonPokecenterGentlemanText
text_end
-MagikarpSalesmanText:
+MtMoonPokecenterMagikarpSalesmanText:
text_asm
callfar MagikarpSalesman
jp TextScriptEnd
-MtMoonPokecenterText5:
- text_far _MtMoonPokecenterText5
+MtMoonPokecenterClipboardText:
+ text_far _MtMoonPokecenterClipboardText
text_end
-MtMoonTradeNurseText:
+MtMoonPokecenterLinkReceptionistText:
script_cable_club_receptionist
-MtMoonPokecenterText7:
+MtMoonPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/MtMoonPokecenter2.asm b/scripts/MtMoonPokecenter_2.asm
index 9abc0286..ba5650a2 100644
--- a/scripts/MtMoonPokecenter2.asm
+++ b/scripts/MtMoonPokecenter_2.asm
@@ -1,7 +1,7 @@
MagikarpSalesman::
CheckEvent EVENT_BOUGHT_MAGIKARP, 1
jp c, .alreadyBoughtMagikarp
- ld hl, .Text1
+ ld hl, .IGotADealText
call PrintText
ld a, MONEY_BOX
ld [wTextBoxID], a
@@ -10,7 +10,6 @@ MagikarpSalesman::
ld a, [wCurrentMenuItem]
and a
jp nz, .choseNo
- ; $000500
xor a
ldh [hMoney], a
ldh [hMoney + 2], a
@@ -24,7 +23,6 @@ MagikarpSalesman::
lb bc, MAGIKARP, 5
call GivePokemon
jr nc, .done
- ; $000500
xor a
ld [wPriceTemp], a
ld [wPriceTemp + 2], a
@@ -40,27 +38,27 @@ MagikarpSalesman::
SetEvent EVENT_BOUGHT_MAGIKARP
jr .done
.choseNo
- ld hl, .RefuseText
+ ld hl, .NoText
jr .printText
.alreadyBoughtMagikarp
- ld hl, .Text2
+ ld hl, .NoRefundsText
.printText
call PrintText
.done
ret
-.Text1
- text_far _MagikarpSalesmanText1
+.IGotADealText
+ text_far _MtMoonPokecenterMagikarpSalesmanIGotADealText
text_end
-.RefuseText
- text_far _MagikarpSalesmanNoText
+.NoText
+ text_far _MtMoonPokecenterMagikarpSalesmanNoText
text_end
.NoMoneyText
- text_far _MagikarpSalesmanNoMoneyText
+ text_far _MtMoonPokecenterMagikarpSalesmanNoMoneyText
text_end
-.Text2
- text_far _MagikarpSalesmanText2
+.NoRefundsText
+ text_far _MtMoonPokecenterMagikarpSalesmanNoRefundsText
text_end
diff --git a/scripts/Museum1F.asm b/scripts/Museum1F.asm
index c89eacda..9fff771d 100644
--- a/scripts/Museum1F.asm
+++ b/scripts/Museum1F.asm
@@ -9,57 +9,59 @@ Museum1F_Script:
ret
Museum1F_ScriptPointers:
- dw Museum1FScript0
- dw Museum1FScript1
+ def_script_pointers
+ dw_const Museum1FDefaultScript, SCRIPT_MUSEUM1F_DEFAULT
+ dw_const Museum1FNoopScript, SCRIPT_MUSEUM1F_NOOP
-Museum1FScript0:
+Museum1FDefaultScript:
ld a, [wYCoord]
cp 4
ret nz
ld a, [wXCoord]
cp 9
- jr z, .asm_5c120
+ jr z, .continue
ld a, [wXCoord]
cp 10
ret nz
-.asm_5c120
+.continue
xor a
ldh [hJoyHeld], a
- ld a, $1
+ ld a, TEXT_MUSEUM1F_SCIENTIST1
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
-Museum1FScript1:
+Museum1FNoopScript:
ret
Museum1F_TextPointers:
- dw Museum1FText1
- dw Museum1FText2
- dw Museum1FText3
- dw Museum1FText4
- dw Museum1FText5
+ def_text_pointers
+ dw_const Museum1FScientist1Text, TEXT_MUSEUM1F_SCIENTIST1
+ dw_const Museum1FGamblerText, TEXT_MUSEUM1F_GAMBLER
+ dw_const Museum1FScientist2Text, TEXT_MUSEUM1F_SCIENTIST2
+ dw_const Museum1FScientist3Text, TEXT_MUSEUM1F_SCIENTIST3
+ dw_const Museum1FOldAmberText, TEXT_MUSEUM1F_OLD_AMBER
-Museum1FText1:
+Museum1FScientist1Text:
text_asm
- farcall Func_f1c1b
+ farcall Museum1FPrintScientist1Text
jp TextScriptEnd
-Museum1FText2:
+Museum1FGamblerText:
text_asm
- farcall Func_f1d2a
+ farcall Museum1FPrintGamblerText
jp TextScriptEnd
-Museum1FText3:
+Museum1FScientist2Text:
text_asm
- farcall Func_f1d36
+ farcall Museum1FPrintScientist2Text
jp TextScriptEnd
-Museum1FText4:
+Museum1FScientist3Text:
text_asm
- farcall Func_f1d80
+ farcall Museum1FPrintScientist3Text
jp TextScriptEnd
-Museum1FText5:
+Museum1FOldAmberText:
text_asm
- farcall Func_f1d8c
+ farcall Museum1FPrintOldAmberText
jp TextScriptEnd
diff --git a/scripts/Museum1F2.asm b/scripts/Museum1F2.asm
deleted file mode 100644
index 512a3295..00000000
--- a/scripts/Museum1F2.asm
+++ /dev/null
@@ -1,209 +0,0 @@
-Func_f1c1b::
- ld a, [wYCoord]
- cp 4
- jr nz, .asm_f1c2c
- ld a, [wXCoord]
- cp 13
- jp z, .asm_f1cde
- jr .asm_f1c48
-
-.asm_f1c2c
- cp $3
- jr nz, .asm_f1c38
- ld a, [wXCoord]
- cp 12
- jp z, .asm_f1cde
-.asm_f1c38
- CheckEvent EVENT_BOUGHT_MUSEUM_TICKET
- jr nz, .asm_f1c4f
- ld hl, Museum1FText_f1d20
- call PrintText
- jp .asm_f1cfc
-
-.asm_f1c48
- CheckEvent EVENT_BOUGHT_MUSEUM_TICKET
- jr z, .asm_f1c58
-.asm_f1c4f
- ld hl, Museum1FText_f1d25
- call PrintText
- jp .asm_f1cfc
-
-.asm_f1c58
- ld a, $13
- ld [wTextBoxID], a
- call DisplayTextBoxID
- xor a
- ldh [hJoyHeld], a
- ld hl, Museum1FText_f1d02
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .asm_f1cbf
- xor a
- ldh [hMoney], a
- ldh [hMoney + 1], a
- ld a, $50
- ldh [hMoney + 2], a
- call HasEnoughMoney
- jr nc, .asm_f1c89
- ld hl, Museum1FText_f1d0c
- call PrintText
- jp .asm_f1cbf
-
-.asm_f1c89
- ld hl, Museum1FText_f1d07
- call PrintText
- SetEvent EVENT_BOUGHT_MUSEUM_TICKET
- xor a
- ld [wPriceTemp], a
- ld [wPriceTemp + 1], a
- ld a, $50
- ld [wPriceTemp + 2], a
- ld hl, wPriceTemp + 2
- ld de, wPlayerMoney + 2
- ld c, 3
- predef SubBCDPredef
- ld a, $13
- ld [wTextBoxID], a
- call DisplayTextBoxID
- ld a, SFX_PURCHASE
- call PlaySoundWaitForCurrent
- call WaitForSoundToFinish
- jr .asm_f1cd7
-
-.asm_f1cbf
- ld hl, Museum1FText_f1cfd
- call PrintText
- ld a, $1
- ld [wSimulatedJoypadStatesIndex], a
- ld a, D_DOWN
- ld [wSimulatedJoypadStatesEnd], a
- call StartSimulatingJoypadStates
- call UpdateSprites
- jr .asm_f1cfc
-
-.asm_f1cd7
- ld a, $1
- ld [wMuseum1FCurScript], a
- jr .asm_f1cfc
-
-.asm_f1cde
- ld hl, Museum1FText_f1d11
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- cp 0
- jr nz, .asm_f1cf6
- ld hl, Museum1FText_f1d16
- call PrintText
- jr .asm_f1cfc
-
-.asm_f1cf6
- ld hl, Museum1FText_f1d1b
- call PrintText
-.asm_f1cfc
- ret
-
-Museum1FText_f1cfd:
- text_far _Museum1FText_5c21a
- text_end
-
-Museum1FText_f1d02:
- text_far _Museum1FText_5c21f
- text_end
-
-Museum1FText_f1d07:
- text_far _Museum1FText_5c224
- text_end
-
-Museum1FText_f1d0c:
- text_far _Museum1FText_5c229
- text_end
-
-Museum1FText_f1d11:
- text_far _Museum1FText_5c22e
- text_end
-
-Museum1FText_f1d16:
- text_far _Museum1FText_5c233
- text_end
-
-Museum1FText_f1d1b:
- text_far _Museum1FText_5c238
- text_end
-
-Museum1FText_f1d20:
- text_far _Museum1FText_5c23d
- text_end
-
-Museum1FText_f1d25:
- text_far _Museum1FText_5c242
- text_end
-
-Func_f1d2a::
- ld hl, Museum1FText_f1d31
- call PrintText
- ret
-
-Museum1FText_f1d31:
- text_far _Museum1FText_5c251
- text_end
-
-Func_f1d36::
- CheckEvent EVENT_GOT_OLD_AMBER
- jr nz, .got_item
- ld hl, Museum1FText_5c28e
- call PrintText
- lb bc, OLD_AMBER, 1
- call GiveItem
- jr nc, .bag_full
- SetEvent EVENT_GOT_OLD_AMBER
- ld a, HS_OLD_AMBER
- ld [wMissableObjectIndex], a
- predef HideObject
- ld hl, ReceivedOldAmberText
- jr .done
-.bag_full
- ld hl, Museum1FText_5c29e
- jr .done
-.got_item
- ld hl, Museum1FText_5c299
-.done
- call PrintText
- ret
-
-Museum1FText_5c28e:
- text_far _Museum1FText_5c28e
- text_end
-
-ReceivedOldAmberText:
- text_far _ReceivedOldAmberText
- sound_get_item_1
- text_end
-
-Museum1FText_5c299:
- text_far _Museum1FText_5c299
- text_end
-
-Museum1FText_5c29e:
- text_far _Museum1FText_5c29e
- text_end
-
-Func_f1d80::
- ld hl, Museum1FText_f1d87
- call PrintText
- ret
-
-Museum1FText_f1d87:
- text_far _Museum1FText_5c2ad
- text_end
-
-Func_f1d8c::
- ld hl, Museum1FText_f1d93
- call PrintText
- ret
-
-Museum1FText_f1d93:
- text_far _Museum1FText_5c2bc
- text_end
diff --git a/scripts/Museum1F_2.asm b/scripts/Museum1F_2.asm
new file mode 100644
index 00000000..836242f4
--- /dev/null
+++ b/scripts/Museum1F_2.asm
@@ -0,0 +1,202 @@
+Museum1FPrintScientist1Text::
+ ld a, [wYCoord]
+ cp 4
+ jr nz, .not_right_of_scientist
+ ld a, [wXCoord]
+ cp 13
+ jp z, .behind_counter
+ jr .check_ticket
+.not_right_of_scientist
+ cp 3
+ jr nz, .not_behind_counter
+ ld a, [wXCoord]
+ cp 12
+ jp z, .behind_counter
+.not_behind_counter
+ CheckEvent EVENT_BOUGHT_MUSEUM_TICKET
+ jr nz, .already_bought_ticket
+ ld hl, .GoToOtherSideText
+ call PrintText
+ jp .done
+.check_ticket
+ CheckEvent EVENT_BOUGHT_MUSEUM_TICKET
+ jr z, .no_ticket
+.already_bought_ticket
+ ld hl, .TakePlentyOfTimeText
+ call PrintText
+ jp .done
+.no_ticket
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ xor a
+ ldh [hJoyHeld], a
+ ld hl, .WouldYouLikeToComeInText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .deny_entry
+ xor a
+ ldh [hMoney], a
+ ldh [hMoney + 1], a
+ ld a, $50
+ ldh [hMoney + 2], a
+ call HasEnoughMoney
+ jr nc, .buy_ticket
+ ld hl, .DontHaveEnoughMoneyText
+ call PrintText
+ jp .deny_entry
+.buy_ticket
+ ld hl, .ThankYouText
+ call PrintText
+ SetEvent EVENT_BOUGHT_MUSEUM_TICKET
+ xor a
+ ld [wPriceTemp], a
+ ld [wPriceTemp + 1], a
+ ld a, $50
+ ld [wPriceTemp + 2], a
+ ld hl, wPriceTemp + 2
+ ld de, wPlayerMoney + 2
+ ld c, $3
+ predef SubBCDPredef
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
+ call DisplayTextBoxID
+ ld a, SFX_PURCHASE
+ call PlaySoundWaitForCurrent
+ call WaitForSoundToFinish
+ jr .allow_entry
+.deny_entry
+ ld hl, .ComeAgainText
+ call PrintText
+ ld a, $1
+ ld [wSimulatedJoypadStatesIndex], a
+ ld a, D_DOWN
+ ld [wSimulatedJoypadStatesEnd], a
+ call StartSimulatingJoypadStates
+ call UpdateSprites
+ jr .done
+.allow_entry
+ ld a, SCRIPT_MUSEUM1F_NOOP
+ ld [wMuseum1FCurScript], a
+ jr .done
+
+.behind_counter
+ ld hl, .DoYouKnowWhatAmberIsText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ cp $0
+ jr nz, .explain_amber
+ ld hl, .TheresALabSomewhereText
+ call PrintText
+ jr .done
+.explain_amber
+ ld hl, .AmberIsFossilizedTreeSapText
+ call PrintText
+.done
+ ret
+
+.ComeAgainText:
+ text_far _Museum1FScientist1ComeAgainText
+ text_end
+
+.WouldYouLikeToComeInText:
+ text_far _Museum1FScientist1WouldYouLikeToComeInText
+ text_end
+
+.ThankYouText:
+ text_far _Museum1FScientist1ThankYouText
+ text_end
+
+.DontHaveEnoughMoneyText:
+ text_far _Museum1FScientist1DontHaveEnoughMoneyText
+ text_end
+
+.DoYouKnowWhatAmberIsText:
+ text_far _Museum1FScientist1DoYouKnowWhatAmberIsText
+ text_end
+
+.TheresALabSomewhereText:
+ text_far _Museum1FScientist1TheresALabSomewhereText
+ text_end
+
+.AmberIsFossilizedTreeSapText:
+ text_far _Museum1FScientist1AmberIsFossilizedTreeSapText
+ text_end
+
+.GoToOtherSideText:
+ text_far _Museum1FScientist1GoToOtherSideText
+ text_end
+
+.TakePlentyOfTimeText:
+ text_far _Museum1FScientist1TakePlentyOfTimeText
+ text_end
+
+Museum1FPrintGamblerText::
+ ld hl, .Text
+ call PrintText
+ ret
+
+.Text:
+ text_far _Museum1FGamblerText
+ text_end
+
+Museum1FPrintScientist2Text::
+ CheckEvent EVENT_GOT_OLD_AMBER
+ jr nz, .got_item
+ ld hl, .TakeThisToAPokemonLabText
+ call PrintText
+ lb bc, OLD_AMBER, 1
+ call GiveItem
+ jr nc, .bag_full
+ SetEvent EVENT_GOT_OLD_AMBER
+ ld a, HS_OLD_AMBER
+ ld [wMissableObjectIndex], a
+ predef HideObject
+ ld hl, .ReceivedOldAmberText
+ jr .done
+.bag_full
+ ld hl, .YouDontHaveSpaceText
+ jr .done
+.got_item
+ ld hl, .GetTheOldAmberCheckText
+.done
+ call PrintText
+ ret
+
+.TakeThisToAPokemonLabText:
+ text_far _Museum1FScientist2TakeThisToAPokemonLabText
+ text_end
+
+.ReceivedOldAmberText:
+ text_far _Museum1FScientist2ReceivedOldAmberText
+ sound_get_item_1
+ text_end
+
+.GetTheOldAmberCheckText:
+ text_far _Museum1FScientist2GetTheOldAmberCheckText
+ text_end
+
+.YouDontHaveSpaceText:
+ text_far _Museum1FScientist2YouDontHaveSpaceText
+ text_end
+
+Museum1FPrintScientist3Text::
+ ld hl, .Text
+ call PrintText
+ ret
+
+.Text:
+ text_far _Museum1FScientist3Text
+ text_end
+
+Museum1FPrintOldAmberText::
+ ld hl, .Text
+ call PrintText
+ ret
+
+.Text:
+ text_far _Museum1FOldAmberText
+ text_end
diff --git a/scripts/Museum2F.asm b/scripts/Museum2F.asm
index fe02f544..a791c921 100644
--- a/scripts/Museum2F.asm
+++ b/scripts/Museum2F.asm
@@ -3,31 +3,32 @@ Museum2F_Script:
ret
Museum2F_TextPointers:
- dw Museum2FText1
- dw Museum2FText2
- dw Museum2FText3
- dw Museum2FText4
- dw Museum2FText5
- dw Museum2FText6
- dw Museum2FText7
+ def_text_pointers
+ dw_const Museum2FYoungsterText, TEXT_MUSEUM2F_YOUNGSTER
+ dw_const Museum2FGrampsText, TEXT_MUSEUM2F_GRAMPS
+ dw_const Museum2FScientistText, TEXT_MUSEUM2F_SCIENTIST
+ dw_const Museum2FBrunetteGirlText, TEXT_MUSEUM2F_BRUNETTE_GIRL
+ dw_const Museum2FHikerText, TEXT_MUSEUM2F_HIKER
+ dw_const Museum2FSpaceShuttleSignText, TEXT_MUSEUM2F_SPACE_SHUTTLE_SIGN
+ dw_const Museum2FMoonStoneSignText, TEXT_MUSEUM2F_MOON_STONE_SIGN
-Museum2FText1:
- text_far _Museum2FText1
+Museum2FYoungsterText:
+ text_far _Museum2FYoungsterText
text_end
-Museum2FText2:
- text_far _Museum2FText2
+Museum2FGrampsText:
+ text_far _Museum2FGrampsText
text_end
-Museum2FText3:
- text_far _Museum2FText3
+Museum2FScientistText:
+ text_far _Museum2FScientistText
text_end
-Museum2FText4:
- text_far _Museum2FText4
+Museum2FBrunetteGirlText:
+ text_far _Museum2FBrunetteGirlText
text_end
-Museum2FText5:
+Museum2FHikerText:
text_asm
ld a, [wd472]
bit 7, a
@@ -51,7 +52,7 @@ Museum2FText5:
jp TextScriptEnd
Museum2FText_5c20e:
- text_far _Museum2FText5
+ text_far _Museum2FHikerText
text_end
Museum2FText_5c213:
@@ -62,10 +63,10 @@ Museum2FText_5c218:
text_far _Museum2FPikachuText2
text_end
-Museum2FText6:
- text_far _Museum2FText6
+Museum2FSpaceShuttleSignText:
+ text_far _Museum2FSpaceShuttleSignText
text_end
-Museum2FText7:
- text_far _Museum2FText7
+Museum2FMoonStoneSignText:
+ text_far _Museum2FMoonStoneSignText
text_end
diff --git a/scripts/NameRatersHouse.asm b/scripts/NameRatersHouse.asm
index cecf97e7..61b10a3e 100644
--- a/scripts/NameRatersHouse.asm
+++ b/scripts/NameRatersHouse.asm
@@ -1,52 +1,54 @@
NameRatersHouse_Script:
jp EnableAutoTextBoxDrawing
-NameRaterScript_1da15:
+NameRatersHouseYesNoScript:
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ret
-NameRaterScript_1da20:
+NameRatersHouseCheckMonOTScript:
+; return carry if mon's OT name or OT ID do not match the player's
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
ld c, NAME_LENGTH
- call .asm_1da47
- jr c, .asm_1da52
+ call .check_match_loop
+ jr c, .no_match
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
ld c, $2
-.asm_1da47
+.check_match_loop
ld a, [de]
cp [hl]
- jr nz, .asm_1da52
+ jr nz, .no_match
inc hl
inc de
dec c
- jr nz, .asm_1da47
+ jr nz, .check_match_loop
and a
ret
-.asm_1da52
+.no_match
scf
ret
NameRatersHouse_TextPointers:
- dw NameRaterText1
+ def_text_pointers
+ dw_const NameRatersHouseNameRaterText, TEXT_NAMERATERSHOUSE_NAME_RATER
-NameRaterText1:
+NameRatersHouseNameRaterText:
text_asm
call SaveScreenTilesToBuffer2
- ld hl, NameRaterText_1dab3
- call NameRaterScript_1da15
- jr nz, .asm_1daae
- ld hl, NameRaterText_1dab8
+ ld hl, .WantMeToRateText
+ call NameRatersHouseYesNoScript
+ jr nz, .did_not_rename
+ ld hl, .WhichPokemonText
call PrintText
xor a
ld [wPartyMenuTypeOrMessageID], a
@@ -58,50 +60,50 @@ NameRaterText1:
call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal
pop af
- jr c, .asm_1daae
+ jr c, .did_not_rename
call GetPartyMonName2
- call NameRaterScript_1da20
- ld hl, NameRaterText_1dad1
- jr c, .asm_1daa8
- ld hl, NameRaterText_1dabd
- call NameRaterScript_1da15
- jr nz, .asm_1daae
- ld hl, NameRaterText_1dac2
+ call NameRatersHouseCheckMonOTScript
+ ld hl, .ATrulyImpeccableNameText
+ jr c, .done
+ ld hl, .GiveItANiceNameText
+ call NameRatersHouseYesNoScript
+ jr nz, .did_not_rename
+ ld hl, .WhatShouldWeNameItText
call PrintText
farcall DisplayNameRaterScreen
- jr c, .asm_1daae
- ld hl, NameRaterText_1dac7
-.asm_1daa8
+ jr c, .did_not_rename
+ ld hl, .PokemonHasBeenRenamedText
+.done
call PrintText
jp TextScriptEnd
-.asm_1daae
- ld hl, NameRaterText_1dacc
- jr .asm_1daa8
+.did_not_rename
+ ld hl, .ComeAnyTimeYouLikeText
+ jr .done
-NameRaterText_1dab3:
- text_far _NameRaterText_1dab3
+.WantMeToRateText:
+ text_far _NameRatersHouseNameRaterWantMeToRateText
text_end
-NameRaterText_1dab8:
- text_far _NameRaterText_1dab8
+.WhichPokemonText:
+ text_far _NameRatersHouseNameRaterWhichPokemonText
text_end
-NameRaterText_1dabd:
- text_far _NameRaterText_1dabd
+.GiveItANiceNameText:
+ text_far _NameRatersHouseNameRaterGiveItANiceNameText
text_end
-NameRaterText_1dac2:
- text_far _NameRaterText_1dac2
+.WhatShouldWeNameItText:
+ text_far _NameRatersHouseNameRaterWhatShouldWeNameItText
text_end
-NameRaterText_1dac7:
- text_far _NameRaterText_1dac7
+.PokemonHasBeenRenamedText:
+ text_far _NameRatersHouseNameRaterPokemonHasBeenRenamedText
text_end
-NameRaterText_1dacc:
- text_far _NameRaterText_1dacc
+.ComeAnyTimeYouLikeText:
+ text_far _NameRatersHouseNameRaterComeAnyTimeYouLikeText
text_end
-NameRaterText_1dad1:
- text_far _NameRaterText_1dad1
+.ATrulyImpeccableNameText:
+ text_far _NameRatersHouseNameRaterATrulyImpeccableNameText
text_end
diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm
index 84faa0cd..17be9fc3 100644
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -1,6 +1,6 @@
OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
- call nz, OaksLabScript_1d076
+ call nz, OaksLabLoadTextPointers2Script
ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
@@ -11,31 +11,32 @@ OaksLab_Script:
ret
OaksLab_ScriptPointers:
- dw OaksLabScript0
- dw OaksLabScript1
- dw OaksLabScript2
- dw OaksLabScript3
- dw OaksLabScript4
- dw OaksLabScript5
- dw OaksLabScript6
- dw OaksLabScript7
- dw OaksLabScript8
- dw OaksLabScript9
- dw OaksLabScript10
- dw OaksLabScript11
- dw OaksLabScript12
- dw OaksLabScript13
- dw OaksLabScript14
- dw OaksLabScript15
- dw OaksLabScript16
- dw OaksLabScript17
- dw OaksLabScript18
- dw OaksLabScript19
- dw OaksLabScript20
- dw OaksLabScript21
- dw OaksLabScript22
+ def_script_pointers
+ dw_const OaksLabDefaultScript, SCRIPT_OAKSLAB_DEFAULT
+ dw_const OaksLabOakEntersLabScript, SCRIPT_OAKSLAB_OAK_ENTERS_LAB
+ dw_const OaksLabHideShowOaksScript, SCRIPT_OAKSLAB_HIDE_SHOW_OAKS
+ dw_const OaksLabPlayerEntersLabScript, SCRIPT_OAKSLAB_PLAYER_ENTERS_LAB
+ dw_const OaksLabFollowedOakScript, SCRIPT_OAKSLAB_FOLLOWED_OAK
+ dw_const OaksLabOakChooseMonSpeechScript, SCRIPT_OAKSLAB_OAK_CHOOSE_MON_SPEECH
+ dw_const OaksLabPlayerDontGoAwayScript, SCRIPT_OAKSLAB_PLAYER_DONT_GO_AWAY_SCRIPT
+ dw_const OaksLabPlayerForcedToWalkBackScript, SCRIPT_OAKSLAB_PLAYER_FORCED_TO_WALK_BACK_SCRIPT
+ dw_const OaksLabChoseStarterScript, SCRIPT_OAKSLAB_CHOSE_STARTER_SCRIPT
+ dw_const OaksLabRivalTakesPokeballScript, SCRIPT_OAKSLAB_RIVAL_TAKES_POKEBALL
+ dw_const OaksLabPlayerWalksToOakScript, SCRIPT_OAKSLAB_PLAYER_WALKS_TO_OAK
+ dw_const OaksLabPlayerReceivesPikachuScript, SCRIPT_OAKSLAB_PLAYER_RECEIVES_PIKACHU
+ dw_const OaksLabRivalChallengesPlayerScript, SCRIPT_OAKSLAB_RIVAL_CHALLENGES_PLAYER
+ dw_const OaksLabRivalStartBattleScript, SCRIPT_OAKSLAB_RIVAL_START_BATTLE
+ dw_const OaksLabRivalEndBattleScript, SCRIPT_OAKSLAB_RIVAL_END_BATTLE
+ dw_const OaksLabRivalStartsExitScript, SCRIPT_OAKSLAB_RIVAL_STARTS_EXIT
+ dw_const OaksLabPlayerWatchRivalExitScript, SCRIPT_OAKSLAB_PLAYER_WATCH_RIVAL_EXIT
+ dw_const OaksLabPikachuEscapesPokeballScript, SCRIPT_OAKSLAB_PIKACHU_ESCAPES_POKEBALL
+ dw_const OaksLabPikachuDislikesPokeballsScript, SCRIPT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS
+ dw_const OaksLabRivalArrivesAtOaksRequestScript, SCRIPT_OAKSLAB_RIVAL_ARRIVES_AT_OAKS_REQUEST
+ dw_const OaksLabOakGivesPokedexScript, SCRIPT_OAKSLAB_OAK_GIVES_POKEDEX
+ dw_const OaksLabRivalLeavesWithPokedexScript, SCRIPT_OAKSLAB_RIVAL_LEAVES_WITH_POKEDEX
+ dw_const OaksLabNoopScript, SCRIPT_OAKSLAB_NOOP
-OaksLabScript0:
+OaksLabDefaultScript:
CheckEvent EVENT_OAK_APPEARED_IN_PALLET
ret z
ld a, [wNPCMovementScriptFunctionNum]
@@ -47,17 +48,17 @@ OaksLabScript0:
ld hl, wd72e
res 4, [hl]
- ld a, $1
+ ld a, SCRIPT_OAKSLAB_OAK_ENTERS_LAB
ld [wOaksLabCurScript], a
ret
-OaksLabScript1:
- ld a, $6
+OaksLabOakEntersLabScript:
+ ld a, OAKSLAB_OAK2
ldh [hSpriteIndex], a
ld de, OakEntryMovement
call MoveSprite
- ld a, $2
+ ld a, SCRIPT_OAKSLAB_HIDE_SHOW_OAKS
ld [wOaksLabCurScript], a
ret
@@ -67,7 +68,7 @@ OakEntryMovement:
db NPC_MOVEMENT_UP
db -1 ; end
-OaksLabScript2:
+OaksLabHideShowOaksScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -78,11 +79,11 @@ OaksLabScript2:
ld [wMissableObjectIndex], a
predef ShowObject
- ld a, $3
+ ld a, SCRIPT_OAKSLAB_PLAYER_ENTERS_LAB
ld [wOaksLabCurScript], a
ret
-OaksLabScript3:
+OaksLabPlayerEntersLabScript:
call Delay3
ld hl, wSimulatedJoypadStatesEnd
ld de, PlayerEntryMovementRLE
@@ -90,18 +91,18 @@ OaksLabScript3:
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
xor a
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $3
+ ld a, OAKSLAB_OAK1
ldh [hSpriteIndex], a
xor a
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $4
+ ld a, SCRIPT_OAKSLAB_FOLLOWED_OAK
ld [wOaksLabCurScript], a
ret
@@ -109,13 +110,13 @@ PlayerEntryMovementRLE:
db D_UP, 8
db -1 ; end
-OaksLabScript4:
+OaksLabFollowedOakScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
SetEvent EVENT_FOLLOWED_OAK_INTO_LAB
SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
ldh [hSpriteFacingDirection], a
@@ -124,19 +125,19 @@ OaksLabScript4:
res 1, [hl]
call PlayDefaultMusic
- ld a, $5
+ ld a, SCRIPT_OAKSLAB_OAK_CHOOSE_MON_SPEECH
ld [wOaksLabCurScript], a
ret
-OaksLabScript5:
+OaksLabOakChooseMonSpeechScript:
SetEvent EVENT_OAK_ASKED_TO_CHOOSE_MON
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $d
+ ld a, TEXT_OAKSLAB_RIVAL_FED_UP_WITH_WAITING
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
- ld a, $e
+ ld a, TEXT_OAKSLAB_OAK_CHOOSE_MON
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
@@ -144,36 +145,36 @@ OaksLabScript5:
ld [wSprite01StateData1MovementStatus], a
ld a, SPRITE_FACING_UP
ld [wSprite01StateData1FacingDirection], a
- ld a, $f
+ ld a, TEXT_OAKSLAB_RIVAL_WHAT_ABOUT_ME
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
- ld a, $10
+ ld a, TEXT_OAKSLAB_OAK_BE_PATIENT
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld a, $6
+ ld a, SCRIPT_OAKSLAB_PLAYER_DONT_GO_AWAY_SCRIPT
ld [wOaksLabCurScript], a
ret
-OaksLabScript6:
+OaksLabPlayerDontGoAwayScript:
ld a, [wYCoord]
cp 6
ret nz
- ld a, $3
+ ld a, OAKSLAB_OAK1
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
xor a
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call UpdateSprites
- ld a, $a
+ ld a, TEXT_OAKSLAB_OAK_DONT_GO_AWAY_YET
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
@@ -184,26 +185,26 @@ OaksLabScript6:
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
- ld a, $7
+ ld a, SCRIPT_OAKSLAB_PLAYER_FORCED_TO_WALK_BACK_SCRIPT
ld [wOaksLabCurScript], a
ret
-OaksLabScript7:
+OaksLabPlayerForcedToWalkBackScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $6
+ ld a, SCRIPT_OAKSLAB_PLAYER_DONT_GO_AWAY_SCRIPT
ld [wOaksLabCurScript], a
ret
-OaksLabScript8:
- ld a, $1
+OaksLabChoseStarterScript:
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndexOrTextID], a
ld de, .RivalPushesPlayerAwayFromEeveeBall
call MoveSprite
- ld a, $9
+ ld a, SCRIPT_OAKSLAB_RIVAL_TAKES_POKEBALL
ld [wOaksLabCurScript], a
ret
@@ -214,14 +215,14 @@ OaksLabScript8:
db $07
db $FF
-OaksLabScript9:
+OaksLabRivalTakesPokeballScript:
ld a, [wd730]
bit 0, a
jr nz, .asm_1c564
ld a, HS_STARTER_BALL_1
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
ldh [hSpriteFacingDirection], a
@@ -233,11 +234,11 @@ OaksLabScript9:
call GetMonName
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
- ld a, $11
+ ld a, TEXT_OAKSLAB_RIVAL_RECEIVED_MON
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $a
+ ld a, SCRIPT_OAKSLAB_PLAYER_WALKS_TO_OAK
ld [wOaksLabCurScript], a
ret
@@ -258,7 +259,7 @@ OaksLabScript9:
call StartSimulatingJoypadStates
ret
-OaksLabScript10:
+OaksLabPlayerWalksToOakScript:
ld a, [wYCoord]
cp 4
jr z, .asm_1c599
@@ -276,7 +277,7 @@ OaksLabScript10:
ld [wSimulatedJoypadStatesIndex], a
.asm_1c5a6
call StartSimulatingJoypadStates
- ld a, $b
+ ld a, SCRIPT_OAKSLAB_PLAYER_RECEIVES_PIKACHU
ld [wOaksLabCurScript], a
ret
@@ -287,27 +288,27 @@ OaksLabRLE_PlayerWalksToOak:
db D_LEFT, 1
db $FF
-OaksLabScript11:
+OaksLabPlayerReceivesPikachuScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld a, $12
+ ld a, TEXT_OAKSLAB_PLAYER_RECEIVED_MON
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld a, $c
+ ld a, SCRIPT_OAKSLAB_RIVAL_CHALLENGES_PLAYER
ld [wOaksLabCurScript], a
ret
-OaksLabScript12:
+OaksLabRivalChallengesPlayerScript:
ld a, [wYCoord]
cp 6
ret nz
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
@@ -315,7 +316,7 @@ OaksLabScript12:
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
- ld a, $b
+ ld a, TEXT_OAKSLAB_RIVAL_ILL_TAKE_YOU_ON
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
@@ -329,26 +330,27 @@ OaksLabScript12:
ldh [hNPCPlayerYDistance], a
predef FindPathToPlayer
ld de, wNPCMovementDirections2
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $d
+ ld a, SCRIPT_OAKSLAB_RIVAL_START_BATTLE
ld [wOaksLabCurScript], a
ret
-OaksLabScript13:
+OaksLabRivalStartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
- ld a, $1
+
+ ld a, OAKSLAB_RIVAL
ld [wSpriteIndex], a
call GetSpritePosition1
ld a, OPP_RIVAL1
ld [wCurOpponent], a
ld a, $1
ld [wTrainerNo], a
- ld hl, OaksLabRivalDefeatedText
- ld de, OaksLabRivalBeatYouText
+ ld hl, OaksLabRivalIPickedTheWrongPokemonText
+ ld de, OaksLabRivalAmIGreatOrWhatText
call SaveEndBattleTextPointers
ld hl, wd72d
set 6, [hl]
@@ -357,12 +359,12 @@ OaksLabScript13:
ld [wJoyIgnore], a
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
- ld a, $e
+ ld a, SCRIPT_OAKSLAB_RIVAL_END_BATTLE
ld [wOaksLabCurScript], a
ret
-OaksLabScript14:
- ld a, $ff
+OaksLabRivalEndBattleScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; If you beat your rival here, his Eevee will evolve into
@@ -383,7 +385,7 @@ OaksLabScript14:
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
call UpdateSprites
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ld [wSpriteIndex], a
call SetSpritePosition1
ld a, $2
@@ -392,36 +394,38 @@ OaksLabScript14:
ld [wSprite01StateData1FacingDirection], a
predef HealParty
SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB
- ld a, $f
+
+ ld a, SCRIPT_OAKSLAB_RIVAL_STARTS_EXIT
ld [wOaksLabCurScript], a
ret
-OaksLabScript15:
+OaksLabRivalStartsExitScript:
ld c, 20
call DelayFrames
- ld a, $c
+ ld a, TEXT_OAKSLAB_RIVAL_SMELL_YOU_LATER
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
farcall Music_RivalAlternateStart
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
- ld de, .OaksLabMovement_RivalWalksOut1
+ ld de, .RivalExitMovement
call MoveSprite
ld a, [wXCoord]
cp 4
- jr nz, .asm_1c6bb
+ ; move left or right depending on where the player is standing
+ jr nz, .moveLeft
ld a, NPC_MOVEMENT_RIGHT
- jr .asm_1c6bd
-
-.asm_1c6bb
+ jr .next
+.moveLeft
ld a, NPC_MOVEMENT_LEFT
-.asm_1c6bd
+.next
ld [wNPCMovementDirections], a
- ld a, $10
+
+ ld a, SCRIPT_OAKSLAB_PLAYER_WATCH_RIVAL_EXIT
ld [wOaksLabCurScript], a
ret
-.OaksLabMovement_RivalWalksOut1
+.RivalExitMovement
db NPC_CHANGE_FACING
db NPC_MOVEMENT_DOWN
db $04
@@ -431,7 +435,7 @@ OaksLabScript15:
db $04
db -1 ; end
-OaksLabScript16:
+OaksLabPlayerWatchRivalExitScript:
ld a, [wd730]
bit 0, a
jr nz, .checkRivalPosition
@@ -441,7 +445,7 @@ OaksLabScript16:
ld [wMissableObjectIndex], a
predef HideObject
call PlayDefaultMusic
- ld a, $11
+ ld a, SCRIPT_OAKSLAB_PIKACHU_ESCAPES_POKEBALL
ld [wOaksLabCurScript], a
ret
; make the player keep facing the rival as he walks away
@@ -465,7 +469,7 @@ OaksLabScript16:
ld [wSpritePlayerStateData1FacingDirection], a
ret
-OaksLabScript17:
+OaksLabPikachuEscapesPokeballScript:
; Pikachu comes out
ld a, SPRITE_FACING_UP
ld [wSpritePlayerStateData1FacingDirection], a
@@ -473,34 +477,34 @@ OaksLabScript17:
ld [wPikachuSpawnState], a
farcall SchedulePikachuSpawnForAfterText
call EnablePikachuOverworldSpriteDrawing
- ld a, $1a
+ ld a, TEXT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $12
+ ld a, SCRIPT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS
ld [wOaksLabCurScript], a
ret
-OaksLabScript18:
- ld a, $1b
+OaksLabPikachuDislikesPokeballsScript:
+ ld a, TEXT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS2
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld a, $16
+ ld a, SCRIPT_OAKSLAB_NOOP
ld [wOaksLabCurScript], a
ret
-OaksLabScript19:
+OaksLabRivalArrivesAtOaksRequestScript:
xor a
ldh [hJoyHeld], a
call EnableAutoTextBoxDrawing
call StopAllMusic
farcall Music_RivalAlternateStart
- ld a, $13
+ ld a, TEXT_OAKSLAB_RIVAL_GRAMPS
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- callfar Func_f1be0
- call OaksLabScript_1c8b9
+ callfar OaksLabPikachuMovementScript
+ call OaksLabCalcRivalMovementScript
ld a, HS_OAKS_LAB_RIVAL
ld [wMissableObjectIndex], a
predef ShowObject
@@ -512,28 +516,29 @@ OaksLabScript19:
ld a, NPC_MOVEMENT_UP
call FillMemory
ld [hl], $ff
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
ld de, wNPCMovementDirections2
call MoveSprite
- ld a, $14
+
+ ld a, SCRIPT_OAKSLAB_OAK_GIVES_POKEDEX
ld [wOaksLabCurScript], a
ret
-OaksLabScript_1c78e:
- ld a, $1
+OaksLabRivalFaceUpOakFaceDownScript:
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $6
+ ld a, OAKSLAB_OAK2
ldh [hSpriteIndex], a
xor a ; SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
ret
-OaksLabScript20:
+OaksLabOakGivesPokedexScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -541,22 +546,22 @@ OaksLabScript20:
call PlayDefaultMusic
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
- call OaksLabScript_1c78e
- ld a, $14
+ call OaksLabRivalFaceUpOakFaceDownScript
+ ld a, TEXT_OAKSLAB_RIVAL_MY_POKEMON_HAS_GROWN_STRONGER
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
- call OaksLabScript_1c78e
- ld a, $15
+ call OaksLabRivalFaceUpOakFaceDownScript
+ ld a, TEXT_OAKSLAB_OAK_I_HAVE_A_REQUEST
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
- call OaksLabScript_1c78e
- ld a, $16
+ call OaksLabRivalFaceUpOakFaceDownScript
+ ld a, TEXT_OAKSLAB_OAK_MY_INVENTION_POKEDEX
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call DelayFrame
- ld a, $17
+ ld a, TEXT_OAKSLAB_OAK_GOT_POKEDEX
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
@@ -566,27 +571,27 @@ OaksLabScript20:
ld a, HS_POKEDEX_2
ld [wMissableObjectIndex], a
predef HideObject
- call OaksLabScript_1c78e
- ld a, $18
+ call OaksLabRivalFaceUpOakFaceDownScript
+ ld a, TEXT_OAKSLAB_OAK_THAT_WAS_MY_DREAM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_RIGHT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call Delay3
- ld a, $19
+ ld a, TEXT_OAKSLAB_RIVAL_LEAVE_IT_ALL_TO_ME
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_POKEDEX
- ld a, $1
+ ld a, SCRIPT_VIRIDIANCITY_AFTER_POKEDEX
ld [wViridianCityCurScript], a
SetEvent EVENT_OAK_GOT_PARCEL
ld a, HS_LYING_OLD_MAN
ld [wMissableObjectIndex], a
predef HideObject
- ld a, HS_OLD_MAN
+ ld a, HS_OLD_MAN_2
ld [wMissableObjectIndex], a
predef ShowObject
ld a, [wSavedNPCMovementDirections2Index]
@@ -598,15 +603,16 @@ OaksLabScript20:
ld [hl], $ff
call StopAllMusic
farcall Music_RivalAlternateStart
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ldh [hSpriteIndexOrTextID], a
ld de, wNPCMovementDirections2
call MoveSprite
- ld a, $15
+
+ ld a, SCRIPT_OAKSLAB_RIVAL_LEAVES_WITH_POKEDEX
ld [wOaksLabCurScript], a
ret
-OaksLabScript21:
+OaksLabRivalLeavesWithPokedexScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -622,11 +628,12 @@ OaksLabScript21:
predef ShowObject
xor a
ld [wJoyIgnore], a
- ld a, $16
+
+ ld a, SCRIPT_OAKSLAB_NOOP
ld [wOaksLabCurScript], a
ret
-OaksLabScript22:
+OaksLabNoopScript:
ret
OaksLabScript_RemoveParcel:
@@ -650,329 +657,329 @@ OaksLabScript_RemoveParcel:
call RemoveItemFromInventory
ret
-OaksLabScript_1c8b9:
+OaksLabCalcRivalMovementScript:
ld a, $7c
ldh [hSpriteScreenYCoord], a
ld a, 8
ldh [hSpriteMapXCoord], a
ld a, [wYCoord]
cp 3
- jr nz, .asm_1c8d3
+ jr nz, .not_below_oak
ld a, $4
ld [wNPCMovementDirections2Index], a
ld a, $30
ld b, 11
- jr .asm_1c8f6
-.asm_1c8d3
+ jr .done
+.not_below_oak
cp 1
- jr nz, .asm_1c8e2
+ jr nz, .not_above_oak
ld a, $2
ld [wNPCMovementDirections2Index], a
ld a, $30
ld b, 9
- jr .asm_1c8f6
-.asm_1c8e2
+ jr .done
+.not_above_oak
ld a, $3
ld [wNPCMovementDirections2Index], a
ld b, 10
ld a, [wXCoord]
cp 4
- jr nz, .asm_1c8f4
+ jr nz, .not_left_of_oak
ld a, $40
- jr .asm_1c8f6
-.asm_1c8f4
+ jr .done
+.not_left_of_oak
ld a, $20
-.asm_1c8f6
+.done
ldh [hSpriteScreenXCoord], a
ld a, b
ldh [hSpriteMapYCoord], a
- ld a, $1
+ ld a, OAKSLAB_RIVAL
ld [wSpriteIndex], a
call SetSpritePosition1
ret
-OaksLabScript_1d076:
+OaksLabLoadTextPointers2Script:
ld hl, OaksLab_TextPointers2
ld a, l
- ld [wMapTextPtr], a
+ ld [wCurMapTextPtr], a
ld a, h
- ld [wMapTextPtr + 1], a
+ ld [wCurMapTextPtr + 1], a
ret
OaksLab_TextPointers:
- dw OaksLabText1
- dw OaksLabText2
- dw OaksLabText3
- dw OaksLabText4
- dw OaksLabText5
- dw OaksLabText6
- dw OaksLabText7
- dw OaksLabText8
- dw OaksLabText9
- dw OaksLabText10
- dw OaksLabText11
- dw OaksLabText12
- dw OaksLabText13
- dw OaksLabText14
- dw OaksLabText15
- dw OaksLabText16
- dw OaksLabText17
- dw OaksLabText18
- dw OaksLabText19
- dw OaksLabText20
- dw OaksLabText21
- dw OaksLabText22
- dw OaksLabText23
- dw OaksLabText24
- dw OaksLabText25
- dw OaksLabText26
- dw OaksLabText27
+ def_text_pointers
+ dw_const OaksLabRivalText, TEXT_OAKSLAB_RIVAL
+ dw_const OaksLabEeveePokeBallText, TEXT_OAKSLAB_EEVEE_POKE_BALL
+ dw_const OaksLabOak1Text, TEXT_OAKSLAB_OAK1
+ dw_const OaksLabPokedexText, TEXT_OAKSLAB_POKEDEX1
+ dw_const OaksLabPokedexText, TEXT_OAKSLAB_POKEDEX2
+ dw_const OaksLabOak2Text, TEXT_OAKSLAB_OAK2
+ dw_const OaksLabGirlText, TEXT_OAKSLAB_GIRL
+ dw_const OaksLabScientistText, TEXT_OAKSLAB_SCIENTIST1
+ dw_const OaksLabScientistText, TEXT_OAKSLAB_SCIENTIST2
+ dw_const OaksLabOakDontGoAwayYetText, TEXT_OAKSLAB_OAK_DONT_GO_AWAY_YET
+ dw_const OaksLabRivalIllTakeYouOnText, TEXT_OAKSLAB_RIVAL_ILL_TAKE_YOU_ON
+ dw_const OaksLabRivalSmellYouLaterText, TEXT_OAKSLAB_RIVAL_SMELL_YOU_LATER
+ dw_const OaksLabRivalFedUpWithWaitingText, TEXT_OAKSLAB_RIVAL_FED_UP_WITH_WAITING
+ dw_const OaksLabOakChooseMonText, TEXT_OAKSLAB_OAK_CHOOSE_MON
+ dw_const OaksLabRivalWhatAboutMeText, TEXT_OAKSLAB_RIVAL_WHAT_ABOUT_ME
+ dw_const OaksLabOakBePatientText, TEXT_OAKSLAB_OAK_BE_PATIENT
+ dw_const OaksLabRivalReceivedMonText, TEXT_OAKSLAB_RIVAL_RECEIVED_MON
+ dw_const OaksLabPlayerReceivedMonText, TEXT_OAKSLAB_PLAYER_RECEIVED_MON
+ dw_const OaksLabRivalGrampsText, TEXT_OAKSLAB_RIVAL_GRAMPS
+ dw_const OaksLabRivalMyPokemonHasGrownStrongerText, TEXT_OAKSLAB_RIVAL_MY_POKEMON_HAS_GROWN_STRONGER
+ dw_const OaksLabOakIHaveARequestText, TEXT_OAKSLAB_OAK_I_HAVE_A_REQUEST
+ dw_const OaksLabOakMyInventionPokedexText, TEXT_OAKSLAB_OAK_MY_INVENTION_POKEDEX
+ dw_const OaksLabOakGotPokedexText, TEXT_OAKSLAB_OAK_GOT_POKEDEX
+ dw_const OaksLabOakThatWasMyDreamText, TEXT_OAKSLAB_OAK_THAT_WAS_MY_DREAM
+ dw_const OaksLabRivalLeaveItAllToMeText, TEXT_OAKSLAB_RIVAL_LEAVE_IT_ALL_TO_ME
+ dw_const OaksLabPikachuDislikesPokeballsText1, TEXT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS1
+ dw_const OaksLabPikachuDislikesPokeballsText2, TEXT_OAKSLAB_PIKACHU_DISLIKES_POKEBALLS2
OaksLab_TextPointers2:
- dw OaksLabText1
- dw OaksLabText2
- dw OaksLabText3
- dw OaksLabText4
- dw OaksLabText5
- dw OaksLabText6
- dw OaksLabText7
- dw OaksLabText8
- dw OaksLabText9
+ dw OaksLabRivalText
+ dw OaksLabEeveePokeBallText
+ dw OaksLabOak1Text
+ dw OaksLabPokedexText
+ dw OaksLabPokedexText
+ dw OaksLabOak2Text
+ dw OaksLabGirlText
+ dw OaksLabScientistText
+ dw OaksLabScientistText
-OaksLabText1:
+OaksLabRivalText:
text_asm
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2
jr nz, .beforeChooseMon
- ld hl, OaksLabGaryText1
+ ld hl, .GrampsIsntAroundText
call PrintText
jr .done
.beforeChooseMon
CheckEventReuseA EVENT_GOT_STARTER
jr nz, .afterChooseMon
- ld hl, OaksLabText40
+ ld hl, .IllGetABetterPokemonThanYou
call PrintText
jr .done
.afterChooseMon
- ld hl, OaksLabText41
+ ld hl, .MyPokemonLooksStrongerText
call PrintText
.done
jp TextScriptEnd
-OaksLabGaryText1:
- text_far _OaksLabGaryText1
+.GrampsIsntAroundText:
+ text_far _OaksLabRivalGrampsIsntAroundText
text_end
-OaksLabText40:
- text_far _OaksLabText40
+.IllGetABetterPokemonThanYou:
+ text_far _OaksLabRivalIllGetABetterPokemonThanYou
text_end
-OaksLabText41:
- text_far _OaksLabText41
+.MyPokemonLooksStrongerText:
+ text_far _OaksLabRivalMyPokemonLooksStrongerText
text_end
-OaksLabText2:
+OaksLabEeveePokeBallText:
text_asm
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
CheckEvent EVENT_OAK_ASKED_TO_CHOOSE_MON
- jr nz, OaksLabScript_1c9ac
+ jr nz, OaksLabRivalExclamationScript
ld a, $0
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, OaksLabText39
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabText39:
- text_far _OaksLabText39
+.Text:
+ text_far _OaksLabThatsAPokeball
text_end
-OaksLabScript_1c9ac:
- ld a, $1
+OaksLabRivalExclamationScript:
+ ld a, OAKSLAB_RIVAL
ld [wEmotionBubbleSpriteIndex], a
xor a ; EXCLAMATION_BUBBLE
ld [wWhichEmotionBubble], a
predef EmotionBubble
- ld a, $8
+ ld a, SCRIPT_OAKSLAB_CHOSE_STARTER_SCRIPT
ld [wOaksLabCurScript], a
jp TextScriptEnd
-OaksLabText3:
+OaksLabOak1Text:
text_asm
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS
- jr nz, .asm_1c9d9
+ jr nz, .already_got_poke_balls
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
cp 2
- jr c, .asm_1c9ec
-.asm_1c9d9
- ld hl, OaksLabText_1ca9f
+ jr c, .check_for_poke_balls
+.already_got_poke_balls
+ ld hl, .HowIsYourPokedexComingText
call PrintText
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
predef DisplayDexRating
- jp .asm_1ca6f
-.asm_1c9ec
+ jp .done
+.check_for_poke_balls
ld b, POKE_BALL
call IsItemInBag
- jr nz, .asm_1ca69
+ jr nz, .come_see_me_sometimes
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
cp 2
- jr nc, .asm_1ca69
+ jr nc, .come_see_me_sometimes
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
- jr nz, .asm_1ca52
+ jr nz, .give_poke_balls
CheckEvent EVENT_GOT_POKEDEX
- jr nz, .asm_1ca4a
+ jr nz, .mon_around_the_world
CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB
- jr nz, .asm_1ca2b
+ jr nz, .check_got_parcel
ld a, [wd72e]
bit 3, a
- jr nz, .asm_1ca23
- ld hl, OaksLabText_1ca72
+ jr nz, .already_got_pokemon
+ ld hl, .GoAheadItsYours
call PrintText
- jr .asm_1ca6f
-.asm_1ca23
- ld hl, OaksLabText_1ca77
+ jr .done
+.already_got_pokemon
+ ld hl, .YourPokemonCanFightText
call PrintText
- jr .asm_1ca6f
-.asm_1ca2b
+ jr .done
+.check_got_parcel
ld b, OAKS_PARCEL
call IsItemInBag
- jr nz, .asm_1ca3a
- ld hl, OaksLabText_1ca7c
+ jr nz, .got_parcel
+ ld hl, .YouShouldTalkToIt
call PrintText
- jr .asm_1ca6f
-.asm_1ca3a
- ld hl, OaksLabDeliverParcelText
+ jr .done
+.got_parcel
+ ld hl, .DeliverParcelText
call PrintText
call OaksLabScript_RemoveParcel
- ld a, $13
+ ld a, SCRIPT_OAKSLAB_RIVAL_ARRIVES_AT_OAKS_REQUEST
ld [wOaksLabCurScript], a
- jr .asm_1ca6f
-.asm_1ca4a
- ld hl, OaksLabAroundWorldText
+ jr .done
+.mon_around_the_world
+ ld hl, .PokemonAroundTheWorldText
call PrintText
- jr .asm_1ca6f
-.asm_1ca52
+ jr .done
+.give_poke_balls
CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK
- jr nz, .asm_1ca69
+ jr nz, .come_see_me_sometimes
lb bc, POKE_BALL, 5
call GiveItem
- ld hl, OaksLabGivePokeballsText
+ ld hl, .GivePokeballsText
call PrintText
- jr .asm_1ca6f
-.asm_1ca69
- ld hl, OaksLabPleaseVisitText
+ jr .done
+.come_see_me_sometimes
+ ld hl, .ComeSeeMeSometimesText
call PrintText
-.asm_1ca6f
+.done
jp TextScriptEnd
-OaksLabText_1ca72:
- text_far _OaksLabPikachuText
+.GoAheadItsYours:
+ text_far _OaksLabOak1GoAheadItsYours
text_end
-OaksLabText_1ca77:
- text_far _OaksLabText_1d2f5
+.YourPokemonCanFightText:
+ text_far _OaksLabOak1YourPokemonCanFightText
text_end
-OaksLabText_1ca7c:
- text_far _OaksLabText_1d2fa
+.YouShouldTalkToIt:
+ text_far _OaksLabOak1YouShouldTalkToIt
text_end
-OaksLabDeliverParcelText:
- text_far _OaksLabDeliverParcelText1
+.DeliverParcelText:
+ text_far _OaksLabOak1DeliverParcelText
sound_get_key_item
- text_far _OaksLabDeliverParcelText2
+ text_far _OaksLabOak1ParcelThanksText
text_end
-OaksLabAroundWorldText:
- text_far _OaksLabAroundWorldText
+.PokemonAroundTheWorldText:
+ text_far _OaksLabOak1PokemonAroundTheWorldText
text_end
-OaksLabGivePokeballsText:
- text_far _OaksLabGivePokeballsText1
+.GivePokeballsText:
+ text_far _OaksLabOak1ReceivedPokeballsText
sound_get_key_item
- text_far _OaksLabGivePokeballsText2
+ text_far _OaksLabGivePokeballsExplanationText
text_end
-OaksLabPleaseVisitText:
- text_far _OaksLabPleaseVisitText
+.ComeSeeMeSometimesText:
+ text_far _OaksLabOak1ComeSeeMeSometimesText
text_end
-OaksLabText_1ca9f:
- text_far _OaksLabText_1d31d
+.HowIsYourPokedexComingText:
+ text_far _OaksLabOak1HowIsYourPokedexComingText
text_end
-OaksLabText4:
-OaksLabText5:
+OaksLabPokedexText:
text_asm
- ld hl, OaksLabText_1caae
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabText_1caae:
- text_far _OaksLabText_1d32c
+.Text:
+ text_far _OaksLabPokedexText
text_end
-OaksLabText6:
- text_far _OaksLabText8
+OaksLabOak2Text:
+ text_far _OaksLabOak2Text
text_end
-OaksLabText7:
+OaksLabGirlText:
text_asm
- ld hl, OaksLabText_1cac2
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabText_1cac2:
- text_far _OaksLabText_1d340
+.Text:
+ text_far _OaksLabGirlText
text_end
-OaksLabText13:
+OaksLabRivalFedUpWithWaitingText:
text_asm
- ld hl, OaksLabRivalWaitingText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabRivalWaitingText:
- text_far _OaksLabRivalWaitingText
+.Text:
+ text_far _OaksLabRivalFedUpWithWaitingText
text_end
-OaksLabText14:
+OaksLabOakChooseMonText:
text_asm
- ld hl, OaksLabChooseMonText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabChooseMonText:
- text_far _OaksLabChooseMonText
+.Text:
+ text_far _OaksLabOakChooseMonText
text_end
-OaksLabText15:
+OaksLabRivalWhatAboutMeText:
text_asm
- ld hl, OaksLabRivalInterjectionText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabRivalInterjectionText:
- text_far _OaksLabRivalInterjectionText
+.Text:
+ text_far _OaksLabRivalWhatAboutMeText
text_end
-OaksLabText16:
+OaksLabOakBePatientText:
text_asm
- ld hl, OaksLabBePatientText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabBePatientText:
- text_far _OaksLabBePatientText
+.Text:
+ text_far _OaksLabOakBePatientText
text_end
-OaksLabText17:
+OaksLabRivalReceivedMonText:
text_asm
ld hl, OaksLabRivalTakesText1
call PrintText
@@ -1007,7 +1014,7 @@ OaksLabRivalTakesText5:
text_far _OaksLabRivalTakesText5
text_end
-OaksLabText18:
+OaksLabPlayerReceivedMonText:
text_asm
ld a, STARTER_PIKACHU
ld [wPlayerStarter], a
@@ -1017,7 +1024,7 @@ OaksLabText18:
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, OaksLabOakGivesText
call PrintText
- ld hl, OaksLabRecievedText
+ ld hl, OaksLabReceivedText
call PrintText
xor a
ld [wMonDataLocation], a
@@ -1039,107 +1046,106 @@ OaksLabOakGivesText:
text_far _OaksLabOakGivesText
text_end
-OaksLabRecievedText:
+OaksLabReceivedText:
text_far _OaksLabReceivedText
sound_get_key_item
text_end
-OaksLabText10:
+OaksLabOakDontGoAwayYetText:
text_asm
- ld hl, OaksLabLeavingText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabLeavingText:
- text_far _OaksLabLeavingText
+.Text:
+ text_far _OaksLabOakDontGoAwayYetText
text_end
-OaksLabText11:
+OaksLabRivalIllTakeYouOnText:
text_asm
- ld hl, OaksLabRivalChallengeText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabRivalChallengeText:
- text_far _OaksLabRivalChallengeText
+.Text:
+ text_far _OaksLabRivalIllTakeYouOnText
text_end
-OaksLabRivalDefeatedText:
- text_far _OaksLabText_1d3be
+OaksLabRivalIPickedTheWrongPokemonText:
+ text_far _OaksLabRivalIPickedTheWrongPokemonText
text_end
-OaksLabRivalBeatYouText:
- text_far _OaksLabText_1d3c3
+OaksLabRivalAmIGreatOrWhatText:
+ text_far _OaksLabRivalAmIGreatOrWhatText
text_end
-OaksLabText12:
+OaksLabRivalSmellYouLaterText:
text_asm
- ld hl, OaksLabRivalToughenUpText
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabRivalToughenUpText:
- text_far _OaksLabRivalToughenUpText
+.Text:
+ text_far _OaksLabRivalSmellYouLaterText
text_end
-OaksLabText26:
+OaksLabPikachuDislikesPokeballsText1:
text_asm
ldpikacry e, PikachuCry2
callfar PlayPikachuSoundClip
- ld hl, OaksLabPikachuDislikesPokeballsText1
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabPikachuDislikesPokeballsText1:
+.Text:
text_far _OaksLabPikachuDislikesPokeballsText1
text_end
-OaksLabText27:
+OaksLabPikachuDislikesPokeballsText2:
text_asm
- ld hl, OaksLabPikachuDislikesPokeballsText2
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabPikachuDislikesPokeballsText2:
+.Text:
text_far _OaksLabPikachuDislikesPokeballsText2
text_end
-OaksLabText19:
- text_far _OaksLabText21
+OaksLabRivalGrampsText:
+ text_far _OaksLabRivalGrampsText
text_end
-OaksLabText20:
- text_far _OaksLabText22
+OaksLabRivalMyPokemonHasGrownStrongerText:
+ text_far _OaksLabRivalMyPokemonHasGrownStrongerText
text_end
-OaksLabText21:
- text_far _OaksLabText23
+OaksLabOakIHaveARequestText:
+ text_far _OaksLabOakIHaveARequestText
text_end
-OaksLabText22:
- text_far _OaksLabText24
+OaksLabOakMyInventionPokedexText:
+ text_far _OaksLabOakMyInventionPokedexText
text_end
-OaksLabText23:
- text_far _OaksLabText25
+OaksLabOakGotPokedexText:
+ text_far _OaksLabOakGotPokedexText
sound_get_key_item
text_end
-OaksLabText24:
- text_far _OaksLabText26
+OaksLabOakThatWasMyDreamText:
+ text_far _OaksLabOakThatWasMyDreamText
text_end
-OaksLabText25:
- text_far _OaksLabText27
+OaksLabRivalLeaveItAllToMeText:
+ text_far _OaksLabRivalLeaveItAllToMeText
text_end
-OaksLabText8:
-OaksLabText9:
+OaksLabScientistText:
text_asm
- ld hl, OaksLabText_1c31d
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-OaksLabText_1c31d:
- text_far _OaksLabText_1d405
+.Text:
+ text_far _OaksLabScientistText
text_end
diff --git a/scripts/OaksLab2.asm b/scripts/OaksLab_2.asm
index b0519827..f642aa7b 100644
--- a/scripts/OaksLab2.asm
+++ b/scripts/OaksLab_2.asm
@@ -1,26 +1,26 @@
-Func_f1be0::
+OaksLabPikachuMovementScript::
ld a, [wYCoord]
cp 3
- jr z, .asm_f1bf0
+ jr z, .movement2
ld b, SPRITE_FACING_DOWN
- ld hl, Data_f1bf9
+ ld hl, OaksLabPikachuMovementData1
call TryApplyPikachuMovementData
ret
-.asm_f1bf0
+.movement2
ld b, SPRITE_FACING_LEFT
- ld hl, Data_f1bfe
+ ld hl, OaksLabPikachuMovementData2
call TryApplyPikachuMovementData
ret
-Data_f1bf9:
+OaksLabPikachuMovementData1:
db $00
db $1f
db $1e
db $38
db $3f
-Data_f1bfe:
+OaksLabPikachuMovementData2:
db $00
db $1d
db $20
diff --git a/scripts/PalletTown.asm b/scripts/PalletTown.asm
index 3a80739e..07e59cc0 100644
--- a/scripts/PalletTown.asm
+++ b/scripts/PalletTown.asm
@@ -9,18 +9,19 @@ PalletTown_Script:
jp CallFunctionInTable
PalletTown_ScriptPointers:
- dw PalletTownScript0
- dw PalletTownScript1
- dw PalletTownScript2
- dw PalletTownScript3
- dw PalletTownScript4
- dw PalletTownScript5
- dw PalletTownScript6
- dw PalletTownScript7
- dw PalletTownScript8
- dw PalletTownScript9
+ def_script_pointers
+ dw_const PalletTownDefaultScript, SCRIPT_PALLETTOWN_DEFAULT
+ dw_const PalletTownOakHeyWaitScript, SCRIPT_PALLETTOWN_OAK_HEY_WAIT
+ dw_const PalletTownOakWalksToPlayerScript, SCRIPT_PALLETTOWN_OAK_WALKS_TO_PLAYER
+ dw_const PalletTownOakGreetsPlayerScript, SCRIPT_PALLETTOWN_OAK_GREETS_PLAYER
+ dw_const PalletTownPikachuBattleScript, SCRIPT_PALLETTOWN_PIKACHU_BATTLE
+ dw_const PalletTownAfterPikachuBattleScript, SCRIPT_PALLETTOWN_AFTER_PIKACHU_BATTLE
+ dw_const PalletTownOakNotSafeComeWithMeScript, SCRIPT_PALLETTOWN_OAK_NOT_SAFE_COME_WITH_ME
+ dw_const PalletTownPlayerFollowsOakScript, SCRIPT_PALLETTOWN_PLAYER_FOLLOWS_OAK
+ dw_const PalletTownDaisyScript, SCRIPT_PALLETTOWN_DAISY
+ dw_const PalletTownNoopScript, SCRIPT_PALLETTOWN_NOOP
-PalletTownScript0:
+PalletTownDefaultScript:
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB
ret nz
ld a, [wYCoord]
@@ -34,7 +35,7 @@ PalletTownScript0:
.asm_18e40
xor a
ldh [hJoyHeld], a
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
@@ -46,19 +47,19 @@ PalletTownScript0:
SetEvent EVENT_OAK_APPEARED_IN_PALLET
; trigger the next script
- ld a, 1
+ ld a, SCRIPT_PALLETTOWN_OAK_HEY_WAIT
ld [wPalletTownCurScript], a
ret
-PalletTownScript1:
+PalletTownOakHeyWaitScript:
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
xor a
ld [wcf0d], a
- ld a, 1
+ ld a, TEXT_PALLETTOWN_OAK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $FF
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wSprite01StateData2MapY
ld a, 8
@@ -68,17 +69,17 @@ PalletTownScript1:
ld a, HS_PALLET_TOWN_OAK
ld [wMissableObjectIndex], a
predef ShowObject
-
- ; trigger the next script
ld a, $2
ld [wSprite01StateData1MovementStatus], a
ld a, SPRITE_FACING_UP
ld [wSprite01StateData1FacingDirection], a
- ld a, 2
+
+ ; trigger the next script
+ ld a, SCRIPT_PALLETTOWN_OAK_WALKS_TO_PLAYER
ld [wPalletTownCurScript], a
ret
-PalletTownScript2:
+PalletTownOakWalksToPlayerScript:
call Delay3
ld a, 0
ld [wYCoord], a
@@ -92,16 +93,16 @@ PalletTownScript2:
dec [hl]
predef FindPathToPlayer ; load Oak's movement into wNPCMovementDirections2
ld de, wNPCMovementDirections2
- ld a, 1 ; oak
+ ld a, PALLETTOWN_OAK
ldh [hSpriteIndex], a
call MoveSprite
; trigger the next script
- ld a, 3
+ ld a, SCRIPT_PALLETTOWN_OAK_GREETS_PLAYER
ld [wPalletTownCurScript], a
ret
-PalletTownScript3:
+PalletTownOakGreetsPlayerScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -113,11 +114,11 @@ PalletTownScript3:
ld [wSprite01StateData1MovementStatus], a
ld a, SPRITE_FACING_UP
ld [wSprite01StateData1FacingDirection], a
- ld a, 1
+ ld a, TEXT_PALLETTOWN_OAK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
; oak faces the horizontally adjacent patch of grass to face pikachu
- ld a, $FF
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, $2
ld [wSprite01StateData1MovementStatus], a
@@ -129,11 +130,11 @@ PalletTownScript3:
ld [wSprite01StateData1FacingDirection], a
; trigger the next script
- ld a, 4
+ ld a, SCRIPT_PALLETTOWN_PIKACHU_BATTLE
ld [wPalletTownCurScript], a
ret
-PalletTownScript4:
+PalletTownPikachuBattleScript:
; start the pikachu battle
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
@@ -147,35 +148,35 @@ PalletTownScript4:
ld [wCurEnemyLVL], a
; trigger the next script
- ld a, 5
+ ld a, SCRIPT_PALLETTOWN_AFTER_PIKACHU_BATTLE
ld [wPalletTownCurScript], a
ret
-PalletTownScript5:
+PalletTownAfterPikachuBattleScript:
ld a, $2
ld [wcf0d], a
- ld a, $1
+ ld a, TEXT_PALLETTOWN_OAK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $2
ld [wSprite01StateData1MovementStatus], a
ld a, SPRITE_FACING_UP
ld [wSprite01StateData1FacingDirection], a
- ld a, $8
+ ld a, TEXT_PALLETTOWN_OAK_COME_WITH_ME
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; trigger the next script
- ld a, 6
+ ld a, SCRIPT_PALLETTOWN_OAK_NOT_SAFE_COME_WITH_ME
ld [wPalletTownCurScript], a
ret
-PalletTownScript6:
+PalletTownOakNotSafeComeWithMeScript:
xor a
ld [wSpritePlayerStateData1FacingDirection], a
- ld a, $1
+ ld a, PALLETTOWN_OAK
ld [wSpriteIndex], a
xor a
ld [wNPCMovementScriptFunctionNum], a
@@ -185,21 +186,21 @@ PalletTownScript6:
ld [wNPCMovementScriptBank], a
; trigger the next script
- ld a, 7
+ ld a, SCRIPT_PALLETTOWN_PLAYER_FOLLOWS_OAK
ld [wPalletTownCurScript], a
ret
-PalletTownScript7:
+PalletTownPlayerFollowsOakScript:
ld a, [wNPCMovementScriptPointerTableNum]
and a ; is the movement script over?
ret nz
; trigger the next script
- ld a, 8
+ ld a, SCRIPT_PALLETTOWN_DAISY
ld [wPalletTownCurScript], a
ret
-PalletTownScript8:
+PalletTownDaisyScript:
CheckEvent EVENT_DAISY_WALKING
jr nz, .next
CheckBothEventsSet EVENT_GOT_TOWN_MAP, EVENT_ENTERED_BLUES_HOUSE, 1
@@ -215,42 +216,42 @@ PalletTownScript8:
CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK
ret z
SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
-PalletTownScript9:
+PalletTownNoopScript:
ret
PalletTown_TextPointers:
- dw PalletTownText1
- dw PalletTownText2
- dw PalletTownText3
- dw PalletTownText4
- dw PalletTownText5
- dw PalletTownText6
- dw PalletTownText7
- dw PalletTownText8
+ def_text_pointers
+ dw_const PalletTownOakText, TEXT_PALLETTOWN_OAK
+ dw_const PalletTownGirlText, TEXT_PALLETTOWN_GIRL
+ dw_const PalletTownFisherText, TEXT_PALLETTOWN_FISHER
+ dw_const PalletTownOaksLabSignText, TEXT_PALLETTOWN_OAKSLAB_SIGN
+ dw_const PalletTownSignText, TEXT_PALLETTOWN_SIGN
+ dw_const PalletTownPlayersHouseSignText, TEXT_PALLETTOWN_PLAYERSHOUSE_SIGN
+ dw_const PalletTownRivalsHouseSignText, TEXT_PALLETTOWN_RIVALSHOUSE_SIGN
+ dw_const PalletTownOakComeWithMe, TEXT_PALLETTOWN_OAK_COME_WITH_ME
-PalletTownText1:
+PalletTownOakText:
text_asm
ld a, [wcf0d]
and a
jr nz, .next
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, OakAppearsText
+ ld hl, .HeyWaitDontGoOutText
jr .done
.next
dec a
- jr nz, .asm_18fd3
- ld hl, OakWalksUpText
+ jr nz, .whew
+ ld hl, .ThatWasCloseText
jr .done
-
-.asm_18fd3
- ld hl, PalletTownText_19002
+.whew
+ ld hl, .WhewText
.done
call PrintText
jp TextScriptEnd
-OakAppearsText:
- text_far _OakAppearsText
+.HeyWaitDontGoOutText:
+ text_far _PalletTownOakHeyWaitDontGoOutText
text_asm
ld c, 10
call DelayFrames
@@ -263,53 +264,53 @@ OakAppearsText:
predef EmotionBubble
jp TextScriptEnd
-OakWalksUpText:
- text_far _OakWalksUpText
+.ThatWasCloseText:
+ text_far _PalletTownOakThatWasCloseText
text_end
-PalletTownText_19002:
- text_far _OakWhewText
+.WhewText:
+ text_far _PalletTownOakWhewText
text_end
-PalletTownText8:
- text_far _OakGrassText
+PalletTownOakComeWithMe:
+ text_far _PalletTownOakComeWithMe
text_end
-PalletTownText2: ; girl
- text_far _PalletTownText2
+PalletTownGirlText:
+ text_far _PalletTownGirlText
text_end
-PalletTownText3: ; fat man
- text_far _PalletTownText3
+PalletTownFisherText:
+ text_far _PalletTownFisherText
text_end
-PalletTownText4: ; sign by lab
- text_far _PalletTownText4
+PalletTownOaksLabSignText:
+ text_far _PalletTownOaksLabSignText
text_end
-PalletTownText5: ; sign by fence
+PalletTownSignText:
IF DEF(_DEBUG)
text_asm
ld a, 239
inc a
ld [wWhichPewterGuy], a
- ld hl, PalletTownText_502b
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-PalletTownText_502b:
+.Text:
text_decimal wWhichPewterGuy, 1, 3
text "bit"
done
ELSE
- text_far _PalletTownText5
+ text_far _PalletTownSignText
text_end
ENDC
-PalletTownText6: ; sign by Red's house
- text_far _PalletTownText6
+PalletTownPlayersHouseSignText:
+ text_far _PalletTownPlayersHouseSignText
text_end
-PalletTownText7: ; sign by Blue's house
- text_far _PalletTownText7
+PalletTownRivalsHouseSignText:
+ text_far _PalletTownRivalsHouseSignText
text_end
diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm
index c1c2d190..9437a55d 100644
--- a/scripts/PewterCity.asm
+++ b/scripts/PewterCity.asm
@@ -8,49 +8,50 @@ PewterCity_Script:
ret
PewterCity_ScriptPointers:
- dw PewterCityScript0
- dw PewterCityScript1
- dw PewterCityScript2
- dw PewterCityScript3
- dw PewterCityScript4
- dw PewterCityScript5
- dw PewterCityScript6
+ def_script_pointers
+ dw_const PewterCityDefaultScript, SCRIPT_PEWTERCITY_DEFAULT
+ dw_const PewterCitySuperNerd1ShowsPlayerMuseumScript, SCRIPT_PEWTERCITY_SUPER_NERD1_SHOWS_PLAYER_MUSEUM
+ dw_const PewterCityHideSuperNerd1Script, SCRIPT_PEWTERCITY_HIDE_SUPER_NERD1
+ dw_const PewterCityResetSuperNerd1Script, SCRIPT_PEWTERCITY_RESET_SUPER_NERD1
+ dw_const PewterCityYoungsterShowsPlayerGymScript, SCRIPT_PEWTERCITY_YOUNGSTER_SHOWS_PLAYER_GYM
+ dw_const PewterCityHideYoungsterScript, SCRIPT_PEWTERCITY_HIDE_YOUNGSTER
+ dw_const PewterCityResetYoungsterScript, SCRIPT_PEWTERCITY_RESET_YOUNGSTER
-PewterCityScript0:
+PewterCityDefaultScript:
xor a
ld [wMuseum1FCurScript], a
ResetEvent EVENT_BOUGHT_MUSEUM_TICKET
- call PewterCityScript_1925e
+ call PewterCityCheckPlayerLeavingEastScript
ret
-PewterCityScript_1925e:
+PewterCityCheckPlayerLeavingEastScript:
CheckEvent EVENT_BEAT_BROCK
ret nz
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
- ld hl, CoordsData_19277
+ ld hl, PewterCityPlayerLeavingEastCoords
call ArePlayerCoordsInArray
ret nc
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $5
+ ld a, TEXT_PEWTERCITY_YOUNGSTER
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
-CoordsData_19277:
+PewterCityPlayerLeavingEastCoords:
dbmapcoord 35, 17
dbmapcoord 36, 17
dbmapcoord 37, 18
dbmapcoord 37, 19
db -1 ; end
-PewterCityScript1:
+PewterCitySuperNerd1ShowsPlayerMuseumScript:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
- ld a, $3
+ ld a, PEWTERCITY_SUPER_NERD1
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
ldh [hSpriteFacingDirection], a
@@ -61,7 +62,7 @@ PewterCityScript1:
call PlayDefaultMusic
ld hl, wFlags_0xcd60
set 4, [hl]
- ld a, $d
+ ld a, TEXT_PEWTERCITY_SUPER_NERD1_ITS_RIGHT_HERE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
@@ -72,14 +73,14 @@ PewterCityScript1:
ldh [hSpriteMapYCoord], a
ld a, 17
ldh [hSpriteMapXCoord], a
- ld a, $3
+ ld a, PEWTERCITY_SUPER_NERD1
ld [wSpriteIndex], a
call SetSpritePosition1
- ld a, $3
+ ld a, PEWTERCITY_SUPER_NERD1
ldh [hSpriteIndex], a
ld de, MovementData_PewterMuseumGuyExit
call MoveSprite
- ld a, $2
+ ld a, SCRIPT_PEWTERCITY_HIDE_SUPER_NERD1
ld [wPewterCityCurScript], a
ret
@@ -90,19 +91,19 @@ MovementData_PewterMuseumGuyExit:
db NPC_MOVEMENT_DOWN
db -1 ; end
-PewterCityScript2:
+PewterCityHideSuperNerd1Script:
ld a, [wd730]
bit 0, a
ret nz
ld a, HS_MUSEUM_GUY
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $3
+ ld a, SCRIPT_PEWTERCITY_RESET_SUPER_NERD1
ld [wPewterCityCurScript], a
ret
-PewterCityScript3:
- ld a, $3
+PewterCityResetSuperNerd1Script:
+ ld a, PEWTERCITY_SUPER_NERD1
ld [wSpriteIndex], a
call SetSpritePosition2
ld a, HS_MUSEUM_GUY
@@ -110,15 +111,15 @@ PewterCityScript3:
predef ShowObject
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_PEWTERCITY_DEFAULT
ld [wPewterCityCurScript], a
ret
-PewterCityScript4:
+PewterCityYoungsterShowsPlayerGymScript:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
- ld a, $5
+ ld a, PEWTERCITY_YOUNGSTER
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_LEFT
ldh [hSpriteFacingDirection], a
@@ -126,7 +127,7 @@ PewterCityScript4:
call PlayDefaultMusic
ld hl, wFlags_0xcd60
set 4, [hl]
- ld a, $e
+ ld a, TEXT_PEWTERCITY_YOUNGSTER_GO_TAKE_ON_BROCK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $3c
@@ -137,14 +138,14 @@ PewterCityScript4:
ldh [hSpriteMapYCoord], a
ld a, 16
ldh [hSpriteMapXCoord], a
- ld a, $5
+ ld a, PEWTERCITY_YOUNGSTER
ld [wSpriteIndex], a
call SetSpritePosition1
- ld a, $5
+ ld a, PEWTERCITY_YOUNGSTER
ldh [hSpriteIndex], a
ld de, MovementData_PewterGymGuyExit
call MoveSprite
- ld a, $5
+ ld a, SCRIPT_PEWTERCITY_HIDE_YOUNGSTER
ld [wPewterCityCurScript], a
ret
@@ -156,19 +157,19 @@ MovementData_PewterGymGuyExit:
db NPC_MOVEMENT_RIGHT
db -1 ; end
-PewterCityScript5:
+PewterCityHideYoungsterScript:
ld a, [wd730]
bit 0, a
ret nz
ld a, HS_GYM_GUY
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $6
+ ld a, SCRIPT_PEWTERCITY_RESET_YOUNGSTER
ld [wPewterCityCurScript], a
ret
-PewterCityScript6:
- ld a, $5
+PewterCityResetYoungsterScript:
+ ld a, PEWTERCITY_YOUNGSTER
ld [wSpriteIndex], a
call SetSpritePosition2
ld a, HS_GYM_GUY
@@ -176,47 +177,48 @@ PewterCityScript6:
predef ShowObject
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_PEWTERCITY_DEFAULT
ld [wPewterCityCurScript], a
ret
PewterCity_TextPointers:
- dw PewterCityText1
- dw PewterCityText2
- dw PewterCityText3
- dw PewterCityText4
- dw PewterCityText5
- dw PewterCityText6
- dw PewterCityText7
- dw MartSignText
- dw PokeCenterSignText
- dw PewterCityText10
- dw PewterCityText11
- dw PewterCityText12
- dw PewterCityText13
- dw PewterCityText14
+ def_text_pointers
+ dw_const PewterCityCooltrainerFText, TEXT_PEWTERCITY_COOLTRAINER_F
+ dw_const PewterCityCooltrainerMText, TEXT_PEWTERCITY_COOLTRAINER_M
+ dw_const PewterCitySuperNerd1Text, TEXT_PEWTERCITY_SUPER_NERD1
+ dw_const PewterCitySuperNerd2Text, TEXT_PEWTERCITY_SUPER_NERD2
+ dw_const PewterCityYoungsterText, TEXT_PEWTERCITY_YOUNGSTER
+ dw_const PewterCityTrainerTipsText, TEXT_PEWTERCITY_TRAINER_TIPS
+ dw_const PewterCityPoliceNoticeSignText, TEXT_PEWTERCITY_POLICE_NOTICE_SIGN
+ dw_const MartSignText, TEXT_PEWTERCITY_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_PEWTERCITY_POKECENTER_SIGN
+ dw_const PewterCityMuseumSignText, TEXT_PEWTERCITY_MUSEUM_SIGN
+ dw_const PewterCityGymSignText, TEXT_PEWTERCITY_GYM_SIGN
+ dw_const PewterCitySignText, TEXT_PEWTERCITY_SIGN
+ dw_const PewterCitySuperNerd1ItsRightHereText, TEXT_PEWTERCITY_SUPER_NERD1_ITS_RIGHT_HERE
+ dw_const PewterCityYoungsterGoTakeOnBrockText, TEXT_PEWTERCITY_YOUNGSTER_GO_TAKE_ON_BROCK
-PewterCityText1:
- text_far _PewterCityText1
+PewterCityCooltrainerFText:
+ text_far _PewterCityCooltrainerFText
text_end
-PewterCityText2:
- text_far _PewterCityText2
+PewterCityCooltrainerMText:
+ text_far _PewterCityCooltrainerMText
text_end
-PewterCityText3:
+PewterCitySuperNerd1Text:
text_asm
- ld hl, PewterCityText_193f1
+ ld hl, .DidYouCheckOutMuseumText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jr nz, .playerDidNotGoIntoMuseum
- ld hl, PewterCityText_193f6
+ ld hl, .WerentThoseFossilsAmazingText
call PrintText
jr .done
.playerDidNotGoIntoMuseum
- ld hl, PewterCityText_193fb
+ ld hl, .YouHaveToGoText
call PrintText
xor a
ldh [hJoyPressed], a
@@ -226,62 +228,62 @@ PewterCityText3:
ld [wNPCMovementScriptPointerTableNum], a
ldh a, [hLoadedROMBank]
ld [wNPCMovementScriptBank], a
- ld a, $3
+ ld a, PEWTERCITY_SUPER_NERD1
ld [wSpriteIndex], a
call GetSpritePosition2
- ld a, $1
+ ld a, SCRIPT_PEWTERCITY_SUPER_NERD1_SHOWS_PLAYER_MUSEUM
ld [wPewterCityCurScript], a
.done
jp TextScriptEnd
-PewterCityText_193f1:
- text_far _PewterCityText_193f1
+.DidYouCheckOutMuseumText:
+ text_far _PewterCitySuperNerd1DidYouCheckOutMuseumText
text_end
-PewterCityText_193f6:
- text_far _PewterCityText_193f6
+.WerentThoseFossilsAmazingText:
+ text_far _PewterCitySuperNerd1WerentThoseFossilsAmazingText
text_end
-PewterCityText_193fb:
- text_far _PewterCityText_193fb
+.YouHaveToGoText:
+ text_far _PewterCitySuperNerd1YouHaveToGoText
text_end
-PewterCityText13:
- text_far _PewterCityText13
+PewterCitySuperNerd1ItsRightHereText:
+ text_far _PewterCitySuperNerd1ItsRightHereText
text_end
-PewterCityText4:
+PewterCitySuperNerd2Text:
text_asm
- ld hl, PewterCityText_19427
+ ld hl, .DoYouKnowWhatImDoingText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
cp $0
jr nz, .playerDoesNotKnow
- ld hl, PewterCityText_1942c
+ ld hl, .ThatsRightText
call PrintText
jr .done
.playerDoesNotKnow
- ld hl, PewterCityText_19431
+ ld hl, .ImSprayingRepelText
call PrintText
.done
jp TextScriptEnd
-PewterCityText_19427:
- text_far _PewterCityText_19427
+.DoYouKnowWhatImDoingText:
+ text_far _PewterCitySuperNerd2DoYouKnowWhatImDoingText
text_end
-PewterCityText_1942c:
- text_far _PewterCityText_1942c
+.ThatsRightText:
+ text_far _PewterCitySuperNerd2ThatsRightText
text_end
-PewterCityText_19431:
- text_far _PewterCityText_19431
+.ImSprayingRepelText:
+ text_far _PewterCitySuperNerd2ImSprayingRepelText
text_end
-PewterCityText5:
+PewterCityYoungsterText:
text_asm
- ld hl, PewterCityText_1945d
+ ld hl, .YoureATrainerFollowMeText
call PrintText
xor a
ldh [hJoyHeld], a
@@ -290,37 +292,37 @@ PewterCityText5:
ld [wNPCMovementScriptPointerTableNum], a
ldh a, [hLoadedROMBank]
ld [wNPCMovementScriptBank], a
- ld a, $5
+ ld a, PEWTERCITY_YOUNGSTER
ld [wSpriteIndex], a
call GetSpritePosition2
- ld a, $4
+ ld a, SCRIPT_PEWTERCITY_YOUNGSTER_SHOWS_PLAYER_GYM
ld [wPewterCityCurScript], a
jp TextScriptEnd
-PewterCityText_1945d:
- text_far _PewterCityText_1945d
+.YoureATrainerFollowMeText:
+ text_far _PewterCityYoungsterYoureATrainerFollowMeText
text_end
-PewterCityText14:
- text_far _PewterCityText14
+PewterCityYoungsterGoTakeOnBrockText:
+ text_far _PewterCityYoungsterGoTakeOnBrockText
text_end
-PewterCityText6:
- text_far _PewterCityText6
+PewterCityTrainerTipsText:
+ text_far _PewterCityTrainerTipsText
text_end
-PewterCityText7:
- text_far _PewterCityText7
+PewterCityPoliceNoticeSignText:
+ text_far _PewterCityPoliceNoticeSignText
text_end
-PewterCityText10:
- text_far _PewterCityText10
+PewterCityMuseumSignText:
+ text_far _PewterCityMuseumSignText
text_end
-PewterCityText11:
- text_far _PewterCityText11
+PewterCityGymSignText:
+ text_far _PewterCityGymSignText
text_end
-PewterCityText12:
- text_far _PewterCityText12
+PewterCitySignText:
+ text_far _PewterCitySignText
text_end
diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm
index 016535c2..a2f4eaa3 100644
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -31,33 +31,34 @@ PewterGymResetScripts:
ret
PewterGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw PewterGymBrockPostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_PEWTERGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_PEWTERGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_PEWTERGYM_END_BATTLE
+ dw_const PewterGymBrockPostBattle, SCRIPT_PEWTERGYM_BROCK_POST_BATTLE
PewterGymBrockPostBattle:
ld a, [wIsInBattle]
cp $ff
jp z, PewterGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; fallthrough
PewterGymScriptReceiveTM34:
- ld a, $4
+ ld a, TEXT_PEWTERGYM_BROCK_WAIT_TAKE_THIS
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_BROCK
lb bc, TM_BIDE, 1
call GiveItem
jr nc, .BagFull
- ld a, $5
+ ld a, TEXT_PEWTERGYM_RECEIVED_TM34
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM34
jr .gymVictory
.BagFull
- ld a, $6
+ ld a, TEXT_PEWTERGYM_TM34_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -81,20 +82,21 @@ PewterGymScriptReceiveTM34:
jp PewterGymResetScripts
PewterGym_TextPointers:
- dw BrockText
- dw PewterGymTrainerText1
- dw PewterGymGuideText
- dw BeforeReceivedTM34Text
- dw ReceivedTM34Text
- dw TM34NoRoomText
+ def_text_pointers
+ dw_const PewterGymBrockText, TEXT_PEWTERGYM_BROCK
+ dw_const PewterGymCooltrainerMText, TEXT_PEWTERGYM_COOLTRAINER_M
+ dw_const PewterGymGuideText, TEXT_PEWTERGYM_GYM_GUIDE
+ dw_const PewterGymBrockWaitTakeThisText, TEXT_PEWTERGYM_BROCK_WAIT_TAKE_THIS
+ dw_const PewterGymReceivedTM34Text, TEXT_PEWTERGYM_RECEIVED_TM34
+ dw_const PewterGymTM34NoRoomText, TEXT_PEWTERGYM_TM34_NO_ROOM
PewterGymTrainerHeaders:
def_trainers 2
PewterGymTrainerHeader0:
- trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymBattleText1, PewterGymEndBattleText1, PewterGymAfterBattleText1
+ trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymCooltrainerMBattleText, PewterGymCooltrainerMEndBattleText, PewterGymCooltrainerMAfterBattleText
db -1 ; end
-BrockText:
+PewterGymBrockText:
text_asm
CheckEvent EVENT_BEAT_BROCK
jr z, .beforeBeat
@@ -104,17 +106,17 @@ BrockText:
call DisableWaitingAfterTextDisplay
jr .done
.afterBeat
- ld hl, BrockPostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
jr .done
.beforeBeat
- ld hl, BrockPreBattleText
+ ld hl, .PreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedBoulderBadgeText
- ld de, ReceivedBoulderBadgeText
+ ld hl, PewterGymBrockReceivedBoulderBadgeText
+ ld de, PewterGymBrockReceivedBoulderBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -124,56 +126,56 @@ BrockText:
ld [wGymLeaderNo], a
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_PEWTERGYM_BROCK_POST_BATTLE
ld [wPewterGymCurScript], a
ld [wCurMapScript], a
.done
jp TextScriptEnd
-BrockPreBattleText:
- text_far _BrockPreBattleText
+.PreBattleText:
+ text_far _PewterGymBrockPreBattleText
text_end
-BrockPostBattleAdviceText:
- text_far _BrockPostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _PewterGymBrockPostBattleAdviceText
text_end
-BeforeReceivedTM34Text:
- text_far _BeforeReceivedTM34Text
+PewterGymBrockWaitTakeThisText:
+ text_far _PewterGymBrockWaitTakeThisText
text_end
-ReceivedTM34Text:
- text_far _ReceivedTM34Text
+PewterGymReceivedTM34Text:
+ text_far _PewterGymReceivedTM34Text
sound_get_item_1
text_far _TM34ExplanationText
text_end
-TM34NoRoomText:
- text_far _TM34NoRoomText
+PewterGymTM34NoRoomText:
+ text_far _PewterGymTM34NoRoomText
text_end
-ReceivedBoulderBadgeText:
- text_far _ReceivedBoulderBadgeText
+PewterGymBrockReceivedBoulderBadgeText:
+ text_far _PewterGymBrockReceivedBoulderBadgeText
sound_get_item_1
- text_far _BrockBoulerBadgeInfoText ; Text to tell that the flash technique can be used
+ text_far _PewterGymBrockBoulderBadgeInfoText ; Text to tell that the flash technique can be used
text_end
-PewterGymTrainerText1:
+PewterGymCooltrainerMText:
text_asm
ld hl, PewterGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-PewterGymBattleText1:
- text_far _PewterGymBattleText1
+PewterGymCooltrainerMBattleText:
+ text_far _PewterGymCooltrainerMBattleText
text_end
-PewterGymEndBattleText1:
- text_far _PewterGymEndBattleText1
+PewterGymCooltrainerMEndBattleText:
+ text_far _PewterGymCooltrainerMEndBattleText
text_end
-PewterGymAfterBattleText1:
- text_far _PewterGymAfterBattleText1
+PewterGymCooltrainerMAfterBattleText:
+ text_far _PewterGymCooltrainerMAfterBattleText
text_end
PewterGymGuideText:
@@ -194,7 +196,7 @@ PewterGymGuideText:
call PrintText
jr .PewterGymGuideAdviceText
.PewterGymGuideBeginAdviceText
- ld hl, PewterGymText_5c524
+ ld hl, PewterGymGuideFreeServiceText
call PrintText
.PewterGymGuideAdviceText
ld hl, PewterGymGuideAdviceText
@@ -222,8 +224,8 @@ PewterGymGuideAdviceText:
text_far _PewterGymGuideAdviceText
text_end
-PewterGymText_5c524:
- text_far _PewterGymText_5c524
+PewterGymGuideFreeServiceText:
+ text_far _PewterGymGuideFreeServiceText
text_end
PewterGymGuidePostBattleText:
diff --git a/scripts/PewterMart.asm b/scripts/PewterMart.asm
index a0e9e63e..0a5baac2 100644
--- a/scripts/PewterMart.asm
+++ b/scripts/PewterMart.asm
@@ -5,26 +5,27 @@ PewterMart_Script:
ret
PewterMart_TextPointers:
- dw PewterCashierText
- dw PewterMartText2
- dw PewterMartText3
+ def_text_pointers
+ dw_const PewterMartClerkText, TEXT_PEWTERMART_CLERK
+ dw_const PewterMartYoungsterText, TEXT_PEWTERMART_YOUNGSTER
+ dw_const PewterMartSuperNerdText, TEXT_PEWTERMART_SUPER_NERD
-PewterMartText2:
+PewterMartYoungsterText:
text_asm
ld hl, .Text
call PrintText
jp TextScriptEnd
-.Text
- text_far _PewterMartText2
+.Text:
+ text_far _PewterMartYoungsterText
text_end
-PewterMartText3:
+PewterMartSuperNerdText:
text_asm
ld hl, .Text
call PrintText
jp TextScriptEnd
-.Text
- text_far _PewterMartText3
+.Text:
+ text_far _PewterMartSuperNerdText
text_end
diff --git a/scripts/PewterNidoranHouse.asm b/scripts/PewterNidoranHouse.asm
index 77fb12c0..6c5820ab 100644
--- a/scripts/PewterNidoranHouse.asm
+++ b/scripts/PewterNidoranHouse.asm
@@ -3,22 +3,23 @@ PewterNidoranHouse_Script:
ret
PewterNidoranHouse_TextPointers:
- dw PewterHouse1Text1
- dw PewterHouse1Text2
- dw PewterHouse1Text3
+ def_text_pointers
+ dw_const PewterNidoranHouseNidoranText, TEXT_PEWTERNIDORANHOUSE_NIDORAN
+ dw_const PewterNidoranHouseLittleBoyText, TEXT_PEWTERNIDORANHOUSE_LITTLE_BOY
+ dw_const PewterNidoranHouseMiddleAgedManText, TEXT_PEWTERNIDORANHOUSE_MIDDLE_AGED_MAN
-PewterHouse1Text1:
- text_far _PewterHouse1Text1
+PewterNidoranHouseNidoranText:
+ text_far _PewterNidoranHouseNidoranText
text_asm
ld a, NIDORAN_M
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-PewterHouse1Text2:
- text_far _PewterHouse1Text2
+PewterNidoranHouseLittleBoyText:
+ text_far _PewterNidoranHouseLittleBoyText
text_end
-PewterHouse1Text3:
- text_far _PewterHouse1Text3
+PewterNidoranHouseMiddleAgedManText:
+ text_far _PewterNidoranHouseMiddleAgedManText
text_end
diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm
index 247ecb03..ae5c6349 100644
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -6,34 +6,35 @@ PewterPokecenter_Script:
ret
PewterPokecenter_TextPointers:
- dw PewterHealNurseText
- dw PewterPokecenterText2
- dw PewterJigglypuffText
- dw PewterTradeNurseText
- dw PewterPokecenterText5
- dw PewterPokecenterText6
+ def_text_pointers
+ dw_const PewterPokecenterNurseText, TEXT_PEWTERPOKECENTER_NURSE
+ dw_const PewterPokecenterGentlemanText, TEXT_PEWTERPOKECENTER_GENTLEMAN
+ dw_const PewterPokecenterJigglypuffText, TEXT_PEWTERPOKECENTER_JIGGLYPUFF
+ dw_const PewterPokecenterLinkReceptionistText, TEXT_PEWTERPOKECENTER_LINK_RECEPTIONIST
+ dw_const PewterPokecenterCooltrainerFText, TEXT_PEWTERPOKECENTER_COOLTRAINER_F
+ dw_const PewterPokecenterChanseyText, TEXT_PEWTERPOKECENTER_CHANSEY
-PewterHealNurseText:
+PewterPokecenterNurseText:
script_pokecenter_nurse
-PewterPokecenterText2:
- text_far _PewterPokecenterText2
+PewterPokecenterGentlemanText:
+ text_far _PewterPokecenterGentlemanText
text_end
-PewterJigglypuffText:
+PewterPokecenterJigglypuffText:
text_asm
farcall PewterJigglypuff
jp TextScriptEnd
-PewterTradeNurseText:
+PewterPokecenterLinkReceptionistText:
script_cable_club_receptionist
-PewterPokecenterText5:
+PewterPokecenterCooltrainerFText:
text_asm
- farcall Func_f1d98
+ farcall PewterPokecenterPrintCooltrainerFText
jp TextScriptEnd
-PewterPokecenterText6:
+PewterPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/PewterPokecenter2.asm b/scripts/PewterPokecenter_2.asm
index dd80e901..cd0933f0 100644
--- a/scripts/PewterPokecenter2.asm
+++ b/scripts/PewterPokecenter_2.asm
@@ -1,25 +1,25 @@
-Func_f1d98::
- ld hl, PewterPokecenterText_f1d9f
+PewterPokecenterPrintCooltrainerFText::
+ ld hl, .text
call PrintText
ret
-PewterPokecenterText_f1d9f:
+.text
text_far _PewterPokecenterText3
text_end
PewterJigglypuff::
ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, .JigglypuffText
+ ld hl, .Text
call PrintText
call StopAllMusic
ld c, 32
call DelayFrames
- ld hl, JigglypuffFacingDirections
+ ld hl, .FacingDirections
ld de, wJigglypuffFacingDirections
- ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
+ ld bc, .FacingDirectionsEnd - .FacingDirections
call CopyData
ld a, [wSprite03StateData1ImageIndex]
@@ -43,7 +43,7 @@ PewterJigglypuff::
push hl
ld hl, wJigglypuffFacingDirections
ld de, wJigglypuffFacingDirections - 1
- ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
+ ld bc, .FacingDirectionsEnd - .FacingDirections
call CopyData
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
@@ -67,13 +67,13 @@ PewterJigglypuff::
call DisablePikachuFollowingPlayer
ret
-.JigglypuffText:
- text_far _PewterJigglypuffText
+.Text:
+ text_far _PewterPokecenterJigglypuffText
text_end
-JigglypuffFacingDirections:
+.FacingDirections:
db $40 | SPRITE_FACING_DOWN
db $40 | SPRITE_FACING_LEFT
db $40 | SPRITE_FACING_UP
db $40 | SPRITE_FACING_RIGHT
-JigglypuffFacingDirectionsEnd:
+.FacingDirectionsEnd:
diff --git a/scripts/PewterSpeechHouse.asm b/scripts/PewterSpeechHouse.asm
index 5d3d9249..e42f941b 100644
--- a/scripts/PewterSpeechHouse.asm
+++ b/scripts/PewterSpeechHouse.asm
@@ -2,13 +2,14 @@ PewterSpeechHouse_Script:
jp EnableAutoTextBoxDrawing
PewterSpeechHouse_TextPointers:
- dw PewterHouse2Text1
- dw PewterHouse2Text2
+ def_text_pointers
+ dw_const PewterSpeechHouseGamblerText, TEXT_PEWTERSPEECHHOUSE_GAMBLER
+ dw_const PewterSpeechHouseYoungsterText, TEXT_PEWTERSPEECHHOUSE_YOUNGSTER
-PewterHouse2Text1:
- text_far _PewterHouse2Text1
+PewterSpeechHouseGamblerText:
+ text_far _PewterSpeechHouseGamblerText
text_end
-PewterHouse2Text2:
- text_far _PewterHouse2Text2
+PewterSpeechHouseYoungsterText:
+ text_far _PewterSpeechHouseYoungsterText
text_end
diff --git a/scripts/PokemonFanClub.asm b/scripts/PokemonFanClub.asm
index e8e68a7f..a648b92b 100644
--- a/scripts/PokemonFanClub.asm
+++ b/scripts/PokemonFanClub.asm
@@ -1,45 +1,46 @@
PokemonFanClub_Script:
call EnableAutoTextBoxDrawing
ld hl, PokemonFanClub_ScriptPointers
- ld a, [wFanClubCurScript]
+ ld a, [wPokemonFanClubCurScript]
call CallFunctionInTable
ret
PokemonFanClub_ScriptPointers:
- dw FanClubScript1
- dw FanClubScript2
+ def_script_pointers
+ dw_const PokemonFanClubScript0, SCRIPT_POKEMONFANCLUB_SCRIPT0
+ dw_const PokemonFanClubScript1, SCRIPT_POKEMONFANCLUB_SCRIPT1
-FanClubScript1:
+PokemonFanClubScript0:
ld hl, wd492
bit 7, [hl]
- call z, FanClubScript_59a44
+ call z, PokemonFanClubScript_59a44
ld hl, wd492
set 7, [hl]
ret
-FanClubScript2:
+PokemonFanClubScript1:
ld hl, wd492
bit 7, [hl]
- call z, FanClubScript_59a39
+ call z, PokemonFanClubScript_59a39
ld hl, wd492
set 7, [hl]
ret
-FanClubScript_59a39:
+PokemonFanClubScript_59a39:
call Random
ldh a, [hRandomAdd]
cp 25
- call c, FanClubScript_59a44
+ call c, PokemonFanClubScript_59a44
ret
-FanClubScript_59a44:
+PokemonFanClubScript_59a44:
ld a, [wd472]
bit 7, a
ret z
callfar CheckPikachuFaintedOrStatused
ret c
- ld a, $1
- ld [wFanClubCurScript], a
+ ld a, SCRIPT_POKEMONFANCLUB_SCRIPT1
+ ld [wPokemonFanClubCurScript], a
xor a
ld [wPlayerMovingDirection], a
call UpdateSprites
@@ -49,17 +50,17 @@ FanClubScript_59a44:
ld a, $f ; Pikachu
ld [wEmotionBubbleSpriteIndex], a
predef EmotionBubble
- ld hl, PikachuMovementScript_59a8c
+ ld hl, PokemonFanClubPikachuMovementData
call ApplyPikachuMovementData
- ld a, $2
- ld [wSprite03StateData1MovementStatus], a ; Seel
+ ld a, $2 ; Seel
+ ld [wSprite03StateData1MovementStatus], a
xor a ; SPRITE_FACING_DOWN
ld [wSprite03StateData1FacingDirection], a
callfar InitializePikachuTextID
call DisablePikachuFollowingPlayer
ret
-PikachuMovementScript_59a8c:
+PokemonFanClubPikachuMovementData:
db $00
db $26
db $20
@@ -69,17 +70,17 @@ PikachuMovementScript_59a8c:
db $3f
PokemonFanClub_TextPointers:
- dw FanClubText1
- dw FanClubText2
- dw FanClubText3
- dw FanClubText4
- dw FanClubText5
- dw FanClubText6
+ def_text_pointers
+ dw_const PokemonFanClubClefairyFanText, TEXT_POKEMONFANCLUB_CLEFAIRY_FAN
+ dw_const PokemonFanClubSeelFanText, TEXT_POKEMONFANCLUB_SEEL_FAN
+ dw_const PokemonFanClubClefairyText, TEXT_POKEMONFANCLUB_CLEFAIRY
+ dw_const PokemonFanClubSeelText, TEXT_POKEMONFANCLUB_SEEL
+ dw_const PokemonFanClubChairmanText, TEXT_POKEMONFANCLUB_CHAIRMAN
+ dw_const PokemonFanClubReceptionistText, TEXT_POKEMONFANCLUB_RECEPTIONIST
-FanClubText1:
-; clefairy fan
+PokemonFanClubClefairyFanText:
text_asm
- CheckEventHL EVENT_152
+ CheckEventHL EVENT_LEFT_FANCLUB_AFTER_BIKE_VOUCHER
jr z, .asm_59aaf
ld hl, .yellowtext
call PrintText
@@ -92,7 +93,6 @@ FanClubText1:
ld hl, .normaltext
call PrintText
jr .done
-
.mineisbetter
ResetEventReuseHL EVENT_PIKACHU_FAN_BOAST
ld hl, .bettertext
@@ -101,25 +101,25 @@ FanClubText1:
jp TextScriptEnd
.normaltext
- text_far PikachuFanText
+ text_far _PokemonFanClubClefairyFanNormalText
text_end
.bettertext
- text_far PikachuFanBetterText
+ text_far _PokemonFanClubClefairyFanBetterText
text_end
.yellowtext
- text_far PikachuFanPrintText
+ text_far _PokemonFanClubClefairyFanText
text_end
-FanClubText2:
-; seel fan
+PokemonFanClubSeelFanText:
text_asm
- CheckEventHL EVENT_152
+ CheckEventHL EVENT_LEFT_FANCLUB_AFTER_BIKE_VOUCHER
jr z, .asm_59ae7
ld hl, .yellowtext
call PrintText
jr .done
+
.asm_59ae7
CheckEventReuseHL EVENT_SEEL_FAN_BOAST
jr nz, .mineisbetter
@@ -135,49 +135,46 @@ FanClubText2:
jp TextScriptEnd
.normaltext
- text_far SeelFanText
+ text_far _PokemonFanClubSeelFanNormalText
text_end
.bettertext
- text_far SeelFanBetterText
+ text_far _PokemonFanClubSeelFanBetterText
text_end
.yellowtext
- text_far SeelFanPrintText
+ text_far _PokemonFanClubSeelFanText
text_end
-FanClubText3:
-; pikachu
+PokemonFanClubClefairyText:
text_asm
- ld hl, .text
+ ld hl, .Text
call PrintText
ld a, CLEFAIRY
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-.text
- text_far FanClubPikachuText
+.Text
+ text_far _PokemonFanClubClefairyText
text_end
-FanClubText4:
-; seel
+PokemonFanClubSeelText:
text_asm
- ld hl, .text
+ ld hl, .Text
call PrintText
ld a, SEEL
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-.text
- text_far FanClubSeelText
+.Text
+ text_far _PokemonFanClubSeelText
text_end
-FanClubText5:
-; chair
+PokemonFanClubChairmanText:
text_asm
- CheckEventHL EVENT_152
+ CheckEventHL EVENT_LEFT_FANCLUB_AFTER_BIKE_VOUCHER
jr z, .check_bike_voucher
ld hl, Text_59c1f
call PrintText
@@ -191,7 +188,7 @@ FanClubText5:
.check_bike_voucher
CheckEvent EVENT_GOT_BIKE_VOUCHER
jr nz, .nothingleft
- ld hl, .meetchairtext
+ ld hl, .IntroText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -199,23 +196,23 @@ FanClubText5:
jr nz, .nothanks
; tell the story
- ld hl, .storytext
+ ld hl, .StoryText
call PrintText
lb bc, BIKE_VOUCHER, 1
call GiveItem
jr nc, .bag_full
- ld hl, .receivedvouchertext
+ ld hl, .BikeVoucherText
call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER
jp TextScriptEnd
.bag_full
- ld hl, .bagfulltext
+ ld hl, .BagFullText
jr .gbpals_print_text
.nothanks
- ld hl, .nostorytext
+ ld hl, .NoStoryText
jr .gbpals_print_text
.nothingleft
- ld hl, .finaltext
+ ld hl, .FinalText
.gbpals_print_text
push hl
call LoadGBPal
@@ -259,30 +256,30 @@ FanClubText5:
ld hl, Text_59c29
jr .gbpals_print_text
-.meetchairtext
- text_far FanClubMeetChairText
+.IntroText:
+ text_far _PokemonFanClubChairmanIntroText
text_end
-.storytext
- text_far FanClubChairStoryText
+.StoryText:
+ text_far _PokemonFanClubChairmanStoryText
text_end
-.receivedvouchertext
- text_far ReceivedBikeVoucherText
+.BikeVoucherText:
+ text_far _PokemonFanClubReceivedBikeVoucherText
sound_get_key_item
- text_far ExplainBikeVoucherText
+ text_far _PokemonFanClubExplainBikeVoucherText
text_end
-.nostorytext
- text_far FanClubNoStoryText
+.NoStoryText:
+ text_far _PokemonFanClubNoStoryText
text_end
-.finaltext
- text_far FanClubChairFinalText
+.FinalText:
+ text_far _PokemonFanClubChairFinalText
text_end
-.bagfulltext
- text_far FanClubBagFullText
+.BagFullText:
+ text_far _PokemonFanClubBagFullText
text_end
Text_59c1f:
@@ -301,6 +298,6 @@ Text_59c2e:
text_far FanClubChairPrintText4
text_end
-FanClubText6:
- text_far _FanClubText6
+PokemonFanClubReceptionistText:
+ text_far _PokemonFanClubReceptionistText
text_end
diff --git a/scripts/PokemonMansion1F.asm b/scripts/PokemonMansion1F.asm
index 247562a9..b294a247 100644
--- a/scripts/PokemonMansion1F.asm
+++ b/scripts/PokemonMansion1F.asm
@@ -1,5 +1,5 @@
PokemonMansion1F_Script:
- call Mansion1Subscript1
+ call Mansion1CheckReplaceSwitchDoorBlocks
call EnableAutoTextBoxDrawing
ld hl, Mansion1TrainerHeaders
ld de, PokemonMansion1F_ScriptPointers
@@ -8,37 +8,37 @@ PokemonMansion1F_Script:
ld [wPokemonMansion1FCurScript], a
ret
-Mansion1Subscript1:
+Mansion1CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
- jr nz, .asm_442ec
+ jr nz, .switchTurnedOn
lb bc, 6, 12
- call Mansion1Script_4430b
+ call Mansion1LoadEmptyFloorTileBlock
lb bc, 3, 8
- call Mansion1Script_44304
+ call Mansion1LoadHorizontalGateBlock
lb bc, 8, 10
- call Mansion1Script_44304
+ call Mansion1LoadHorizontalGateBlock
lb bc, 13, 13
- jp Mansion1Script_44304
-.asm_442ec
+ jp Mansion1LoadHorizontalGateBlock
+.switchTurnedOn
lb bc, 6, 12
- call Mansion1Script_44304
+ call Mansion1LoadHorizontalGateBlock
lb bc, 3, 8
- call Mansion1Script_4430b
+ call Mansion1LoadEmptyFloorTileBlock
lb bc, 8, 10
- call Mansion1Script_4430b
+ call Mansion1LoadEmptyFloorTileBlock
lb bc, 13, 13
- jp Mansion1Script_4430b
+ jp Mansion1LoadEmptyFloorTileBlock
-Mansion1Script_44304:
+Mansion1LoadHorizontalGateBlock:
ld a, $2d
ld [wNewTileBlockID], a
jr Mansion1ReplaceBlock
-Mansion1Script_4430b:
+Mansion1LoadEmptyFloorTileBlock:
ld a, $e
ld [wNewTileBlockID], a
Mansion1ReplaceBlock:
@@ -51,79 +51,81 @@ Mansion1Script_Switches::
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $4
+ ld a, TEXT_POKEMONMANSION1F_SWITCH
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POKEMONMANSION1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSION1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONMANSION1F_END_BATTLE
PokemonMansion1F_TextPointers:
- dw Mansion1Text1
- dw PickUpItemText
- dw PickUpItemText
- dw Mansion1Text4
+ def_text_pointers
+ dw_const PokemonMansion1FScientistText, TEXT_POKEMONMANSION1F_SCIENTIST
+ dw_const PickUpItemText, TEXT_POKEMONMANSION1F_ESCAPE_ROPE
+ dw_const PickUpItemText, TEXT_POKEMONMANSION1F_CARBOS
+ dw_const PokemonMansion1FSwitchText, TEXT_POKEMONMANSION1F_SWITCH
Mansion1TrainerHeaders:
def_trainers
Mansion1TrainerHeader0:
- trainer EVENT_BEAT_MANSION_1_TRAINER_0, 3, Mansion1BattleText2, Mansion1EndBattleText2, Mansion1AfterBattleText2
+ trainer EVENT_BEAT_MANSION_1_TRAINER_0, 3, PokemonMansion1FScientistBattleText, PokemonMansion1FScientistEndBattleText, PokemonMansion1FScientistAfterBattleText
db -1 ; end
-Mansion1Text1:
+PokemonMansion1FScientistText:
text_asm
ld hl, Mansion1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Mansion1BattleText2:
- text_far _Mansion1BattleText2
+PokemonMansion1FScientistBattleText:
+ text_far _PokemonMansion1FScientistBattleText
text_end
-Mansion1EndBattleText2:
- text_far _Mansion1EndBattleText2
+PokemonMansion1FScientistEndBattleText:
+ text_far _PokemonMansion1FScientistEndBattleText
text_end
-Mansion1AfterBattleText2:
- text_far _Mansion1AfterBattleText2
+PokemonMansion1FScientistAfterBattleText:
+ text_far _PokemonMansion1FScientistAfterBattleText
text_end
-Mansion1Text4:
+PokemonMansion1FSwitchText:
text_asm
- ld hl, MansionSwitchText
+ ld hl, .Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_4438c
+ jr nz, .not_pressed
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
- ld hl, MansionSwitchPressedText
+ ld hl, .PressedText
call PrintText
ld a, SFX_GO_INSIDE
call PlaySound
CheckAndSetEvent EVENT_MANSION_SWITCH_ON
- jr z, .asm_44392
+ jr z, .done
ResetEventReuseHL EVENT_MANSION_SWITCH_ON
- jr .asm_44392
-.asm_4438c
- ld hl, MansionSwitchNotPressedText
+ jr .done
+.not_pressed
+ ld hl, .NotPressedText
call PrintText
-.asm_44392
+.done
jp TextScriptEnd
-MansionSwitchText:
- text_far _MansionSwitchText
+.Text:
+ text_far _PokemonMansion1FSwitchText
text_end
-MansionSwitchPressedText:
- text_far _MansionSwitchPressedText
+.PressedText:
+ text_far _PokemonMansion1FSwitchPressedText
text_end
-MansionSwitchNotPressedText:
- text_far _MansionSwitchNotPressedText
+.NotPressedText:
+ text_far _PokemonMansion1FSwitchNotPressedText
text_end
diff --git a/scripts/PokemonMansion2F.asm b/scripts/PokemonMansion2F.asm
index a887913a..bc3d78e9 100644
--- a/scripts/PokemonMansion2F.asm
+++ b/scripts/PokemonMansion2F.asm
@@ -1,5 +1,5 @@
PokemonMansion2F_Script:
- call Mansion2Script_51fee
+ call Mansion2CheckReplaceSwitchDoorBlocks
call EnableAutoTextBoxDrawing
ld hl, Mansion2TrainerHeaders
ld de, PokemonMansion2F_ScriptPointers
@@ -8,36 +8,36 @@ PokemonMansion2F_Script:
ld [wPokemonMansion2FCurScript], a
ret
-Mansion2Script_51fee:
+Mansion2CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
- jr nz, .asm_52016
+ jr nz, .switchTurnedOn
ld a, $e
lb bc, 2, 4
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $54
lb bc, 4, 9
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $5f
lb bc, 11, 3
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
-.asm_52016
+.switchTurnedOn
ld a, $5f
lb bc, 2, 4
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
lb bc, 4, 9
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
lb bc, 11, 3
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
-Mansion2Script_5202f:
+Mansion2ReplaceBlock:
ld [wNewTileBlockID], a
predef_jump ReplaceTileBlock
@@ -47,89 +47,90 @@ Mansion2Script_Switches::
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $5
+ ld a, TEXT_POKEMONMANSION2F_SWITCH
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion2F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POKEMONMANSION2F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSION2F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONMANSION2F_END_BATTLE
PokemonMansion2F_TextPointers:
- dw Mansion2Text1
- dw PickUpItemText
- dw Mansion2Text3
- dw Mansion2Text4
- dw Mansion2Text5
+ def_text_pointers
+ dw_const PokemonMansion2FSuperNerdText, TEXT_POKEMONMANSION2F_SUPER_NERD
+ dw_const PickUpItemText, TEXT_POKEMONMANSION2F_CALCIUM
+ dw_const PokemonMansion2FDiary1Text, TEXT_POKEMONMANSION2F_DIARY1
+ dw_const PokemonMansion2FDiary2Text, TEXT_POKEMONMANSION2F_DIARY2
+ dw_const PokemonMansion2FSwitchText, TEXT_POKEMONMANSION2F_SWITCH
Mansion2TrainerHeaders:
def_trainers
Mansion2TrainerHeader0:
- trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, Mansion2BattleText1, Mansion2EndBattleText1, Mansion2AfterBattleText1
+ trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, PokemonMansion2FSuperNerdBattleText, PokemonMansion2FSuperNerdEndBattleText, PokemonMansion2FSuperNerdAfterBattleText
db -1 ; end
-Mansion2Text1:
+PokemonMansion2FSuperNerdText:
text_asm
ld hl, Mansion2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Mansion2BattleText1:
- text_far _Mansion2BattleText1
+PokemonMansion2FSuperNerdBattleText:
+ text_far _PokemonMansion2FSuperNerdBattleText
text_end
-Mansion2EndBattleText1:
- text_far _Mansion2EndBattleText1
+PokemonMansion2FSuperNerdEndBattleText:
+ text_far _PokemonMansion2FSuperNerdEndBattleText
text_end
-Mansion2AfterBattleText1:
- text_far _Mansion2AfterBattleText1
+PokemonMansion2FSuperNerdAfterBattleText:
+ text_far _PokemonMansion2FSuperNerdAfterBattleText
text_end
-Mansion2Text3:
- text_far _Mansion2Text3
+PokemonMansion2FDiary1Text:
+ text_far _PokemonMansion2FDiary1Text
text_end
-Mansion2Text4:
- text_far _Mansion2Text4
+PokemonMansion2FDiary2Text:
+ text_far _PokemonMansion2FDiary2Text
text_end
-Mansion3Text6:
-Mansion2Text5:
+PokemonMansion2FSwitchText:
text_asm
- ld hl, Mansion2Text_520c2
+ ld hl, .Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_520b9
+ jr nz, .not_pressed
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
- ld hl, Mansion2Text_520c7
+ ld hl, .PressedText
call PrintText
ld a, SFX_GO_INSIDE
call PlaySound
CheckAndSetEvent EVENT_MANSION_SWITCH_ON
- jr z, .asm_520bf
+ jr z, .done
ResetEventReuseHL EVENT_MANSION_SWITCH_ON
- jr .asm_520bf
-.asm_520b9
- ld hl, Mansion2Text_520cc
+ jr .done
+.not_pressed
+ ld hl, .NotPressed
call PrintText
-.asm_520bf
+.done
jp TextScriptEnd
-Mansion2Text_520c2:
- text_far _Mansion2Text_520c2
+.Text:
+ text_far _PokemonMansion2FSwitchText
text_end
-Mansion2Text_520c7:
- text_far _Mansion2Text_520c7
+.PressedText:
+ text_far _PokemonMansion2FSwitchPressedText
text_end
-Mansion2Text_520cc:
- text_far _Mansion2Text_520cc
+.NotPressed:
+ text_far _PokemonMansion2FSwitchNotPressedText
text_end
diff --git a/scripts/PokemonMansion3F.asm b/scripts/PokemonMansion3F.asm
index 2fc7c18d..f64357d5 100644
--- a/scripts/PokemonMansion3F.asm
+++ b/scripts/PokemonMansion3F.asm
@@ -1,5 +1,5 @@
PokemonMansion3F_Script:
- call Mansion3Script_52204
+ call Mansion3CheckReplaceSwitchDoorBlocks
call EnableAutoTextBoxDrawing
ld hl, Mansion3TrainerHeaders
ld de, PokemonMansion3F_ScriptPointers
@@ -8,55 +8,56 @@ PokemonMansion3F_Script:
ld [wPokemonMansion3FCurScript], a
ret
-Mansion3Script_52204:
+Mansion3CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
- jr nz, .asm_52224
+ jr nz, .switchTurnedOn
ld a, $e
lb bc, 2, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $5f
lb bc, 5, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
-.asm_52224
+.switchTurnedOn
ld a, $5f
lb bc, 2, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
lb bc, 5, 7
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
PokemonMansion3F_ScriptPointers:
- dw Mansion3Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const PokemonMansion3FDefaultScript, SCRIPT_POKEMONMANSION3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSION3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONMANSION3F_END_BATTLE
-Mansion3Script0:
- ld hl, CoordsData_52254
- call Mansion3Script_5225b
+PokemonMansion3FDefaultScript:
+ ld hl, .holeCoords
+ call .isPlayerFallingDownHole
ld a, [wWhichDungeonWarp]
and a
jp z, CheckFightingMapTrainers
cp $3
ld a, POKEMON_MANSION_1F
- jr nz, .asm_52250
+ jr nz, .fellDownHoleTo1F
ld a, POKEMON_MANSION_2F
-.asm_52250
+.fellDownHoleTo1F
ld [wDungeonWarpDestinationMap], a
ret
-CoordsData_52254:
+.holeCoords:
dbmapcoord 16, 14
dbmapcoord 17, 14
dbmapcoord 19, 14
db -1 ; end
-Mansion3Script_5225b:
+.isPlayerFallingDownHole:
xor a
ld [wWhichDungeonWarp], a
ld a, [wd72d]
@@ -78,62 +79,63 @@ Mansion3Script_Switches::
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $6
+ ld a, TEXT_POKEMONMANSION3F_SWITCH
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansion3F_TextPointers:
- dw Mansion3Text1
- dw Mansion3Text2
- dw PickUpItemText
- dw PickUpItemText
- dw Mansion3Text5
- dw Mansion3Text6
+ def_text_pointers
+ dw_const PokemonMansion3FSuperNerdText, TEXT_POKEMONMANSION3F_SUPER_NERD
+ dw_const PokemonMansion3FScientistText, TEXT_POKEMONMANSION3F_SCIENTIST
+ dw_const PickUpItemText, TEXT_POKEMONMANSION3F_MAX_POTION
+ dw_const PickUpItemText, TEXT_POKEMONMANSION3F_IRON
+ dw_const PokemonMansion3FDiaryText, TEXT_POKEMONMANSION3F_DIARY
+ dw_const PokemonMansion2FSwitchText, TEXT_POKEMONMANSION3F_SWITCH ; This switch uses the text script from the 2F.
Mansion3TrainerHeaders:
def_trainers
Mansion3TrainerHeader0:
- trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, Mansion3BattleText1, Mansion3EndBattleText1, Mansion3AfterBattleText1
+ trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, PokemonMansion3FSuperNerdBattleText, PokemonMansion3FSuperNerdEndBattleText, PokemonMansion3FSuperNerdAfterBattleText
Mansion3TrainerHeader1:
- trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, Mansion3BattleText2, Mansion3EndBattleText2, Mansion3AfterBattleText2
+ trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, PokemonMansion3FScientistBattleText, PokemonMansion3FScientistEndBattleText, PokemonMansion3FScientistAfterBattleText
db -1 ; end
-Mansion3Text1:
+PokemonMansion3FSuperNerdText:
text_asm
ld hl, Mansion3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Mansion3Text2:
+PokemonMansion3FScientistText:
text_asm
ld hl, Mansion3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Mansion3BattleText1:
- text_far _Mansion3BattleText1
+PokemonMansion3FSuperNerdBattleText:
+ text_far _PokemonMansion3FSuperNerdBattleText
text_end
-Mansion3EndBattleText1:
- text_far _Mansion3EndBattleText1
+PokemonMansion3FSuperNerdEndBattleText:
+ text_far _PokemonMansion3FSuperNerdEndBattleText
text_end
-Mansion3AfterBattleText1:
- text_far _Mansion3AfterBattleText1
+PokemonMansion3FSuperNerdAfterBattleText:
+ text_far _PokemonMansion3FSuperNerdAfterBattleText
text_end
-Mansion3BattleText2:
- text_far _Mansion3BattleText2
+PokemonMansion3FScientistBattleText:
+ text_far _PokemonMansion3FScientistBattleText
text_end
-Mansion3EndBattleText2:
- text_far _Mansion3EndBattleText2
+PokemonMansion3FScientistEndBattleText:
+ text_far _PokemonMansion3FScientistEndBattleText
text_end
-Mansion3AfterBattleText2:
- text_far _Mansion3AfterBattleText2
+PokemonMansion3FScientistAfterBattleText:
+ text_far _PokemonMansion3FScientistAfterBattleText
text_end
-Mansion3Text5:
- text_far _Mansion3Text5
+PokemonMansion3FDiaryText:
+ text_far _PokemonMansion3FDiaryText
text_end
diff --git a/scripts/PokemonMansionB1F.asm b/scripts/PokemonMansionB1F.asm
index 4ca84624..74f1648e 100644
--- a/scripts/PokemonMansionB1F.asm
+++ b/scripts/PokemonMansionB1F.asm
@@ -1,5 +1,5 @@
PokemonMansionB1F_Script:
- call Mansion4Script_523cf
+ call MansionB1FCheckReplaceSwitchDoorBlocks
call EnableAutoTextBoxDrawing
ld hl, Mansion4TrainerHeaders
ld de, PokemonMansionB1F_ScriptPointers
@@ -8,39 +8,39 @@ PokemonMansionB1F_Script:
ld [wPokemonMansionB1FCurScript], a
ret
-Mansion4Script_523cf:
+MansionB1FCheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
- jr nz, .asm_523ff
+ jr nz, .switchTurnedOn
ld a, $e
ld bc, $80d
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
ld bc, $b06
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $5f
ld bc, $304
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $54
ld bc, $808
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
-.asm_523ff
+.switchTurnedOn
ld a, $2d
ld bc, $80d
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $5f
ld bc, $b06
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
ld bc, $304
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ld a, $e
ld bc, $808
- call Mansion2Script_5202f
+ call Mansion2ReplaceBlock
ret
Mansion4Script_Switches::
@@ -49,70 +49,72 @@ Mansion4Script_Switches::
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $9
+ ld a, TEXT_POKEMONMANSIONB1F_SWITCH
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
PokemonMansionB1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POKEMONMANSIONB1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONMANSIONB1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONMANSIONB1F_END_BATTLE
PokemonMansionB1F_TextPointers:
- dw Mansion4Text1
- dw Mansion4Text2
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw Mansion4Text7
- dw PickUpItemText
- dw Mansion3Text6
+ def_text_pointers
+ dw_const PokemonMansionB1FBurglarText, TEXT_POKEMONMANSIONB1F_BURGLAR
+ dw_const PokemonMansionB1FScientistText, TEXT_POKEMONMANSIONB1F_SCIENTIST
+ dw_const PickUpItemText, TEXT_POKEMONMANSIONB1F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_POKEMONMANSIONB1F_FULL_RESTORE
+ dw_const PickUpItemText, TEXT_POKEMONMANSIONB1F_TM_BLIZZARD
+ dw_const PickUpItemText, TEXT_POKEMONMANSIONB1F_TM_SOLARBEAM
+ dw_const PokemonMansionB1FDiaryText, TEXT_POKEMONMANSIONB1F_DIARY
+ dw_const PickUpItemText, TEXT_POKEMONMANSIONB1F_SECRET_KEY
+ dw_const PokemonMansion2FSwitchText, TEXT_POKEMONMANSIONB1F_SWITCH ; This switch uses the text script from the 2F.
Mansion4TrainerHeaders:
def_trainers
Mansion4TrainerHeader0:
- trainer EVENT_BEAT_MANSION_4_TRAINER_0, 0, Mansion4BattleText1, Mansion4EndBattleText1, Mansion4AfterBattleText1
+ trainer EVENT_BEAT_MANSION_4_TRAINER_0, 0, PokemonMansionB1FBurglarBattleText, PokemonMansionB1FBurglarEndBattleText, PokemonMansionB1FBurglarAfterBattleText
Mansion4TrainerHeader1:
- trainer EVENT_BEAT_MANSION_4_TRAINER_1, 3, Mansion4BattleText2, Mansion4EndBattleText2, Mansion4AfterBattleText2
+ trainer EVENT_BEAT_MANSION_4_TRAINER_1, 3, PokemonMansionB1FScientistBattleText, PokemonMansionB1FScientistEndBattleText, PokemonMansionB1FScientistAfterBattleText
db -1 ; end
-Mansion4Text1:
+PokemonMansionB1FBurglarText:
text_asm
ld hl, Mansion4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Mansion4Text2:
+PokemonMansionB1FScientistText:
text_asm
ld hl, Mansion4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Mansion4BattleText1:
- text_far _Mansion4BattleText1
+PokemonMansionB1FBurglarBattleText:
+ text_far _PokemonMansionB1FBurglarBattleText
text_end
-Mansion4EndBattleText1:
- text_far _Mansion4EndBattleText1
+PokemonMansionB1FBurglarEndBattleText:
+ text_far _PokemonMansionB1FBurglarEndBattleText
text_end
-Mansion4AfterBattleText1:
- text_far _Mansion4AfterBattleText1
+PokemonMansionB1FBurglarAfterBattleText:
+ text_far _PokemonMansionB1FBurglarAfterBattleText
text_end
-Mansion4BattleText2:
- text_far _Mansion4BattleText2
+PokemonMansionB1FScientistBattleText:
+ text_far _PokemonMansionB1FScientistBattleText
text_end
-Mansion4EndBattleText2:
- text_far _Mansion4EndBattleText2
+PokemonMansionB1FScientistEndBattleText:
+ text_far _PokemonMansionB1FScientistEndBattleText
text_end
-Mansion4AfterBattleText2:
- text_far _Mansion4AfterBattleText2
+PokemonMansionB1FScientistAfterBattleText:
+ text_far _PokemonMansionB1FScientistAfterBattleText
text_end
-Mansion4Text7:
- text_far _Mansion4Text7
+PokemonMansionB1FDiaryText:
+ text_far _PokemonMansionB1FDiaryText
text_end
diff --git a/scripts/PokemonTower1F.asm b/scripts/PokemonTower1F.asm
index 0870364c..011627ed 100644
--- a/scripts/PokemonTower1F.asm
+++ b/scripts/PokemonTower1F.asm
@@ -3,28 +3,29 @@ PokemonTower1F_Script:
ret
PokemonTower1F_TextPointers:
- dw PokemonTower1Text1
- dw PokemonTower1Text2
- dw PokemonTower1Text3
- dw PokemonTower1Text4
- dw PokemonTower1Text5
+ def_text_pointers
+ dw_const PokemonTower1FReceptionistText, TEXT_POKEMONTOWER1F_RECEPTIONIST
+ dw_const PokemonTower1FMiddleAgedWomanText, TEXT_POKEMONTOWER1F_MIDDLE_AGED_WOMAN
+ dw_const PokemonTower1FBaldingGuyText, TEXT_POKEMONTOWER1F_BALDING_GUY
+ dw_const PokemonTower1FGirlText, TEXT_POKEMONTOWER1F_GIRL
+ dw_const PokemonTower1FChannelerText, TEXT_POKEMONTOWER1F_CHANNELER
-PokemonTower1Text1:
- text_far _PokemonTower1Text1
+PokemonTower1FReceptionistText:
+ text_far _PokemonTower1FReceptionistText
text_end
-PokemonTower1Text2:
- text_far _PokemonTower1Text2
+PokemonTower1FMiddleAgedWomanText:
+ text_far _PokemonTower1FMiddleAgedWomanText
text_end
-PokemonTower1Text3:
- text_far _PokemonTower1Text3
+PokemonTower1FBaldingGuyText:
+ text_far _PokemonTower1FBaldingGuyText
text_end
-PokemonTower1Text4:
- text_far _PokemonTower1Text4
+PokemonTower1FGirlText:
+ text_far _PokemonTower1FGirlText
text_end
-PokemonTower1Text5:
- text_far _PokemonTower1Text5
+PokemonTower1FChannelerText:
+ text_far _PokemonTower1FChannelerText
text_end
diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm
index b9a46f85..b4d09619 100644
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -4,26 +4,27 @@ PokemonTower2F_Script:
ld a, [wPokemonTower2FCurScript]
jp CallFunctionInTable
-PokemonTower2Script_604fe:
- xor a
+PokemonTower2FResetRivalEncounter:
+ xor a ; SCRIPT_POKEMONTOWER2F_DEFAULT
ld [wJoyIgnore], a
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
ret
PokemonTower2F_ScriptPointers:
- dw PokemonTower2Script0
- dw PokemonTower2Script1
- dw PokemonTower2Script2
+ def_script_pointers
+ dw_const PokemonTower2FDefaultScript, SCRIPT_POKEMONTOWER2F_DEFAULT
+ dw_const PokemonTower2FDefeatedRivalScript, SCRIPT_POKEMONTOWER2F_DEFEATED_RIVAL
+ dw_const PokemonTower2FRivalExitsScript, SCRIPT_POKEMONTOWER2F_RIVAL_EXITS
-PokemonTower2Script0:
+PokemonTower2FDefaultScript:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
ret nz
- ld hl, CoordsData_6055e
+ ld hl, PokemonTower2FRivalEncounterEventCoords
call ArePlayerCoordsInArray
ret nc
call StopAllMusic
@@ -35,19 +36,19 @@ ENDC
cp $1
ld a, PLAYER_DIR_UP
ld b, SPRITE_FACING_DOWN
- jr nz, .asm_60544
+ jr nz, .player_below_rival
; the rival is on the left side and the player is on the right side
SetEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT
ld a, PLAYER_DIR_LEFT
ld b, SPRITE_FACING_RIGHT
-.asm_60544
+.player_below_rival
ld [wPlayerMovingDirection], a
- ld a, $1
+ ld a, POKEMONTOWER2F_RIVAL
ldh [hSpriteIndex], a
ld a, b
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $1
+ ld a, TEXT_POKEMONTOWER2F_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -55,38 +56,38 @@ ENDC
ldh [hJoyPressed], a
ret
-CoordsData_6055e:
+PokemonTower2FRivalEncounterEventCoords:
dbmapcoord 15, 5
dbmapcoord 14, 6
db $0F ; end? (should be $ff?)
-PokemonTower2Script1:
+PokemonTower2FDefeatedRivalScript:
ld a, [wIsInBattle]
cp $ff
- jp z, PokemonTower2Script_604fe
- ld a, $f0
+ jp z, PokemonTower2FResetRivalEncounter
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
- ld a, $1
+ ld a, TEXT_POKEMONTOWER2F_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld de, MovementData_605b2
+ ld de, PokemonTower2FRivalDownThenRightMovement
CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT
- jr nz, .asm_60589
- callfar Func_f1e22
- ld de, MovementData_605a9
-.asm_60589
- ld a, $1
+ jr nz, .got_movement
+ callfar PokemonTower2FPikachuMovementScript
+ ld de, PokemonTower2FRivalRightThenDownMovement
+.got_movement
+ ld a, POKEMONTOWER2F_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
call StopAllMusic
farcall Music_RivalAlternateStart
- ld a, $2
+ ld a, SCRIPT_POKEMONTOWER2F_RIVAL_EXITS
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
ret
-MovementData_605a9:
+PokemonTower2FRivalRightThenDownMovement:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
@@ -97,7 +98,7 @@ MovementData_605a9:
db NPC_MOVEMENT_RIGHT
db -1 ; end
-MovementData_605b2:
+PokemonTower2FRivalDownThenRightMovement:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_RIGHT
@@ -108,7 +109,7 @@ MovementData_605b2:
db NPC_MOVEMENT_DOWN
db -1 ; end
-PokemonTower2Script2:
+PokemonTower2FRivalExitsScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -118,30 +119,31 @@ PokemonTower2Script2:
xor a
ld [wJoyIgnore], a
call PlayDefaultMusic
- ld a, $0
+ ld a, SCRIPT_POKEMONTOWER2F_DEFAULT
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
ret
PokemonTower2F_TextPointers:
- dw PokemonTower2Text1
- dw PokemonTower2Text2
+ def_text_pointers
+ dw_const PokemonTower2FRivalText, TEXT_POKEMONTOWER2F_RIVAL
+ dw_const PokemonTower2FChannelerText, TEXT_POKEMONTOWER2F_CHANNELER
-PokemonTower2Text1:
+PokemonTower2FRivalText:
text_asm
CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL
- jr z, .asm_16f24
- ld hl, PokemonTower2Text_6063c
+ jr z, .do_battle
+ ld hl, .HowsYourDexText
call PrintText
- jr .asm_41852
-.asm_16f24
- ld hl, PokemonTower2Text_6062d
+ jr .text_script_end
+.do_battle
+ ld hl, .WhatBringsYouHereText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, PokemonTower2Text_60632
- ld de, PokemonTower2Text_60637
+ ld hl, .DefeatedText
+ ld de, .VictoryText
call SaveEndBattleTextPointers
ld a, OPP_RIVAL2
ld [wCurOpponent], a
@@ -149,28 +151,28 @@ PokemonTower2Text1:
add $1
ld [wTrainerNo], a
- ld a, $1
+ ld a, SCRIPT_POKEMONTOWER2F_DEFEATED_RIVAL
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
-.asm_41852
+.text_script_end
jp TextScriptEnd
-PokemonTower2Text_6062d:
- text_far _PokemonTower2Text_6062d
+.WhatBringsYouHereText:
+ text_far _PokemonTower2FRivalWhatBringsYouHereText
text_end
-PokemonTower2Text_60632:
- text_far _PokemonTower2Text_60632
+.DefeatedText:
+ text_far _PokemonTower2FRivalDefeatedText
text_end
-PokemonTower2Text_60637:
- text_far _PokemonTower2Text_60637
+.VictoryText:
+ text_far _PokemonTower2FRivalVictoryText
text_end
-PokemonTower2Text_6063c:
- text_far _PokemonTower2Text_6063c
+.HowsYourDexText:
+ text_far _PokemonTower2FRivalHowsYourDexText
text_end
-PokemonTower2Text2:
- text_far _PokemonTower2Text2
+PokemonTower2FChannelerText:
+ text_far _PokemonTower2FChannelerText
text_end
diff --git a/scripts/PokemonTower2F_2.asm b/scripts/PokemonTower2F_2.asm
index 0dfbb965..9e801efa 100644
--- a/scripts/PokemonTower2F_2.asm
+++ b/scripts/PokemonTower2F_2.asm
@@ -1,10 +1,10 @@
-Func_f1e22::
- ld hl, PikachuMovementData_f1e2b
+PokemonTower2FPikachuMovementScript::
+ ld hl, PokemonTower2FPikachuMovement
ld b, SPRITE_FACING_RIGHT
call TryApplyPikachuMovementData
ret
-PikachuMovementData_f1e2b:
+PokemonTower2FPikachuMovement:
db $00
db $1d
db $1f
diff --git a/scripts/PokemonTower3F.asm b/scripts/PokemonTower3F.asm
index 158bc9d7..d7c81583 100644
--- a/scripts/PokemonTower3F.asm
+++ b/scripts/PokemonTower3F.asm
@@ -8,76 +8,78 @@ PokemonTower3F_Script:
ret
PokemonTower3F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POKEMONTOWER3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONTOWER3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONTOWER3F_END_BATTLE
PokemonTower3F_TextPointers:
- dw PokemonTower3Text1
- dw PokemonTower3Text2
- dw PokemonTower3Text3
- dw PickUpItemText
+ def_text_pointers
+ dw_const PokemonTower3FChanneler1Text, TEXT_POKEMONTOWER3F_CHANNELER1
+ dw_const PokemonTower3FChanneler2Text, TEXT_POKEMONTOWER3F_CHANNELER2
+ dw_const PokemonTower3FChanneler3Text, TEXT_POKEMONTOWER3F_CHANNELER3
+ dw_const PickUpItemText, TEXT_POKEMONTOWER3F_ESCAPE_ROPE
PokemonTower3TrainerHeaders:
def_trainers
PokemonTower3TrainerHeader0:
- trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_0, 2, PokemonTower3BattleText1, PokemonTower3EndBattleText1, PokemonTower3AfterBattleText1
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_0, 2, PokemonTower3FChanneler1BattleText, PokemonTower3FChanneler1EndBattleText, PokemonTower3FChanneler1AfterBattleText
PokemonTower3TrainerHeader1:
- trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_1, 3, PokemonTower3BattleText2, PokemonTower3EndBattleText2, PokemonTower3AfterBattleText2
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_1, 3, PokemonTower3FChanneler2BattleText, PokemonTower3FChanneler2EndBattleText, PokemonTower3FChanneler2AfterBattleText
PokemonTower3TrainerHeader2:
- trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_2, 2, PokemonTower3BattleText3, PokemonTower3EndBattleText3, PokemonTower3AfterBattleText3
+ trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_2, 2, PokemonTower3FChanneler3BattleText, PokemonTower3FChanneler3EndBattleText, PokemonTower3FChanneler3AfterBattleText
db -1 ; end
-PokemonTower3Text1:
+PokemonTower3FChanneler1Text:
text_asm
ld hl, PokemonTower3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-PokemonTower3Text2:
+PokemonTower3FChanneler2Text:
text_asm
ld hl, PokemonTower3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-PokemonTower3Text3:
+PokemonTower3FChanneler3Text:
text_asm
ld hl, PokemonTower3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-PokemonTower3BattleText1:
- text_far _PokemonTower3BattleText1
+PokemonTower3FChanneler1BattleText:
+ text_far _PokemonTower3FChanneler1BattleText
text_end
-PokemonTower3EndBattleText1:
- text_far _PokemonTower3EndBattleText1
+PokemonTower3FChanneler1EndBattleText:
+ text_far _PokemonTower3FChanneler1EndBattleText
text_end
-PokemonTower3AfterBattleText1:
- text_far _PokemonTower3AfterBattleText1
+PokemonTower3FChanneler1AfterBattleText:
+ text_far _PokemonTower3FChanneler1AfterBattleText
text_end
-PokemonTower3BattleText2:
- text_far _PokemonTower3BattleText2
+PokemonTower3FChanneler2BattleText:
+ text_far _PokemonTower3FChanneler2BattleText
text_end
-PokemonTower3EndBattleText2:
- text_far _PokemonTower3EndBattleText2
+PokemonTower3FChanneler2EndBattleText:
+ text_far _PokemonTower3FChanneler2EndBattleText
text_end
-PokemonTower3AfterBattleText2:
- text_far _PokemonTower3AfterBattleText2
+PokemonTower3FChanneler2AfterBattleText:
+ text_far _PokemonTower3FChanneler2AfterBattleText
text_end
-PokemonTower3BattleText3:
- text_far _PokemonTower3BattleText3
+PokemonTower3FChanneler3BattleText:
+ text_far _PokemonTower3FChanneler3BattleText
text_end
-PokemonTower3EndBattleText3:
- text_far _PokemonTower3EndBattleText3
+PokemonTower3FChanneler3EndBattleText:
+ text_far _PokemonTower3FChanneler3EndBattleText
text_end
-PokemonTower3AfterBattleText3:
- text_far _PokemonTower3AfterBattleText3
+PokemonTower3FChanneler3AfterBattleText:
+ text_far _PokemonTower3FChanneler3AfterBattleText
text_end
diff --git a/scripts/PokemonTower4F.asm b/scripts/PokemonTower4F.asm
index 9bd291d2..066ee277 100644
--- a/scripts/PokemonTower4F.asm
+++ b/scripts/PokemonTower4F.asm
@@ -8,78 +8,80 @@ PokemonTower4F_Script:
ret
PokemonTower4F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POKEMONTOWER4F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONTOWER4F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONTOWER4F_END_BATTLE
PokemonTower4F_TextPointers:
- dw PokemonTower4Text1
- dw PokemonTower4Text2
- dw PokemonTower4Text3
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const PokemonTower4FChanneler1Text, TEXT_POKEMONTOWER4F_CHANNELER1
+ dw_const PokemonTower4FChanneler2Text, TEXT_POKEMONTOWER4F_CHANNELER2
+ dw_const PokemonTower4FChanneler3Text, TEXT_POKEMONTOWER4F_CHANNELER3
+ dw_const PickUpItemText, TEXT_POKEMONTOWER4F_ELIXER
+ dw_const PickUpItemText, TEXT_POKEMONTOWER4F_AWAKENING
+ dw_const PickUpItemText, TEXT_POKEMONTOWER4F_HP_UP
PokemonTower4TrainerHeaders:
def_trainers
PokemonTower4TrainerHeader0:
- trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_0, 2, PokemonTower4BattleText1, PokemonTower4EndBattleText1, PokemonTower4AfterBattleText1
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_0, 2, PokemonTower4FChanneler1BattleText, PokemonTower4FChanneler1EndBattleText, PokemonTower4FChanneler1AfterBattleText
PokemonTower4TrainerHeader1:
- trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_1, 2, PokemonTower4BattleText2, PokemonTower4EndBattleText2, PokemonTower4AfterBattleText2
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_1, 2, PokemonTower4FChanneler2BattleText, PokemonTower4FChanneler2EndBattleText, PokemonTower4FChanneler2AfterBattleText
PokemonTower4TrainerHeader2:
- trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_2, 2, PokemonTower4BattleText3, PokemonTower4EndBattleText3, PokemonTower4AfterBattleText3
+ trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_2, 2, PokemonTower4FChanneler3BattleText, PokemonTower4FChanneler3EndBattleText, PokemonTower4FChanneler3AfterBattleText
db -1 ; end
-PokemonTower4Text1:
+PokemonTower4FChanneler1Text:
text_asm
ld hl, PokemonTower4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-PokemonTower4Text2:
+PokemonTower4FChanneler2Text:
text_asm
ld hl, PokemonTower4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-PokemonTower4Text3:
+PokemonTower4FChanneler3Text:
text_asm
ld hl, PokemonTower4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-PokemonTower4BattleText1:
- text_far _PokemonTower4BattleText1
+PokemonTower4FChanneler1BattleText:
+ text_far _PokemonTower4FChanneler1BattleText
text_end
-PokemonTower4EndBattleText1:
- text_far _PokemonTower4EndBattleText1
+PokemonTower4FChanneler1EndBattleText:
+ text_far _PokemonTower4FChanneler1EndBattleText
text_end
-PokemonTower4AfterBattleText1:
- text_far _PokemonTower4AfterBattleText1
+PokemonTower4FChanneler1AfterBattleText:
+ text_far _PokemonTower4FChanneler1AfterBattleText
text_end
-PokemonTower4BattleText2:
- text_far _PokemonTower4BattleText2
+PokemonTower4FChanneler2BattleText:
+ text_far _PokemonTower4FChanneler2BattleText
text_end
-PokemonTower4EndBattleText2:
- text_far _PokemonTower4EndBattleText2
+PokemonTower4FChanneler2EndBattleText:
+ text_far _PokemonTower4FChanneler2EndBattleText
text_end
-PokemonTower4AfterBattleText2:
- text_far _PokemonTower4AfterBattleText2
+PokemonTower4FChanneler2AfterBattleText:
+ text_far _PokemonTower4FChanneler2AfterBattleText
text_end
-PokemonTower4BattleText3:
- text_far _PokemonTower4BattleText3
+PokemonTower4FChanneler3BattleText:
+ text_far _PokemonTower4FChanneler3BattleText
text_end
-PokemonTower4EndBattleText3:
- text_far _PokemonTower4EndBattleText3
+PokemonTower4FChanneler3EndBattleText:
+ text_far _PokemonTower4FChanneler3EndBattleText
text_end
-PokemonTower4AfterBattleText3:
- text_far _PokemonTower4AfterBattleText3
+PokemonTower4FChanneler3AfterBattleText:
+ text_far _PokemonTower4FChanneler3AfterBattleText
text_end
diff --git a/scripts/PokemonTower5F.asm b/scripts/PokemonTower5F.asm
index 4d89befb..6482993d 100644
--- a/scripts/PokemonTower5F.asm
+++ b/scripts/PokemonTower5F.asm
@@ -8,24 +8,25 @@ PokemonTower5F_Script:
ret
PokemonTower5F_ScriptPointers:
- dw PokemonTower5Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const PokemonTower5FDefaultScript, SCRIPT_POKEMONTOWER5F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONTOWER5F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONTOWER5F_END_BATTLE
-PokemonTower5Script0:
- ld hl, CoordsData_60992
+PokemonTower5FDefaultScript:
+ ld hl, PokemonTower5FPurifiedZoneCoords
call ArePlayerCoordsInArray
- jr c, .asm_60960
+ jr c, .in_purified_zone
ld hl, wd72e
res 4, [hl]
ResetEvent EVENT_IN_PURIFIED_ZONE
jp CheckFightingMapTrainers
-.asm_60960
+.in_purified_zone
CheckAndSetEvent EVENT_IN_PURIFIED_ZONE
ret nz
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld hl, wd72e
set 4, [hl]
@@ -34,14 +35,14 @@ PokemonTower5Script0:
call Delay3
call Delay3
call GBFadeInFromWhite
- ld a, $7
+ ld a, TEXT_POKEMONTOWER5F_PURIFIEDZONE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
ret
-CoordsData_60992:
+PokemonTower5FPurifiedZoneCoords:
dbmapcoord 10, 8
dbmapcoord 11, 8
dbmapcoord 10, 9
@@ -49,102 +50,103 @@ CoordsData_60992:
db -1 ; end
PokemonTower5F_TextPointers:
- dw PokemonTower5Text1
- dw PokemonTower5Text2
- dw PokemonTower5Text3
- dw PokemonTower5Text4
- dw PokemonTower5Text5
- dw PickUpItemText
- dw PokemonTower5Text7
+ def_text_pointers
+ dw_const PokemonTower5FChanneler1Text, TEXT_POKEMONTOWER5F_CHANNELER1
+ dw_const PokemonTower5FChanneler2Text, TEXT_POKEMONTOWER5F_CHANNELER2
+ dw_const PokemonTower5FChanneler3Text, TEXT_POKEMONTOWER5F_CHANNELER3
+ dw_const PokemonTower5FChanneler4Text, TEXT_POKEMONTOWER5F_CHANNELER4
+ dw_const PokemonTower5FChanneler5Text, TEXT_POKEMONTOWER5F_CHANNELER5
+ dw_const PickUpItemText, TEXT_POKEMONTOWER5F_NUGGET
+ dw_const PokemonTower5FPurifiedZoneText, TEXT_POKEMONTOWER5F_PURIFIEDZONE
PokemonTower5TrainerHeaders:
def_trainers 2
PokemonTower5TrainerHeader0:
- trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_0, 2, PokemonTower5BattleText1, PokemonTower5EndBattleText1, PokemonTower5AfterBattleText1
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_0, 2, PokemonTower5FChanneler2BattleText, PokemonTower5FChanneler2EndBattleText, PokemonTower5FChanneler2AfterBattleText
PokemonTower5TrainerHeader1:
- trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_1, 3, PokemonTower5BattleText2, PokemonTower5EndBattleText2, PokemonTower5AfterBattleText2
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_1, 3, PokemonTower5FChanneler3BattleText, PokemonTower5FChanneler3EndBattleText, PokemonTower5FChanneler3AfterBattleText
PokemonTower5TrainerHeader2:
- trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_2, 2, PokemonTower5BattleText3, PokemonTower5EndBattleText3, PokemonTower5AfterBattleText3
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_2, 2, PokemonTower5FChanneler4BattleText, PokemonTower5FChanneler4EndBattleText, PokemonTower5FChanneler4AfterBattleText
PokemonTower5TrainerHeader3:
- trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_3, 2, PokemonTower5BattleText4, PokemonTower5EndBattleText4, PokemonTower5AfterBattleText4
+ trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_3, 2, PokemonTower5FChanneler5BattleText, PokemonTower5FChanneler5EndBattleText, PokemonTower5FChanneler5AfterBattleText
db -1 ; end
-PokemonTower5Text1:
- text_far _PokemonTower5Text1
+PokemonTower5FChanneler1Text:
+ text_far _PokemonTower5FChanneler1Text
text_end
-PokemonTower5Text2:
+PokemonTower5FChanneler2Text:
text_asm
ld hl, PokemonTower5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-PokemonTower5BattleText1:
- text_far _PokemonTower5BattleText1
+PokemonTower5FChanneler2BattleText:
+ text_far _PokemonTower5FChanneler2BattleText
text_end
-PokemonTower5EndBattleText1:
- text_far _PokemonTower5EndBattleText1
+PokemonTower5FChanneler2EndBattleText:
+ text_far _PokemonTower5FChanneler2EndBattleText
text_end
-PokemonTower5AfterBattleText1:
- text_far _PokemonTower5AfterBattleText1
+PokemonTower5FChanneler2AfterBattleText:
+ text_far _PokemonTower5FChanneler2AfterBattleText
text_end
-PokemonTower5Text3:
+PokemonTower5FChanneler3Text:
text_asm
ld hl, PokemonTower5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-PokemonTower5BattleText2:
- text_far _PokemonTower5BattleText2
+PokemonTower5FChanneler3BattleText:
+ text_far _PokemonTower5FChanneler3BattleText
text_end
-PokemonTower5EndBattleText2:
- text_far _PokemonTower5EndBattleText2
+PokemonTower5FChanneler3EndBattleText:
+ text_far _PokemonTower5FChanneler3EndBattleText
text_end
-PokemonTower5AfterBattleText2:
- text_far _PokemonTower5AfterBattleText2
+PokemonTower5FChanneler3AfterBattleText:
+ text_far _PokemonTower5FChanneler3AfterBattleText
text_end
-PokemonTower5Text4:
+PokemonTower5FChanneler4Text:
text_asm
ld hl, PokemonTower5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-PokemonTower5BattleText3:
- text_far _PokemonTower5BattleText3
+PokemonTower5FChanneler4BattleText:
+ text_far _PokemonTower5FChanneler4BattleText
text_end
-PokemonTower5EndBattleText3:
- text_far _PokemonTower5EndBattleText3
+PokemonTower5FChanneler4EndBattleText:
+ text_far _PokemonTower5FChanneler4EndBattleText
text_end
-PokemonTower5AfterBattleText3:
- text_far _PokemonTower5AfterBattleText3
+PokemonTower5FChanneler4AfterBattleText:
+ text_far _PokemonTower5FChanneler4AfterBattleText
text_end
-PokemonTower5Text5:
+PokemonTower5FChanneler5Text:
text_asm
ld hl, PokemonTower5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-PokemonTower5BattleText4:
- text_far _PokemonTower5BattleText4
+PokemonTower5FChanneler5BattleText:
+ text_far _PokemonTower5FChanneler5BattleText
text_end
-PokemonTower5EndBattleText4:
- text_far _PokemonTower5EndBattleText4
+PokemonTower5FChanneler5EndBattleText:
+ text_far _PokemonTower5FChanneler5EndBattleText
text_end
-PokemonTower5AfterBattleText4:
- text_far _PokemonTower5AfterBattleText4
+PokemonTower5FChanneler5AfterBattleText:
+ text_far _PokemonTower5FChanneler5AfterBattleText
text_end
-PokemonTower5Text7:
- text_far _PokemonTower5Text7
+PokemonTower5FPurifiedZoneText:
+ text_far _PokemonTower5FPurifiedZoneText
text_end
diff --git a/scripts/PokemonTower6F.asm b/scripts/PokemonTower6F.asm
index 03cb49f4..f2e99586 100644
--- a/scripts/PokemonTower6F.asm
+++ b/scripts/PokemonTower6F.asm
@@ -7,70 +7,71 @@ PokemonTower6F_Script:
ld [wPokemonTower6FCurScript], a
ret
-PokemonTower6Script_60b02:
+PokemonTower6FSetDefaultScript:
xor a
ld [wJoyIgnore], a
- ld [wPokemonTower6FCurScript], a
- ld [wCurMapScript], a
+ ld [wPokemonTower6FCurScript], a ; SCRIPT_POKEMONTOWER6F_DEFAULT
+ ld [wCurMapScript], a ; SCRIPT_POKEMONTOWER6F_DEFAULT
ret
PokemonTower6F_ScriptPointers:
- dw PokemonTower6Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw PokemonTower6Script3
- dw PokemonTower6Script4
+ def_script_pointers
+ dw_const PokemonTower6FDefaultScript, SCRIPT_POKEMONTOWER6F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POKEMONTOWER6F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POKEMONTOWER6F_END_BATTLE
+ dw_const PokemonTower6FPlayerMovingScript, SCRIPT_POKEMONTOWER6F_PLAYER_MOVING
+ dw_const PokemonTower6FMarowakBattleScript, SCRIPT_POKEMONTOWER6F_MAROWAK_BATTLE
-PokemonTower6Script0:
+PokemonTower6FDefaultScript:
CheckEvent EVENT_BEAT_GHOST_MAROWAK
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_60b45
+ ld hl, PokemonTower6FMarowakCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ldh [hJoyHeld], a
- ld a, $6
+ ld a, TEXT_POKEMONTOWER6F_BEGONE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, RESTLESS_SOUL
ld [wCurOpponent], a
ld a, 30
ld [wCurEnemyLVL], a
- ld a, $4
+ ld a, SCRIPT_POKEMONTOWER6F_MAROWAK_BATTLE
ld [wPokemonTower6FCurScript], a
ld [wCurMapScript], a
ret
-CoordsData_60b45:
+PokemonTower6FMarowakCoords:
dbmapcoord 10, 16
db -1 ; end
-PokemonTower6Script4:
+PokemonTower6FMarowakBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, PokemonTower6Script_60b02
- ld a, $ff
+ jp z, PokemonTower6FSetDefaultScript
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd72d]
bit 6, a
ret nz
call UpdateSprites
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wBattleResult]
and a
- jr nz, .asm_60b82
+ jr nz, .did_not_defeat
SetEvent EVENT_BEAT_GHOST_MAROWAK
- ld a, $7
+ ld a, TEXT_POKEMONTOWER6F_MAROWAK_DEPARTED
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_POKEMONTOWER6F_DEFAULT
ld [wPokemonTower6FCurScript], a
ld [wCurMapScript], a
ret
-.asm_60b82
+.did_not_defeat
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
ld a, $10
@@ -80,12 +81,12 @@ PokemonTower6Script4:
ld [wOverrideSimulatedJoypadStatesMask], a
ld hl, wd730
set 7, [hl]
- ld a, $3
+ ld a, SCRIPT_POKEMONTOWER6F_PLAYER_MOVING
ld [wPokemonTower6FCurScript], a
ld [wCurMapScript], a
ret
-PokemonTower6Script3:
+PokemonTower6FPlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -96,99 +97,100 @@ PokemonTower6Script3:
ret
PokemonTower6F_TextPointers:
- dw PokemonTower6Text1
- dw PokemonTower6Text2
- dw PokemonTower6Text3
- dw PickUpItemText
- dw PickUpItemText
- dw PokemonTower6Text6
- dw PokemonTower6Text7
+ def_text_pointers
+ dw_const PokemonTower6FChanneler1Text, TEXT_POKEMONTOWER6F_CHANNELER1
+ dw_const PokemonTower6FChanneler2Text, TEXT_POKEMONTOWER6F_CHANNELER2
+ dw_const PokemonTower6FChanneler3Text, TEXT_POKEMONTOWER6F_CHANNELER3
+ dw_const PickUpItemText, TEXT_POKEMONTOWER6F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_POKEMONTOWER6F_X_ACCURACY
+ dw_const PokemonTower6FBeGoneText, TEXT_POKEMONTOWER6F_BEGONE
+ dw_const PokemonTower6FMarowakDepartedText, TEXT_POKEMONTOWER6F_MAROWAK_DEPARTED
PokemonTower6TrainerHeaders:
def_trainers
PokemonTower6TrainerHeader0:
- trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_0, 3, PokemonTower6BattleText1, PokemonTower6EndBattleText1, PokemonTower6AfterBattleText1
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_0, 3, PokemonTower6FChanneler1BattleText, PokemonTower6FChanneler1EndBattleText, PokemonTower6FChanneler1AfterBattleText
PokemonTower6TrainerHeader1:
- trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_1, 3, PokemonTower6BattleText2, PokemonTower6EndBattleText2, PokemonTower6AfterBattleText2
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_1, 3, PokemonTower6FChanneler2BattleText, PokemonTower6FChanneler2EndBattleText, PokemonTower6FChanneler2AfterBattleText
PokemonTower6TrainerHeader2:
- trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_2, 2, PokemonTower6BattleText3, PokemonTower6EndBattleText3, PokemonTower6AfterBattleText3
+ trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_2, 2, PokemonTower6FChanneler3BattleText, PokemonTower6FChanneler3EndBattleText, PokemonTower6FChanneler3AfterBattleText
db -1 ; end
-PokemonTower6Text1:
+PokemonTower6FChanneler1Text:
text_asm
ld hl, PokemonTower6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-PokemonTower6Text2:
+PokemonTower6FChanneler2Text:
text_asm
ld hl, PokemonTower6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-PokemonTower6Text3:
+PokemonTower6FChanneler3Text:
text_asm
ld hl, PokemonTower6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-PokemonTower6Text7:
+PokemonTower6FMarowakDepartedText:
text_asm
- ld hl, PokemonTower2Text_60c1f
+ ld hl, PokemonTower6FGhostWasCubonesMotherText
call PrintText
ld a, RESTLESS_SOUL
call PlayCry
call WaitForSoundToFinish
ld c, 30
call DelayFrames
- ld hl, PokemonTower2Text_60c24
+ ld hl, PokemonTower6FSoulWasCalmedText
call PrintText
jp TextScriptEnd
-PokemonTower2Text_60c1f:
- text_far _PokemonTower2Text_60c1f
+PokemonTower6FGhostWasCubonesMotherText:
+ text_far _PokemonTower6FGhostWasCubonesMotherText
text_end
-PokemonTower2Text_60c24:
- text_far _PokemonTower2Text_60c24
+PokemonTower6FSoulWasCalmedText:
+ text_far _PokemonTower6FSoulWasCalmedText
text_end
-PokemonTower6BattleText1:
- text_far _PokemonTower6BattleText1
+PokemonTower6FChanneler1BattleText:
+ text_far _PokemonTower6FChanneler1BattleText
text_end
-PokemonTower6EndBattleText1:
- text_far _PokemonTower6EndBattleText1
+PokemonTower6FChanneler1EndBattleText:
+ text_far _PokemonTower6FChanneler1EndBattleText
text_end
-PokemonTower6AfterBattleText1:
- text_far _PokemonTower6AfterBattleText1
+PokemonTower6FChanneler1AfterBattleText:
+ text_far _PokemonTower6FChanneler1AfterBattleText
text_end
-PokemonTower6BattleText2:
- text_far _PokemonTower6BattleText2
+PokemonTower6FChanneler2BattleText:
+ text_far _PokemonTower6FChanneler2BattleText
text_end
-PokemonTower6EndBattleText2:
- text_far _PokemonTower6EndBattleText2
+PokemonTower6FChanneler2EndBattleText:
+ text_far _PokemonTower6FChanneler2EndBattleText
text_end
-PokemonTower6AfterBattleText2:
- text_far _PokemonTower6AfterBattleText2
+PokemonTower6FChanneler2AfterBattleText:
+ text_far _PokemonTower6FChanneler2AfterBattleText
text_end
-PokemonTower6BattleText3:
- text_far _PokemonTower6BattleText3
+PokemonTower6FChanneler3BattleText:
+ text_far _PokemonTower6FChanneler3BattleText
text_end
-PokemonTower6EndBattleText3:
- text_far _PokemonTower6EndBattleText3
+PokemonTower6FChanneler3EndBattleText:
+ text_far _PokemonTower6FChanneler3EndBattleText
text_end
-PokemonTower6AfterBattleText3:
- text_far _PokemonTower6AfterBattleText3
+PokemonTower6FChanneler3AfterBattleText:
+ text_far _PokemonTower6FChanneler3AfterBattleText
text_end
-PokemonTower6Text6:
- text_far _PokemonTower6Text6
+PokemonTower6FBeGoneText:
+ text_far _PokemonTower6FBeGoneText
text_end
diff --git a/scripts/PokemonTower7F.asm b/scripts/PokemonTower7F.asm
index c9da74f7..d0332cb6 100644
--- a/scripts/PokemonTower7F.asm
+++ b/scripts/PokemonTower7F.asm
@@ -5,37 +5,38 @@ PokemonTower7F_Script:
call CallFunctionInTable
ret
-PokemonTower7Script_60d01:
+PokemonTower7FSetDefaultScript:
xor a
ld [wJoyIgnore], a
-PokemonTower7Script_60d05:
+PokemonTower7FSetScript:
ld [wPokemonTower7FCurScript], a
ret
PokemonTower7F_ScriptPointers:
- dw PokemonTower7Script0
- dw PokemonTower7Script1
- dw PokemonTower7Script2
- dw PokemonTower7Script3
- dw PokemonTower7Script4
- dw PokemonTower7Script5
- dw PokemonTower7Script6
- dw PokemonTower7Script7
- dw PokemonTower7Script8
- dw PokemonTower7Script9
- dw PokemonTower7Script10
- dw PokemonTower7Script11
+ def_script_pointers
+ dw_const PokemonTower7FScript0, SCRIPT_POKEMONTOWER7F_SCRIPT0
+ dw_const PokemonTower7FScript1, SCRIPT_POKEMONTOWER7F_SCRIPT1
+ dw_const PokemonTower7FScript2, SCRIPT_POKEMONTOWER7F_SCRIPT2
+ dw_const PokemonTower7FScript3, SCRIPT_POKEMONTOWER7F_SCRIPT3
+ dw_const PokemonTower7FScript4, SCRIPT_POKEMONTOWER7F_SCRIPT4
+ dw_const PokemonTower7FScript5, SCRIPT_POKEMONTOWER7F_SCRIPT5
+ dw_const PokemonTower7FScript6, SCRIPT_POKEMONTOWER7F_SCRIPT6
+ dw_const PokemonTower7FScript7, SCRIPT_POKEMONTOWER7F_SCRIPT7
+ dw_const PokemonTower7FScript8, SCRIPT_POKEMONTOWER7F_SCRIPT8
+ dw_const PokemonTower7FScript9, SCRIPT_POKEMONTOWER7F_SCRIPT9
+ dw_const PokemonTower7FScript10, SCRIPT_POKEMONTOWER7F_SCRIPT10
+ dw_const PokemonTower7FWarpToMrFujiHouseScript, SCRIPT_POKEMONTOWER7F_WARP_TO_MR_FUJI_HOUSE
-PokemonTower7Script0:
+PokemonTower7FScript0:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
- call z, PokemonTower7Script_60d2a
+ call z, PokemonTower7FScript_60d2a
ret
-PokemonTower7Script_60d2a:
+PokemonTower7FScript_60d2a:
ld a, [wYCoord]
cp $c
ret nz
@@ -57,101 +58,102 @@ PokemonTower7Script_60d2a:
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
ld a, HS_POKEMON_TOWER_7F_JESSIE
- call PokemonTower7Script_60eaf
+ call PokemonTower7FScript_ShowObject
ld a, HS_POKEMON_TOWER_7F_JAMES
- call PokemonTower7Script_60eaf
+ call PokemonTower7FScript_ShowObject
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $4
+ ld a, TEXT_POKEMONTOWER7F_TEXT4
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $1
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT1
+ call PokemonTower7FSetScript
ret
-PokemonTower7MovementData_60d7a:
+PokemonTower7FMovementData_60d7a:
db $4
-PokemonTower7MovementData_60d7b:
+PokemonTower7FMovementData_60d7b:
db $4
db $4
db $4
db $FF
-PokemonTower7Script1:
- ld de, PokemonTower7MovementData_60d7b
+PokemonTower7FScript1:
+ ld de, PokemonTower7FMovementData_60d7b
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
jr z, .asm_60d8c
- ld de, PokemonTower7MovementData_60d7a
+ ld de, PokemonTower7FMovementData_60d7a
.asm_60d8c
- ld a, $1
+ ld a, POKEMONTOWER7F_JESSIE
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $2
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT2
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script2:
- ld a, $ff
+PokemonTower7FScript2:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-PokemonTower7Script3:
- ld a, $0
+PokemonTower7FScript3:
+ ld a, SPRITE_FACING_DOWN
ld [wSprite01StateData1FacingDirection], a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
jr z, .asm_60dba
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a
.asm_60dba
ld a, $2
ld [wSprite01StateData1MovementStatus], a
-PokemonTower7Script4:
- ld de, PokemonTower7MovementData_60d7a
+PokemonTower7FScript4:
+ ld de, PokemonTower7FMovementData_60d7a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
jr z, .asm_60dcc
- ld de, PokemonTower7MovementData_60d7b
+ ld de, PokemonTower7FMovementData_60d7b
.asm_60dcc
- ld a, $2
+ ld a, POKEMONTOWER7F_JAMES
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $5
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT5
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script5:
- ld a, $ff
+
+PokemonTower7FScript5:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-PokemonTower7Script6:
+PokemonTower7FScript6:
ld a, $2
ld [wSprite02StateData1MovementStatus], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSprite02StateData1FacingDirection], a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
jr z, .asm_60dff
- ld a, $0
+ ld a, SPRITE_FACING_DOWN
ld [wSprite02StateData1FacingDirection], a
.asm_60dff
call Delay3
ld a, ~(A_BUTTON | B_BUTTON)
ld [wJoyIgnore], a
- ld a, $5
+ ld a, TEXT_POKEMONTOWER7F_TEXT5
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-PokemonTower7Script7:
+PokemonTower7FScript7:
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, PokemonTower7JessieJamesEndBattleText
- ld de, PokemonTower7JessieJamesEndBattleText
+ ld hl, PokemonTower7FJessieJamesEndBattleText
+ ld de, PokemonTower7FJessieJamesEndBattleText
call SaveEndBattleTextPointers
ld a, OPP_ROCKET
ld [wCurOpponent], a
@@ -160,16 +162,16 @@ PokemonTower7Script7:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
- ld a, $8
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT8
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script8:
- ld a, $ff
+PokemonTower7FScript8:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wIsInBattle]
cp $ff
- jp z, PokemonTower7Script_60d01
+ jp z, PokemonTower7FSetDefaultScript
ld a, $2
ld [wSprite01StateData1MovementStatus], a
ld [wSprite02StateData1MovementStatus], a
@@ -180,7 +182,7 @@ PokemonTower7Script8:
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $6
+ ld a, TEXT_POKEMONTOWER7F_TEXT6
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -189,51 +191,51 @@ PokemonTower7Script8:
ld c, BANK(Music_MeetJessieJames)
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $9
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT9
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script9:
- ld a, $ff
+PokemonTower7FScript9:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call GBFadeOutToBlack
ld a, HS_POKEMON_TOWER_7F_JESSIE
- call PokemonTower7Script_60ebe
+ call PokemonTower7FScript_HideObject
ld a, HS_POKEMON_TOWER_7F_JAMES
- call PokemonTower7Script_60ebe
+ call PokemonTower7FScript_HideObject
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- ld a, $a
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT10
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script10:
+PokemonTower7FScript10:
call PlayDefaultMusic
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
- ld a, $0
- call PokemonTower7Script_60d05
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT0
+ call PokemonTower7FSetScript
ret
-PokemonTower7Script_60eaf:
+PokemonTower7FScript_ShowObject:
ld [wMissableObjectIndex], a
predef ShowObject
call UpdateSprites
call Delay3
ret
-PokemonTower7Script_60ebe:
+PokemonTower7FScript_HideObject:
ld [wMissableObjectIndex], a
predef HideObject
ret
-PokemonTower7Script11:
- ld a, $ff
+PokemonTower7FWarpToMrFujiHouseScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, HS_POKEMON_TOWER_7F_MR_FUJI
ld [wMissableObjectIndex], a
@@ -248,23 +250,23 @@ PokemonTower7Script11:
ld [wLastMap], a
ld hl, wd72d
set 3, [hl]
- ld a, $0
+ ld a, SCRIPT_POKEMONTOWER7F_SCRIPT0
ld [wPokemonTower7FCurScript], a
ret
PokemonTower7F_TextPointers:
- dw PokemonTower7Text1
- dw PokemonTower7Text2
- dw PokemonTower7Text3
- dw PokemonTower7Text4
- dw PokemonTower7Text5
- dw PokemonTower7Text6
+ def_text_pointers
+ dw_const PokemonTower7FJessieJamesText, TEXT_POKEMONTOWER7F_JESSIE
+ dw_const PokemonTower7FJessieJamesText, TEXT_POKEMONTOWER7F_JAMES
+ dw_const PokemonTower7FMrFujiText, TEXT_POKEMONTOWER7F_MR_FUJI
+ dw_const PokemonTower7FText4, TEXT_POKEMONTOWER7F_TEXT4
+ dw_const PokemonTower7FText5, TEXT_POKEMONTOWER7F_TEXT5
+ dw_const PokemonTower7FText6, TEXT_POKEMONTOWER7F_TEXT6
-PokemonTower7Text1:
-PokemonTower7Text2:
+PokemonTower7FJessieJamesText:
text_end
-PokemonTower7Text4:
+PokemonTower7FText4:
text_far _PokemonTowerJessieJamesText1
text_asm
ld c, 10
@@ -280,24 +282,24 @@ PokemonTower7Text4:
call DelayFrames
jp TextScriptEnd
-PokemonTower7Text5:
+PokemonTower7FText5:
text_far _PokemonTowerJessieJamesText2
text_end
-PokemonTower7JessieJamesEndBattleText:
+PokemonTower7FJessieJamesEndBattleText:
text_far _PokemonTowerJessieJamesText3
text_end
-PokemonTower7Text6:
+PokemonTower7FText6:
text_far _PokemonTowerJessieJamesText4
text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
-PokemonTower7Text3:
+PokemonTower7FMrFujiText:
text_asm
- ld hl, PokemonTower7Text_60f75
+ ld hl, .RescueText
call PrintText
SetEvent EVENT_RESCUED_MR_FUJI
SetEvent EVENT_RESCUED_MR_FUJI_2
@@ -310,10 +312,10 @@ PokemonTower7Text3:
ld a, HS_SAFFRON_CITY_F
ld [wMissableObjectIndex], a
predef ShowObject
- ld a, $b
+ ld a, SCRIPT_POKEMONTOWER7F_WARP_TO_MR_FUJI_HOUSE
ld [wPokemonTower7FCurScript], a
jp TextScriptEnd
-PokemonTower7Text_60f75:
- text_far _TowerRescueFujiText
+.RescueText:
+ text_far _PokemonTower7FMrFujiRescueText
text_end
diff --git a/scripts/PowerPlant.asm b/scripts/PowerPlant.asm
index 67056e07..568d79d2 100644
--- a/scripts/PowerPlant.asm
+++ b/scripts/PowerPlant.asm
@@ -8,105 +8,107 @@ PowerPlant_Script:
ret
PowerPlant_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_POWERPLANT_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_POWERPLANT_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_POWERPLANT_END_BATTLE
PowerPlant_TextPointers:
- dw Voltorb0Text
- dw Voltorb1Text
- dw Voltorb2Text
- dw Voltorb3Text
- dw Voltorb4Text
- dw Voltorb5Text
- dw Voltorb6Text
- dw Voltorb7Text
- dw ZapdosText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const PowerPlantVoltorb1Text, TEXT_POWERPLANT_VOLTORB1
+ dw_const PowerPlantVoltorb2Text, TEXT_POWERPLANT_VOLTORB2
+ dw_const PowerPlantVoltorb3Text, TEXT_POWERPLANT_VOLTORB3
+ dw_const PowerPlantElectrode1Text, TEXT_POWERPLANT_ELECTRODE1
+ dw_const PowerPlantVoltorb4Text, TEXT_POWERPLANT_VOLTORB4
+ dw_const PowerPlantVoltorb5Text, TEXT_POWERPLANT_VOLTORB5
+ dw_const PowerPlantElectrode2Text, TEXT_POWERPLANT_ELECTRODE2
+ dw_const PowerPlantVoltorb6Text, TEXT_POWERPLANT_VOLTORB6
+ dw_const PowerPlantZapdosText, TEXT_POWERPLANT_ZAPDOS
+ dw_const PickUpItemText, TEXT_POWERPLANT_CARBOS
+ dw_const PickUpItemText, TEXT_POWERPLANT_HP_UP
+ dw_const PickUpItemText, TEXT_POWERPLANT_RARE_CANDY
+ dw_const PickUpItemText, TEXT_POWERPLANT_TM_THUNDER
+ dw_const PickUpItemText, TEXT_POWERPLANT_TM_REFLECT
PowerPlantTrainerHeaders:
def_trainers
Voltorb0TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_0, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_0, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb1TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_1, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_1, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb2TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_2, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_2, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb3TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_3, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_3, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb4TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_4, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_4, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb5TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_5, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_5, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb6TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_6, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_6, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
Voltorb7TrainerHeader:
- trainer EVENT_BEAT_POWER_PLANT_VOLTORB_7, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText
+ trainer EVENT_BEAT_POWER_PLANT_VOLTORB_7, 0, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText, PowerPlantVoltorbBattleText
ZapdosTrainerHeader:
- trainer EVENT_BEAT_ZAPDOS, 0, ZapdosBattleText, ZapdosBattleText, ZapdosBattleText
+ trainer EVENT_BEAT_ZAPDOS, 0, PowerPlantZapdosBattleText, PowerPlantZapdosBattleText, PowerPlantZapdosBattleText
db -1 ; end
-InitVoltorbBattle:
+PowerPlantInitBattleScript:
call TalkToTrainer
ld a, [wCurMapScript]
ld [wPowerPlantCurScript], a
jp TextScriptEnd
-Voltorb0Text:
+PowerPlantVoltorb1Text:
text_asm
ld hl, Voltorb0TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb1Text:
+PowerPlantVoltorb2Text:
text_asm
ld hl, Voltorb1TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb2Text:
+PowerPlantVoltorb3Text:
text_asm
ld hl, Voltorb2TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb3Text:
+PowerPlantElectrode1Text:
text_asm
ld hl, Voltorb3TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb4Text:
+PowerPlantVoltorb4Text:
text_asm
ld hl, Voltorb4TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb5Text:
+PowerPlantVoltorb5Text:
text_asm
ld hl, Voltorb5TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb6Text:
+PowerPlantElectrode2Text:
text_asm
ld hl, Voltorb6TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-Voltorb7Text:
+PowerPlantVoltorb6Text:
text_asm
ld hl, Voltorb7TrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-ZapdosText:
+PowerPlantZapdosText:
text_asm
ld hl, ZapdosTrainerHeader
- jr InitVoltorbBattle
+ jr PowerPlantInitBattleScript
-VoltorbBattleText:
- text_far _VoltorbBattleText
+PowerPlantVoltorbBattleText:
+ text_far _PowerPlantVoltorbBattleText
text_end
-ZapdosBattleText:
- text_far _ZapdosBattleText
+PowerPlantZapdosBattleText:
+ text_far _PowerPlantZapdosBattleText
text_asm
ld a, ZAPDOS
call PlayCry
diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm
index 4af4a2e6..84ace5ad 100644
--- a/scripts/RedsHouse1F.asm
+++ b/scripts/RedsHouse1F.asm
@@ -3,15 +3,16 @@ RedsHouse1F_Script:
ret
RedsHouse1F_TextPointers:
- dw RedsHouse1FMomText
- dw RedsHouse1FTVText
+ def_text_pointers
+ dw_const RedsHouse1FMomText, TEXT_REDSHOUSE1F_MOM
+ dw_const RedsHouse1FTVText, TEXT_REDSHOUSE1F_TV
RedsHouse1FMomText:
text_asm
- callfar Func_f1b73
+ callfar RedsHouse1FPrintMomText
jp TextScriptEnd
RedsHouse1FTVText:
text_asm
- callfar Func_f1bc4
+ callfar RedsHouse1FPrintTVText
jp TextScriptEnd
diff --git a/scripts/RedsHouse1F2.asm b/scripts/RedsHouse1F2.asm
deleted file mode 100644
index fc4a5cdb..00000000
--- a/scripts/RedsHouse1F2.asm
+++ /dev/null
@@ -1,57 +0,0 @@
-Func_f1b73::
- ld a, [wd72e]
- bit 3, a ; received a Pokémon from Oak?
- jp nz, MomHealPokemon
- ld hl, MomWakeUpText
- call PrintText
- ret
-
-MomWakeUpText:
- text_far _MomWakeUpText
- text_end
-
-MomHealPokemon:
- ld hl, MomHealText1
- call PrintText
- call GBFadeOutToWhite
- call ReloadMapData
- predef HealParty
- ld a, MUSIC_PKMN_HEALED
- ld [wNewSoundID], a
- call PlaySound
-.next
- ld a, [wChannelSoundIDs]
- cp MUSIC_PKMN_HEALED
- jr z, .next
- ld a, [wMapMusicSoundID]
- ld [wNewSoundID], a
- call PlaySound
- call GBFadeInFromWhite
- ld hl, MomHealText2
- call PrintText
- ret
-
-MomHealText1:
- text_far _MomHealText1
- text_end
-MomHealText2:
- text_far _MomHealText2
- text_end
-
-Func_f1bc4::
- ld hl, TVWrongSideText
- ld a, [wSpritePlayerStateData1FacingDirection]
- cp SPRITE_FACING_UP
- jp nz, .got_text
- ld hl, StandByMeText
-.got_text
- call PrintText
- ret
-
-StandByMeText:
- text_far _StandByMeText
- text_end
-
-TVWrongSideText:
- text_far _TVWrongSideText
- text_end
diff --git a/scripts/RedsHouse1F_2.asm b/scripts/RedsHouse1F_2.asm
new file mode 100644
index 00000000..c7e37989
--- /dev/null
+++ b/scripts/RedsHouse1F_2.asm
@@ -0,0 +1,57 @@
+RedsHouse1FPrintMomText::
+ ld a, [wd72e]
+ bit 3, a ; received a Pokémon from Oak?
+ jp nz, RedsHouse1FMomHealScript
+ ld hl, .WakeUpText
+ call PrintText
+ ret
+
+.WakeUpText:
+ text_far _RedsHouse1FMomWakeUpText
+ text_end
+
+RedsHouse1FMomHealScript:
+ ld hl, RedsHouse1FMomYouShouldRestText
+ call PrintText
+ call GBFadeOutToWhite
+ call ReloadMapData
+ predef HealParty
+ ld a, MUSIC_PKMN_HEALED
+ ld [wNewSoundID], a
+ call PlaySound
+.next
+ ld a, [wChannelSoundIDs]
+ cp MUSIC_PKMN_HEALED
+ jr z, .next
+ ld a, [wMapMusicSoundID]
+ ld [wNewSoundID], a
+ call PlaySound
+ call GBFadeInFromWhite
+ ld hl, RedsHouse1FMomLookingGreatText
+ call PrintText
+ ret
+
+RedsHouse1FMomYouShouldRestText:
+ text_far _RedsHouse1FMomYouShouldRestText
+ text_end
+RedsHouse1FMomLookingGreatText:
+ text_far _RedsHouse1FMomLookingGreatText
+ text_end
+
+RedsHouse1FPrintTVText::
+ ld hl, .WrongSideText
+ ld a, [wSpritePlayerStateData1FacingDirection]
+ cp SPRITE_FACING_UP
+ jp nz, .got_text
+ ld hl, .StandByMeMovieText
+.got_text
+ call PrintText
+ ret
+
+.StandByMeMovieText:
+ text_far _RedsHouse1FTVStandByMeMovieText
+ text_end
+
+.WrongSideText:
+ text_far _RedsHouse1FTVWrongSideText
+ text_end
diff --git a/scripts/RedsHouse2F.asm b/scripts/RedsHouse2F.asm
index 4eb465c4..6e8bd2dd 100644
--- a/scripts/RedsHouse2F.asm
+++ b/scripts/RedsHouse2F.asm
@@ -6,19 +6,17 @@ RedsHouse2F_Script:
ret
RedsHouse2F_ScriptPointers:
- dw RedsHouse2FScript0
- dw RedsHouse2FScript1
- dw RedsHouse2FScript2
- dw RedsHouse2FScript3
- dw RedsHouse2FScript4
+ def_script_pointers
+ dw_const RedsHouse2FDefaultScript, SCRIPT_REDSHOUSE2F_DEFAULT0
+ dw_const RedsHouse2FDefaultScript, SCRIPT_REDSHOUSE2F_DEFAULT1
+ dw_const RedsHouse2FDefaultScript, SCRIPT_REDSHOUSE2F_DEFAULT2
+ dw_const RedsHouse2FDefaultScript, SCRIPT_REDSHOUSE2F_DEFAULT3
+ dw_const RedsHouse2FDefaultScript, SCRIPT_REDSHOUSE2F_DEFAULT4
-RedsHouse2FScript0:
-RedsHouse2FScript1:
-RedsHouse2FScript2:
-RedsHouse2FScript3:
-RedsHouse2FScript4:
+RedsHouse2FDefaultScript:
ret
RedsHouse2F_TextPointers:
+ def_text_pointers
text_end ; unused
diff --git a/scripts/RockTunnel1F.asm b/scripts/RockTunnel1F.asm
index cafdbe62..234a506d 100644
--- a/scripts/RockTunnel1F.asm
+++ b/scripts/RockTunnel1F.asm
@@ -8,159 +8,161 @@ RockTunnel1F_Script:
ret
RockTunnel1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROCKTUNNEL1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKTUNNEL1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROCKTUNNEL1F_END_BATTLE
RockTunnel1F_TextPointers:
- dw RockTunnel1Text1
- dw RockTunnel1Text2
- dw RockTunnel1Text3
- dw RockTunnel1Text4
- dw RockTunnel1Text5
- dw RockTunnel1Text6
- dw RockTunnel1Text7
- dw RockTunnel1Text8
+ def_text_pointers
+ dw_const RockTunnel1FHiker1Text, TEXT_ROCKTUNNEL1F_HIKER1
+ dw_const RockTunnel1FHiker2Text, TEXT_ROCKTUNNEL1F_HIKER2
+ dw_const RockTunnel1FHiker3Text, TEXT_ROCKTUNNEL1F_HIKER3
+ dw_const RockTunnel1FSuperNerdText, TEXT_ROCKTUNNEL1F_SUPER_NERD
+ dw_const RockTunnel1FCooltrainerF1Text, TEXT_ROCKTUNNEL1F_COOLTRAINER_F1
+ dw_const RockTunnel1FCooltrainerF2Text, TEXT_ROCKTUNNEL1F_COOLTRAINER_F2
+ dw_const RockTunnel1FCooltrainerF3Text, TEXT_ROCKTUNNEL1F_COOLTRAINER_F3
+ dw_const RockTunnel1FSignText, TEXT_ROCKTUNNEL1F_SIGN
RockTunnel1TrainerHeaders:
def_trainers
RockTunnel1TrainerHeader0:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0, 4, RockTunnel1BattleText1, RockTunnel1EndBattleText1, RockTunnel1AfterBattleText1
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0, 4, RockTunnel1FHiker1BattleText, RockTunnel1FHiker1EndBattleText, RockTunnel1FHiker1AfterBattleText
RockTunnel1TrainerHeader1:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1, 4, RockTunnel1BattleText2, RockTunnel1EndBattleText2, RockTunnel1AfterBattleText2
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1, 4, RockTunnel1FHiker2BattleText, RockTunnel1FHiker2EndBattleText, RockTunnel1FHiker2AfterBattleText
RockTunnel1TrainerHeader2:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2, 3, RockTunnel1BattleText3, RockTunnel1EndBattleText3, RockTunnel1AfterBattleText3
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2, 3, RockTunnel1FHiker3BattleText, RockTunnel1FHiker3EndBattleText, RockTunnel1FHiker3AfterBattleText
RockTunnel1TrainerHeader3:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3, 3, RockTunnel1BattleText4, RockTunnel1EndBattleText4, RockTunnel1AfterBattleText4
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3, 3, RockTunnel1FSuperNerdBattleText, RockTunnel1FSuperNerdEndBattleText, RockTunnel1FSuperNerdAfterBattleText
RockTunnel1TrainerHeader4:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4, 4, RockTunnel1BattleText5, RockTunnel1EndBattleText5, RockTunnel1AfterBattleText5
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4, 4, RockTunnel1FCooltrainerF1BattleText, RockTunnel1FCooltrainerF1EndBattleText, RockTunnel1FCooltrainerF1AfterBattleText
RockTunnel1TrainerHeader5:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5, 4, RockTunnel1BattleText6, RockTunnel1EndBattleText6, RockTunnel1AfterBattleText6
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5, 4, RockTunnel1FCooltrainerF2BattleText, RockTunnel1FCooltrainerF2EndBattleText, RockTunnel1FCooltrainerF2AfterBattleText
RockTunnel1TrainerHeader6:
- trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6, 4, RockTunnel1BattleText7, RockTunnel1EndBattleText7, RockTunnel1AfterBattleText7
+ trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6, 4, RockTunnel1FCooltrainerF3BattleText, RockTunnel1FCooltrainerF3EndBattleText, RockTunnel1FCooltrainerF3AfterBattleText
db -1 ; end
-RockTunnel1Text1:
+RockTunnel1FHiker1Text:
text_asm
ld hl, RockTunnel1TrainerHeader0
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text2:
+RockTunnel1FHiker2Text:
text_asm
ld hl, RockTunnel1TrainerHeader1
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text3:
+RockTunnel1FHiker3Text:
text_asm
ld hl, RockTunnel1TrainerHeader2
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text4:
+RockTunnel1FSuperNerdText:
text_asm
ld hl, RockTunnel1TrainerHeader3
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text5:
+RockTunnel1FCooltrainerF1Text:
text_asm
ld hl, RockTunnel1TrainerHeader4
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text6:
+RockTunnel1FCooltrainerF2Text:
text_asm
ld hl, RockTunnel1TrainerHeader5
- jr RockTunnel1TalkToTrainer
+ jr RockTunnel1FTalkToTrainer
-RockTunnel1Text7:
+RockTunnel1FCooltrainerF3Text:
text_asm
ld hl, RockTunnel1TrainerHeader6
-RockTunnel1TalkToTrainer:
+RockTunnel1FTalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-RockTunnel1BattleText1:
- text_far _RockTunnel1BattleText1
+RockTunnel1FHiker1BattleText:
+ text_far _RockTunnel1FHiker1BattleText
text_end
-RockTunnel1EndBattleText1:
- text_far _RockTunnel1EndBattleText1
+RockTunnel1FHiker1EndBattleText:
+ text_far _RockTunnel1FHiker1EndBattleText
text_end
-RockTunnel1AfterBattleText1:
- text_far _RockTunnel1AfterBattleText1
+RockTunnel1FHiker1AfterBattleText:
+ text_far _RockTunnel1FHiker1AfterBattleText
text_end
-RockTunnel1BattleText2:
- text_far _RockTunnel1BattleText2
+RockTunnel1FHiker2BattleText:
+ text_far _RockTunnel1FHiker2BattleText
text_end
-RockTunnel1EndBattleText2:
- text_far _RockTunnel1EndBattleText2
+RockTunnel1FHiker2EndBattleText:
+ text_far _RockTunnel1FHiker2EndBattleText
text_end
-RockTunnel1AfterBattleText2:
- text_far _RockTunnel1AfterBattleText2
+RockTunnel1FHiker2AfterBattleText:
+ text_far _RockTunnel1FHiker2AfterBattleText
text_end
-RockTunnel1BattleText3:
- text_far _RockTunnel1BattleText3
+RockTunnel1FHiker3BattleText:
+ text_far _RockTunnel1FHiker3BattleText
text_end
-RockTunnel1EndBattleText3:
- text_far _RockTunnel1EndBattleText3
+RockTunnel1FHiker3EndBattleText:
+ text_far _RockTunnel1FHiker3EndBattleText
text_end
-RockTunnel1AfterBattleText3:
- text_far _RockTunnel1AfterBattleText3
+RockTunnel1FHiker3AfterBattleText:
+ text_far _RockTunnel1FHiker3AfterBattleText
text_end
-RockTunnel1BattleText4:
- text_far _RockTunnel1BattleText4
+RockTunnel1FSuperNerdBattleText:
+ text_far _RockTunnel1FSuperNerdBattleText
text_end
-RockTunnel1EndBattleText4:
- text_far _RockTunnel1EndBattleText4
+RockTunnel1FSuperNerdEndBattleText:
+ text_far _RockTunnel1FSuperNerdEndBattleText
text_end
-RockTunnel1AfterBattleText4:
- text_far _RockTunnel1AfterBattleText4
+RockTunnel1FSuperNerdAfterBattleText:
+ text_far _RockTunnel1FSuperNerdAfterBattleText
text_end
-RockTunnel1BattleText5:
- text_far _RockTunnel1BattleText5
+RockTunnel1FCooltrainerF1BattleText:
+ text_far _RockTunnel1FCooltrainerF1BattleText
text_end
-RockTunnel1EndBattleText5:
- text_far _RockTunnel1EndBattleText5
+RockTunnel1FCooltrainerF1EndBattleText:
+ text_far _RockTunnel1FCooltrainerF1EndBattleText
text_end
-RockTunnel1AfterBattleText5:
- text_far _RockTunnel1AfterBattleText5
+RockTunnel1FCooltrainerF1AfterBattleText:
+ text_far _RockTunnel1FCooltrainerF1AfterBattleText
text_end
-RockTunnel1BattleText6:
- text_far _RockTunnel1BattleText6
+RockTunnel1FCooltrainerF2BattleText:
+ text_far _RockTunnel1FCooltrainerF2BattleText
text_end
-RockTunnel1EndBattleText6:
- text_far _RockTunnel1EndBattleText6
+RockTunnel1FCooltrainerF2EndBattleText:
+ text_far _RockTunnel1FCooltrainerF2EndBattleText
text_end
-RockTunnel1AfterBattleText6:
- text_far _RockTunnel1AfterBattleText6
+RockTunnel1FCooltrainerF2AfterBattleText:
+ text_far _RockTunnel1FCooltrainerF2AfterBattleText
text_end
-RockTunnel1BattleText7:
- text_far _RockTunnel1BattleText7
+RockTunnel1FCooltrainerF3BattleText:
+ text_far _RockTunnel1FCooltrainerF3BattleText
text_end
-RockTunnel1EndBattleText7:
- text_far _RockTunnel1EndBattleText7
+RockTunnel1FCooltrainerF3EndBattleText:
+ text_far _RockTunnel1FCooltrainerF3EndBattleText
text_end
-RockTunnel1AfterBattleText7:
- text_far _RockTunnel1AfterBattleText7
+RockTunnel1FCooltrainerF3AfterBattleText:
+ text_far _RockTunnel1FCooltrainerF3AfterBattleText
text_end
-RockTunnel1Text8:
- text_far _RockTunnel1Text8
+RockTunnel1FSignText:
+ text_far _RockTunnel1FSignText
text_end
diff --git a/scripts/RockTunnelB1F.asm b/scripts/RockTunnelB1F.asm
index fa9cafda..1a1c9266 100644
--- a/scripts/RockTunnelB1F.asm
+++ b/scripts/RockTunnelB1F.asm
@@ -8,180 +8,182 @@ RockTunnelB1F_Script:
ret
RockTunnelB1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROCKTUNNELB1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKTUNNELB1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROCKTUNNELB1F_END_BATTLE
RockTunnelB1F_TextPointers:
- dw RockTunnel2Text1
- dw RockTunnel2Text2
- dw RockTunnel2Text3
- dw RockTunnel2Text4
- dw RockTunnel2Text5
- dw RockTunnel2Text6
- dw RockTunnel2Text7
- dw RockTunnel2Text8
+ def_text_pointers
+ dw_const RockTunnelB1FCooltrainerF1Text, TEXT_ROCKTUNNELB1F_COOLTRAINER_F1
+ dw_const RockTunnelB1FHiker1Text, TEXT_ROCKTUNNELB1F_HIKER1
+ dw_const RockTunnelB1FSuperNerd1Text, TEXT_ROCKTUNNELB1F_SUPER_NERD1
+ dw_const RockTunnelB1FSuperNerd2Text, TEXT_ROCKTUNNELB1F_SUPER_NERD2
+ dw_const RockTunnelB1FHiker2Text, TEXT_ROCKTUNNELB1F_HIKER2
+ dw_const RockTunnelB1FCooltrainerF2Text, TEXT_ROCKTUNNELB1F_COOLTRAINER_F2
+ dw_const RockTunnelB1FHiker3Text, TEXT_ROCKTUNNELB1F_HIKER3
+ dw_const RockTunnelB1FSuperNerd3Text, TEXT_ROCKTUNNELB1F_SUPER_NERD3
RockTunnel2TrainerHeaders:
def_trainers
RockTunnel2TrainerHeader0:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0, 4, RockTunnel2BattleText2, RockTunnel2EndBattleText2, RockTunnel2AfterBattleText2
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0, 4, RockTunnelB1FCooltrainerF1BattleText, RockTunnelB1FCooltrainerF1EndBattleText, RockTunnelB1FCooltrainerF1AfterBattleText
RockTunnel2TrainerHeader1:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1, 3, RockTunnel2BattleText3, RockTunnel2EndBattleText3, RockTunnel2AfterBattleText3
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1, 3, RockTunnelB1FHiker1BattleText, RockTunnelB1FHiker1EndBattleText, RockTunnelB1FHiker1AfterBattleText
RockTunnel2TrainerHeader2:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2, 3, RockTunnel2BattleText4, RockTunnel2EndBattleText4, RockTunnel2AfterBattleText4
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2, 3, RockTunnelB1FSuperNerd1BattleText, RockTunnelB1FSuperNerd1EndBattleText, RockTunnelB1FSuperNerd1AfterBattleText
RockTunnel2TrainerHeader3:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3, 4, RockTunnel2BattleText5, RockTunnel2EndBattleText5, RockTunnel2AfterBattleText5
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3, 4, RockTunnelB1FSuperNerd2BattleText, RockTunnelB1FSuperNerd2EndBattleText, RockTunnelB1FSuperNerd2AfterBattleText
RockTunnel2TrainerHeader4:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4, 3, RockTunnel2BattleText6, RockTunnel2EndBattleText6, RockTunnel2AfterBattleText6
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4, 3, RockTunnelB1FHiker2BattleText, RockTunnelB1FHiker2EndBattleText, RockTunnelB1FHiker2AfterBattleText
RockTunnel2TrainerHeader5:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5, 4, RockTunnel2BattleText7, RockTunnel2EndBattleText7, RockTunnel2AfterBattleText7
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5, 4, RockTunnelB1FCooltrainerF2BattleText, RockTunnelB1FCooltrainerF2EndBattleText, RockTunnelB1FCooltrainerF2AfterBattleText
RockTunnel2TrainerHeader6:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6, 3, RockTunnel2BattleText8, RockTunnel2EndBattleText8, RockTunnel2AfterBattleText8
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6, 3, RockTunnelB1FHiker3BattleText, RockTunnelB1FHiker3EndBattleText, RockTunnelB1FHiker3AfterBattleText
RockTunnel2TrainerHeader7:
- trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 3, RockTunnel2BattleText9, RockTunnel2EndBattleText9, RockTunnel2AfterBattleText9
+ trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 3, RockTunnelB1FSuperNerd3BattleText, RockTunnelB1FSuperNerd3EndBattleText, RockTunnelB1FSuperNerd3AfterBattleText
db -1 ; end
-RockTunnel2Text1:
+RockTunnelB1FCooltrainerF1Text:
text_asm
ld hl, RockTunnel2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text2:
+RockTunnelB1FHiker1Text:
text_asm
ld hl, RockTunnel2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text3:
+RockTunnelB1FSuperNerd1Text:
text_asm
ld hl, RockTunnel2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text4:
+RockTunnelB1FSuperNerd2Text:
text_asm
ld hl, RockTunnel2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text5:
+RockTunnelB1FHiker2Text:
text_asm
ld hl, RockTunnel2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text6:
+RockTunnelB1FCooltrainerF2Text:
text_asm
ld hl, RockTunnel2TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text7:
+RockTunnelB1FHiker3Text:
text_asm
ld hl, RockTunnel2TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2Text8:
+RockTunnelB1FSuperNerd3Text:
text_asm
ld hl, RockTunnel2TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-RockTunnel2BattleText2:
- text_far _RockTunnel2BattleText2
+RockTunnelB1FCooltrainerF1BattleText:
+ text_far _RockTunnelB1FCooltrainerF1BattleText
text_end
-RockTunnel2EndBattleText2:
- text_far _RockTunnel2EndBattleText2
+RockTunnelB1FCooltrainerF1EndBattleText:
+ text_far _RockTunnelB1FCooltrainerF1EndBattleText
text_end
-RockTunnel2AfterBattleText2:
- text_far _RockTunnel2AfterBattleText2
+RockTunnelB1FCooltrainerF1AfterBattleText:
+ text_far _RockTunnelB1FCooltrainerF1AfterBattleText
text_end
-RockTunnel2BattleText3:
- text_far _RockTunnel2BattleText3
+RockTunnelB1FHiker1BattleText:
+ text_far _RockTunnelB1FHiker1BattleText
text_end
-RockTunnel2EndBattleText3:
- text_far _RockTunnel2EndBattleText3
+RockTunnelB1FHiker1EndBattleText:
+ text_far _RockTunnelB1FHiker1EndBattleText
text_end
-RockTunnel2AfterBattleText3:
- text_far _RockTunnel2AfterBattleText3
+RockTunnelB1FHiker1AfterBattleText:
+ text_far _RockTunnelB1FHiker1AfterBattleText
text_end
-RockTunnel2BattleText4:
- text_far _RockTunnel2BattleText4
+RockTunnelB1FSuperNerd1BattleText:
+ text_far _RockTunnelB1FSuperNerd1BattleText
text_end
-RockTunnel2EndBattleText4:
- text_far _RockTunnel2EndBattleText4
+RockTunnelB1FSuperNerd1EndBattleText:
+ text_far _RockTunnelB1FSuperNerd1EndBattleText
text_end
-RockTunnel2AfterBattleText4:
- text_far _RockTunnel2AfterBattleText4
+RockTunnelB1FSuperNerd1AfterBattleText:
+ text_far _RockTunnelB1FSuperNerd1AfterBattleText
text_end
-RockTunnel2BattleText5:
- text_far _RockTunnel2BattleText5
+RockTunnelB1FSuperNerd2BattleText:
+ text_far _RockTunnelB1FSuperNerd2BattleText
text_end
-RockTunnel2EndBattleText5:
- text_far _RockTunnel2EndBattleText5
+RockTunnelB1FSuperNerd2EndBattleText:
+ text_far _RockTunnelB1FSuperNerd2EndBattleText
text_end
-RockTunnel2AfterBattleText5:
- text_far _RockTunnel2AfterBattleText5
+RockTunnelB1FSuperNerd2AfterBattleText:
+ text_far _RockTunnelB1FSuperNerd2AfterBattleText
text_end
-RockTunnel2BattleText6:
- text_far _RockTunnel2BattleText6
+RockTunnelB1FHiker2BattleText:
+ text_far _RockTunnelB1FHiker2BattleText
text_end
-RockTunnel2EndBattleText6:
- text_far _RockTunnel2EndBattleText6
+RockTunnelB1FHiker2EndBattleText:
+ text_far _RockTunnelB1FHiker2EndBattleText
text_end
-RockTunnel2AfterBattleText6:
- text_far _RockTunnel2AfterBattleText6
+RockTunnelB1FHiker2AfterBattleText:
+ text_far _RockTunnelB1FHiker2AfterBattleText
text_end
-RockTunnel2BattleText7:
- text_far _RockTunnel2BattleText7
+RockTunnelB1FCooltrainerF2BattleText:
+ text_far _RockTunnelB1FCooltrainerF2BattleText
text_end
-RockTunnel2EndBattleText7:
- text_far _RockTunnel2EndBattleText7
+RockTunnelB1FCooltrainerF2EndBattleText:
+ text_far _RockTunnelB1FCooltrainerF2EndBattleText
text_end
-RockTunnel2AfterBattleText7:
- text_far _RockTunnel2AfterBattleText7
+RockTunnelB1FCooltrainerF2AfterBattleText:
+ text_far _RockTunnelB1FCooltrainerF2AfterBattleText
text_end
-RockTunnel2BattleText8:
- text_far _RockTunnel2BattleText8
+RockTunnelB1FHiker3BattleText:
+ text_far _RockTunnelB1FHiker3BattleText
text_end
-RockTunnel2EndBattleText8:
- text_far _RockTunnel2EndBattleText8
+RockTunnelB1FHiker3EndBattleText:
+ text_far _RockTunnelB1FHiker3EndBattleText
text_end
-RockTunnel2AfterBattleText8:
- text_far _RockTunnel2AfterBattleText8
+RockTunnelB1FHiker3AfterBattleText:
+ text_far _RockTunnelB1FHiker3AfterBattleText
text_end
-RockTunnel2BattleText9:
- text_far _RockTunnel2BattleText9
+RockTunnelB1FSuperNerd3BattleText:
+ text_far _RockTunnelB1FSuperNerd3BattleText
text_end
-RockTunnel2EndBattleText9:
- text_far _RockTunnel2EndBattleText9
+RockTunnelB1FSuperNerd3EndBattleText:
+ text_far _RockTunnelB1FSuperNerd3EndBattleText
text_end
-RockTunnel2AfterBattleText9:
- text_far _RockTunnel2AfterBattleText9
+RockTunnelB1FSuperNerd3AfterBattleText:
+ text_far _RockTunnelB1FSuperNerd3AfterBattleText
text_end
diff --git a/scripts/RockTunnelPokecenter.asm b/scripts/RockTunnelPokecenter.asm
index 3b3da387..8a980490 100644
--- a/scripts/RockTunnelPokecenter.asm
+++ b/scripts/RockTunnelPokecenter.asm
@@ -3,27 +3,28 @@ RockTunnelPokecenter_Script:
jp EnableAutoTextBoxDrawing
RockTunnelPokecenter_TextPointers:
- dw RockTunnelHealNurseText
- dw RockTunnelPokecenterText2
- dw RockTunnelPokecenterText3
- dw RockTunnelTradeNurseText
- dw RockTunnelPokecenterText5
+ def_text_pointers
+ dw_const RockTunnelPokecenterNurseText, TEXT_ROCKTUNNELPOKECENTER_NURSE
+ dw_const RockTunnelPokecenterGentlemanText, TEXT_ROCKTUNNELPOKECENTER_GENTLEMAN
+ dw_const RockTunnelPokecenterFisherText, TEXT_ROCKTUNNELPOKECENTER_FISHER
+ dw_const RockTunnelPokecenterLinkReceptionistText, TEXT_ROCKTUNNELPOKECENTER_LINK_RECEPTIONIST
+ dw_const RockTunnelPokecenterChanseyText, TEXT_ROCKTUNNELPOKECENTER_CHANSEY
-RockTunnelHealNurseText:
+RockTunnelPokecenterNurseText:
script_pokecenter_nurse
-RockTunnelPokecenterText2:
- text_far _RockTunnelPokecenterText2
+RockTunnelPokecenterGentlemanText:
+ text_far _RockTunnelPokecenterGentlemanText
text_end
-RockTunnelPokecenterText3:
- text_far _RockTunnelPokecenterText3
+RockTunnelPokecenterFisherText:
+ text_far _RockTunnelPokecenterFisherText
text_end
-RockTunnelTradeNurseText:
+RockTunnelPokecenterLinkReceptionistText:
script_cable_club_receptionist
-RockTunnelPokecenterText5:
+RockTunnelPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/RocketHideoutB1F.asm b/scripts/RocketHideoutB1F.asm
index 44964e14..f6c64bda 100644
--- a/scripts/RocketHideoutB1F.asm
+++ b/scripts/RocketHideoutB1F.asm
@@ -1,5 +1,5 @@
RocketHideoutB1F_Script:
- call RocketHideout1Script_44be0
+ call RocketHideoutB1FDoorCallbackScript
call EnableAutoTextBoxDrawing
ld hl, RocketHideout1TrainerHeaders
ld de, RocketHideoutB1F_ScriptPointers
@@ -8,149 +8,151 @@ RocketHideoutB1F_Script:
ld [wRocketHideoutB1FCurScript], a
ret
-RocketHideout1Script_44be0:
+RocketHideoutB1FDoorCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_677
- jr nz, .asm_44c01
+ jr nz, .door_open
CheckEventReuseA EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
- jr nz, .asm_44bf7
- ld a, $54
- jr .asm_44c03
-.asm_44bf7
+ jr nz, .play_sound_door_open
+ ld a, $54 ; Door Block
+ jr .set_door_block
+.play_sound_door_open
ld a, SFX_GO_INSIDE
call PlaySound
CheckEventHL EVENT_677
-.asm_44c01
- ld a, $e
-.asm_44c03
+.door_open
+ ld a, $e ; Floor Block
+.set_door_block
ld [wNewTileBlockID], a
lb bc, 8, 12
predef_jump ReplaceTileBlock
RocketHideoutB1F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROCKETHIDEOUTB1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKETHIDEOUTB1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROCKETHIDEOUTB1F_END_BATTLE
RocketHideoutB1F_TextPointers:
- dw RocketHideout1Text1
- dw RocketHideout1Text2
- dw RocketHideout1Text3
- dw RocketHideout1Text4
- dw RocketHideout1Text5
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const RocketHideoutB1FRocket1Text, TEXT_ROCKETHIDEOUTB1F_ROCKET1
+ dw_const RocketHideoutB1FRocket2Text, TEXT_ROCKETHIDEOUTB1F_ROCKET2
+ dw_const RocketHideoutB1FRocket3Text, TEXT_ROCKETHIDEOUTB1F_ROCKET3
+ dw_const RocketHideoutB1FRocket4Text, TEXT_ROCKETHIDEOUTB1F_ROCKET4
+ dw_const RocketHideoutB1FRocket5Text, TEXT_ROCKETHIDEOUTB1F_ROCKET5
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB1F_ESCAPE_ROPE
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB1F_HYPER_POTION
RocketHideout1TrainerHeaders:
def_trainers
RocketHideout1TrainerHeader0:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0, 3, RocketHideout1BattleText2, RocketHideout1EndBattleText2, RocketHideout1AfterBattleTxt2
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0, 3, RocketHideoutB1FRocket1BattleText, RocketHideoutB1FRocket1EndBattleText, RocketHideoutB1FRocket1AfterBattleText
RocketHideout1TrainerHeader1:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1, 2, RocketHideout1BattleText3, RocketHideout1EndBattleText3, RocketHideout1AfterBattleTxt3
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1, 2, RocketHideoutB1FRocket2BattleText, RocketHideoutB1FRocket2EndBattleText, RocketHideoutB1FRocket2AfterBattleText
RocketHideout1TrainerHeader2:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2, 2, RocketHideout1BattleText4, RocketHideout1EndBattleText4, RocketHideout1AfterBattleTxt4
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2, 2, RocketHideoutB1FRocket3BattleText, RocketHideoutB1FRocket3EndBattleText, RocketHideoutB1FRocket3AfterBattleText
RocketHideout1TrainerHeader3:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3, 3, RocketHideout1BattleText5, RocketHideout1EndBattleText5, RocketHideout1AfterBattleTxt5
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3, 3, RocketHideoutB1FRocket4BattleText, RocketHideoutB1FRocket4EndBattleText, RocketHideoutB1FRocket4AfterBattleText
RocketHideout1TrainerHeader4:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4, 3, RocketHideout1BattleText6, RocketHideout1EndBattleText6, RocketHideout1AfterBattleTxt6
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4, 3, RocketHideoutB1FRocket5BattleText, RocketHideoutB1FRocket5EndBattleText, RocketHideoutB1FRocket5AfterBattleText
db -1 ; end
-RocketHideout1Text1:
+RocketHideoutB1FRocket1Text:
text_asm
ld hl, RocketHideout1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-RocketHideout1Text2:
+RocketHideoutB1FRocket2Text:
text_asm
ld hl, RocketHideout1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-RocketHideout1Text3:
+RocketHideoutB1FRocket3Text:
text_asm
ld hl, RocketHideout1TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-RocketHideout1Text4:
+RocketHideoutB1FRocket4Text:
text_asm
ld hl, RocketHideout1TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-RocketHideout1Text5:
+RocketHideoutB1FRocket5Text:
text_asm
ld hl, RocketHideout1TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-RocketHideout1EndBattleText6:
- text_far _RocketHideout1EndBattleText6
+RocketHideoutB1FRocket5EndBattleText:
+ text_far _RocketHideoutB1FRocket5EndBattleText
text_asm
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
- ld hl, RocketHideout1Text_44c9f
+ ld hl, .prompt_end
ret
-RocketHideout1Text_44c9f:
+.prompt_end:
text_promptbutton
text_end
-RocketHideout1BattleText2:
- text_far _RocketHideout1BattleText2
+RocketHideoutB1FRocket1BattleText:
+ text_far _RocketHideoutB1FRocket1BattleText
text_end
-RocketHideout1EndBattleText2:
- text_far _RocketHideout1EndBattleText2
+RocketHideoutB1FRocket1EndBattleText:
+ text_far _RocketHideoutB1FRocket1EndBattleText
text_end
-RocketHideout1AfterBattleTxt2:
- text_far _RocketHideout1AfterBattleTxt2
+RocketHideoutB1FRocket1AfterBattleText:
+ text_far _RocketHideoutB1FRocket1AfterBattleText
text_end
-RocketHideout1BattleText3:
- text_far _RocketHideout1BattleText3
+RocketHideoutB1FRocket2BattleText:
+ text_far _RocketHideoutB1FRocket2BattleText
text_end
-RocketHideout1EndBattleText3:
- text_far _RocketHideout1EndBattleText3
+RocketHideoutB1FRocket2EndBattleText:
+ text_far _RocketHideoutB1FRocket2EndBattleText
text_end
-RocketHideout1AfterBattleTxt3:
- text_far _RocketHideout1AfterBattleTxt3
+RocketHideoutB1FRocket2AfterBattleText:
+ text_far _RocketHideoutB1FRocket2AfterBattleText
text_end
-RocketHideout1BattleText4:
- text_far _RocketHideout1BattleText4
+RocketHideoutB1FRocket3BattleText:
+ text_far _RocketHideoutB1FRocket3BattleText
text_end
-RocketHideout1EndBattleText4:
- text_far _RocketHideout1EndBattleText4
+RocketHideoutB1FRocket3EndBattleText:
+ text_far _RocketHideoutB1FRocket3EndBattleText
text_end
-RocketHideout1AfterBattleTxt4:
- text_far _RocketHideout1AfterBattleTxt4
+RocketHideoutB1FRocket3AfterBattleText:
+ text_far _RocketHideoutB1FRocket3AfterBattleText
text_end
-RocketHideout1BattleText5:
- text_far _RocketHideout1BattleText5
+RocketHideoutB1FRocket4BattleText:
+ text_far _RocketHideoutB1FRocket4BattleText
text_end
-RocketHideout1EndBattleText5:
- text_far _RocketHideout1EndBattleText5
+RocketHideoutB1FRocket4EndBattleText:
+ text_far _RocketHideoutB1FRocket4EndBattleText
text_end
-RocketHideout1AfterBattleTxt5:
- text_far _RocketHideout1AfterBattleTxt5
+RocketHideoutB1FRocket4AfterBattleText:
+ text_far _RocketHideoutB1FRocket4AfterBattleText
text_end
-RocketHideout1BattleText6:
- text_far _RocketHideout1BattleText6
+RocketHideoutB1FRocket5BattleText:
+ text_far _RocketHideoutB1FRocket5BattleText
text_end
-RocketHideout1AfterBattleTxt6:
- text_far _RocketHideout1AfterBattleTxt6
+RocketHideoutB1FRocket5AfterBattleText:
+ text_far _RocketHideoutB1FRocket5AfterBattleText
text_end
diff --git a/scripts/RocketHideoutB2F.asm b/scripts/RocketHideoutB2F.asm
index 4fa32e34..3a7ffa9b 100644
--- a/scripts/RocketHideoutB2F.asm
+++ b/scripts/RocketHideoutB2F.asm
@@ -8,12 +8,13 @@ RocketHideoutB2F_Script:
ret
RocketHideoutB2F_ScriptPointers:
- dw RocketHideout2Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw RocketHideout2Script3
+ def_script_pointers
+ dw_const RocketHideoutB2FDefaultScript, SCRIPT_ROCKETHIDEOUTB2F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKETHIDEOUTB2F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROCKETHIDEOUTB2F_END_BATTLE
+ dw_const RocketHideoutB2FPlayerSpinningScript, SCRIPT_ROCKETHIDEOUTB2F_PLAYER_SPINNING
-RocketHideout2Script0:
+RocketHideoutB2FDefaultScript:
ld a, [wYCoord]
ld b, a
ld a, [wXCoord]
@@ -27,9 +28,9 @@ RocketHideout2Script0:
call StartSimulatingJoypadStates
ld a, SFX_ARROW_TILES
call PlaySound
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $3
+ ld a, SCRIPT_ROCKETHIDEOUTB2F_PLAYER_SPINNING
ld [wCurMapScript], a
ret
@@ -255,7 +256,7 @@ RocketHideout2ArrowMovement36:
db D_LEFT, 5
db -1 ; end
-RocketHideout2Script3:
+RocketHideoutB2FPlayerSpinningScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
jr nz, LoadSpinnerArrowTiles
@@ -263,39 +264,40 @@ RocketHideout2Script3:
ld [wJoyIgnore], a
ld hl, wd736
res 7, [hl]
- ld a, $0
+ ld a, SCRIPT_ROCKETHIDEOUTB2F_DEFAULT
ld [wCurMapScript], a
ret
INCLUDE "engine/overworld/spinners.asm"
RocketHideoutB2F_TextPointers:
- dw RocketHideout2Text1
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const RocketHideoutB2FRocketText, TEXT_ROCKETHIDEOUTB2F_ROCKET
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB2F_MOON_STONE
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB2F_NUGGET
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB2F_TM_HORN_DRILL
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB2F_SUPER_POTION
RocketHideout2TrainerHeaders:
def_trainers
RocketHideout2TrainerHeader0:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0, 4, RocketHideout2BattleText2, RocketHideout2EndBattleText2, RocketHideout2AfterBattleTxt2
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0, 4, RocketHideoutB1FRocketBattleText, RocketHideoutB1FRocketEndBattleText, RocketHideoutB1FRocketAfterBattleText
db -1 ; end
-RocketHideout2Text1:
+RocketHideoutB2FRocketText:
text_asm
ld hl, RocketHideout2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-RocketHideout2BattleText2:
- text_far _RocketHideout2BattleText2
+RocketHideoutB1FRocketBattleText:
+ text_far _RocketHideoutB1FRocketBattleText
text_end
-RocketHideout2EndBattleText2:
- text_far _RocketHideout2EndBattleText2
+RocketHideoutB1FRocketEndBattleText:
+ text_far _RocketHideoutB1FRocketEndBattleText
text_end
-RocketHideout2AfterBattleTxt2:
- text_far _RocketHideout2AfterBattleTxt2
+RocketHideoutB1FRocketAfterBattleText:
+ text_far _RocketHideoutB1FRocketAfterBattleText
text_end
diff --git a/scripts/RocketHideoutB3F.asm b/scripts/RocketHideoutB3F.asm
index 996790ec..03681bef 100644
--- a/scripts/RocketHideoutB3F.asm
+++ b/scripts/RocketHideoutB3F.asm
@@ -8,12 +8,13 @@ RocketHideoutB3F_Script:
ret
RocketHideoutB3F_ScriptPointers:
- dw RocketHideout3Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw RocketHideout3Script3
+ def_script_pointers
+ dw_const RocketHideoutB3FDefaultScript, SCRIPT_ROCKETHIDEOUTB3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKETHIDEOUTB3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROCKETHIDEOUTB3F_END_BATTLE
+ dw_const RocketHideoutB3FPlayerSpinningScript, SCRIPT_ROCKETHIDEOUTB3F_PLAYER_SPINNING
-RocketHideout3Script0:
+RocketHideoutB3FDefaultScript:
ld a, [wYCoord]
ld b, a
ld a, [wXCoord]
@@ -27,9 +28,9 @@ RocketHideout3Script0:
call StartSimulatingJoypadStates
ld a, SFX_ARROW_TILES
call PlaySound
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $3
+ ld a, SCRIPT_ROCKETHIDEOUTB3F_PLAYER_SPINNING
ld [wCurMapScript], a
ret
@@ -112,7 +113,7 @@ RocketHideout3ArrowMovement12:
db D_UP, 1
db -1 ; end
-RocketHideout3Script3:
+RocketHideoutB3FPlayerSpinningScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
jp nz, LoadSpinnerArrowTiles
@@ -120,56 +121,57 @@ RocketHideout3Script3:
ld [wJoyIgnore], a
ld hl, wd736
res 7, [hl]
- ld a, $0
+ ld a, SCRIPT_ROCKETHIDEOUTB3F_DEFAULT
ld [wCurMapScript], a
ret
RocketHideoutB3F_TextPointers:
- dw RocketHideout3Text1
- dw RocketHideout3Text2
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const RocketHideoutB3FRocket1Text, TEXT_ROCKETHIDEOUTB3F_ROCKET1
+ dw_const RocketHideoutB3FRocket2Text, TEXT_ROCKETHIDEOUTB3F_ROCKET2
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB3F_TM_DOUBLE_EDGE
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB3F_RARE_CANDY
RocketHideout3TrainerHeaders:
def_trainers
RocketHideout3TrainerHeader0:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0, 2, RocketHideout3BattleText2, RocketHideout3EndBattleText2, RocketHideout3AfterBattleTxt2
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0, 2, RocketHideoutB3FRocket1BattleText, RocketHideoutB3FRocket1EndBattleText, RocketHideoutB3FRocket1AfterBattleText
RocketHideout3TrainerHeader1:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1, 4, RocketHideout3BattleTxt, RocketHideout3EndBattleText3, RocketHideout3AfterBattleText3
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1, 4, RocketHideoutB3FRocket2BattleText, RocketHideoutB3FRocket2EndBattleText, RocketHideoutB3FRocket2AfterBattleText
db -1 ; end
-RocketHideout3Text1:
+RocketHideoutB3FRocket1Text:
text_asm
ld hl, RocketHideout3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-RocketHideout3BattleText2:
- text_far _RocketHideout3BattleText2
+RocketHideoutB3FRocket1BattleText:
+ text_far _RocketHideoutB3FRocket1BattleText
text_end
-RocketHideout3EndBattleText2:
- text_far _RocketHideout3EndBattleText2
+RocketHideoutB3FRocket1EndBattleText:
+ text_far _RocketHideoutB3FRocket1EndBattleText
text_end
-RocketHideout3AfterBattleTxt2:
- text_far _RocketHideout3AfterBattleTxt2
+RocketHideoutB3FRocket1AfterBattleText:
+ text_far _RocketHideoutB3FRocket1AfterBattleText
text_end
-RocketHideout3Text2:
+RocketHideoutB3FRocket2Text:
text_asm
ld hl, RocketHideout3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-RocketHideout3BattleTxt:
+RocketHideoutB3FRocket2BattleText:
text_far _RocketHideout3BattleTxt
text_end
-RocketHideout3EndBattleText3:
+RocketHideoutB3FRocket2EndBattleText:
text_far _RocketHideout3EndBattleText3
text_end
-RocketHideout3AfterBattleText3:
+RocketHideoutB3FRocket2AfterBattleText:
text_far _RocketHide3AfterBattleText3
text_end
diff --git a/scripts/RocketHideoutB4F.asm b/scripts/RocketHideoutB4F.asm
index c3943e98..0a417abc 100644
--- a/scripts/RocketHideoutB4F.asm
+++ b/scripts/RocketHideoutB4F.asm
@@ -7,47 +7,48 @@ RocketHideoutB4F_Script:
ld [wRocketHideoutB4FCurScript], a
ret
-RocketHideout4Script_45510:
+RocketHideoutB4FResetScripts:
CheckAndResetEvent EVENT_6A0
- call nz, RocketHideout4Script_45525
+ call nz, RocketHideoutB4FScript_HideJessieJames
xor a
ld [wJoyIgnore], a
-RocketHideout4Script_4551e:
+RocketHideoutB4FSetScript:
ld [wRocketHideoutB4FCurScript], a
ld [wCurMapScript], a
ret
-RocketHideout4Script_45525:
+RocketHideoutB4FScript_HideJessieJames:
ld a, HS_ROCKET_HIDEOUT_B4F_JAMES
- call RocketHideout4Script_45756
+ call RocketHideoutB4FScript_HideObject
ld a, HS_ROCKET_HIDEOUT_B4F_JESSIE
- call RocketHideout4Script_45756
+ call RocketHideoutB4FScript_HideObject
ret
RocketHideoutB4F_ScriptPointers:
- dw RocketHideout4Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw RocketHideout4Script3
- dw RocketHideout4Script4
- dw RocketHideout4Script5
- dw RocketHideout4Script6
- dw RocketHideout4Script7
- dw RocketHideout4Script8
- dw RocketHideout4Script9
- dw RocketHideout4Script10
- dw RocketHideout4Script11
- dw RocketHideout4Script12
- dw RocketHideout4Script13
+ def_script_pointers
+ dw_const RocketHideoutB4FDefaultScript, SCRIPT_ROCKETHIDEOUTB4F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT1
+ dw_const EndTrainerBattle, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT2
+ dw_const RocketHideoutB4FBeatGiovanniScript, SCRIPT_ROCKETHIDEOUTB4F_BEAT_GIOVANNI
+ dw_const RocketHideoutB4FScript4, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT4
+ dw_const RocketHideoutB4FScript5, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT5
+ dw_const RocketHideoutB4FScript6, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT6
+ dw_const RocketHideoutB4FScript7, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT7
+ dw_const RocketHideoutB4FScript8, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT8
+ dw_const RocketHideoutB4FScript9, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT9
+ dw_const RocketHideoutB4FScript10, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT10
+ dw_const RocketHideoutB4FScript11, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT11
+ dw_const RocketHideoutB4FScript12, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT12
+ dw_const RocketHideoutB4FScript13, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT13
-RocketHideout4Script3:
+RocketHideoutB4FBeatGiovanniScript:
ld a, [wIsInBattle]
cp $ff
- jp z, RocketHideout4Script_45510
- ld a, $fc
+ jp z, RocketHideoutB4FResetScripts
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI
- ld a, $a
+ ld a, TEXT_ROCKETHIDEOUTB4F_GIOVANNI_HOPE_WE_MEET_AGAIN
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call GBFadeOutToBlack
@@ -63,23 +64,23 @@ RocketHideout4Script3:
ld [wJoyIgnore], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
- ld a, $0
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_DEFAULT
ld [wRocketHideoutB4FCurScript], a
ld [wCurMapScript], a
ret
-RocketHideout4Script0:
+RocketHideoutB4FDefaultScript:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
- call z, RocketHideout4Script_455a5
+ call z, RocketHideoutB4FScript_455a5
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
call z, CheckFightingMapTrainers
ret
-RocketHideout4Script_455a5:
+RocketHideoutB4FScript_455a5:
ld a, [wYCoord]
cp $e
ret nz
@@ -94,7 +95,7 @@ RocketHideout4Script_455a5:
.asm_455c2
xor a
ldh [hJoyHeld], a
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call StopAllMusic
ld c, BANK(Music_MeetJessieJames)
@@ -106,51 +107,51 @@ RocketHideout4Script_455a5:
call Delay3
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $b
+ ld a, TEXT_ROCKETHIDEOUTB4F_TEXT11
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, HS_ROCKET_HIDEOUT_B4F_JAMES
- call RocketHideout4Script_45747
+ call RocketHideoutB4FScript_ShowObject
ld a, HS_ROCKET_HIDEOUT_B4F_JESSIE
- call RocketHideout4Script_45747
- ld a, $4
- call RocketHideout4Script_4551e
+ call RocketHideoutB4FScript_ShowObject
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT4
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4JessieJamesMovementData_45605:
+RocketHideoutB4FJessieJamesMovementData_45605:
db $4
-RocketHideout4JessieJamesMovementData_45606:
+RocketHideoutB4FJessieJamesMovementData_45606:
db $4
db $4
db $4
db $ff
-RocketHideout4Script4:
- ld de, RocketHideout4JessieJamesMovementData_45605
+RocketHideoutB4FScript4:
+ ld de, RocketHideoutB4FJessieJamesMovementData_45605
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
jr z, .asm_45617
- ld de, RocketHideout4JessieJamesMovementData_45606
+ ld de, RocketHideoutB4FJessieJamesMovementData_45606
.asm_45617
- ld a, $2
+ ld a, ROCKETHIDEOUTB4F_JAMES
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $5
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT5
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script5:
- ld a, $ff
+RocketHideoutB4FScript5:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-RocketHideout4Script6:
+RocketHideoutB4FScript6:
ld a, $2
ld [wSprite02StateData1MovementStatus], a
ld a, SPRITE_FACING_LEFT
@@ -161,32 +162,32 @@ RocketHideout4Script6:
ld [wSprite02StateData1FacingDirection], a
.asm_4564a
call Delay3
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-RocketHideout4Script7:
- ld de, RocketHideout4JessieJamesMovementData_45606
+RocketHideoutB4FScript7:
+ ld de, RocketHideoutB4FJessieJamesMovementData_45606
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
jr z, .asm_4565f
- ld de, RocketHideout4JessieJamesMovementData_45605
+ ld de, RocketHideoutB4FJessieJamesMovementData_45605
.asm_4565f
- ld a, $3
+ ld a, ROCKETHIDEOUTB4F_JESSIE
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $8
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT8
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script8:
- ld a, $ff
+RocketHideoutB4FScript8:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-RocketHideout4Script9:
+RocketHideoutB4FScript9:
ld a, $2
ld [wSprite03StateData1MovementStatus], a
ld a, SPRITE_FACING_DOWN
@@ -197,15 +198,15 @@ RocketHideout4Script9:
ld [wSprite03StateData1FacingDirection], a
.asm_45697
call Delay3
- ld a, $c
+ ld a, TEXT_ROCKETHIDEOUTB4F_TEXT12
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-RocketHideout4Script10:
+RocketHideoutB4FScript10:
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, RocketHideout4JessieJamesEndBattleText
- ld de, RocketHideout4JessieJamesEndBattleText
+ ld hl, RocketHideoutB4FJessieJamesEndBattleText
+ ld de, RocketHideoutB4FJessieJamesEndBattleText
call SaveEndBattleTextPointers
ld a, OPP_ROCKET
ld [wCurOpponent], a
@@ -215,27 +216,27 @@ RocketHideout4Script10:
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_6A0
- ld a, $b
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT11
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script11:
- ld a, $ff
+RocketHideoutB4FScript11:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wIsInBattle]
cp $ff
- jp z, RocketHideout4Script_45510
+ jp z, RocketHideoutB4FResetScripts
ld a, $2
ld [wSprite02StateData1MovementStatus], a
ld [wSprite03StateData1MovementStatus], a
xor a
ld [wSprite02StateData1FacingDirection], a
ld [wSprite03StateData1FacingDirection], a
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $d
+ ld a, TEXT_ROCKETHIDEOUTB4F_TEXT13
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -244,75 +245,75 @@ RocketHideout4Script11:
ld c, BANK(Music_MeetJessieJames)
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $c
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT12
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script12:
- ld a, $ff
+RocketHideoutB4FScript12:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call GBFadeOutToBlack
ld a, HS_ROCKET_HIDEOUT_B4F_JAMES
- call RocketHideout4Script_45756
+ call RocketHideoutB4FScript_HideObject
ld a, HS_ROCKET_HIDEOUT_B4F_JESSIE
- call RocketHideout4Script_45756
+ call RocketHideoutB4FScript_HideObject
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- ld a, $d
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_SCRIPT13
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script13:
+RocketHideoutB4FScript13:
call PlayDefaultMusic
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
- ld a, $0
- call RocketHideout4Script_4551e
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_DEFAULT
+ call RocketHideoutB4FSetScript
ret
-RocketHideout4Script_45747:
+RocketHideoutB4FScript_ShowObject:
ld [wMissableObjectIndex], a
predef ShowObject
call UpdateSprites
call Delay3
ret
-RocketHideout4Script_45756:
+RocketHideoutB4FScript_HideObject:
ld [wMissableObjectIndex], a
predef HideObject
ret
RocketHideoutB4F_TextPointers:
- dw RocketHideout4Text0
- dw RocketHideout4Text1
- dw RocketHideout4Text2
- dw RocketHideout4Text3
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw RocketHideout4Text9
- dw RocketHideout4Text10
- dw RocketHideout4Text11
- dw RocketHideout4Text12
+ def_text_pointers
+ dw_const RocketHideoutB4FGiovanniText, TEXT_ROCKETHIDEOUTB4F_GIOVANNI
+ dw_const RocketHideoutB4FJessieJamesText, TEXT_ROCKETHIDEOUTB4F_JAMES
+ dw_const RocketHideoutB4FJessieJamesText, TEXT_ROCKETHIDEOUTB4F_JESSIE
+ dw_const RocketHideoutB4FRocketText, TEXT_ROCKETHIDEOUTB4F_ROCKET
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB4F_HP_UP
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB4F_TM_RAZOR_WIND
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB4F_IRON
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB4F_SILPH_SCOPE
+ dw_const PickUpItemText, TEXT_ROCKETHIDEOUTB4F_LIFT_KEY
+ dw_const RocketHideoutB4FGiovanniHopeWeMeetAgainText, TEXT_ROCKETHIDEOUTB4F_GIOVANNI_HOPE_WE_MEET_AGAIN
+ dw_const RocketHideoutB4FText11, TEXT_ROCKETHIDEOUTB4F_TEXT11
+ dw_const RocketHideoutB4FText12, TEXT_ROCKETHIDEOUTB4F_TEXT12
+ dw_const RocketHideoutB4FText13, TEXT_ROCKETHIDEOUTB4F_TEXT13
RocketHideout4TrainerHeaders:
def_trainers 4
RocketHideout4TrainerHeader0:
- trainer EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1, RocketHideout4Trainer0BeforeText, RocketHideout4Trainer0EndBattleText, RocketHideout4Trainer0AfterText
+ trainer EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1, RocketHideoutB4FRocketBattleText, RocketHideoutB4FRocketEndBattleText, RocketHideoutB4FRocketAfterBattleText
db -1 ; end
-RocketHideout4Text1:
-RocketHideout4Text2:
+RocketHideoutB4FJessieJamesText:
text_end
-RocketHideout4Text10:
+RocketHideoutB4FText11:
text_far _RocketHideoutJessieJamesText1
text_asm
ld c, 10
@@ -328,32 +329,32 @@ RocketHideout4Text10:
call DelayFrames
jp TextScriptEnd
-RocketHideout4Text11:
+RocketHideoutB4FText12:
text_far _RocketHideoutJessieJamesText2
text_end
-RocketHideout4JessieJamesEndBattleText:
+RocketHideoutB4FJessieJamesEndBattleText:
text_far _RocketHideoutJessieJamesText3
text_end
-RocketHideout4Text12:
+RocketHideoutB4FText13:
text_far _RocketHideoutJessieJamesText4
text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
-RocketHideout4Text0:
+RocketHideoutB4FGiovanniText:
text_asm
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI
- jp nz, .asm_457fb
- ld hl, RocketHideout4Text_45804
+ jp nz, .beat_giovanni
+ ld hl, .ImpressedYouGotHereText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, RocketHideout4Text_45809
- ld de, RocketHideout4Text_45809
+ ld hl, .WhatCannotBeText
+ ld de, .WhatCannotBeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -361,41 +362,40 @@ RocketHideout4Text0:
call InitBattleEnemyParameters
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_ROCKETHIDEOUTB4F_BEAT_GIOVANNI
ld [wRocketHideoutB4FCurScript], a
ld [wCurMapScript], a
- jr .asm_45801
-
-.asm_457fb
- ld hl, RocketHideout4Text9
+ jr .done
+.beat_giovanni
+ ld hl, RocketHideoutB4FGiovanniHopeWeMeetAgainText
call PrintText
-.asm_45801
+.done
jp TextScriptEnd
-RocketHideout4Text_45804:
- text_far _RocketHideout4Text_4557a
+.ImpressedYouGotHereText:
+ text_far _RocketHideoutB4FGiovanniImpressedYouGotHereText
text_end
-RocketHideout4Text_45809:
- text_far _RocketHideout4Text_4557f
+.WhatCannotBeText:
+ text_far _RocketHideoutB4FGiovanniWhatCannotBeText
text_end
-RocketHideout4Text9:
- text_far _RocketHideout4Text_45584
+RocketHideoutB4FGiovanniHopeWeMeetAgainText:
+ text_far _RocketHideoutB4FGiovanniHopeWeMeetAgainText
text_end
-RocketHideout4Text3:
+RocketHideoutB4FRocketText:
text_asm
ld hl, RocketHideout4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-RocketHideout4Trainer0BeforeText:
- text_far _RocketHideout4BattleText4
+RocketHideoutB4FRocketBattleText:
+ text_far _RocketHideoutB4FRocket2BattleText
text_end
-RocketHideout4Trainer0EndBattleText:
- text_far _RocketHideout4EndBattleText4
+RocketHideoutB4FRocketEndBattleText:
+ text_far _RocketHideoutB4FRocket2EndBattleText
text_promptbutton
text_asm
SetEvent EVENT_ROCKET_DROPPED_LIFT_KEY
@@ -404,12 +404,12 @@ RocketHideout4Trainer0EndBattleText:
predef ShowObject
jp TextScriptEnd
-RocketHideout4Trainer0AfterText:
+RocketHideoutB4FRocketAfterBattleText:
text_asm
- ld hl, RocketHideout4Text_45844
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-RocketHideout4Text_45844:
- text_far _RocketHideout4Text_455ec
+.Text:
+ text_far _RocketHideoutB4FRocket2AfterBattleText
text_end
diff --git a/scripts/RocketHideoutElevator.asm b/scripts/RocketHideoutElevator.asm
index 8c51294e..71ff0758 100644
--- a/scripts/RocketHideoutElevator.asm
+++ b/scripts/RocketHideoutElevator.asm
@@ -3,26 +3,26 @@ RocketHideoutElevator_Script:
bit 5, [hl]
res 5, [hl]
push hl
- call nz, RocketHideoutElevatorScript_4572c
+ call nz, RocketHideoutElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
- call nz, RocketHideoutElevatorScript_4575f
+ call nz, RocketHideoutElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a
inc a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ret
-RocketHideoutElevatorScript_4572c:
+RocketHideoutElevatorStoreWarpEntriesScript:
ld hl, wWarpEntries
ld a, [wWarpedFromWhichWarp]
ld b, a
ld a, [wWarpedFromWhichMap]
ld c, a
- call RocketHideoutElevatorScript_4573a
-
-RocketHideoutElevatorScript_4573a:
+ call .StoreWarpEntry
+ ; fallthrough
+.StoreWarpEntry:
inc hl
inc hl
ld a, b
@@ -31,12 +31,12 @@ RocketHideoutElevatorScript_4573a:
ld [hli], a
ret
-RocketHideoutElevatorScript_45741:
+RocketHideoutElevatorScript:
ld hl, RocketHideoutElavatorFloors
call LoadItemList
ld hl, RocketHideoutElevatorWarpMaps
ld de, wElevatorWarpMaps
- ld bc, RocketHideoutElevatorWarpMapsEnd - RocketHideoutElevatorWarpMaps
+ ld bc, RocketHideoutElevatorWarpMaps.End - RocketHideoutElevatorWarpMaps
call CopyData
ret
@@ -53,32 +53,33 @@ RocketHideoutElevatorWarpMaps:
db 4, ROCKET_HIDEOUT_B1F
db 4, ROCKET_HIDEOUT_B2F
db 2, ROCKET_HIDEOUT_B4F
-RocketHideoutElevatorWarpMapsEnd:
+.End:
-RocketHideoutElevatorScript_4575f:
+RocketHideoutElevatorShakeScript:
call Delay3
farcall ShakeElevator
ret
RocketHideoutElevator_TextPointers:
- dw RocketHideoutElevatorText1
+ def_text_pointers
+ dw_const RocketHideoutElevatorText, TEXT_ROCKETHIDEOUTELEVATOR
-RocketHideoutElevatorText1:
+RocketHideoutElevatorText:
text_asm
ld b, LIFT_KEY
call IsItemInBag
- jr z, .asm_45782
- call RocketHideoutElevatorScript_45741
+ jr z, .no_key
+ call RocketHideoutElevatorScript
ld hl, RocketHideoutElevatorWarpMaps
predef DisplayElevatorFloorMenu
- jr .asm_45788
-.asm_45782
- ld hl, RocketHideoutElevatorText_4578b
+ jr .text_script_end
+.no_key
+ ld hl, .AppearsToNeedKeyText
call PrintText
-.asm_45788
+.text_script_end
jp TextScriptEnd
-RocketHideoutElevatorText_4578b:
- text_far _RocketElevatorText_4578b
+.AppearsToNeedKeyText:
+ text_far _RocketHideoutElevatorAppearsToNeedKeyText
text_waitbutton
text_end
diff --git a/scripts/Route1.asm b/scripts/Route1.asm
index d2f0b766..a784d0a8 100644
--- a/scripts/Route1.asm
+++ b/scripts/Route1.asm
@@ -3,21 +3,22 @@ Route1_Script:
ret
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
- farcall Func_f1ad2
+ farcall Route1PrintYoungster1Text
jp TextScriptEnd
-Route1Text2:
+Route1Youngster2Text:
text_asm
- farcall Func_f1b0f
+ farcall Route1PrintYoungster2Text
jp TextScriptEnd
-Route1Text3:
+Route1SignText:
text_asm
- farcall Func_f1b1b
+ farcall Route1PrintSignText
jp TextScriptEnd
diff --git a/scripts/Route10.asm b/scripts/Route10.asm
index 70a7e013..5e015a1b 100644
--- a/scripts/Route10.asm
+++ b/scripts/Route10.asm
@@ -8,151 +8,152 @@ Route10_Script:
ret
Route10_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE10_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE10_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE10_END_BATTLE
Route10_TextPointers:
- dw Route10Text1
- dw Route10Text2
- dw Route10Text3
- dw Route10Text4
- dw Route10Text5
- dw Route10Text6
- dw Route10Text7
- dw PokeCenterSignText
- dw Route10Text9
- dw Route10Text10
+ def_text_pointers
+ dw_const Route10SuperNerd1Text, TEXT_ROUTE10_SUPER_NERD1
+ dw_const Route10Hiker1Text, TEXT_ROUTE10_HIKER1
+ dw_const Route10SuperNerd2Text, TEXT_ROUTE10_SUPER_NERD2
+ dw_const Route10CooltrainerF1Text, TEXT_ROUTE10_COOLTRAINER_F1
+ dw_const Route10Hiker2Text, TEXT_ROUTE10_HIKER2
+ dw_const Route10CooltrainerF2Text, TEXT_ROUTE10_COOLTRAINER_F2
+ dw_const Route10RockTunnelSignText, TEXT_ROUTE10_ROCKTUNNEL_NORTH_SIGN
+ dw_const PokeCenterSignText, TEXT_ROUTE10_POKECENTER_SIGN
+ dw_const Route10RockTunnelSignText, TEXT_ROUTE10_ROCKTUNNEL_SOUTH_SIGN
+ dw_const Route10PowerPlantSignText, TEXT_ROUTE10_POWERPLANT_SIGN
Route10TrainerHeaders:
def_trainers
Route10TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_0, 4, Route10BattleText1, Route10EndBattleText1, Route10AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_0, 4, Route10SuperNerd1BattleText, Route10SuperNerd1EndBattleText, Route10SuperNerd1AfterBattleText
Route10TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_1, 3, Route10BattleText2, Route10EndBattleText2, Route10AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_1, 3, Route10Hiker1BattleText, Route10Hiker1EndBattleText, Route10Hiker1AfterBattleText
Route10TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_2, 4, Route10BattleText3, Route10EndBattleText3, Route10AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_2, 4, Route10SuperNerd2BattleText, Route10SuperNerd2EndBattleText, Route10SuperNerd2AfterBattleText
Route10TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_3, 3, Route10BattleText4, Route10EndBattleText4, Route10AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_3, 3, Route10CooltrainerF1BattleText, Route10CooltrainerF1EndBattleText, Route10CooltrainerF1AfterBattleText
Route10TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_4, 2, Route10BattleText5, Route10EndBattleText5, Route10AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_4, 2, Route10Hiker2BattleText, Route10Hiker2EndBattleText, Route10Hiker2AfterBattleText
Route10TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_10_TRAINER_5, 2, Route10BattleText6, Route10EndBattleText6, Route10AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_10_TRAINER_5, 2, Route10CooltrainerF2BattleText, Route10CooltrainerF2EndBattleText, Route10CooltrainerF2AfterBattleText
db -1 ; end
-Route10Text1:
+Route10SuperNerd1Text:
text_asm
ld hl, Route10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText1:
- text_far _Route10BattleText1
+Route10SuperNerd1BattleText:
+ text_far _Route10SuperNerd1BattleText
text_end
-Route10EndBattleText1:
- text_far _Route10EndBattleText1
+Route10SuperNerd1EndBattleText:
+ text_far _Route10SuperNerd1EndBattleText
text_end
-Route10AfterBattleText1:
- text_far _Route10AfterBattleText1
+Route10SuperNerd1AfterBattleText:
+ text_far _Route10SuperNerd1AfterBattleText
text_end
-Route10Text2:
+Route10Hiker1Text:
text_asm
ld hl, Route10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText2:
- text_far _Route10BattleText2
+Route10Hiker1BattleText:
+ text_far _Route10Hiker1BattleText
text_end
-Route10EndBattleText2:
- text_far _Route10EndBattleText2
+Route10Hiker1EndBattleText:
+ text_far _Route10Hiker1EndBattleText
text_end
-Route10AfterBattleText2:
- text_far _Route10AfterBattleText2
+Route10Hiker1AfterBattleText:
+ text_far _Route10Hiker1AfterBattleText
text_end
-Route10Text3:
+Route10SuperNerd2Text:
text_asm
ld hl, Route10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText3:
- text_far _Route10BattleText3
+Route10SuperNerd2BattleText:
+ text_far _Route10SuperNerd2BattleText
text_end
-Route10EndBattleText3:
- text_far _Route10EndBattleText3
+Route10SuperNerd2EndBattleText:
+ text_far _Route10SuperNerd2EndBattleText
text_end
-Route10AfterBattleText3:
- text_far _Route10AfterBattleText3
+Route10SuperNerd2AfterBattleText:
+ text_far _Route10SuperNerd2AfterBattleText
text_end
-Route10Text4:
+Route10CooltrainerF1Text:
text_asm
ld hl, Route10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText4:
- text_far _Route10BattleText4
+Route10CooltrainerF1BattleText:
+ text_far _Route10CooltrainerF1BattleText
text_end
-Route10EndBattleText4:
- text_far _Route10EndBattleText4
+Route10CooltrainerF1EndBattleText:
+ text_far _Route10CooltrainerF1EndBattleText
text_end
-Route10AfterBattleText4:
- text_far _Route10AfterBattleText4
+Route10CooltrainerF1AfterBattleText:
+ text_far _Route10CooltrainerF1AfterBattleText
text_end
-Route10Text5:
+Route10Hiker2Text:
text_asm
ld hl, Route10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText5:
- text_far _Route10BattleText5
+Route10Hiker2BattleText:
+ text_far _Route10Hiker2BattleText
text_end
-Route10EndBattleText5:
- text_far _Route10EndBattleText5
+Route10Hiker2EndBattleText:
+ text_far _Route10Hiker2EndBattleText
text_end
-Route10AfterBattleText5:
- text_far _Route10AfterBattleText5
+Route10Hiker2AfterBattleText:
+ text_far _Route10Hiker2AfterBattleText
text_end
-Route10Text6:
+Route10CooltrainerF2Text:
text_asm
ld hl, Route10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route10BattleText6:
- text_far _Route10BattleText6
+Route10CooltrainerF2BattleText:
+ text_far _Route10CooltrainerF2BattleText
text_end
-Route10EndBattleText6:
- text_far _Route10EndBattleText6
+Route10CooltrainerF2EndBattleText:
+ text_far _Route10CooltrainerF2EndBattleText
text_end
-Route10AfterBattleText6:
- text_far _Route10AfterBattleText6
+Route10CooltrainerF2AfterBattleText:
+ text_far _Route10CooltrainerF2AfterBattleText
text_end
-Route10Text9:
-Route10Text7:
- text_far _Route10Text7 ; _Route10Text9
+Route10RockTunnelSignText:
+ text_far _Route10RockTunnelSignText
text_end
-Route10Text10:
- text_far _Route10Text10
+Route10PowerPlantSignText:
+ text_far _Route10PowerPlantSignText
text_end
diff --git a/scripts/Route11.asm b/scripts/Route11.asm
index 724d8d89..e54a4a2d 100644
--- a/scripts/Route11.asm
+++ b/scripts/Route11.asm
@@ -8,227 +8,229 @@ Route11_Script:
ret
Route11_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE11_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE11_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE11_END_BATTLE
Route11_TextPointers:
- dw Route11Text1
- dw Route11Text2
- dw Route11Text3
- dw Route11Text4
- dw Route11Text5
- dw Route11Text6
- dw Route11Text7
- dw Route11Text8
- dw Route11Text9
- dw Route11Text10
- dw Route11Text11
+ def_text_pointers
+ dw_const Route11Gambler1Text, TEXT_ROUTE11_GAMBLER1
+ dw_const Route11Gambler2Text, TEXT_ROUTE11_GAMBLER2
+ dw_const Route11Youngster1Text, TEXT_ROUTE11_YOUNGSTER1
+ dw_const Route11SuperNerd1Text, TEXT_ROUTE11_SUPER_NERD1
+ dw_const Route11Youngster2Text, TEXT_ROUTE11_YOUNGSTER2
+ dw_const Route11Gambler3Text, TEXT_ROUTE11_GAMBLER3
+ dw_const Route11Gambler4Text, TEXT_ROUTE11_GAMBLER4
+ dw_const Route11Youngster3Text, TEXT_ROUTE11_YOUNGSTER3
+ dw_const Route11SuperNerd2Text, TEXT_ROUTE11_SUPER_NERD2
+ dw_const Route11Youngster4Text, TEXT_ROUTE11_YOUNGSTER4
+ dw_const Route11DiglettsCaveSignText, TEXT_ROUTE11_DIGLETTSCAVE_SIGN
Route11TrainerHeaders:
def_trainers
Route11TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_0, 3, Route11BattleText1, Route11EndBattleText1, Route11AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_0, 3, Route11Gambler1BattleText, Route11Gambler1EndBattleText, Route11Gambler1AfterBattleText
Route11TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_1, 2, Route11BattleText2, Route11EndBattleText2, Route11AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_1, 2, Route11Gambler2BattleText, Route11Gambler2EndBattleText, Route11Gambler2AfterBattleText
Route11TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_2, 3, Route11BattleText3, Route11EndBattleText3, Route11AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_2, 3, Route11Youngster1BattleText, Route11Youngster1EndBattleText, Route11Youngster1AfterBattleText
Route11TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_3, 3, Route11BattleText4, Route11EndBattleText4, Route11AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_3, 3, Route11SuperNerd1BattleText, Route11SuperNerd1EndBattleText, Route11SuperNerd1AfterBattleText
Route11TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_4, 4, Route11BattleText5, Route11EndBattleText5, Route11AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_4, 4, Route11Youngster2BattleText, Route11Youngster2EndBattleText, Route11Youngster2AfterBattleText
Route11TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_5, 3, Route11BattleText6, Route11EndBattleText6, Route11AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_5, 3, Route11Gambler3BattleText, Route11Gambler3EndBattleText, Route11Gambler3AfterBattleText
Route11TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_6, 3, Route11BattleText7, Route11EndBattleText7, Route11AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_6, 3, Route11Gambler4BattleText, Route11Gambler4EndBattleText, Route11Gambler4AfterBattleText
Route11TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_7, 4, Route11BattleText8, Route11EndBattleText8, Route11AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_7, 4, Route11Youngster3BattleText, Route11Youngster3EndBattleText, Route11Youngster3AfterBattleText
Route11TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_8, 3, Route11BattleText9, Route11EndBattleText9, Route11AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_8, 3, Route11SuperNerd2BattleText, Route11SuperNerd2EndBattleText, Route11SuperNerd2AfterBattleText
Route11TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_11_TRAINER_9, 4, Route11BattleText10, Route11EndBattleText10, Route11AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_11_TRAINER_9, 4, Route11Youngster4BattleText, Route11Youngster4EndBattleText, Route11Youngster4AfterBattleText
db -1 ; end
-Route11Text1:
+Route11Gambler1Text:
text_asm
ld hl, Route11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText1:
- text_far _Route11BattleText1
+Route11Gambler1BattleText:
+ text_far _Route11Gambler1BattleText
text_end
-Route11EndBattleText1:
- text_far _Route11EndBattleText1
+Route11Gambler1EndBattleText:
+ text_far _Route11Gambler1EndBattleText
text_end
-Route11AfterBattleText1:
- text_far _Route11AfterBattleText1
+Route11Gambler1AfterBattleText:
+ text_far _Route11Gambler1AfterBattleText
text_end
-Route11Text2:
+Route11Gambler2Text:
text_asm
ld hl, Route11TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText2:
- text_far _Route11BattleText2
+Route11Gambler2BattleText:
+ text_far _Route11Gambler2BattleText
text_end
-Route11EndBattleText2:
- text_far _Route11EndBattleText2
+Route11Gambler2EndBattleText:
+ text_far _Route11Gambler2EndBattleText
text_end
-Route11AfterBattleText2:
- text_far _Route11AfterBattleText2
+Route11Gambler2AfterBattleText:
+ text_far _Route11Gambler2AfterBattleText
text_end
-Route11Text3:
+Route11Youngster1Text:
text_asm
ld hl, Route11TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText3:
- text_far _Route11BattleText3
+Route11Youngster1BattleText:
+ text_far _Route11Youngster1BattleText
text_end
-Route11EndBattleText3:
- text_far _Route11EndBattleText3
+Route11Youngster1EndBattleText:
+ text_far _Route11Youngster1EndBattleText
text_end
-Route11AfterBattleText3:
- text_far _Route11AfterBattleText3
+Route11Youngster1AfterBattleText:
+ text_far _Route11Youngster1AfterBattleText
text_end
-Route11Text4:
+Route11SuperNerd1Text:
text_asm
ld hl, Route11TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText4:
- text_far _Route11BattleText4
+Route11SuperNerd1BattleText:
+ text_far _Route11SuperNerd1BattleText
text_end
-Route11EndBattleText4:
- text_far _Route11EndBattleText4
+Route11SuperNerd1EndBattleText:
+ text_far _Route11SuperNerd1EndBattleText
text_end
-Route11AfterBattleText4:
- text_far _Route11AfterBattleText4
+Route11SuperNerd1AfterBattleText:
+ text_far _Route11SuperNerd1AfterBattleText
text_end
-Route11Text5:
+Route11Youngster2Text:
text_asm
ld hl, Route11TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText5:
- text_far _Route11BattleText5
+Route11Youngster2BattleText:
+ text_far _Route11Youngster2BattleText
text_end
-Route11EndBattleText5:
- text_far _Route11EndBattleText5
+Route11Youngster2EndBattleText:
+ text_far _Route11Youngster2EndBattleText
text_end
-Route11AfterBattleText5:
- text_far _Route11AfterBattleText5
+Route11Youngster2AfterBattleText:
+ text_far _Route11Youngster2AfterBattleText5
text_end
-Route11Text6:
+Route11Gambler3Text:
text_asm
ld hl, Route11TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText6:
- text_far _Route11BattleText6
+Route11Gambler3BattleText:
+ text_far _Route11Gambler3BattleText
text_end
-Route11EndBattleText6:
- text_far _Route11EndBattleText6
+Route11Gambler3EndBattleText:
+ text_far _Route11Gambler3EndBattleText
text_end
-Route11AfterBattleText6:
- text_far _Route11AfterBattleText6
+Route11Gambler3AfterBattleText:
+ text_far _Route11Gambler3AfterBattleText
text_end
-Route11Text7:
+Route11Gambler4Text:
text_asm
ld hl, Route11TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText7:
- text_far _Route11BattleText7
+Route11Gambler4BattleText:
+ text_far _Route11Gambler4BattleText
text_end
-Route11EndBattleText7:
- text_far _Route11EndBattleText7
+Route11Gambler4EndBattleText:
+ text_far _Route11Gambler4EndBattleText
text_end
-Route11AfterBattleText7:
- text_far _Route11AfterBattleText7
+Route11Gambler4AfterBattleText:
+ text_far _Route11Gambler4AfterBattleText
text_end
-Route11Text8:
+Route11Youngster3Text:
text_asm
ld hl, Route11TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText8:
- text_far _Route11BattleText8
+Route11Youngster3BattleText:
+ text_far _Route11Youngster3BattleText
text_end
-Route11EndBattleText8:
- text_far _Route11EndBattleText8
+Route11Youngster3EndBattleText:
+ text_far _Route11Youngster3EndBattleText
text_end
-Route11AfterBattleText8:
- text_far _Route11AfterBattleText8
+Route11Youngster3AfterBattleText:
+ text_far _Route11Youngster3AfterBattleText
text_end
-Route11Text9:
+Route11SuperNerd2Text:
text_asm
ld hl, Route11TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText9:
- text_far _Route11BattleText9
+Route11SuperNerd2BattleText:
+ text_far _Route11SuperNerd2BattleText
text_end
-Route11EndBattleText9:
- text_far _Route11EndBattleText9
+Route11SuperNerd2EndBattleText:
+ text_far _Route11SuperNerd2EndBattleText
text_end
-Route11AfterBattleText9:
- text_far _Route11AfterBattleText9
+Route11SuperNerd2AfterBattleText:
+ text_far _Route11SuperNerd2AfterBattleText
text_end
-Route11Text10:
+Route11Youngster4Text:
text_asm
ld hl, Route11TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
-Route11BattleText10:
- text_far _Route11BattleText10
+Route11Youngster4BattleText:
+ text_far _Route11Youngster4BattleText
text_end
-Route11EndBattleText10:
- text_far _Route11EndBattleText10
+Route11Youngster4EndBattleText:
+ text_far _Route11Youngster4EndBattleText
text_end
-Route11AfterBattleText10:
- text_far _Route11AfterBattleText10
+Route11Youngster4AfterBattleText:
+ text_far _Route11Youngster4AfterBattleText
text_end
-Route11Text11:
- text_far _Route11Text11
+Route11DiglettsCaveSignText:
+ text_far _Route11DiglettsCaveSignText
text_end
diff --git a/scripts/Route11Gate1F.asm b/scripts/Route11Gate1F.asm
index d1ebe6ea..7ab0bc86 100644
--- a/scripts/Route11Gate1F.asm
+++ b/scripts/Route11Gate1F.asm
@@ -2,8 +2,9 @@ Route11Gate1F_Script:
jp EnableAutoTextBoxDrawing
Route11Gate1F_TextPointers:
- dw Route11GateText1
+ def_text_pointers
+ dw_const Route11Gate1FGuardText, TEXT_ROUTE11GATE1F_GUARD
-Route11GateText1:
- text_far _Route11GateText1
+Route11Gate1FGuardText:
+ text_far _Route11Gate1FGuardText
text_end
diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm
index 4026dbc9..da690ad6 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
ld a, TRADE_FOR_GURIO
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
diff --git a/scripts/Route12.asm b/scripts/Route12.asm
index d46a95bb..ea7b66ca 100644
--- a/scripts/Route12.asm
+++ b/scripts/Route12.asm
@@ -7,7 +7,7 @@ Route12_Script:
ld [wRoute12CurScript], a
ret
-Route12Script_59606:
+Route12ResetScripts:
xor a
ld [wJoyIgnore], a
ld [wRoute12CurScript], a
@@ -15,18 +15,19 @@ Route12Script_59606:
ret
Route12_ScriptPointers:
- dw Route12Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw Route12Script3
+ def_script_pointers
+ dw_const Route12DefaultScript, SCRIPT_ROUTE12_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE12_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE12_END_BATTLE
+ dw_const Route12SnorlaxPostBattleScript, SCRIPT_ROUTE12_SNORLAX_POST_BATTLE
-Route12Script0:
+Route12DefaultScript:
CheckEventHL EVENT_BEAT_ROUTE12_SNORLAX
jp nz, CheckFightingMapTrainers
CheckEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX
jp z, CheckFightingMapTrainers
- ld a, $d
+ ld a, TEXT_ROUTE12_SNORLAX_WOKE_UP
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
@@ -36,206 +37,207 @@ Route12Script0:
ld a, HS_ROUTE_12_SNORLAX
ld [wMissableObjectIndex], a
predef HideObject
- ld a, $3
+ ld a, SCRIPT_ROUTE12_SNORLAX_POST_BATTLE
ld [wRoute12CurScript], a
ld [wCurMapScript], a
ret
-Route12Script3:
+Route12SnorlaxPostBattleScript:
ld a, [wIsInBattle]
cp $ff
- jr z, Route12Script_59606
+ jr z, Route12ResetScripts
call UpdateSprites
ld a, [wBattleResult]
cp $2
- jr z, .asm_59664
- ld a, $e
+ jr z, .caught_snorlax
+ ld a, TEXT_ROUTE12_SNORLAX_CALMED_DOWN
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-.asm_59664
+.caught_snorlax
SetEvent EVENT_BEAT_ROUTE12_SNORLAX
call Delay3
- ld a, $0
+ ld a, SCRIPT_ROUTE12_DEFAULT
ld [wRoute12CurScript], a
ld [wCurMapScript], a
ret
Route12_TextPointers:
- dw Route12Text1
- dw Route12Text2
- dw Route12Text3
- dw Route12Text4
- dw Route12Text5
- dw Route12Text6
- dw Route12Text7
- dw Route12Text8
- dw PickUpItemText
- dw PickUpItemText
- dw Route12Text11
- dw Route12Text12
- dw Route12Text13
- dw Route12Text14
+ def_text_pointers
+ dw_const Route12SnorlaxText, TEXT_ROUTE12_SNORLAX
+ dw_const Route12Fisher1Text, TEXT_ROUTE12_FISHER1
+ dw_const Route12Fisher2Text, TEXT_ROUTE12_FISHER2
+ dw_const Route12CooltrainerMText, TEXT_ROUTE12_COOLTRAINER_M
+ dw_const Route12SuperNerdText, TEXT_ROUTE12_SUPER_NERD
+ dw_const Route12Fisher3Text, TEXT_ROUTE12_FISHER3
+ dw_const Route12Fisher4Text, TEXT_ROUTE12_FISHER4
+ dw_const Route12Fisher5Text, TEXT_ROUTE12_FISHER5
+ dw_const PickUpItemText, TEXT_ROUTE12_TM_PAY_DAY
+ dw_const PickUpItemText, TEXT_ROUTE12_IRON
+ dw_const Route12SignText, TEXT_ROUTE12_SIGN
+ dw_const Route12SportFishingSignText, TEXT_ROUTE12_SPORT_FISHING_SIGN
+ dw_const Route12SnorlaxWokeUpText, TEXT_ROUTE12_SNORLAX_WOKE_UP
+ dw_const Route12SnorlaxCalmedDownText, TEXT_ROUTE12_SNORLAX_CALMED_DOWN
Route12TrainerHeaders:
def_trainers 2
Route12TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_0, 4, Route12BattleText1, Route12EndBattleText1, Route12AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_0, 4, Route12Fisher1BattleText, Route12Fisher1EndBattleText, Route12Fisher1AfterBattleText
Route12TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_1, 4, Route12BattleText2, Route12EndBattleText2, Route12AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_1, 4, Route12Fisher2BattleText, Route12Fisher2EndBattleText, Route12Fisher2AfterBattleText
Route12TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_2, 4, Route12BattleText3, Route12EndBattleText3, Route12AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_2, 4, Route12CooltrainerMBattleText, Route12CooltrainerMEndBattleText, Route12CooltrainerMAfterBattleText
Route12TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_3, 4, Route12BattleText4, Route12EndBattleText4, Route12AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_3, 4, Route12SuperNerdBattleText, Route12SuperNerdEndBattleText, Route12SuperNerdAfterBattleText
Route12TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_4, 4, Route12BattleText5, Route12EndBattleText5, Route12AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_4, 4, Route12Fisher3BattleText, Route12Fisher3EndBattleText, Route12Fisher3AfterBattleText
Route12TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_5, 4, Route12BattleText6, Route12EndBattleText6, Route12AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_5, 4, Route12Fisher4BattleText, Route12Fisher4EndBattleText, Route12Fisher4AfterBattleText
Route12TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_12_TRAINER_6, 1, Route12BattleText7, Route12EndBattleText7, Route12AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_12_TRAINER_6, 1, Route12Fisher5BattleText, Route12Fisher5EndBattleText, Route12Fisher5AfterBattleText
db -1 ; end
-Route12Text1:
- text_far _Route12Text1
+Route12SnorlaxText:
+ text_far _Route12SnorlaxText
text_end
-Route12Text13:
- text_far _Route12Text13
+Route12SnorlaxWokeUpText:
+ text_far _Route12SnorlaxWokeUpText
text_end
-Route12Text14:
- text_far _Route12Text14
+Route12SnorlaxCalmedDownText:
+ text_far _Route12SnorlaxCalmedDownText
text_end
-Route12Text2:
+Route12Fisher1Text:
text_asm
ld hl, Route12TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText1:
- text_far _Route12BattleText1
+Route12Fisher1BattleText:
+ text_far _Route12Fisher1BattleText
text_end
-Route12EndBattleText1:
- text_far _Route12EndBattleText1
+Route12Fisher1EndBattleText:
+ text_far _Route12Fisher1EndBattleText
text_end
-Route12AfterBattleText1:
- text_far _Route12AfterBattleText1
+Route12Fisher1AfterBattleText:
+ text_far _Route12Fisher1AfterBattleText
text_end
-Route12Text3:
+Route12Fisher2Text:
text_asm
ld hl, Route12TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText2:
- text_far _Route12BattleText2
+Route12Fisher2BattleText:
+ text_far _Route12Fisher2BattleText
text_end
-Route12EndBattleText2:
- text_far _Route12EndBattleText2
+Route12Fisher2EndBattleText:
+ text_far _Route12Fisher2EndBattleText
text_end
-Route12AfterBattleText2:
- text_far _Route12AfterBattleText2
+Route12Fisher2AfterBattleText:
+ text_far _Route12Fisher2AfterBattleText
text_end
-Route12Text4:
+Route12CooltrainerMText:
text_asm
ld hl, Route12TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText3:
- text_far _Route12BattleText3
+Route12CooltrainerMBattleText:
+ text_far _Route12CooltrainerMBattleText
text_end
-Route12EndBattleText3:
- text_far _Route12EndBattleText3
+Route12CooltrainerMEndBattleText:
+ text_far _Route12CooltrainerMEndBattleText
text_end
-Route12AfterBattleText3:
- text_far _Route12AfterBattleText3
+Route12CooltrainerMAfterBattleText:
+ text_far _Route12CooltrainerMAfterBattleText
text_end
-Route12Text5:
+Route12SuperNerdText:
text_asm
ld hl, Route12TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText4:
- text_far _Route12BattleText4
+Route12SuperNerdBattleText:
+ text_far _Route12SuperNerdBattleText
text_end
-Route12EndBattleText4:
- text_far _Route12EndBattleText4
+Route12SuperNerdEndBattleText:
+ text_far _Route12SuperNerdEndBattleText
text_end
-Route12AfterBattleText4:
- text_far _Route12AfterBattleText4
+Route12SuperNerdAfterBattleText:
+ text_far _Route12SuperNerdAfterBattleText
text_end
-Route12Text6:
+Route12Fisher3Text:
text_asm
ld hl, Route12TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText5:
- text_far _Route12BattleText5
+Route12Fisher3BattleText:
+ text_far _Route12Fisher3BattleText
text_end
-Route12EndBattleText5:
- text_far _Route12EndBattleText5
+Route12Fisher3EndBattleText:
+ text_far _Route12Fisher3EndBattleText
text_end
-Route12AfterBattleText5:
- text_far _Route12AfterBattleText5
+Route12Fisher3AfterBattleText:
+ text_far _Route12Fisher3AfterBattleText
text_end
-Route12Text7:
+Route12Fisher4Text:
text_asm
ld hl, Route12TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText6:
- text_far _Route12BattleText6
+Route12Fisher4BattleText:
+ text_far _Route12Fisher4BattleText
text_end
-Route12EndBattleText6:
- text_far _Route12EndBattleText6
+Route12Fisher4EndBattleText:
+ text_far _Route12Fisher4EndBattleText
text_end
-Route12AfterBattleText6:
- text_far _Route12AfterBattleText6
+Route12Fisher4AfterBattleText:
+ text_far _Route12Fisher4AfterBattleText
text_end
-Route12Text8:
+Route12Fisher5Text:
text_asm
ld hl, Route12TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route12BattleText7:
- text_far _Route12BattleText7
+Route12Fisher5BattleText:
+ text_far _Route12Fisher5BattleText
text_end
-Route12EndBattleText7:
- text_far _Route12EndBattleText7
+Route12Fisher5EndBattleText:
+ text_far _Route12Fisher5EndBattleText
text_end
-Route12AfterBattleText7:
- text_far _Route12AfterBattleText7
+Route12Fisher5AfterBattleText:
+ text_far _Route12Fisher5AfterBattleText
text_end
-Route12Text11:
- text_far _Route12Text11
+Route12SignText:
+ text_far _Route12SignText
text_end
-Route12Text12:
- text_far _Route12Text12
+Route12SportFishingSignText:
+ text_far _Route12SportFishingSignText
text_end
diff --git a/scripts/Route12Gate1F.asm b/scripts/Route12Gate1F.asm
index 72f2dfbf..91288a1f 100644
--- a/scripts/Route12Gate1F.asm
+++ b/scripts/Route12Gate1F.asm
@@ -2,8 +2,9 @@ Route12Gate1F_Script:
jp EnableAutoTextBoxDrawing
Route12Gate1F_TextPointers:
- dw Route12GateText1
+ def_text_pointers
+ dw_const Route12Gate1FGuardText, TEXT_ROUTE12GATE1F_GUARD
-Route12GateText1:
- text_far _Route12GateText1
+Route12Gate1FGuardText:
+ text_far _Route12Gate1FGuardText
text_end
diff --git a/scripts/Route12Gate2F.asm b/scripts/Route12Gate2F.asm
index 2174fba8..c1c68221 100644
--- a/scripts/Route12Gate2F.asm
+++ b/scripts/Route12Gate2F.asm
@@ -2,66 +2,67 @@ Route12Gate2F_Script:
jp DisableAutoTextBoxDrawing
Route12Gate2F_TextPointers:
- dw Route12GateUpstairsText1
- dw Route12GateUpstairsText2
- dw Route12GateUpstairsText3
+ def_text_pointers
+ dw_const Route12Gate2FBrunetteGirlText, TEXT_ROUTE12GATE2F_BRUNETTE_GIRL
+ dw_const Route12Gate2FLeftBinocularsText, TEXT_ROUTE12GATE2F_LEFT_BINOCULARS
+ dw_const Route12Gate2FRightBinocularsText, TEXT_ROUTE12GATE2F_RIGHT_BINOCULARS
-Route12GateUpstairsText1:
+Route12Gate2FBrunetteGirlText:
text_asm
CheckEvent EVENT_GOT_TM39, 1
jr c, .got_item
- ld hl, TM39PreReceiveText
+ ld hl, .YouCanHaveThisText
call PrintText
lb bc, TM_SWIFT, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedTM39Text
+ ld hl, .ReceivedTM39Text
call PrintText
SetEvent EVENT_GOT_TM39
jr .done
.bag_full
- ld hl, TM39NoRoomText
+ ld hl, .TM39NoRoomText
call PrintText
jr .done
.got_item
- ld hl, TM39ExplanationText
+ ld hl, .TM39ExplanationText
call PrintText
.done
jp TextScriptEnd
-TM39PreReceiveText:
- text_far _TM39PreReceiveText
+.YouCanHaveThisText:
+ text_far _Route12Gate2FBrunetteGirlYouCanHaveThisText
text_end
-ReceivedTM39Text:
- text_far _ReceivedTM39Text
+.ReceivedTM39Text:
+ text_far _Route12Gate2FBrunetteGirlReceivedTM39Text
sound_get_item_1
text_end
-TM39ExplanationText:
- text_far _TM39ExplanationText
+.TM39ExplanationText:
+ text_far _Route12Gate2FBrunetteGirlTM39ExplanationText
text_end
-TM39NoRoomText:
- text_far _TM39NoRoomText
+.TM39NoRoomText:
+ text_far _Route12Gate2FBrunetteGirlTM39NoRoomText
text_end
-Route12GateUpstairsText2:
+Route12Gate2FLeftBinocularsText:
text_asm
- ld hl, Route12GateUpstairsText_495b8
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route12GateUpstairsText_495b8:
- text_far _Route12GateUpstairsText_495b8
+.Text:
+ text_far _Route12Gate2FLeftBinocularsText
text_end
-Route12GateUpstairsText3:
+Route12Gate2FRightBinocularsText:
text_asm
- ld hl, Route12GateUpstairsText_495c4
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route12GateUpstairsText_495c4:
- text_far _Route12GateUpstairsText_495c4
+.Text:
+ text_far _Route12Gate2FRightBinocularsText
text_end
GateUpstairsScript_PrintIfFacingUp:
diff --git a/scripts/Route12SuperRodHouse.asm b/scripts/Route12SuperRodHouse.asm
index fba5426e..551949d0 100644
--- a/scripts/Route12SuperRodHouse.asm
+++ b/scripts/Route12SuperRodHouse.asm
@@ -2,14 +2,15 @@ Route12SuperRodHouse_Script:
jp EnableAutoTextBoxDrawing
Route12SuperRodHouse_TextPointers:
- dw Route12HouseText1
+ def_text_pointers
+ dw_const Route12SuperRodHouseFishingGuruText, TEXT_ROUTE12SUPERRODHOUSE_FISHING_GURU
-Route12HouseText1:
+Route12SuperRodHouseFishingGuruText:
text_asm
ld a, [wd728]
bit 5, a ; received super rod?
jr nz, .got_item
- ld hl, Route12HouseText_564c0
+ ld hl, .DoYouLikeToFishText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -20,38 +21,38 @@ Route12HouseText1:
jr nc, .bag_full
ld hl, wd728
set 5, [hl] ; received super rod
- ld hl, Route12HouseText_564c5
+ ld hl, .ReceivedSuperRodText
jr .done
.bag_full
- ld hl, Route12HouseText_564d9
+ ld hl, .NoRoomText
jr .done
.refused
- ld hl, Route12HouseText_564cf
+ ld hl, .ThatsDisappointingText
jr .done
.got_item
- ld hl, Route12HouseText_564d4
+ ld hl, .TryFishingText
.done
call PrintText
jp TextScriptEnd
-Route12HouseText_564c0:
- text_far _Route12HouseText_564c0
+.DoYouLikeToFishText:
+ text_far _Route12SuperRodHouseFishingGuruDoYouLikeToFishText
text_end
-Route12HouseText_564c5:
- text_far _Route12HouseText_564c5
+.ReceivedSuperRodText:
+ text_far _Route12SuperRodHouseFishingGuruReceivedSuperRodText
sound_get_item_1
- text_far _Route12HouseText_564ca
+ text_far _Route12SuperRodHouseFishingGuruFishingWayOfLifeText
text_end
-Route12HouseText_564cf:
- text_far _Route12HouseText_564cf
+.ThatsDisappointingText:
+ text_far _Route12SuperRodHouseFishingGuruThatsDisappointingText
text_end
-Route12HouseText_564d4:
- text_far _Route12HouseText_564d4
+.TryFishingText:
+ text_far _Route12SuperRodHouseFishingGuruTryFishingText
text_end
-Route12HouseText_564d9:
- text_far _Route12HouseText_564d9
+.NoRoomText:
+ text_far _Route12SuperRodHouseFishingGuruNoRoomText
text_end
diff --git a/scripts/Route13.asm b/scripts/Route13.asm
index d7f55f28..3ee6537a 100644
--- a/scripts/Route13.asm
+++ b/scripts/Route13.asm
@@ -8,237 +8,239 @@ Route13_Script:
ret
Route13_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE13_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE13_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE13_END_BATTLE
Route13_TextPointers:
- dw Route13Text1
- dw Route13Text2
- dw Route13Text3
- dw Route13Text4
- dw Route13Text5
- dw Route13Text6
- dw Route13Text7
- dw Route13Text8
- dw Route13Text9
- dw Route13Text10
- dw Route13Text11
- dw Route13Text12
- dw Route13Text13
+ def_text_pointers
+ dw_const Route13CooltrainerM1Text, TEXT_ROUTE13_COOLTRAINER_M1
+ dw_const Route13CooltrainerF1Text, TEXT_ROUTE13_COOLTRAINER_F1
+ dw_const Route13CooltrainerF2Text, TEXT_ROUTE13_COOLTRAINER_F2
+ dw_const Route13CooltrainerF3Text, TEXT_ROUTE13_COOLTRAINER_F3
+ dw_const Route13CooltrainerF4Text, TEXT_ROUTE13_COOLTRAINER_F4
+ dw_const Route13CooltrainerM2Text, TEXT_ROUTE13_COOLTRAINER_M2
+ dw_const Route13Beauty1Text, TEXT_ROUTE13_BEAUTY1
+ dw_const Route13Beauty2Text, TEXT_ROUTE13_BEAUTY2
+ dw_const Route13BikerText, TEXT_ROUTE13_BIKER
+ dw_const Route13CooltrainerM3Text, TEXT_ROUTE13_COOLTRAINER_M3
+ dw_const Route13TrainerTips1Text, TEXT_ROUTE13_TRAINER_TIPS1
+ dw_const Route13TrainerTips2Text, TEXT_ROUTE13_TRAINER_TIPS2
+ dw_const Route13SignText, TEXT_ROUTE13_SIGN
Route13TrainerHeaders:
def_trainers
Route13TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_0, 2, Route13BattleText2, Route13EndBattleText2, Route13AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_0, 2, Route13CooltrainerM1BattleText, Route13CooltrainerM1EndBattleText, Route13CooltrainerM1AfterBattleText
Route13TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_1, 2, Route13BattleText3, Route13EndBattleText3, Route13AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_1, 2, Route13CooltrainerF1BattleText, Route13CooltrainerF1EndBattleText, Route13CooltrainerF1AfterBattleText
Route13TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_2, 2, Route13BattleText4, Route13EndBattleText4, Route13AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_2, 2, Route13CooltrainerF2BattleText, Route13CooltrainerF2EndBattleText, Route13CooltrainerF2AfterBattleText
Route13TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_3, 2, Route13BattleText5, Route13EndBattleText5, Route13AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_3, 2, Route13CooltrainerF3BattleText, Route13CooltrainerF3EndBattleText, Route13CooltrainerF3AfterBattleText
Route13TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_4, 4, Route13BattleText6, Route13EndBattleText6, Route13AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_4, 4, Route13CooltrainerF4BattleText, Route13CooltrainerF4EndBattleText, Route13CooltrainerF4AfterBattleText
Route13TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_5, 2, Route13BattleText7, Route13EndBattleText7, Route13AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_5, 2, Route13CooltrainerM2BattleText, Route13CooltrainerM2EndBattleText, Route13CooltrainerM2AfterBattleText
Route13TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_6, 4, Route13BattleText8, Route13EndBattleText8, Route13AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_6, 4, Route13Beauty1BattleText, Route13Beauty1EndBattleText, Route13Beauty1AfterBattleText
Route13TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_7, 2, Route13BattleText9, Route13EndBattleText9, Route13AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_7, 2, Route13Beauty2BattleText, Route13Beauty2EndBattleText, Route13Beauty2AfterBattleText
Route13TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_8, 2, Route13BattleText10, Route13EndBattleText10, Route13AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_8, 2, Route13BikerBattleText, Route13BikerEndBattleText, Route13BikerAfterBattleText
Route13TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_13_TRAINER_9, 4, Route13BattleText11, Route13EndBattleText11, Route13AfterBattleText11
+ trainer EVENT_BEAT_ROUTE_13_TRAINER_9, 4, Route13CooltrainerM3BattleText, Route13CooltrainerM3EndBattleText, Route13CooltrainerM3AfterBattleText
db -1 ; end
-Route13Text1:
+Route13CooltrainerM1Text:
text_asm
ld hl, Route13TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText2:
- text_far _Route13BattleText2
+Route13CooltrainerM1BattleText:
+ text_far _Route13CooltrainerM1BattleText
text_end
-Route13EndBattleText2:
- text_far _Route13EndBattleText2
+Route13CooltrainerM1EndBattleText:
+ text_far _Route13CooltrainerM1EndBattleText
text_end
-Route13AfterBattleText2:
- text_far _Route13AfterBattleText2
+Route13CooltrainerM1AfterBattleText:
+ text_far _Route13CooltrainerM1AfterBattleText
text_end
-Route13Text2:
+Route13CooltrainerF1Text:
text_asm
ld hl, Route13TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText3:
- text_far _Route13BattleText3
+Route13CooltrainerF1BattleText:
+ text_far _Route13CooltrainerF1BattleText
text_end
-Route13EndBattleText3:
- text_far _Route13EndBattleText3
+Route13CooltrainerF1EndBattleText:
+ text_far _Route13CooltrainerF1EndBattleText
text_end
-Route13AfterBattleText3:
- text_far _Route13AfterBattleText3
+Route13CooltrainerF1AfterBattleText:
+ text_far _Route13CooltrainerF1AfterBattleText
text_end
-Route13Text3:
+Route13CooltrainerF2Text:
text_asm
ld hl, Route13TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText4:
- text_far _Route13BattleText4
+Route13CooltrainerF2BattleText:
+ text_far _Route13CooltrainerF2BattleText
text_end
-Route13EndBattleText4:
- text_far _Route13EndBattleText4
+Route13CooltrainerF2EndBattleText:
+ text_far _Route13CooltrainerF2EndBattleText
text_end
-Route13AfterBattleText4:
- text_far _Route13AfterBattleText4
+Route13CooltrainerF2AfterBattleText:
+ text_far _Route13CooltrainerF2AfterBattleText
text_end
-Route13Text4:
+Route13CooltrainerF3Text:
text_asm
ld hl, Route13TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText5:
- text_far _Route13BattleText5
+Route13CooltrainerF3BattleText:
+ text_far _Route13CooltrainerF3BattleText
text_end
-Route13EndBattleText5:
- text_far _Route13EndBattleText5
+Route13CooltrainerF3EndBattleText:
+ text_far _Route13CooltrainerF3EndBattleText
text_end
-Route13AfterBattleText5:
- text_far _Route13AfterBattleText5
+Route13CooltrainerF3AfterBattleText:
+ text_far _Route13CooltrainerF3AfterBattleText
text_end
-Route13Text5:
+Route13CooltrainerF4Text:
text_asm
ld hl, Route13TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText6:
- text_far _Route13BattleText6
+Route13CooltrainerF4BattleText:
+ text_far _Route13CooltrainerF4BattleText
text_end
-Route13EndBattleText6:
- text_far _Route13EndBattleText6
+Route13CooltrainerF4EndBattleText:
+ text_far _Route13CooltrainerF4EndBattleText
text_end
-Route13AfterBattleText6:
- text_far _Route13AfterBattleText6
+Route13CooltrainerF4AfterBattleText:
+ text_far _Route13CooltrainerF4AfterBattleText
text_end
-Route13Text6:
+Route13CooltrainerM2Text:
text_asm
ld hl, Route13TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText7:
- text_far _Route13BattleText7
+Route13CooltrainerM2BattleText:
+ text_far _Route13CooltrainerM2BattleText
text_end
-Route13EndBattleText7:
- text_far _Route13EndBattleText7
+Route13CooltrainerM2EndBattleText:
+ text_far _Route13CooltrainerM2EndBattleText
text_end
-Route13AfterBattleText7:
- text_far _Route13AfterBattleText7
+Route13CooltrainerM2AfterBattleText:
+ text_far _Route13CooltrainerM2AfterBattleText
text_end
-Route13Text7:
+Route13Beauty1Text:
text_asm
ld hl, Route13TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText8:
- text_far _Route13BattleText8
+Route13Beauty1BattleText:
+ text_far _Route13Beauty1BattleText
text_end
-Route13EndBattleText8:
- text_far _Route13EndBattleText8
+Route13Beauty1EndBattleText:
+ text_far _Route13Beauty1EndBattleText
text_end
-Route13AfterBattleText8:
- text_far _Route13AfterBattleText8
+Route13Beauty1AfterBattleText:
+ text_far _Route13Beauty1AfterBattleText
text_end
-Route13Text8:
+Route13Beauty2Text:
text_asm
ld hl, Route13TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText9:
- text_far _Route13BattleText9
+Route13Beauty2BattleText:
+ text_far _Route13Beauty2BattleText
text_end
-Route13EndBattleText9:
- text_far _Route13EndBattleText9
+Route13Beauty2EndBattleText:
+ text_far _Route13Beauty2EndBattleText
text_end
-Route13AfterBattleText9:
- text_far _Route13AfterBattleText9
+Route13Beauty2AfterBattleText:
+ text_far _Route13Beauty2AfterBattleText
text_end
-Route13Text9:
+Route13BikerText:
text_asm
ld hl, Route13TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText10:
- text_far _Route13BattleText10
+Route13BikerBattleText:
+ text_far _Route13BikerBattleText
text_end
-Route13EndBattleText10:
- text_far _Route13EndBattleText10
+Route13BikerEndBattleText:
+ text_far _Route13BikerEndBattleText
text_end
-Route13AfterBattleText10:
- text_far _Route13AfterBattleText10
+Route13BikerAfterBattleText:
+ text_far _Route13BikerAfterBattleText
text_end
-Route13Text10:
+Route13CooltrainerM3Text:
text_asm
ld hl, Route13TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
-Route13BattleText11:
- text_far _Route13BattleText11
+Route13CooltrainerM3BattleText:
+ text_far _Route13CooltrainerM3BattleText
text_end
-Route13EndBattleText11:
- text_far _Route13EndBattleText11
+Route13CooltrainerM3EndBattleText:
+ text_far _Route13CooltrainerM3EndBattleText
text_end
-Route13AfterBattleText11:
- text_far _Route13AfterBattleText11
+Route13CooltrainerM3AfterBattleText:
+ text_far _Route13CooltrainerM3AfterBattleText
text_end
-Route13Text11:
- text_far _Route13Text11
+Route13TrainerTips1Text:
+ text_far _Route13TrainerTips1Text
text_end
-Route13Text12:
- text_far _Route13Text12
+Route13TrainerTips2Text:
+ text_far _Route13TrainerTips2Text
text_end
-Route13Text13:
- text_far _Route13Text13
+Route13SignText:
+ text_far _Route13SignText
text_end
diff --git a/scripts/Route14.asm b/scripts/Route14.asm
index 3c3fe50f..8f1cc9d0 100644
--- a/scripts/Route14.asm
+++ b/scripts/Route14.asm
@@ -8,227 +8,229 @@ Route14_Script:
ret
Route14_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE14_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE14_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE14_END_BATTLE
Route14_TextPointers:
- dw Route14Text1
- dw Route14Text2
- dw Route14Text3
- dw Route14Text4
- dw Route14Text5
- dw Route14Text6
- dw Route14Text7
- dw Route14Text8
- dw Route14Text9
- dw Route14Text10
- dw Route14Text11
+ def_text_pointers
+ dw_const Route14CooltrainerM1Text, TEXT_ROUTE14_COOLTRAINER_M1
+ dw_const Route14CooltrainerM2Text, TEXT_ROUTE14_COOLTRAINER_M2
+ dw_const Route14CooltrainerM3Text, TEXT_ROUTE14_COOLTRAINER_M3
+ dw_const Route14CooltrainerM4Text, TEXT_ROUTE14_COOLTRAINER_M4
+ dw_const Route14CooltrainerM5Text, TEXT_ROUTE14_COOLTRAINER_M5
+ dw_const Route14CooltrainerM6Text, TEXT_ROUTE14_COOLTRAINER_M6
+ dw_const Route14Biker1Text, TEXT_ROUTE14_BIKER1
+ dw_const Route14Biker2Text, TEXT_ROUTE14_BIKER2
+ dw_const Route14Biker3Text, TEXT_ROUTE14_BIKER3
+ dw_const Route14Biker4Text, TEXT_ROUTE14_BIKER4
+ dw_const Route14SignText, TEXT_ROUTE14_SIGN
Route14TrainerHeaders:
def_trainers
Route14TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_0, 2, Route14BattleText1, Route14EndBattleText1, Route14AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_0, 2, Route14CooltrainerM1BattleText, Route14CooltrainerM1EndBattleText, Route14CooltrainerM1AfterBattleText
Route14TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_1, 2, Route14BattleText2, Route14EndBattleText2, Route14AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_1, 2, Route14CooltrainerM2BattleText, Route14CooltrainerM2EndBattleText, Route14CooltrainerM2AfterBattleText
Route14TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_2, 4, Route14BattleText3, Route14EndBattleText3, Route14AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_2, 4, Route14CooltrainerM3BattleText, Route14CooltrainerM3EndBattleText, Route14CooltrainerM3AfterBattleText
Route14TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_3, 3, Route14BattleText4, Route14EndBattleText4, Route14AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_3, 3, Route14CooltrainerM4BattleText, Route14CooltrainerM4EndBattleText, Route14CooltrainerM4AfterBattleText
Route14TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_4, 3, Route14BattleText5, Route14EndBattleText5, Route14AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_4, 3, Route14CooltrainerM5BattleText, Route14CooltrainerM5EndBattleText, Route14CooltrainerM5AfterBattleText
Route14TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_5, 4, Route14BattleText6, Route14EndBattleText6, Route14AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_5, 4, Route14CooltrainerM6BattleText, Route14CooltrainerM6EndBattleText, Route14CooltrainerM6AfterBattleText
Route14TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_6, 4, Route14BattleText7, Route14EndBattleText7, Route14AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_6, 4, Route14Biker1BattleText, Route14Biker1EndBattleText, Route14Biker1AfterBattleText
Route14TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_7, 4, Route14BattleText8, Route14EndBattleText8, Route14AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_7, 4, Route14Biker2BattleText, Route14Biker2EndBattleText, Route14Biker2AfterBattleText
Route14TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_8, 3, Route14BattleText9, Route14EndBattleText9, Route14AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_8, 3, Route14Biker3BattleText, Route14Biker3EndBattleText, Route14Biker3AfterBattleText
Route14TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_14_TRAINER_9, 4, Route14BattleText10, Route14EndBattleText10, Route14AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_14_TRAINER_9, 4, Route14Biker4BattleText, Route14Biker4EndBattleText, Route14Biker4AfterBattleText
db -1 ; end
-Route14Text1:
+Route14CooltrainerM1Text:
text_asm
ld hl, Route14TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText1:
- text_far _Route14BattleText1
+Route14CooltrainerM1BattleText:
+ text_far _Route14CooltrainerM1BattleText
text_end
-Route14EndBattleText1:
- text_far _Route14EndBattleText1
+Route14CooltrainerM1EndBattleText:
+ text_far _Route14CooltrainerM1EndBattleText
text_end
-Route14AfterBattleText1:
- text_far _Route14AfterBattleText1
+Route14CooltrainerM1AfterBattleText:
+ text_far _Route14CooltrainerM1AfterBattleText
text_end
-Route14Text2:
+Route14CooltrainerM2Text:
text_asm
ld hl, Route14TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText2:
- text_far _Route14BattleText2
+Route14CooltrainerM2BattleText:
+ text_far _Route14CooltrainerM2BattleText
text_end
-Route14EndBattleText2:
- text_far _Route14EndBattleText2
+Route14CooltrainerM2EndBattleText:
+ text_far _Route14CooltrainerM2EndBattleText
text_end
-Route14AfterBattleText2:
- text_far _Route14AfterBattleText2
+Route14CooltrainerM2AfterBattleText:
+ text_far _Route14CooltrainerM2AfterBattleText
text_end
-Route14Text3:
+Route14CooltrainerM3Text:
text_asm
ld hl, Route14TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText3:
- text_far _Route14BattleText3
+Route14CooltrainerM3BattleText:
+ text_far _Route14CooltrainerM3BattleText
text_end
-Route14EndBattleText3:
- text_far _Route14EndBattleText3
+Route14CooltrainerM3EndBattleText:
+ text_far _Route14CooltrainerM3EndBattleText
text_end
-Route14AfterBattleText3:
- text_far _Route14AfterBattleText3
+Route14CooltrainerM3AfterBattleText:
+ text_far _Route14CooltrainerM3AfterBattleText
text_end
-Route14Text4:
+Route14CooltrainerM4Text:
text_asm
ld hl, Route14TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText4:
- text_far _Route14BattleText4
+Route14CooltrainerM4BattleText:
+ text_far _Route14CooltrainerM4BattleText
text_end
-Route14EndBattleText4:
- text_far _Route14EndBattleText4
+Route14CooltrainerM4EndBattleText:
+ text_far _Route14CooltrainerM4EndBattleText
text_end
-Route14AfterBattleText4:
- text_far _Route14AfterBattleText4
+Route14CooltrainerM4AfterBattleText:
+ text_far _Route14CooltrainerM4AfterBattleText
text_end
-Route14Text5:
+Route14CooltrainerM5Text:
text_asm
ld hl, Route14TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText5:
- text_far _Route14BattleText5
+Route14CooltrainerM5BattleText:
+ text_far _Route14CooltrainerM5BattleText
text_end
-Route14EndBattleText5:
- text_far _Route14EndBattleText5
+Route14CooltrainerM5EndBattleText:
+ text_far _Route14CooltrainerM5EndBattleText
text_end
-Route14AfterBattleText5:
- text_far _Route14AfterBattleText5
+Route14CooltrainerM5AfterBattleText:
+ text_far _Route14CooltrainerM5AfterBattleText
text_end
-Route14Text6:
+Route14CooltrainerM6Text:
text_asm
ld hl, Route14TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText6:
- text_far _Route14BattleText6
+Route14CooltrainerM6BattleText:
+ text_far _Route14CooltrainerM6BattleText
text_end
-Route14EndBattleText6:
- text_far _Route14EndBattleText6
+Route14CooltrainerM6EndBattleText:
+ text_far _Route14CooltrainerM6EndBattleText
text_end
-Route14AfterBattleText6:
- text_far _Route14AfterBattleText6
+Route14CooltrainerM6AfterBattleText:
+ text_far _Route14CooltrainerM6AfterBattleText
text_end
-Route14Text7:
+Route14Biker1Text:
text_asm
ld hl, Route14TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText7:
- text_far _Route14BattleText7
+Route14Biker1BattleText:
+ text_far _Route14Biker1BattleText
text_end
-Route14EndBattleText7:
- text_far _Route14EndBattleText7
+Route14Biker1EndBattleText:
+ text_far _Route14Biker1EndBattleText
text_end
-Route14AfterBattleText7:
- text_far _Route14AfterBattleText7
+Route14Biker1AfterBattleText:
+ text_far _Route14Biker1AfterBattleText
text_end
-Route14Text8:
+Route14Biker2Text:
text_asm
ld hl, Route14TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText8:
- text_far _Route14BattleText8
+Route14Biker2BattleText:
+ text_far _Route14Biker2BattleText
text_end
-Route14EndBattleText8:
- text_far _Route14EndBattleText8
+Route14Biker2EndBattleText:
+ text_far _Route14Biker2EndBattleText
text_end
-Route14AfterBattleText8:
- text_far _Route14AfterBattleText8
+Route14Biker2AfterBattleText:
+ text_far _Route14Biker2AfterBattleText
text_end
-Route14Text9:
+Route14Biker3Text:
text_asm
ld hl, Route14TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText9:
- text_far _Route14BattleText9
+Route14Biker3BattleText:
+ text_far _Route14Biker3BattleText
text_end
-Route14EndBattleText9:
- text_far _Route14EndBattleText9
+Route14Biker3EndBattleText:
+ text_far _Route14Biker3EndBattleText
text_end
-Route14AfterBattleText9:
- text_far _Route14AfterBattleText9
+Route14Biker3AfterBattleText:
+ text_far _Route14Biker3AfterBattleText
text_end
-Route14Text10:
+Route14Biker4Text:
text_asm
ld hl, Route14TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
-Route14BattleText10:
- text_far _Route14BattleText10
+Route14Biker4BattleText:
+ text_far _Route14Biker4BattleText
text_end
-Route14EndBattleText10:
- text_far _Route14EndBattleText10
+Route14Biker4EndBattleText:
+ text_far _Route14Biker4EndBattleText
text_end
-Route14AfterBattleText10:
- text_far _Route14AfterBattleText10
+Route14Biker4AfterBattleText:
+ text_far _Route14Biker4AfterBattleText
text_end
-Route14Text11:
- text_far _Route14Text11
+Route14SignText:
+ text_far _Route14SignText
text_end
diff --git a/scripts/Route15.asm b/scripts/Route15.asm
index d3fb18bf..76275dd6 100644
--- a/scripts/Route15.asm
+++ b/scripts/Route15.asm
@@ -8,220 +8,222 @@ Route15_Script:
ret
Route15_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE15_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE15_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE15_END_BATTLE
Route15_TextPointers:
- dw Route15Text1
- dw Route15Text2
- dw Route15Text3
- dw Route15Text4
- dw Route15Text5
- dw Route15Text6
- dw Route15Text7
- dw Route15Text8
- dw Route15Text9
- dw Route15Text10
- dw PickUpItemText
- dw Route15Text12
+ def_text_pointers
+ dw_const Route15CooltrainerF1Text, TEXT_ROUTE15_COOLTRAINER_F1
+ dw_const Route15CooltrainerF2Text, TEXT_ROUTE15_COOLTRAINER_F2
+ dw_const Route15CooltrainerM1Text, TEXT_ROUTE15_COOLTRAINER_M1
+ dw_const Route15CooltrainerM2Text, TEXT_ROUTE15_COOLTRAINER_M2
+ dw_const Route15Beauty1Text, TEXT_ROUTE15_BEAUTY1
+ dw_const Route15Beauty2Text, TEXT_ROUTE15_BEAUTY2
+ dw_const Route15Biker1Text, TEXT_ROUTE15_BIKER1
+ dw_const Route15Biker2Text, TEXT_ROUTE15_BIKER2
+ dw_const Route15CooltrainerF3Text, TEXT_ROUTE15_COOLTRAINER_F3
+ dw_const Route15CooltrainerF4Text, TEXT_ROUTE15_COOLTRAINER_F4
+ dw_const PickUpItemText, TEXT_ROUTE15_TM_RAGE
+ dw_const Route15SignText, TEXT_ROUTE15_SIGN
Route15TrainerHeaders:
def_trainers
Route15TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_0, 2, Route15BattleText1, Route15EndBattleText1, Route15AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_0, 2, Route15CooltrainerF1BattleText, Route15CooltrainerF1EndBattleText, Route15CooltrainerF1AfterBattleText
Route15TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_1, 3, Route15BattleText2, Route15EndBattleText2, Route15AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_1, 3, Route15CooltrainerF2BattleText, Route15CooltrainerF2EndBattleText, Route15CooltrainerF2AfterBattleText
Route15TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_2, 3, Route15BattleText3, Route15EndBattleText3, Route15AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_2, 3, Route15CooltrainerM1BattleText, Route15CooltrainerM1EndBattleText, Route15CooltrainerM1AfterBattleText
Route15TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_3, 3, Route15BattleText4, Route15EndBattleText4, Route15AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_3, 3, Route15CooltrainerM2BattleText, Route15CooltrainerM2EndBattleText, Route15CooltrainerM2AfterBattleText
Route15TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_4, 2, Route15BattleText5, Route15EndBattleText5, Route15AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_4, 2, Route15Beauty1BattleText, Route15Beauty1EndBattleText, Route15Beauty1AfterBattleText
Route15TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_5, 3, Route15BattleText6, Route15EndBattleText6, Route15AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_5, 3, Route15Beauty2BattleText, Route15Beauty2EndBattleText, Route15Beauty2AfterBattleText
Route15TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_6, 3, Route15BattleText7, Route15EndBattleText7, Route15AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_6, 3, Route15Biker1BattleText, Route15Biker1EndBattleText, Route15Biker1AfterBattleText
Route15TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_7, 3, Route15BattleText8, Route15EndBattleText8, Route15AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_7, 3, Route15Biker2BattleText, Route15Biker2EndBattleText, Route15Biker2AfterBattleText
Route15TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_8, 3, Route15BattleText9, Route15EndBattleText9, Route15AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_8, 3, Route15CooltrainerF3BattleText, Route15CooltrainerF3EndBattleText, Route15CooltrainerF3AfterBattleText
Route15TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_15_TRAINER_9, 3, Route15BattleText10, Route15EndBattleText10, Route15AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_15_TRAINER_9, 3, Route15CooltrainerF4BattleText, Route15CooltrainerF4EndBattleText, Route15CooltrainerF4AfterBattleText
db -1 ; end
-Route15Text1:
+Route15CooltrainerF1Text:
text_asm
ld hl, Route15TrainerHeader0
jr Route15TalkToTrainer
-Route15Text2:
+Route15CooltrainerF2Text:
text_asm
ld hl, Route15TrainerHeader1
jr Route15TalkToTrainer
-Route15Text3:
+Route15CooltrainerM1Text:
text_asm
ld hl, Route15TrainerHeader2
jr Route15TalkToTrainer
-Route15Text4:
+Route15CooltrainerM2Text:
text_asm
ld hl, Route15TrainerHeader3
jr Route15TalkToTrainer
-Route15Text5:
+Route15Beauty1Text:
text_asm
ld hl, Route15TrainerHeader4
jr Route15TalkToTrainer
-Route15Text6:
+Route15Beauty2Text:
text_asm
ld hl, Route15TrainerHeader5
jr Route15TalkToTrainer
-Route15Text7:
+Route15Biker1Text:
text_asm
ld hl, Route15TrainerHeader6
jr Route15TalkToTrainer
-Route15Text8:
+Route15Biker2Text:
text_asm
ld hl, Route15TrainerHeader7
jr Route15TalkToTrainer
-Route15Text9:
+Route15CooltrainerF3Text:
text_asm
ld hl, Route15TrainerHeader8
jr Route15TalkToTrainer
-Route15Text10:
+Route15CooltrainerF4Text:
text_asm
ld hl, Route15TrainerHeader9
Route15TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-Route15BattleText1:
- text_far _Route15BattleText1
+Route15CooltrainerF1BattleText:
+ text_far _Route15CooltrainerF1BattleText
text_end
-Route15EndBattleText1:
- text_far _Route15EndBattleText1
+Route15CooltrainerF1EndBattleText:
+ text_far _Route15CooltrainerF1EndBattleText
text_end
-Route15AfterBattleText1:
- text_far _Route15AfterBattleText1
+Route15CooltrainerF1AfterBattleText:
+ text_far _Route15CooltrainerF1AfterBattleText
text_end
-Route15BattleText2:
- text_far _Route15BattleText2
+Route15CooltrainerF2BattleText:
+ text_far _Route15CooltrainerF2BattleText
text_end
-Route15EndBattleText2:
- text_far _Route15EndBattleText2
+Route15CooltrainerF2EndBattleText:
+ text_far _Route15CooltrainerF2EndBattleText
text_end
-Route15AfterBattleText2:
- text_far _Route15AfterBattleText2
+Route15CooltrainerF2AfterBattleText:
+ text_far _Route15CooltrainerF2AfterBattleText
text_end
-Route15BattleText3:
- text_far _Route15BattleText3
+Route15CooltrainerM1BattleText:
+ text_far _Route15CooltrainerM1BattleText
text_end
-Route15EndBattleText3:
- text_far _Route15EndBattleText3
+Route15CooltrainerM1EndBattleText:
+ text_far _Route15CooltrainerM1EndBattleText
text_end
-Route15AfterBattleText3:
- text_far _Route15AfterBattleText3
+Route15CooltrainerM1AfterBattleText:
+ text_far _Route15CooltrainerM1AfterBattleText
text_end
-Route15BattleText4:
- text_far _Route15BattleText4
+Route15CooltrainerM2BattleText:
+ text_far _Route15CooltrainerM2BattleText
text_end
-Route15EndBattleText4:
- text_far _Route15EndBattleText4
+Route15CooltrainerM2EndBattleText:
+ text_far _Route15CooltrainerM2EndBattleText
text_end
-Route15AfterBattleText4:
- text_far _Route15AfterBattleText4
+Route15CooltrainerM2AfterBattleText:
+ text_far _Route15CooltrainerM2AfterBattleText
text_end
-Route15BattleText5:
- text_far _Route15BattleText5
+Route15Beauty1BattleText:
+ text_far _Route15Beauty1BattleText
text_end
-Route15EndBattleText5:
- text_far _Route15EndBattleText5
+Route15Beauty1EndBattleText:
+ text_far _Route15Beauty1EndBattleText
text_end
-Route15AfterBattleText5:
- text_far _Route15AfterBattleText5
+Route15Beauty1AfterBattleText:
+ text_far _Route15Beauty1AfterBattleText
text_end
-Route15BattleText6:
- text_far _Route15BattleText6
+Route15Beauty2BattleText:
+ text_far _Route15Beauty2BattleText
text_end
-Route15EndBattleText6:
- text_far _Route15EndBattleText6
+Route15Beauty2EndBattleText:
+ text_far _Route15Beauty2EndBattleText
text_end
-Route15AfterBattleText6:
- text_far _Route15AfterBattleText6
+Route15Beauty2AfterBattleText:
+ text_far _Route15Beauty2AfterBattleText
text_end
-Route15BattleText7:
- text_far _Route15BattleText7
+Route15Biker1BattleText:
+ text_far _Route15Biker1BattleText
text_end
-Route15EndBattleText7:
- text_far _Route15EndBattleText7
+Route15Biker1EndBattleText:
+ text_far _Route15Biker1EndBattleText
text_end
-Route15AfterBattleText7:
- text_far _Route15AfterBattleText7
+Route15Biker1AfterBattleText:
+ text_far _Route15Biker1AfterBattleText
text_end
-Route15BattleText8:
- text_far _Route15BattleText8
+Route15Biker2BattleText:
+ text_far _Route15Biker2BattleText
text_end
-Route15EndBattleText8:
- text_far _Route15EndBattleText8
+Route15Biker2EndBattleText:
+ text_far _Route15Biker2EndBattleText
text_end
-Route15AfterBattleText8:
- text_far _Route15AfterBattleText8
+Route15Biker2AfterBattleText:
+ text_far _Route15Biker2AfterBattleText
text_end
-Route15BattleText9:
- text_far _Route15BattleText9
+Route15CooltrainerF3BattleText:
+ text_far _Route15CooltrainerF3BattleText
text_end
-Route15EndBattleText9:
- text_far _Route15EndBattleText9
+Route15CooltrainerF3EndBattleText:
+ text_far _Route15CooltrainerF3EndBattleText
text_end
-Route15AfterBattleText9:
- text_far _Route15AfterBattleText9
+Route15CooltrainerF3AfterBattleText:
+ text_far _Route15CooltrainerF3AfterBattleText
text_end
-Route15BattleText10:
- text_far _Route15BattleText10
+Route15CooltrainerF4BattleText:
+ text_far _Route15CooltrainerF4BattleText
text_end
-Route15EndBattleText10:
- text_far _Route15EndBattleText10
+Route15CooltrainerF4EndBattleText:
+ text_far _Route15CooltrainerF4EndBattleText
text_end
-Route15AfterBattleText10:
- text_far _Route15AfterBattleText10
+Route15CooltrainerF4AfterBattleText:
+ text_far _Route15CooltrainerF4AfterBattleText
text_end
-Route15Text12:
- text_far _Route15Text12
+Route15SignText:
+ text_far _Route15SignText
text_end
diff --git a/scripts/Route15Gate1F.asm b/scripts/Route15Gate1F.asm
index dfbce9d4..fb117946 100644
--- a/scripts/Route15Gate1F.asm
+++ b/scripts/Route15Gate1F.asm
@@ -2,8 +2,9 @@ Route15Gate1F_Script:
jp EnableAutoTextBoxDrawing
Route15Gate1F_TextPointers:
- dw Route15GateText1
+ def_text_pointers
+ dw_const Route15Gate1FGuardText, TEXT_ROUTE15GATE1F_GUARD
-Route15GateText1:
- text_far _Route15GateText1
+Route15Gate1FGuardText:
+ text_far _Route15Gate1FGuardText
text_end
diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm
index 1b85e34e..0e04367b 100644
--- a/scripts/Route15Gate2F.asm
+++ b/scripts/Route15Gate2F.asm
@@ -2,10 +2,11 @@ Route15Gate2F_Script:
jp DisableAutoTextBoxDrawing
Route15Gate2F_TextPointers:
- dw Route15GateUpstairsText1
- dw Route15GateUpstairsText2
+ def_text_pointers
+ dw_const Route15Gate2FOaksAideText, TEXT_ROUTE15GATE2F_OAKS_AIDE
+ dw_const Route15Gate2FBinocularsText, TEXT_ROUTE15GATE2F_BINOCULARS
-Route15GateUpstairsText1:
+Route15Gate2FOaksAideText:
text_asm
CheckEvent EVENT_GOT_EXP_ALL
jr nz, .got_item
@@ -25,20 +26,20 @@ Route15GateUpstairsText1:
jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL
.got_item
- ld hl, Route15GateUpstairsText_4968c
+ ld hl, .ExpAllText
call PrintText
.no_item
jp TextScriptEnd
-Route15GateUpstairsText_4968c:
- text_far _Route15GateUpstairsText_4968c
+.ExpAllText:
+ text_far _Route15Gate2FOaksAideExpAllText
text_end
-Route15GateUpstairsText2:
+Route15Gate2FBinocularsText:
text_asm
- ld hl, Route15GateUpstairsText_49698
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route15GateUpstairsText_49698:
- text_far _Route15GateUpstairsText_49698
+.Text:
+ text_far _Route15Gate2FBinocularsText
text_end
diff --git a/scripts/Route16.asm b/scripts/Route16.asm
index b77bbf61..f51bd00e 100644
--- a/scripts/Route16.asm
+++ b/scripts/Route16.asm
@@ -7,26 +7,27 @@ Route16_Script:
ld [wRoute16CurScript], a
ret
-Route16Script_59946:
- xor a
+Route16ResetScripts:
+ xor a ; SCRIPT_ROUTE16_DEFAULT
ld [wJoyIgnore], a
ld [wRoute16CurScript], a
ld [wCurMapScript], a
ret
Route16_ScriptPointers:
- dw Route16Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw Route16Script3
+ def_script_pointers
+ dw_const Route16DefaultScript, SCRIPT_ROUTE16_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE16_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE16_END_BATTLE
+ dw_const Route16SnorlaxPostBattleScript, SCRIPT_ROUTE16_SNORLAX_POST_BATTLE
-Route16Script0:
+Route16DefaultScript:
CheckEventHL EVENT_BEAT_ROUTE16_SNORLAX
jp nz, CheckFightingMapTrainers
CheckEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX
jp z, CheckFightingMapTrainers
- ld a, $a
+ ld a, TEXT_ROUTE16_SNORLAX_WOKE_UP
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
@@ -37,183 +38,184 @@ Route16Script0:
ld [wMissableObjectIndex], a
predef HideObject
call UpdateSprites
- ld a, $3
+ ld a, SCRIPT_ROUTE16_SNORLAX_POST_BATTLE
ld [wRoute16CurScript], a
ld [wCurMapScript], a
ret
-Route16Script3:
+Route16SnorlaxPostBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, Route16Script_59946
+ jp z, Route16ResetScripts
call UpdateSprites
ld a, [wBattleResult]
cp $2
- jr z, .asm_599a8
- ld a, $b
+ jr z, .caught
+ ld a, TEXT_ROUTE16_SNORLAX_RETURNED_TO_MOUNTAINS
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-.asm_599a8
+.caught
SetEvent EVENT_BEAT_ROUTE16_SNORLAX
call Delay3
- ld a, $0
+ ld a, SCRIPT_ROUTE16_DEFAULT
ld [wRoute16CurScript], a
ld [wCurMapScript], a
ret
Route16_TextPointers:
- dw Route16Text1
- dw Route16Text2
- dw Route16Text3
- dw Route16Text4
- dw Route16Text5
- dw Route16Text6
- dw Route16Text7
- dw Route16Text8
- dw Route16Text9
- dw Route16Text10
- dw Route16Text11
+ def_text_pointers
+ dw_const Route16Biker1Text, TEXT_ROUTE16_BIKER1
+ dw_const Route16Biker2Text, TEXT_ROUTE16_BIKER2
+ dw_const Route16Biker3Text, TEXT_ROUTE16_BIKER3
+ dw_const Route16Biker4Text, TEXT_ROUTE16_BIKER4
+ dw_const Route16Biker5Text, TEXT_ROUTE16_BIKER5
+ dw_const Route16Biker6Text, TEXT_ROUTE16_BIKER6
+ dw_const Route16SnorlaxText, TEXT_ROUTE16_SNORLAX
+ dw_const Route16CyclingRoadSignText, TEXT_ROUTE16_CYCLING_ROAD_SIGN
+ dw_const Route16SignText, TEXT_ROUTE16_SIGN
+ dw_const Route16SnorlaxWokeUpText, TEXT_ROUTE16_SNORLAX_WOKE_UP
+ dw_const Route16SnorlaxReturnedToMountainsText, TEXT_ROUTE16_SNORLAX_RETURNED_TO_MOUNTAINS
Route16TrainerHeaders:
def_trainers
Route16TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16BattleText1, Route16EndBattleText1, Route16AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16Biker1BattleText, Route16Biker1EndBattleText, Route16Biker1AfterBattleText
Route16TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16BattleText2, Route16EndBattleText2, Route16AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16Biker2BattleText, Route16Biker2EndBattleText, Route16Biker2AfterBattleText
Route16TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16BattleText3, Route16EndBattleText3, Route16AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16Biker3BattleText, Route16Biker3EndBattleText, Route16Biker3AfterBattleText
Route16TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16BattleText4, Route16EndBattleText4, Route16AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16biker4BattleText, Route16Biker4EndBattleText, Route16Biker4AfterBattleText
Route16TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16BattleText5, Route16EndBattleText5, Route16AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16Biker5BattleText, Route16Biker5EndBattleText, Route16Biker5AfterBattleText
Route16TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16BattleText6, Route16EndBattleText6, Route16AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16Biker6BattleText, Route16Biker6EndBattleText, Route16Biker6AfterBattleText
db -1 ; end
-Route16Text1:
+Route16Biker1Text:
text_asm
ld hl, Route16TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText1:
- text_far _Route16BattleText1
+Route16Biker1BattleText:
+ text_far _Route16Biker1BattleText
text_end
-Route16EndBattleText1:
- text_far _Route16EndBattleText1
+Route16Biker1EndBattleText:
+ text_far _Route16Biker1EndBattleText
text_end
-Route16AfterBattleText1:
- text_far _Route16AfterBattleText1
+Route16Biker1AfterBattleText:
+ text_far _Route16Biker1AfterBattleText
text_end
-Route16Text2:
+Route16Biker2Text:
text_asm
ld hl, Route16TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText2:
- text_far _Route16BattleText2
+Route16Biker2BattleText:
+ text_far _Route16Biker2BattleText
text_end
-Route16EndBattleText2:
- text_far _Route16EndBattleText2
+Route16Biker2EndBattleText:
+ text_far _Route16Biker2EndBattleText
text_end
-Route16AfterBattleText2:
- text_far _Route16AfterBattleText2
+Route16Biker2AfterBattleText:
+ text_far _Route16Biker2AfterBattleText
text_end
-Route16Text3:
+Route16Biker3Text:
text_asm
ld hl, Route16TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText3:
- text_far _Route16BattleText3
+Route16Biker3BattleText:
+ text_far _Route16Biker3BattleText
text_end
-Route16EndBattleText3:
- text_far _Route16EndBattleText3
+Route16Biker3EndBattleText:
+ text_far _Route16Biker3EndBattleText
text_end
-Route16AfterBattleText3:
- text_far _Route16AfterBattleText3
+Route16Biker3AfterBattleText:
+ text_far _Route16Biker3AfterBattleText
text_end
-Route16Text4:
+Route16Biker4Text:
text_asm
ld hl, Route16TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText4:
- text_far _Route16BattleText4
+Route16biker4BattleText:
+ text_far _Route16biker4BattleText
text_end
-Route16EndBattleText4:
- text_far _Route16EndBattleText4
+Route16Biker4EndBattleText:
+ text_far _Route16Biker4EndBattleText
text_end
-Route16AfterBattleText4:
- text_far _Route16AfterBattleText4
+Route16Biker4AfterBattleText:
+ text_far _Route16Biker4AfterBattleText
text_end
-Route16Text5:
+Route16Biker5Text:
text_asm
ld hl, Route16TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText5:
- text_far _Route16BattleText5
+Route16Biker5BattleText:
+ text_far _Route16Biker5BattleText
text_end
-Route16EndBattleText5:
- text_far _Route16EndBattleText5
+Route16Biker5EndBattleText:
+ text_far _Route16Biker5EndBattleText
text_end
-Route16AfterBattleText5:
- text_far _Route16AfterBattleText5
+Route16Biker5AfterBattleText:
+ text_far _Route16Biker5AfterBattleText
text_end
-Route16Text6:
+Route16Biker6Text:
text_asm
ld hl, Route16TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route16BattleText6:
- text_far _Route16BattleText6
+Route16Biker6BattleText:
+ text_far _Route16Biker6BattleText
text_end
-Route16EndBattleText6:
- text_far _Route16EndBattleText6
+Route16Biker6EndBattleText:
+ text_far _Route16Biker6EndBattleText
text_end
-Route16AfterBattleText6:
- text_far _Route16AfterBattleText6
+Route16Biker6AfterBattleText:
+ text_far _Route16Biker6AfterBattleText
text_end
-Route16Text7:
+Route16SnorlaxText:
text_far _Route16Text7
text_end
-Route16Text10:
- text_far _Route16Text10
+Route16SnorlaxWokeUpText:
+ text_far _Route16SnorlaxWokeUpText
text_end
-Route16Text11:
- text_far _Route16Text11
+Route16SnorlaxReturnedToMountainsText:
+ text_far _Route16SnorlaxReturnedToMountainsText
text_end
-Route16Text8:
- text_far _Route16Text8
+Route16CyclingRoadSignText:
+ text_far _Route16CyclingRoadSignText
text_end
-Route16Text9:
- text_far _Route16Text9
+Route16SignText:
+ text_far _Route16SignText
text_end
diff --git a/scripts/Route16FlyHouse.asm b/scripts/Route16FlyHouse.asm
index 3bb34b75..5929b623 100644
--- a/scripts/Route16FlyHouse.asm
+++ b/scripts/Route16FlyHouse.asm
@@ -2,54 +2,55 @@ Route16FlyHouse_Script:
jp EnableAutoTextBoxDrawing
Route16FlyHouse_TextPointers:
- dw Route16HouseText1
- dw Route16HouseText2
+ def_text_pointers
+ dw_const Route16FlyHouseBrunetteGirlText, TEXT_ROUTE16FLYHOUSE_BRUNETTE_GIRL
+ dw_const Route16FlyHouseFearowText, TEXT_ROUTE16FLYHOUSE_FEAROW
-Route16HouseText1:
+Route16FlyHouseBrunetteGirlText:
text_asm
CheckEvent EVENT_GOT_HM02
- ld hl, HM02ExplanationText
+ ld hl, .HM02ExplanationText
jr nz, .got_item
- ld hl, Route16HouseText3
+ ld hl, .Text
call PrintText
lb bc, HM_FLY, 1
call GiveItem
jr nc, .bag_full
SetEvent EVENT_GOT_HM02
- ld hl, ReceivedHM02Text
+ ld hl, .ReceivedHM02Text
jr .got_item
.bag_full
- ld hl, HM02NoRoomText
+ ld hl, .HM02NoRoomText
.got_item
call PrintText
jp TextScriptEnd
-Route16HouseText3:
- text_far _Route16HouseText3
+.Text:
+ text_far _Route16FlyHouseBrunetteGirlText
text_end
-ReceivedHM02Text:
- text_far _ReceivedHM02Text
+.ReceivedHM02Text:
+ text_far _Route16FlyHouseBrunetteGirlReceivedHM02Text
sound_get_key_item
text_end
-HM02ExplanationText:
- text_far _HM02ExplanationText
+.HM02ExplanationText:
+ text_far _Route16FlyHouseBrunetteGirlHM02ExplanationText
text_end
-HM02NoRoomText:
- text_far _HM02NoRoomText
+.HM02NoRoomText:
+ text_far _Route16FlyHouseBrunetteGirlHM02NoRoomText
text_end
-Route16HouseText2:
+Route16FlyHouseFearowText:
text_asm
- ld hl, Route16HouseText_1e652
+ ld hl, .Text
call PrintText
ld a, FEAROW
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-Route16HouseText_1e652:
- text_far _Route16HouseText_1e652
+.Text:
+ text_far _Route16FlyHouseFearowText
text_end
diff --git a/scripts/Route16Gate1F.asm b/scripts/Route16Gate1F.asm
index e992fa44..2d9777fc 100644
--- a/scripts/Route16Gate1F.asm
+++ b/scripts/Route16Gate1F.asm
@@ -7,25 +7,26 @@ Route16Gate1F_Script:
jp CallFunctionInTable
Route16Gate1F_ScriptPointers:
- dw Route16GateScript0
- dw Route16GateScript1
- dw Route16GateScript2
- dw Route16GateScript3
+ def_script_pointers
+ dw_const Route16Gate1FDefaultScript, SCRIPT_ROUTE16GATE1F_DEFAULT
+ dw_const Route16Gate1FPlayerMovingUpScript, SCRIPT_ROUTE16GATE1F_PLAYER_MOVING_UP
+ dw_const Route16Gate1FGuardScript, SCRIPT_ROUTE16GATE1F_GUARD
+ dw_const Route16Gate1FPlayerMovingRightScript, SCRIPT_ROUTE16GATE1F_PLAYER_MOVING_RIGHT
-Route16GateScript0:
- call Route16GateScript_49755
+Route16Gate1FDefaultScript:
+ call Route16Gate1FIsBicycleInBagScript
ret nz
- ld hl, CoordsData_49714
+ ld hl, .StopsPlayerCoords
call ArePlayerCoordsInArray
ret nc
- ld a, $3
+ ld a, TEXT_ROUTE16GATE1F_GUARD_WAIT_UP
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $1
- jr z, .asm_4970e
+ jr z, .next_to_counter
ld a, [wCoordIndex]
dec a
ld [wSimulatedJoypadStatesIndex], a
@@ -35,30 +36,30 @@ Route16GateScript0:
ld hl, wSimulatedJoypadStatesEnd
call FillMemory
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, SCRIPT_ROUTE16GATE1F_PLAYER_MOVING_UP
ld [wRoute16Gate1FCurScript], a
ret
-.asm_4970e
- ld a, $2
+.next_to_counter
+ ld a, SCRIPT_ROUTE16GATE1F_GUARD
ld [wRoute16Gate1FCurScript], a
ret
-CoordsData_49714:
+.StopsPlayerCoords:
dbmapcoord 4, 7
dbmapcoord 4, 8
dbmapcoord 4, 9
dbmapcoord 4, 10
db -1 ; end
-Route16GateScript1:
+Route16Gate1FPlayerMovingUpScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-Route16GateScript2:
- ld a, $1
+Route16Gate1FGuardScript:
+ ld a, TEXT_ROUTE16GATE1F_GUARD
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
@@ -66,11 +67,11 @@ Route16GateScript2:
ld a, D_RIGHT
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_ROUTE16GATE1F_PLAYER_MOVING_RIGHT
ld [wRoute16Gate1FCurScript], a
ret
-Route16GateScript3:
+Route16Gate1FPlayerMovingRightScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -78,44 +79,45 @@ Route16GateScript3:
ld [wJoyIgnore], a
ld hl, wd730
res 7, [hl]
- ld a, $0
+ ld a, SCRIPT_ROUTE16GATE1F_DEFAULT
ld [wRoute16Gate1FCurScript], a
ret
-Route16GateScript_49755:
+Route16Gate1FIsBicycleInBagScript:
ld b, BICYCLE
jp IsItemInBag
Route16Gate1F_TextPointers:
- dw Route16GateText1
- dw Route16GateText2
- dw Route16GateText3
+ def_text_pointers
+ dw_const Route16Gate1FGuardText, TEXT_ROUTE16GATE1F_GUARD
+ dw_const Route16Gate1FGamblerText, TEXT_ROUTE16GATE1F_GAMBLER
+ dw_const Route16Gate1FGuardWaitUpText, TEXT_ROUTE16GATE1F_GUARD_WAIT_UP
-Route16GateText1:
+Route16Gate1FGuardText:
text_asm
- call Route16GateScript_49755
- jr z, .asm_0bdf3
- ld hl, Route16GateText_4977c
+ call Route16Gate1FIsBicycleInBagScript
+ jr z, .no_bike
+ ld hl, .CyclingRoadExplanationText
call PrintText
- jr .asm_56c9d
-.asm_0bdf3
- ld hl, Route16GateText_49777
+ jr .text_script_end
+.no_bike
+ ld hl, .NoPedestriansAllowedText
call PrintText
-.asm_56c9d
+.text_script_end
jp TextScriptEnd
-Route16GateText_49777:
- text_far _Route16GateText_49777
+.NoPedestriansAllowedText:
+ text_far _Route16Gate1FGuardNoPedestriansAllowedText
text_end
-Route16GateText_4977c:
- text_far _Route16GateText_4977c
+.CyclingRoadExplanationText:
+ text_far _Route16Gate1FGuardCyclingRoadExplanationText
text_end
-Route16GateText3:
- text_far _Route16GateText_49781
+Route16Gate1FGuardWaitUpText:
+ text_far _Route16Gate1FGuardWaitUpText
text_end
-Route16GateText2:
- text_far _Route16GateText2
+Route16Gate1FGamblerText:
+ text_far _Route16Gate1FGamblerText
text_end
diff --git a/scripts/Route16Gate2F.asm b/scripts/Route16Gate2F.asm
index 27e147a1..e21359ba 100644
--- a/scripts/Route16Gate2F.asm
+++ b/scripts/Route16Gate2F.asm
@@ -2,45 +2,46 @@ Route16Gate2F_Script:
jp DisableAutoTextBoxDrawing
Route16Gate2F_TextPointers:
- dw Route16GateUpstairsText1
- dw Route16GateUpstairsText2
- dw Route16GateUpstairsText3
- dw Route16GateUpstairsText4
+ def_text_pointers
+ dw_const Route16Gate2FLittleBoyText, TEXT_ROUTE16GATE2F_LITTLE_BOY
+ dw_const Route16Gate2FLittleGirlText, TEXT_ROUTE16GATE2F_LITTLE_GIRL
+ dw_const Route16Gate2FLeftBinocularsText, TEXT_ROUTE16GATE2F_LEFT_BINOCULARS
+ dw_const Route16Gate2FRightBinocularsText, TEXT_ROUTE16GATE2F_RIGHT_BINOCULARS
-Route16GateUpstairsText1:
+Route16Gate2FLittleBoyText:
text_asm
- ld hl, Route16GateUpstairsText_49820
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-Route16GateUpstairsText_49820:
- text_far _Route16GateUpstairsText_49820
+.Text:
+ text_far _Route16Gate2FLittleBoyText
text_end
-Route16GateUpstairsText2:
+Route16Gate2FLittleGirlText:
text_asm
- ld hl, Route16GateUpstairsText_4982f
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-Route16GateUpstairsText_4982f:
- text_far _Route16GateUpstairsText_4982f
+.Text:
+ text_far _Route16Gate2FLittleGirlText
text_end
-Route16GateUpstairsText3:
+Route16Gate2FLeftBinocularsText:
text_asm
- ld hl, Route16GateUpstairsText_4983b
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route16GateUpstairsText_4983b:
- text_far _Route16GateUpstairsText_4983b
+.Text:
+ text_far _Route16Gate2FLeftBinocularsText
text_end
-Route16GateUpstairsText4:
+Route16Gate2FRightBinocularsText:
text_asm
- ld hl, Route16GateUpstairsText_49847
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route16GateUpstairsText_49847:
- text_far _Route16GateUpstairsText_49847
+.Text:
+ text_far _Route16Gate2FRightBinocularsText
text_end
diff --git a/scripts/Route17.asm b/scripts/Route17.asm
index 526b2576..aa40baa8 100644
--- a/scripts/Route17.asm
+++ b/scripts/Route17.asm
@@ -8,252 +8,254 @@ Route17_Script:
ret
Route17_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE17_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE17_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE17_END_BATTLE
Route17_TextPointers:
- dw Route17Text1
- dw Route17Text2
- dw Route17Text3
- dw Route17Text4
- dw Route17Text5
- dw Route17Text6
- dw Route17Text7
- dw Route17Text8
- dw Route17Text9
- dw Route17Text10
- dw Route17Text11
- dw Route17Text12
- dw Route17Text13
- dw Route17Text14
- dw Route17Text15
- dw Route17Text16
+ def_text_pointers
+ dw_const Route17Biker1Text, TEXT_ROUTE17_BIKER1
+ dw_const Route17Biker2Text, TEXT_ROUTE17_BIKER2
+ dw_const Route17Biker3Text, TEXT_ROUTE17_BIKER3
+ dw_const Route17Biker4Text, TEXT_ROUTE17_BIKER4
+ dw_const Route17Biker5Text, TEXT_ROUTE17_BIKER5
+ dw_const Route17Biker6Text, TEXT_ROUTE17_BIKER6
+ dw_const Route17Biker7Text, TEXT_ROUTE17_BIKER7
+ dw_const Route17Biker8Text, TEXT_ROUTE17_BIKER8
+ dw_const Route17Biker9Text, TEXT_ROUTE17_BIKER9
+ dw_const Route17Biker10Text, TEXT_ROUTE17_BIKER10
+ dw_const Route17NoticeSign1Text, TEXT_ROUTE17_NOTICE_SIGN1
+ dw_const Route17TrainerTips1Text, TEXT_ROUTE17_TRAINER_TIPS1
+ dw_const Route17TrainerTips2Text, TEXT_ROUTE17_TRAINER_TIPS2
+ dw_const Route17SignText, TEXT_ROUTE17_SIGN
+ dw_const Route17NoticeSign2Text, TEXT_ROUTE17_NOTICE_SIGN2
+ dw_const Route17CyclingRoadEndsSignText, TEXT_ROUTE17_CYCLING_ROAD_ENDS_SIGN
Route17TrainerHeaders:
def_trainers
Route17TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_0, 3, Route17BattleText1, Route17EndBattleText1, Route17AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_0, 3, Route17Biker1BattleText, Route17Biker1EndBattleText, Route17Biker1AfterBattleText
Route17TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_1, 4, Route17BattleText2, Route17EndBattleText2, Route17AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_1, 4, Route17Biker2BattleText, Route17Biker2EndBattleText, Route17Biker2AfterBattleText
Route17TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_2, 4, Route17BattleText3, Route17EndBattleText3, Route17AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_2, 4, Route17Biker3BattleText, Route17Biker3EndBattleText, Route17Biker3AfterBattleText
Route17TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_3, 4, Route17BattleText4, Route17EndBattleText4, Route17AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_3, 4, Route17Biker4BattleText, Route17Biker4EndBattleText, Route17Biker4AfterBattleText
Route17TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_4, 3, Route17BattleText5, Route17EndBattleText5, Route17AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_4, 3, Route17Biker5BattleText, Route17Biker5EndBattleText, Route17Biker5AfterBattleText
Route17TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_5, 2, Route17BattleText6, Route17EndBattleText6, Route17AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_5, 2, Route17Biker6BattleText, Route17Biker6EndBattleText, Route17Biker6AfterBattleText
Route17TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_6, 4, Route17BattleText7, Route17EndBattleText7, Route17AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_6, 4, Route17Biker7BattleText, Route17Biker7EndBattleText, Route17Biker7AfterBattleText
Route17TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_7, 2, Route17BattleText8, Route17EndBattleText8, Route17AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_7, 2, Route17Biker8BattleText, Route17Biker8EndBattleText, Route17Biker8AfterBattleText
Route17TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_8, 3, Route17BattleText9, Route17EndBattleText9, Route17AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_8, 3, Route17Biker9BattleText, Route17Biker9EndBattleText, Route17Biker9AfterBattleText
Route17TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_17_TRAINER_9, 4, Route17BattleText10, Route17EndBattleText10, Route17AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_17_TRAINER_9, 4, Route17Biker10BattleText, Route17Biker10EndBattleText, Route17Biker10AfterBattleText
db -1 ; end
-Route17Text1:
+Route17Biker1Text:
text_asm
ld hl, Route17TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText1:
- text_far _Route17BattleText1
+Route17Biker1BattleText:
+ text_far _Route17Biker1BattleText
text_end
-Route17EndBattleText1:
- text_far _Route17EndBattleText1
+Route17Biker1EndBattleText:
+ text_far _Route17Biker1EndBattleText
text_end
-Route17AfterBattleText1:
- text_far _Route17AfterBattleText1
+Route17Biker1AfterBattleText:
+ text_far _Route17Biker1AfterBattleText
text_end
-Route17Text2:
+Route17Biker2Text:
text_asm
ld hl, Route17TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText2:
- text_far _Route17BattleText2
+Route17Biker2BattleText:
+ text_far _Route17Biker2BattleText
text_end
-Route17EndBattleText2:
- text_far _Route17EndBattleText2
+Route17Biker2EndBattleText:
+ text_far _Route17Biker2EndBattleText
text_end
-Route17AfterBattleText2:
- text_far _Route17AfterBattleText2
+Route17Biker2AfterBattleText:
+ text_far _Route17Biker2AfterBattleText
text_end
-Route17Text3:
+Route17Biker3Text:
text_asm
ld hl, Route17TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText3:
- text_far _Route17BattleText3
+Route17Biker3BattleText:
+ text_far _Route17Biker3BattleText
text_end
-Route17EndBattleText3:
- text_far _Route17EndBattleText3
+Route17Biker3EndBattleText:
+ text_far _Route17Biker3EndBattleText
text_end
-Route17AfterBattleText3:
- text_far _Route17AfterBattleText3
+Route17Biker3AfterBattleText:
+ text_far _Route17Biker3AfterBattleText
text_end
-Route17Text4:
+Route17Biker4Text:
text_asm
ld hl, Route17TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText4:
- text_far _Route17BattleText4
+Route17Biker4BattleText:
+ text_far _Route17Biker4BattleText
text_end
-Route17EndBattleText4:
- text_far _Route17EndBattleText4
+Route17Biker4EndBattleText:
+ text_far _Route17Biker4EndBattleText
text_end
-Route17AfterBattleText4:
- text_far _Route17AfterBattleText4
+Route17Biker4AfterBattleText:
+ text_far _Route17Biker4AfterBattleText
text_end
-Route17Text5:
+Route17Biker5Text:
text_asm
ld hl, Route17TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText5:
- text_far _Route17BattleText5
+Route17Biker5BattleText:
+ text_far _Route17Biker5BattleText
text_end
-Route17EndBattleText5:
- text_far _Route17EndBattleText5
+Route17Biker5EndBattleText:
+ text_far _Route17Biker5EndBattleText
text_end
-Route17AfterBattleText5:
- text_far _Route17AfterBattleText5
+Route17Biker5AfterBattleText:
+ text_far _Route17Biker5AfterBattleText
text_end
-Route17Text6:
+Route17Biker6Text:
text_asm
ld hl, Route17TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText6:
- text_far _Route17BattleText6
+Route17Biker6BattleText:
+ text_far _Route17Biker6BattleText
text_end
-Route17EndBattleText6:
- text_far _Route17EndBattleText6
+Route17Biker6EndBattleText:
+ text_far _Route17Biker6EndBattleText
text_end
-Route17AfterBattleText6:
- text_far _Route17AfterBattleText6
+Route17Biker6AfterBattleText:
+ text_far _Route17Biker6AfterBattleText
text_end
-Route17Text7:
+Route17Biker7Text:
text_asm
ld hl, Route17TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText7:
- text_far _Route17BattleText7
+Route17Biker7BattleText:
+ text_far _Route17Biker7BattleText
text_end
-Route17EndBattleText7:
- text_far _Route17EndBattleText7
+Route17Biker7EndBattleText:
+ text_far _Route17Biker7EndBattleText
text_end
-Route17AfterBattleText7:
- text_far _Route17AfterBattleText7
+Route17Biker7AfterBattleText:
+ text_far _Route17Biker7AfterBattleText
text_end
-Route17Text8:
+Route17Biker8Text:
text_asm
ld hl, Route17TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText8:
- text_far _Route17BattleText8
+Route17Biker8BattleText:
+ text_far _Route17Biker8BattleText
text_end
-Route17EndBattleText8:
- text_far _Route17EndBattleText8
+Route17Biker8EndBattleText:
+ text_far _Route17Biker8EndBattleText
text_end
-Route17AfterBattleText8:
- text_far _Route17AfterBattleText8
+Route17Biker8AfterBattleText:
+ text_far _Route17Biker8AfterBattleText
text_end
-Route17Text9:
+Route17Biker9Text:
text_asm
ld hl, Route17TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText9:
- text_far _Route17BattleText9
+Route17Biker9BattleText:
+ text_far _Route17Biker9BattleText
text_end
-Route17EndBattleText9:
- text_far _Route17EndBattleText9
+Route17Biker9EndBattleText:
+ text_far _Route17Biker9EndBattleText
text_end
-Route17AfterBattleText9:
- text_far _Route17AfterBattleText9
+Route17Biker9AfterBattleText:
+ text_far _Route17Biker9AfterBattleText
text_end
-Route17Text10:
+Route17Biker10Text:
text_asm
ld hl, Route17TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
-Route17BattleText10:
- text_far _Route17BattleText10
+Route17Biker10BattleText:
+ text_far _Route17Biker10BattleText
text_end
-Route17EndBattleText10:
- text_far _Route17EndBattleText10
+Route17Biker10EndBattleText:
+ text_far _Route17Biker10EndBattleText
text_end
-Route17AfterBattleText10:
- text_far _Route17AfterBattleText10
+Route17Biker10AfterBattleText:
+ text_far _Route17Biker10AfterBattleText
text_end
-Route17Text11:
- text_far _Route17Text11
+Route17NoticeSign1Text:
+ text_far _Route17NoticeSign1Text
text_end
-Route17Text12:
- text_far _Route17Text12
+Route17TrainerTips1Text:
+ text_far _Route17TrainerTips1Text
text_end
-Route17Text13:
- text_far _Route17Text13
+Route17TrainerTips2Text:
+ text_far _Route17TrainerTips2Text
text_end
-Route17Text14:
- text_far _Route17Text14
+Route17SignText:
+ text_far _Route17SignText
text_end
-Route17Text15:
- text_far _Route17Text15
+Route17NoticeSign2Text:
+ text_far _Route17NoticeSign2Text
text_end
-Route17Text16:
- text_far _Route17Text16
+Route17CyclingRoadEndsSignText:
+ text_far _Route17CyclingRoadEndsSignText
text_end
diff --git a/scripts/Route18.asm b/scripts/Route18.asm
index 42c83f4c..26d660c8 100644
--- a/scripts/Route18.asm
+++ b/scripts/Route18.asm
@@ -8,85 +8,87 @@ Route18_Script:
ret
Route18_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE18_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE18_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE18_END_BATTLE
Route18_TextPointers:
- dw Route18Text1
- dw Route18Text2
- dw Route18Text3
- dw Route18Text4
- dw Route18Text5
+ def_text_pointers
+ dw_const Route18CooltrainerM1Text, SCRIPT_ROUTE18_COOLTRAINER_M1
+ dw_const Route18CooltrainerM2Text, SCRIPT_ROUTE18_COOLTRAINER_M2
+ dw_const Route18CooltrainerM3Text, SCRIPT_ROUTE18_COOLTRAINER_M3
+ dw_const Route18SignText, SCRIPT_ROUTE18_SIGN
+ dw_const Route18CyclingRoadSignText, SCRIPT_ROUTE18_CYCLING_ROAD_SIGN
Route18TrainerHeaders:
def_trainers
Route18TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_18_TRAINER_0, 3, Route18BattleText1, Route18EndBattleText1, Route18AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_0, 3, Route18CooltrainerM1BattleText, Route18CooltrainerM1EndBattleText, Route18CooltrainerM1AfterBattleText
Route18TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_18_TRAINER_1, 3, Route18BattleText2, Route18EndBattleText2, Route18AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_1, 3, Route18CooltrainerM2BattleText, Route18CooltrainerM2EndBattleText, Route18CooltrainerM2AfterBattleText
Route18TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_18_TRAINER_2, 4, Route18BattleText3, Route18EndBattleText3, Route18AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_18_TRAINER_2, 4, Route18CooltrainerM3BattleText, Route18CooltrainerM3EndBattleText, Route18CooltrainerM3AfterBattleText
db -1 ; end
-Route18Text1:
+Route18CooltrainerM1Text:
text_asm
ld hl, Route18TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route18BattleText1:
- text_far _Route18BattleText1
+Route18CooltrainerM1BattleText:
+ text_far _Route18CooltrainerM1BattleText
text_end
-Route18EndBattleText1:
- text_far _Route18EndBattleText1
+Route18CooltrainerM1EndBattleText:
+ text_far _Route18CooltrainerM1EndBattleText
text_end
-Route18AfterBattleText1:
- text_far _Route18AfterBattleText1
+Route18CooltrainerM1AfterBattleText:
+ text_far _Route18CooltrainerM1AfterBattleText
text_end
-Route18Text2:
+Route18CooltrainerM2Text:
text_asm
ld hl, Route18TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route18BattleText2:
- text_far _Route18BattleText2
+Route18CooltrainerM2BattleText:
+ text_far _Route18CooltrainerM2BattleText
text_end
-Route18EndBattleText2:
- text_far _Route18EndBattleText2
+Route18CooltrainerM2EndBattleText:
+ text_far _Route18CooltrainerM2EndBattleText
text_end
-Route18AfterBattleText2:
- text_far _Route18AfterBattleText2
+Route18CooltrainerM2AfterBattleText:
+ text_far _Route18CooltrainerM2AfterBattleText
text_end
-Route18Text3:
+Route18CooltrainerM3Text:
text_asm
ld hl, Route18TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route18BattleText3:
- text_far _Route18BattleText3
+Route18CooltrainerM3BattleText:
+ text_far _Route18CooltrainerM3BattleText
text_end
-Route18EndBattleText3:
- text_far _Route18EndBattleText3
+Route18CooltrainerM3EndBattleText:
+ text_far _Route18CooltrainerM3EndBattleText
text_end
-Route18AfterBattleText3:
- text_far _Route18AfterBattleText3
+Route18CooltrainerM3AfterBattleText:
+ text_far _Route18CooltrainerM3AfterBattleText
text_end
-Route18Text4:
- text_far _Route18Text4
+Route18SignText:
+ text_far _Route18SignText
text_end
-Route18Text5:
- text_far _Route18Text5
+Route18CyclingRoadSignText:
+ text_far _Route18CyclingRoadSignText
text_end
diff --git a/scripts/Route18Gate1F.asm b/scripts/Route18Gate1F.asm
index 2caeaedd..8f08638c 100644
--- a/scripts/Route18Gate1F.asm
+++ b/scripts/Route18Gate1F.asm
@@ -7,25 +7,26 @@ Route18Gate1F_Script:
jp CallFunctionInTable
Route18Gate1F_ScriptPointers:
- dw Route18GateScript0
- dw Route18GateScript1
- dw Route18GateScript2
- dw Route18GateScript3
+ def_script_pointers
+ dw_const Route18Gate1FDefaultScript, SCRIPT_ROUTE18GATE1F_DEFAULT
+ dw_const Route18Gate1FPlayerMovingUpScript, SCRIPT_ROUTE18GATE1F_PLAYER_MOVING_UP
+ dw_const Route18Gate1FGuardScript, SCRIPT_ROUTE18GATE1F_GUARD
+ dw_const Route18Gate1FPlayerMovingRightScript, SCRIPT_ROUTE18GATE1F_PLAYER_MOVING_RIGHT
-Route18GateScript0:
- call Route16GateScript_49755
+Route18Gate1FDefaultScript:
+ call Route16Gate1FIsBicycleInBagScript
ret nz
- ld hl, CoordsData_498cc
+ ld hl, .StopsPlayerCoords
call ArePlayerCoordsInArray
ret nc
- ld a, $2
+ ld a, TEXT_ROUTE18GATE1F_GUARD_EXCUSE_ME
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ldh [hJoyHeld], a
ld a, [wCoordIndex]
cp $1
- jr z, .asm_498c6
+ jr z, .next_to_counter
ld a, [wCoordIndex]
dec a
ld [wSimulatedJoypadStatesIndex], a
@@ -35,30 +36,30 @@ Route18GateScript0:
ld hl, wSimulatedJoypadStatesEnd
call FillMemory
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, SCRIPT_ROUTE18GATE1F_PLAYER_MOVING_UP
ld [wRoute18Gate1FCurScript], a
ret
-.asm_498c6
- ld a, $2
+.next_to_counter
+ ld a, SCRIPT_ROUTE18GATE1F_GUARD
ld [wRoute18Gate1FCurScript], a
ret
-CoordsData_498cc:
+.StopsPlayerCoords:
dbmapcoord 4, 3
dbmapcoord 4, 4
dbmapcoord 4, 5
dbmapcoord 4, 6
db -1 ; end
-Route18GateScript1:
+Route18Gate1FPlayerMovingUpScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-Route18GateScript2:
- ld a, $1
+Route18Gate1FGuardScript:
+ ld a, TEXT_ROUTE18GATE1F_GUARD
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
@@ -66,11 +67,11 @@ Route18GateScript2:
ld a, D_RIGHT
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_ROUTE18GATE1F_PLAYER_MOVING_RIGHT
ld [wRoute18Gate1FCurScript], a
ret
-Route18GateScript3:
+Route18Gate1FPlayerMovingRightScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -78,35 +79,36 @@ Route18GateScript3:
ld [wJoyIgnore], a
ld hl, wd730
res 7, [hl]
- ld a, $0
+ ld a, SCRIPT_ROUTE18GATE1F_DEFAULT
ld [wRoute18Gate1FCurScript], a
ret
Route18Gate1F_TextPointers:
- dw Route18GateText1
- dw Route18GateText2
+ def_text_pointers
+ dw_const Route18Gate1FGuardText, TEXT_ROUTE18GATE1F_GUARD
+ dw_const Route18Gate1FGuardExcuseMeText, TEXT_ROUTE18GATE1F_GUARD_EXCUSE_ME
-Route18GateText1:
+Route18Gate1FGuardText:
text_asm
- call Route16GateScript_49755
- jr z, .asm_3c84d
- ld hl, Route18GateText_4992d
+ call Route16Gate1FIsBicycleInBagScript
+ jr z, .no_bike
+ ld hl, .CyclingRoadUphillText
call PrintText
- jr .asm_a8410
-.asm_3c84d
- ld hl, Route18GateText_49928
+ jr .text_script_end
+.no_bike
+ ld hl, .YouNeedABicycleText
call PrintText
-.asm_a8410
+.text_script_end
jp TextScriptEnd
-Route18GateText_49928:
- text_far _Route18GateText_49928
+.YouNeedABicycleText:
+ text_far _Route18Gate1FGuardYouNeedABicycleText
text_end
-Route18GateText_4992d:
- text_far _Route18GateText_4992d
+.CyclingRoadUphillText:
+ text_far _Route18Gate1FGuardCyclingRoadUphillText
text_end
-Route18GateText2:
- text_far _Route18GateText_49932
+Route18Gate1FGuardExcuseMeText:
+ text_far _Route18Gate1FGuardExcuseMeText
text_end
diff --git a/scripts/Route18Gate2F.asm b/scripts/Route18Gate2F.asm
index 67ec2641..5065b696 100644
--- a/scripts/Route18Gate2F.asm
+++ b/scripts/Route18Gate2F.asm
@@ -2,31 +2,32 @@ Route18Gate2F_Script:
jp DisableAutoTextBoxDrawing
Route18Gate2F_TextPointers:
- dw Route18GateUpstairsText1
- dw Route18GateUpstairsText2
- dw Route18GateUpstairsText3
+ def_text_pointers
+ dw_const Route18Gate2FCookText, TEXT_ROUTE18GATE2F_COOK
+ dw_const Route18Gate2FLeftBinocularsText, TEXT_ROUTE18GATE2F_LEFT_BINOCULARS
+ dw_const Route18Gate2FRightBinocularsText, TEXT_ROUTE18GATE2F_RIGHT_BINOCULARS
-Route18GateUpstairsText1:
+Route18Gate2FCookText:
text_asm
ld a, TRADE_FOR_SPIKE
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
-Route18GateUpstairsText2:
+Route18Gate2FLeftBinocularsText:
text_asm
- ld hl, Route18GateUpstairsText_49993
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route18GateUpstairsText_49993:
- text_far _Route18GateUpstairsText_49993
+.Text:
+ text_far _Route18Gate2FLeftBinocularsText
text_end
-Route18GateUpstairsText3:
+Route18Gate2FRightBinocularsText:
text_asm
- ld hl, Route18GateUpstairsText_4999f
+ ld hl, .Text
jp GateUpstairsScript_PrintIfFacingUp
-Route18GateUpstairsText_4999f:
- text_far _Route18GateUpstairsText_4999f
+.Text:
+ text_far _Route18Gate2FRightBinocularsText
text_end
diff --git a/scripts/Route19.asm b/scripts/Route19.asm
index 4db46dad..9733ca05 100644
--- a/scripts/Route19.asm
+++ b/scripts/Route19.asm
@@ -8,219 +8,221 @@ Route19_Script:
ret
Route19_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE19_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE19_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE19_END_BATTLE
Route19_TextPointers:
- dw Route19Text1
- dw Route19Text2
- dw Route19Text3
- dw Route19Text4
- dw Route19Text5
- dw Route19Text6
- dw Route19Text7
- dw Route19Text8
- dw Route19Text9
- dw Route19Text10
- dw Route19Text11
+ def_text_pointers
+ dw_const Route19CooltrainerM1Text, TEXT_ROUTE19_COOLTRAINER_M1
+ dw_const Route19CooltrainerM2Text, TEXT_ROUTE19_COOLTRAINER_M2
+ dw_const Route19Swimmer1Text, TEXT_ROUTE19_SWIMMER1
+ dw_const Route19Swimmer2Text, TEXT_ROUTE19_SWIMMER2
+ dw_const Route19Swimmer3Text, TEXT_ROUTE19_SWIMMER3
+ dw_const Route19Swimmer4Text, TEXT_ROUTE19_SWIMMER4
+ dw_const Route19Swimmer5Text, TEXT_ROUTE19_SWIMMER5
+ dw_const Route19Swimmer6Text, TEXT_ROUTE19_SWIMMER6
+ dw_const Route19Swimmer7Text, TEXT_ROUTE19_SWIMMER7
+ dw_const Route19Swimmer8Text, TEXT_ROUTE19_SWIMMER8
+ dw_const Route19SignText, TEXT_ROUTE19_SIGN
Route19TrainerHeaders:
def_trainers
Route19TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_0, 4, Route19BattleText1, Route19EndBattleText1, Route19AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_0, 4, Route19CooltrainerM1BattleText, Route19CooltrainerM1EndBattleText, Route19CooltrainerM1AfterBattleText
Route19TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_1, 4, Route19BattleText2, Route19EndBattleText2, Route19AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_1, 4, Route19CooltrainerM2BattleText, Route19CooltrainerM2EndBattleText, Route19CooltrainerM2AfterBattleText
Route19TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_2, 3, Route19BattleText3, Route19EndBattleText3, Route19AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_2, 3, Route19Swimmer1BattleText, Route19Swimmer1EndBattleText, Route19Swimmer1AfterBattleText
Route19TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_3, 4, Route19BattleText4, Route19EndBattleText4, Route19AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_3, 4, Route19Swimmer2BattleText, Route19Swimmer2EndBattleText, Route19Swimmer2AfterBattleText
Route19TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_4, 4, Route19BattleText5, Route19EndBattleText5, Route19AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_4, 4, Route19Swimmer3BattleText, Route19Swimmer3EndBattleText, Route19Swimmer3AfterBattleText
Route19TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_5, 4, Route19BattleText6, Route19EndBattleText6, Route19AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_5, 4, Route19Swimmer4BattleText, Route19Swimmer4EndBattleText, Route19Swimmer4AfterBattleText
Route19TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_6, 3, Route19BattleText7, Route19EndBattleText7, Route19AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_6, 3, Route19Swimmer5BattleText, Route19Swimmer5EndBattleText, Route19Swimmer5AfterBattleText
Route19TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_7, 4, Route19BattleText8, Route19EndBattleText8, Route19AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_7, 4, Route19Swimmer6BattleText, Route19Swimmer6EndBattleText, Route19Swimmer6AfterBattleText
Route19TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_8, 4, Route19BattleText9, Route19EndBattleText9, Route19AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_8, 4, Route19Swimmer7BattleText, Route19Swimmer7EndBattleText, Route19Swimmer7AfterBattleText
Route19TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_19_TRAINER_9, 4, Route19BattleText10, Route19EndBattleText10, Route19AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_19_TRAINER_9, 4, Route19Swimmer8BattleText, Route19Swimmer8EndBattleText, Route19Swimmer8AfterBattleText
db -1 ; end
-Route19Text1:
+Route19CooltrainerM1Text:
text_asm
ld hl, Route19TrainerHeader0
jr Route19_TalkToTrainer
-Route19Text2:
+Route19CooltrainerM2Text:
text_asm
ld hl, Route19TrainerHeader1
jr Route19_TalkToTrainer
-Route19Text3:
+Route19Swimmer1Text:
text_asm
ld hl, Route19TrainerHeader2
jr Route19_TalkToTrainer
-Route19Text4:
+Route19Swimmer2Text:
text_asm
ld hl, Route19TrainerHeader3
jr Route19_TalkToTrainer
-Route19Text5:
+Route19Swimmer3Text:
text_asm
ld hl, Route19TrainerHeader4
jr Route19_TalkToTrainer
-Route19Text6:
+Route19Swimmer4Text:
text_asm
ld hl, Route19TrainerHeader5
jr Route19_TalkToTrainer
-Route19Text7:
+Route19Swimmer5Text:
text_asm
ld hl, Route19TrainerHeader6
jr Route19_TalkToTrainer
-Route19Text8:
+Route19Swimmer6Text:
text_asm
ld hl, Route19TrainerHeader7
jr Route19_TalkToTrainer
-Route19Text9:
+Route19Swimmer7Text:
text_asm
ld hl, Route19TrainerHeader8
jr Route19_TalkToTrainer
-Route19Text10:
+Route19Swimmer8Text:
text_asm
ld hl, Route19TrainerHeader9
Route19_TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-Route19BattleText1:
- text_far _Route19BattleText1
+Route19CooltrainerM1BattleText:
+ text_far _Route19CooltrainerM1BattleText
text_end
-Route19EndBattleText1:
- text_far _Route19EndBattleText1
+Route19CooltrainerM1EndBattleText:
+ text_far _Route19CooltrainerM1EndBattleText
text_end
-Route19AfterBattleText1:
- text_far _Route19AfterBattleText1
+Route19CooltrainerM1AfterBattleText:
+ text_far _Route19CooltrainerM1AfterBattleText
text_end
-Route19BattleText2:
- text_far _Route19BattleText2
+Route19CooltrainerM2BattleText:
+ text_far _Route19CooltrainerM2BattleText
text_end
-Route19EndBattleText2:
- text_far _Route19EndBattleText2
+Route19CooltrainerM2EndBattleText:
+ text_far _Route19CooltrainerM2EndBattleText
text_end
-Route19AfterBattleText2:
- text_far _Route19AfterBattleText2
+Route19CooltrainerM2AfterBattleText:
+ text_far _Route19CooltrainerM2AfterBattleText
text_end
-Route19BattleText3:
- text_far _Route19BattleText3
+Route19Swimmer1BattleText:
+ text_far _Route19Swimmer1BattleText
text_end
-Route19EndBattleText3:
- text_far _Route19EndBattleText3
+Route19Swimmer1EndBattleText:
+ text_far _Route19Swimmer1EndBattleText
text_end
-Route19AfterBattleText3:
- text_far _Route19AfterBattleText3
+Route19Swimmer1AfterBattleText:
+ text_far _Route19Swimmer1AfterBattleText
text_end
-Route19BattleText4:
- text_far _Route19BattleText4
+Route19Swimmer2BattleText:
+ text_far _Route19Swimmer2BattleText
text_end
-Route19EndBattleText4:
- text_far _Route19EndBattleText4
+Route19Swimmer2EndBattleText:
+ text_far _Route19Swimmer2EndBattleText
text_end
-Route19AfterBattleText4:
- text_far _Route19AfterBattleText4
+Route19Swimmer2AfterBattleText:
+ text_far _Route19Swimmer2AfterBattleText
text_end
-Route19BattleText5:
- text_far _Route19BattleText5
+Route19Swimmer3BattleText:
+ text_far _Route19Swimmer3BattleText
text_end
-Route19EndBattleText5:
- text_far _Route19EndBattleText5
+Route19Swimmer3EndBattleText:
+ text_far _Route19Swimmer3EndBattleText
text_end
-Route19AfterBattleText5:
- text_far _Route19AfterBattleText5
+Route19Swimmer3AfterBattleText:
+ text_far _Route19Swimmer3AfterBattleText
text_end
-Route19BattleText6:
- text_far _Route19BattleText6
+Route19Swimmer4BattleText:
+ text_far _Route19Swimmer4BattleText
text_end
-Route19EndBattleText6:
- text_far _Route19EndBattleText6
+Route19Swimmer4EndBattleText:
+ text_far _Route19Swimmer4EndBattleText
text_end
-Route19AfterBattleText6:
- text_far _Route19AfterBattleText6
+Route19Swimmer4AfterBattleText:
+ text_far _Route19Swimmer4AfterBattleText
text_end
-Route19BattleText7:
- text_far _Route19BattleText7
+Route19Swimmer5BattleText:
+ text_far _Route19Swimmer5BattleText
text_end
-Route19EndBattleText7:
- text_far _Route19EndBattleText7
+Route19Swimmer5EndBattleText:
+ text_far _Route19Swimmer5EndBattleText
text_end
-Route19AfterBattleText7:
- text_far _Route19AfterBattleText7
+Route19Swimmer5AfterBattleText:
+ text_far _Route19Swimmer5AfterBattleText
text_end
-Route19BattleText8:
- text_far _Route19BattleText8
+Route19Swimmer6BattleText:
+ text_far _Route19Swimmer6BattleText
text_end
-Route19EndBattleText8:
- text_far _Route19EndBattleText8
+Route19Swimmer6EndBattleText:
+ text_far _Route19Swimmer6EndBattleText
text_end
-Route19AfterBattleText8:
- text_far _Route19AfterBattleText8
+Route19Swimmer6AfterBattleText:
+ text_far _Route19Swimmer6AfterBattleText
text_end
-Route19BattleText9:
- text_far _Route19BattleText9
+Route19Swimmer7BattleText:
+ text_far _Route19Swimmer7BattleText
text_end
-Route19EndBattleText9:
- text_far _Route19EndBattleText9
+Route19Swimmer7EndBattleText:
+ text_far _Route19Swimmer7EndBattleText
text_end
-Route19AfterBattleText9:
- text_far _Route19AfterBattleText9
+Route19Swimmer7AfterBattleText:
+ text_far _Route19Swimmer7AfterBattleText
text_end
-Route19BattleText10:
- text_far _Route19BattleText10
+Route19Swimmer8BattleText:
+ text_far _Route19Swimmer8BattleText
text_end
-Route19EndBattleText10:
- text_far _Route19EndBattleText10
+Route19Swimmer8EndBattleText:
+ text_far _Route19Swimmer8EndBattleText
text_end
-Route19AfterBattleText10:
- text_far _Route19AfterBattleText10
+Route19Swimmer8AfterBattleText:
+ text_far _Route19Swimmer8AfterBattleText
text_end
-Route19Text11:
- text_far _Route19Text11
+Route19SignText:
+ text_far _Route19SignText
text_end
diff --git a/scripts/Route1_2.asm b/scripts/Route1_2.asm
index 94748252..24cabbde 100644
--- a/scripts/Route1_2.asm
+++ b/scripts/Route1_2.asm
@@ -1,53 +1,53 @@
-Func_f1ad2::
+Route1PrintYoungster1Text::
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
ret
-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
-Func_f1b0f::
- ld hl, Route1Text_f1b16
+Route1PrintYoungster2Text::
+ ld hl, .text
call PrintText
ret
-Route1Text_f1b16:
- text_far _Route1Text2
+.text
+ text_far _Route1Youngster2Text
text_end
-Func_f1b1b::
- ld hl, Route1Text_f1b22
+Route1PrintSignText::
+ ld hl, .text
call PrintText
ret
-Route1Text_f1b22:
- text_far _Route1Text3
+.text
+ text_far _Route1SignText
text_end
diff --git a/scripts/Route2.asm b/scripts/Route2.asm
index c6886ce4..837bbe88 100644
--- a/scripts/Route2.asm
+++ b/scripts/Route2.asm
@@ -2,15 +2,16 @@ Route2_Script:
jp EnableAutoTextBoxDrawing
Route2_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw Route2Text3
- dw Route2Text4
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_ROUTE2_MOON_STONE
+ dw_const PickUpItemText, TEXT_ROUTE2_HP_UP
+ dw_const Route2SignText, TEXT_ROUTE2_SIGN
+ dw_const Route2DiglettsCaveSignText, TEXT_ROUTE2_DIGLETTS_CAVE_SIGN
-Route2Text3:
- text_far _Route2Text3
+Route2SignText:
+ text_far _Route2SignText
text_end
-Route2Text4:
- text_far _Route2Text4
+Route2DiglettsCaveSignText:
+ text_far _Route2DiglettsCaveSignText
text_end
diff --git a/scripts/Route20.asm b/scripts/Route20.asm
index fd20f722..5230858e 100644
--- a/scripts/Route20.asm
+++ b/scripts/Route20.asm
@@ -1,6 +1,6 @@
Route20_Script:
CheckAndResetEvent EVENT_IN_SEAFOAM_ISLANDS
- call nz, Route20Script_50cc6
+ call nz, Route20BoulderScript
call EnableAutoTextBoxDrawing
ld hl, Route20TrainerHeaders
ld de, Route20_ScriptPointers
@@ -9,22 +9,22 @@ Route20_Script:
ld [wRoute20CurScript], a
ret
-Route20Script_50cc6:
+Route20BoulderScript:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
- jr z, .asm_50cef
+ jr z, .next_boulder_check
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_1
- call Route20Script_50d0c
+ call Route20ShowObjectScript
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_2
- call Route20Script_50d0c
+ call Route20ShowObjectScript
ld hl, .MissableObjectIDs
-.asm_50cdc
+.hide_missable_objects
ld a, [hli]
cp $ff
- jr z, .asm_50cef
+ jr z, .next_boulder_check
push hl
- call Route20Script_50d14
+ call Route20HideObjectScript
pop hl
- jr .asm_50cdc
+ jr .hide_missable_objects
.MissableObjectIDs:
db HS_SEAFOAM_ISLANDS_B1F_BOULDER_1
@@ -35,251 +35,252 @@ Route20Script_50cc6:
db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4
db -1 ; end
-.asm_50cef
+.next_boulder_check
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
ret z
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_1
- call Route20Script_50d0c
+ call Route20ShowObjectScript
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_2
- call Route20Script_50d0c
+ call Route20ShowObjectScript
ld a, HS_SEAFOAM_ISLANDS_B4F_BOULDER_1
- call Route20Script_50d14
+ call Route20HideObjectScript
ld a, HS_SEAFOAM_ISLANDS_B4F_BOULDER_2
- call Route20Script_50d14
+ call Route20HideObjectScript
ret
-Route20Script_50d0c:
+Route20ShowObjectScript:
ld [wMissableObjectIndex], a
predef_jump ShowObject
-Route20Script_50d14:
+Route20HideObjectScript:
ld [wMissableObjectIndex], a
predef_jump HideObject
Route20_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE20_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE20_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE20_END_BATTLE
Route20_TextPointers:
- dw Route20Text1
- dw Route20Text2
- dw Route20Text3
- dw Route20Text4
- dw Route20Text5
- dw Route20Text6
- dw Route20Text7
- dw Route20Text8
- dw Route20Text9
- dw Route20Text10
- dw Route20Text11
- dw Route20Text12
+ def_text_pointers
+ dw_const Route20Swimmer1Text, TEXT_ROUTE20_SWIMMER1
+ dw_const Route20Swimmer2Text, TEXT_ROUTE20_SWIMMER2
+ dw_const Route20Swimmer3Text, TEXT_ROUTE20_SWIMMER3
+ dw_const Route20Swimmer4Text, TEXT_ROUTE20_SWIMMER4
+ dw_const Route20Swimmer5Text, TEXT_ROUTE20_SWIMMER5
+ dw_const Route20Swimmer6Text, TEXT_ROUTE20_SWIMMER6
+ dw_const Route20CooltrainerMText, TEXT_ROUTE20_COOLTRAINER_M
+ dw_const Route20Swimmer7Text, TEXT_ROUTE20_SWIMMER7
+ dw_const Route20Swimmer8Text, TEXT_ROUTE20_SWIMMER8
+ dw_const Route20Swimmer9Text, TEXT_ROUTE20_SWIMMER9
+ dw_const Route20SeafoamIslandsSignText, TEXT_ROUTE20_SEAFOAM_ISLANDS_WEST_SIGN
+ dw_const Route20SeafoamIslandsSignText, TEXT_ROUTE20_SEAFOAM_ISLANDS_EAST_SIGN
Route20TrainerHeaders:
def_trainers
Route20TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_0, 4, Route20BattleText1, Route20EndBattleText1, Route20AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_0, 4, Route20Swimmer1BattleText, Route20Swimmer1EndBattleText, Route20Swimmer1AfterBattleText
Route20TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_1, 4, Route20BattleText2, Route20EndBattleText2, Route20AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_1, 4, Route20Swimmer2BattleText, Route20Swimmer2EndBattleText, Route20Swimmer2AfterBattleText
Route20TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_2, 2, Route20BattleText3, Route20EndBattleText3, Route20AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_2, 2, Route20Swimmer3BattleText, Route20Swimmer3EndBattleText, Route20Swimmer3AfterBattleText
Route20TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_3, 4, Route20BattleText4, Route20EndBattleText4, Route20AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_3, 4, Route20Swimmer4BattleText, Route20Swimmer4EndBattleText, Route20Swimmer4AfterBattleText
Route20TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_4, 3, Route20BattleText5, Route20EndBattleText5, Route20AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_4, 3, Route20Swimmer5BattleText, Route20Swimmer5EndBattleText, Route20Swimmer5AfterBattleText
Route20TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_5, 4, Route20BattleText6, Route20EndBattleText6, Route20AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_5, 4, Route20Swimmer6BattleText, Route20Swimmer6EndBattleText, Route20Swimmer6AfterBattleText
Route20TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_6, 2, Route20BattleText7, Route20EndBattleText7, Route20AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_6, 2, Route20CooltrainerMBattleText, Route20CooltrainerMEndBattleText, Route20CooltrainerMAfterBattleText
Route20TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_7, 4, Route20BattleText8, Route20EndBattleText8, Route20AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_7, 4, Route20Swimmer7BattleText, Route20Swimmer7EndBattleText, Route20Swimmer7AfterBattleText
Route20TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_8, 3, Route20BattleText9, Route20EndBattleText9, Route20AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_8, 3, Route20Swimmer8BattleText, Route20Swimmer8EndBattleText, Route20Swimmer8AfterBattleText
Route20TrainerHeader9:
- trainer EVENT_BEAT_ROUTE_20_TRAINER_9, 4, Route20BattleText10, Route20EndBattleText10, Route20AfterBattleText10
+ trainer EVENT_BEAT_ROUTE_20_TRAINER_9, 4, Route20Swimmer9BattleText, Route20Swimmer9EndBattleText, Route20Swimmer9AfterBattleText
db -1 ; end
-Route20Text1:
+Route20Swimmer1Text:
text_asm
ld hl, Route20TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route20Text2:
+Route20Swimmer2Text:
text_asm
ld hl, Route20TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route20Text3:
+Route20Swimmer3Text:
text_asm
ld hl, Route20TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route20Text4:
+Route20Swimmer4Text:
text_asm
ld hl, Route20TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route20Text5:
+Route20Swimmer5Text:
text_asm
ld hl, Route20TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route20Text6:
+Route20Swimmer6Text:
text_asm
ld hl, Route20TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route20Text7:
+Route20CooltrainerMText:
text_asm
ld hl, Route20TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route20Text8:
+Route20Swimmer7Text:
text_asm
ld hl, Route20TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route20Text9:
+Route20Swimmer8Text:
text_asm
ld hl, Route20TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route20Text10:
+Route20Swimmer9Text:
text_asm
ld hl, Route20TrainerHeader9
call TalkToTrainer
jp TextScriptEnd
-Route20BattleText1:
- text_far _Route20BattleText1
+Route20Swimmer1BattleText:
+ text_far _Route20Swimmer1BattleText
text_end
-Route20EndBattleText1:
- text_far _Route20EndBattleText1
+Route20Swimmer1EndBattleText:
+ text_far _Route20Swimmer1EndBattleText
text_end
-Route20AfterBattleText1:
- text_far _Route20AfterBattleText1
+Route20Swimmer1AfterBattleText:
+ text_far _Route20Swimmer1AfterBattleText
text_end
-Route20BattleText2:
- text_far _Route20BattleText2
+Route20Swimmer2BattleText:
+ text_far _Route20Swimmer2BattleText
text_end
-Route20EndBattleText2:
- text_far _Route20EndBattleText2
+Route20Swimmer2EndBattleText:
+ text_far _Route20Swimmer2EndBattleText
text_end
-Route20AfterBattleText2:
- text_far _Route20AfterBattleText2
+Route20Swimmer2AfterBattleText:
+ text_far _Route20Swimmer2AfterBattleText
text_end
-Route20BattleText3:
- text_far _Route20BattleText3
+Route20Swimmer3BattleText:
+ text_far _Route20Swimmer3BattleText
text_end
-Route20EndBattleText3:
- text_far _Route20EndBattleText3
+Route20Swimmer3EndBattleText:
+ text_far _Route20Swimmer3EndBattleText
text_end
-Route20AfterBattleText3:
- text_far _Route20AfterBattleText3
+Route20Swimmer3AfterBattleText:
+ text_far _Route20Swimmer3AfterBattleText
text_end
-Route20BattleText4:
- text_far _Route20BattleText4
+Route20Swimmer4BattleText:
+ text_far _Route20Swimmer4BattleText
text_end
-Route20EndBattleText4:
- text_far _Route20EndBattleText4
+Route20Swimmer4EndBattleText:
+ text_far _Route20Swimmer4EndBattleText
text_end
-Route20AfterBattleText4:
- text_far _Route20AfterBattleText4
+Route20Swimmer4AfterBattleText:
+ text_far _Route20Swimmer4AfterBattleText
text_end
-Route20BattleText5:
- text_far _Route20BattleText5
+Route20Swimmer5BattleText:
+ text_far _Route20Swimmer5BattleText
text_end
-Route20EndBattleText5:
- text_far _Route20EndBattleText5
+Route20Swimmer5EndBattleText:
+ text_far _Route20Swimmer5EndBattleText
text_end
-Route20AfterBattleText5:
- text_far _Route20AfterBattleText5
+Route20Swimmer5AfterBattleText:
+ text_far _Route20Swimmer5AfterBattleText
text_end
-Route20BattleText6:
- text_far _Route20BattleText6
+Route20Swimmer6BattleText:
+ text_far _Route20Swimmer6BattleText
text_end
-Route20EndBattleText6:
- text_far _Route20EndBattleText6
+Route20Swimmer6EndBattleText:
+ text_far _Route20Swimmer6EndBattleText
text_end
-Route20AfterBattleText6:
- text_far _Route20AfterBattleText6
+Route20Swimmer6AfterBattleText:
+ text_far _Route20Swimmer6AfterBattleText
text_end
-Route20BattleText7:
- text_far _Route20BattleText7
+Route20CooltrainerMBattleText:
+ text_far _Route20CooltrainerMBattleText
text_end
-Route20EndBattleText7:
- text_far _Route20EndBattleText7
+Route20CooltrainerMEndBattleText:
+ text_far _Route20CooltrainerMEndBattleText
text_end
-Route20AfterBattleText7:
- text_far _Route20AfterBattleText7
+Route20CooltrainerMAfterBattleText:
+ text_far _Route20CooltrainerMAfterBattleText
text_end
-Route20BattleText8:
- text_far _Route20BattleText8
+Route20Swimmer7BattleText:
+ text_far _Route20Swimmer7BattleText
text_end
-Route20EndBattleText8:
- text_far _Route20EndBattleText8
+Route20Swimmer7EndBattleText:
+ text_far _Route20Swimmer7EndBattleText
text_end
-Route20AfterBattleText8:
- text_far _Route20AfterBattleText8
+Route20Swimmer7AfterBattleText:
+ text_far _Route20Swimmer7AfterBattleText
text_end
-Route20BattleText9:
- text_far _Route20BattleText9
+Route20Swimmer8BattleText:
+ text_far _Route20Swimmer8BattleText
text_end
-Route20EndBattleText9:
- text_far _Route20EndBattleText9
+Route20Swimmer8EndBattleText:
+ text_far _Route20Swimmer8EndBattleText
text_end
-Route20AfterBattleText9:
- text_far _Route20AfterBattleText9
+Route20Swimmer8AfterBattleText:
+ text_far _Route20Swimmer8AfterBattleText
text_end
-Route20BattleText10:
- text_far _Route20BattleText10
+Route20Swimmer9BattleText:
+ text_far _Route20Swimmer9BattleText
text_end
-Route20EndBattleText10:
- text_far _Route20EndBattleText10
+Route20Swimmer9EndBattleText:
+ text_far _Route20Swimmer9EndBattleText
text_end
-Route20AfterBattleText10:
- text_far _Route20AfterBattleText10
+Route20Swimmer9AfterBattleText:
+ text_far _Route20Swimmer9AfterBattleText
text_end
-Route20Text12:
-Route20Text11:
- text_far _Route20Text11
+Route20SeafoamIslandsSignText:
+ text_far _Route20SeafoamIslandsSignText
text_end
diff --git a/scripts/Route21.asm b/scripts/Route21.asm
index c4267816..91840b8f 100644
--- a/scripts/Route21.asm
+++ b/scripts/Route21.asm
@@ -8,201 +8,203 @@ Route21_Script:
ret
Route21_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE21_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE21_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE21_END_BATTLE
Route21_TextPointers:
- dw Route21Text1
- dw Route21Text2
- dw Route21Text3
- dw Route21Text4
- dw Route21Text5
- dw Route21Text6
- dw Route21Text7
- dw Route21Text8
- dw Route21Text9
+ def_text_pointers
+ dw_const Route21Fisher1Text, TEXT_ROUTE21_FISHER1
+ dw_const Route21Fisher2Text, TEXT_ROUTE21_FISHER2
+ dw_const Route21Swimmer1Text, TEXT_ROUTE21_SWIMMER1
+ dw_const Route21Swimmer2Text, TEXT_ROUTE21_SWIMMER2
+ dw_const Route21Swimmer3Text, TEXT_ROUTE21_SWIMMER3
+ dw_const Route21Swimmer4Text, TEXT_ROUTE21_SWIMMER4
+ dw_const Route21Swimmer5Text, TEXT_ROUTE21_SWIMMER5
+ dw_const Route21Fisher3Text, TEXT_ROUTE21_FISHER3
+ dw_const Route21Fisher4Text, TEXT_ROUTE21_FISHER4
Route21TrainerHeaders:
def_trainers
Route21TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_0, 0, Route21BattleText1, Route21EndBattleText1, Route21AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_0, 0, Route21Fisher1BattleText, Route21Fisher1EndBattleText, Route21Fisher1AfterBattleText
Route21TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_1, 0, Route21BattleText2, Route21EndBattleText2, Route21AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_1, 0, Route21Fisher2BattleText, Route21Fisher2EndBattleText, Route21Fisher2AfterBattleText
Route21TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_2, 4, Route21BattleText3, Route21EndBattleText3, Route21AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_2, 4, Route21Swimmer1BattleText, Route21Swimmer1EndBattleText, Route21Swimmer1AfterBattleText
Route21TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_3, 4, Route21BattleText4, Route21EndBattleText4, Route21AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_3, 4, Route21Swimmer2BattleText, Route21Swimmer2EndBattleText, Route21Swimmer2AfterBattleText
Route21TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_4, 4, Route21BattleText5, Route21EndBattleText5, Route21AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_4, 4, Route21Swimmer3BattleText, Route21Swimmer3EndBattleText, Route21Swimmer3AfterBattleText
Route21TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_5, 4, Route21BattleText6, Route21EndBattleText6, Route21AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_5, 4, Route21Swimmer4BattleText, Route21Swimmer4EndBattleText, Route21Swimmer4AfterBattleText
Route21TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_6, 3, Route21BattleText7, Route21EndBattleText7, Route21AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_6, 3, Route21Swimmer5BattleText, Route21Swimmer5EndBattleText, Route21Swimmer5AfterBattleText
Route21TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_7, 0, Route21BattleText8, Route21EndBattleText8, Route21AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_7, 0, Route21Fisher3BattleText, Route21Fisher3EndBattleText, Route21Fisher3AfterBattleText
Route21TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_21_TRAINER_8, 0, Route21BattleText9, Route21EndBattleText9, Route21AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_21_TRAINER_8, 0, Route21Fisher4BattleText, Route21Fisher4EndBattleText, Route21Fisher4AfterBattleText
db -1 ; end
-Route21Text1:
+Route21Fisher1Text:
text_asm
ld hl, Route21TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route21Text2:
+Route21Fisher2Text:
text_asm
ld hl, Route21TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route21Text3:
+Route21Swimmer1Text:
text_asm
ld hl, Route21TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route21Text4:
+Route21Swimmer2Text:
text_asm
ld hl, Route21TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route21Text5:
+Route21Swimmer3Text:
text_asm
ld hl, Route21TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route21Text6:
+Route21Swimmer4Text:
text_asm
ld hl, Route21TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route21Text7:
+Route21Swimmer5Text:
text_asm
ld hl, Route21TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route21Text8:
+Route21Fisher3Text:
text_asm
ld hl, Route21TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route21Text9:
+Route21Fisher4Text:
text_asm
ld hl, Route21TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route21BattleText1:
- text_far _Route21BattleText1
+Route21Fisher1BattleText:
+ text_far _Route21Fisher1BattleText
text_end
-Route21EndBattleText1:
- text_far _Route21EndBattleText1
+Route21Fisher1EndBattleText:
+ text_far _Route21Fisher1EndBattleText
text_end
-Route21AfterBattleText1:
- text_far _Route21AfterBattleText1
+Route21Fisher1AfterBattleText:
+ text_far _Route21Fisher1AfterBattleText
text_end
-Route21BattleText2:
- text_far _Route21BattleText2
+Route21Fisher2BattleText:
+ text_far _Route21Fisher2BattleText
text_end
-Route21EndBattleText2:
- text_far _Route21EndBattleText2
+Route21Fisher2EndBattleText:
+ text_far _Route21Fisher2EndBattleText
text_end
-Route21AfterBattleText2:
- text_far _Route21AfterBattleText2
+Route21Fisher2AfterBattleText:
+ text_far _Route21Fisher2AfterBattleText
text_end
-Route21BattleText3:
- text_far _Route21BattleText3
+Route21Swimmer1BattleText:
+ text_far _Route21Swimmer1BattleText
text_end
-Route21EndBattleText3:
- text_far _Route21EndBattleText3
+Route21Swimmer1EndBattleText:
+ text_far _Route21Swimmer1EndBattleText
text_end
-Route21AfterBattleText3:
- text_far _Route21AfterBattleText3
+Route21Swimmer1AfterBattleText:
+ text_far _Route21Swimmer1AfterBattleText
text_end
-Route21BattleText4:
- text_far _Route21BattleText4
+Route21Swimmer2BattleText:
+ text_far _Route21Swimmer2BattleText
text_end
-Route21EndBattleText4:
- text_far _Route21EndBattleText4
+Route21Swimmer2EndBattleText:
+ text_far _Route21Swimmer2EndBattleText
text_end
-Route21AfterBattleText4:
- text_far _Route21AfterBattleText4
+Route21Swimmer2AfterBattleText:
+ text_far _Route21Swimmer2AfterBattleText
text_end
-Route21BattleText5:
- text_far _Route21BattleText5
+Route21Swimmer3BattleText:
+ text_far _Route21Swimmer3BattleText
text_end
-Route21EndBattleText5:
- text_far _Route21EndBattleText5
+Route21Swimmer3EndBattleText:
+ text_far _Route21Swimmer3EndBattleText
text_end
-Route21AfterBattleText5:
- text_far _Route21AfterBattleText5
+Route21Swimmer3AfterBattleText:
+ text_far _Route21Swimmer3AfterBattleText
text_end
-Route21BattleText6:
- text_far _Route21BattleText6
+Route21Swimmer4BattleText:
+ text_far _Route21Swimmer4BattleText
text_end
-Route21EndBattleText6:
- text_far _Route21EndBattleText6
+Route21Swimmer4EndBattleText:
+ text_far _Route21Swimmer4EndBattleText
text_end
-Route21AfterBattleText6:
- text_far _Route21AfterBattleText6
+Route21Swimmer4AfterBattleText:
+ text_far _Route21Swimmer4AfterBattleText
text_end
-Route21BattleText7:
- text_far _Route21BattleText7
+Route21Swimmer5BattleText:
+ text_far _Route21Swimmer5BattleText
text_end
-Route21EndBattleText7:
- text_far _Route21EndBattleText7
+Route21Swimmer5EndBattleText:
+ text_far _Route21Swimmer5EndBattleText
text_end
-Route21AfterBattleText7:
- text_far _Route21AfterBattleText7
+Route21Swimmer5AfterBattleText:
+ text_far _Route21Swimmer5AfterBattleText
text_end
-Route21BattleText8:
- text_far _Route21BattleText8
+Route21Fisher3BattleText:
+ text_far _Route21Fisher3BattleText
text_end
-Route21EndBattleText8:
- text_far _Route21EndBattleText8
+Route21Fisher3EndBattleText:
+ text_far _Route21Fisher3EndBattleText
text_end
-Route21AfterBattleText8:
- text_far _Route21AfterBattleText8
+Route21Fisher3AfterBattleText:
+ text_far _Route21Fisher3AfterBattleText
text_end
-Route21BattleText9:
- text_far _Route21BattleText9
+Route21Fisher4BattleText:
+ text_far _Route21Fisher4BattleText
text_end
-Route21EndBattleText9:
- text_far _Route21EndBattleText9
+Route21Fisher4EndBattleText:
+ text_far _Route21Fisher4EndBattleText
text_end
-Route21AfterBattleText9:
- text_far _Route21AfterBattleText9
+Route21Fisher4AfterBattleText:
+ text_far _Route21Fisher4AfterBattleText
text_end
diff --git a/scripts/Route22.asm b/scripts/Route22.asm
index 4ffeff23..a1b8d0ea 100644
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -5,20 +5,21 @@ Route22_Script:
jp CallFunctionInTable
Route22_ScriptPointers:
- dw Route22Script0
- dw Route22Script1
- dw Route22Script2
- dw Route22Script3
- dw Route22Script4
- dw Route22Script5
- dw Route22Script6
- dw Route22Script7
+ def_script_pointers
+ dw_const Route22DefaultScript, SCRIPT_ROUTE22_DEFAULT
+ dw_const Route22Rival1StartBattleScript, SCRIPT_ROUTE22_RIVAL1_START_BATTLE
+ dw_const Route22Rival1AfterBattleScript, SCRIPT_ROUTE22_RIVAL1_AFTER_BATTLE
+ dw_const Route22Rival1ExitScript, SCRIPT_ROUTE22_RIVAL1_EXIT
+ dw_const Route22Rival2StartBattleScript, SCRIPT_ROUTE22_RIVAL2_START_BATTLE
+ dw_const Route22Rival2AfterBattleScript, SCRIPT_ROUTE22_RIVAL2_AFTER_BATTLE
+ dw_const Route22Rival2ExitScript, SCRIPT_ROUTE22_RIVAL2_EXIT
+ dw_const Route22NoopScript, SCRIPT_ROUTE22_NOOP
-Route22Script_50ece:
- xor a
+Route22SetDefaultScript:
+ xor a ; SCRIPT_ROUTE22_DEFAULT
ld [wJoyIgnore], a
ld [wRoute22CurScript], a
-Route22Script7:
+Route22NoopScript:
ret
Route22Script_50ed6:
@@ -36,13 +37,13 @@ Route22Script_50ee1:
ld [wTrainerNo], a
ret
-Route22MoveRivalSprite:
+Route22MoveRivalRightScript:
ld de, Route22RivalMovementData
ld a, [wcf0d]
cp $1
- jr z, .asm_50ef1
+ jr z, .skip_first_right
inc de
-.asm_50ef1
+.skip_first_right
call MoveSprite
ld a, SPRITE_FACING_RIGHT
ldh [hSpriteFacingDirection], a
@@ -55,7 +56,7 @@ Route22RivalMovementData:
db NPC_MOVEMENT_RIGHT
db -1 ; end
-Route22Script0:
+Route22DefaultScript:
CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ret z
ld hl, .Route22RivalBattleCoords
@@ -65,14 +66,14 @@ Route22Script0:
ld [wcf0d], a
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
CheckEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE
- jr nz, .firstRivalBattle
- CheckEventReuseA EVENT_2ND_ROUTE22_RIVAL_BATTLE ; is this the rival at the end of the game?
- jp nz, Route22Script_5104e
+ jr nz, Route22FirstRivalBattleScript
+ CheckEventReuseA EVENT_2ND_ROUTE22_RIVAL_BATTLE
+ jp nz, Route22SecondRivalBattleScript
ret
.Route22RivalBattleCoords
@@ -80,73 +81,73 @@ Route22Script0:
dbmapcoord 29, 5
db -1 ; end
-.firstRivalBattle
- ld a, $1
+Route22FirstRivalBattleScript:
+ ld a, ROUTE22_RIVAL1
ld [wEmotionBubbleSpriteIndex], a
xor a ; EXCLAMATION_BUBBLE
ld [wWhichEmotionBubble], a
predef EmotionBubble
ld a, [wWalkBikeSurfState]
and a
- jr z, .asm_50f4e
+ jr z, .walking
call StopAllMusic
-.asm_50f4e
+.walking
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
- ld a, $1
+ ld a, ROUTE22_RIVAL1
ldh [hSpriteIndex], a
- call Route22MoveRivalSprite
- ld a, $1
+ call Route22MoveRivalRightScript
+ ld a, SCRIPT_ROUTE22_RIVAL1_START_BATTLE
ld [wRoute22CurScript], a
ret
-Route22Script1:
+Route22Rival1StartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
ld a, [wcf0d]
cp $1
- jr nz, .asm_50f78
+ jr nz, .set_rival_facing_right
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_UP
- jr .asm_50f7a
-.asm_50f78
+ jr .set_rival_facing_direction
+.set_rival_facing_right
ld a, SPRITE_FACING_RIGHT
-.asm_50f7a
+.set_rival_facing_direction
ldh [hSpriteFacingDirection], a
- ld a, $1
+ ld a, ROUTE22_RIVAL1
ldh [hSpriteIndex], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
- ld a, $1
+ ld a, TEXT_ROUTE22_RIVAL1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, Route22RivalDefeatedText1
- ld de, Route22Text_511bc
+ ld hl, Route22Rival1DefeatedText
+ ld de, Route22Rival1VictoryText
call SaveEndBattleTextPointers
call Route22Script_50ed6
- ld a, $2
+ ld a, SCRIPT_ROUTE22_RIVAL1_AFTER_BATTLE
ld [wRoute22CurScript], a
ret
-Route22RivalDefeatedText1:
- text_far _Route22RivalDefeatedText1
+Route22Rival1DefeatedText:
+ text_far _Route22Rival1DefeatedText
text_end
-Route22Text_511bc:
- text_far _Route22Text_511bc
+Route22Rival1VictoryText:
+ text_far _Route22Rival1VictoryText
text_end
-Route22Script2:
+Route22Rival1AfterBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, Route22Script_50ece
+ jp z, Route22SetDefaultScript
ld a, [wRivalStarter]
cp RIVAL_STARTER_FLAREON
jr nz, .keep_rival_starter
@@ -155,48 +156,48 @@ Route22Script2:
.keep_rival_starter
ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
- jr nz, .notDown
+ jr nz, .not_facing_down
ld a, SPRITE_FACING_UP
- jr .done
-.notDown
+ jr .set_rival_facing
+.not_facing_down
ld a, SPRITE_FACING_RIGHT
-.done
+.set_rival_facing
ldh [hSpriteFacingDirection], a
- ld a, $1
+ ld a, ROUTE22_RIVAL1
ldh [hSpriteIndex], a
call SetSpriteFacingDirectionAndDelay
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
- ld a, $1
+ ld a, TEXT_ROUTE22_RIVAL1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
farcall Music_RivalAlternateStart
ld a, [wcf0d]
cp $1
- jr nz, .asm_50fff
- call Route22Script_51008
- jr .asm_51002
-.asm_50fff
- call Route22Script_5100d
-.asm_51002
- ld a, $3
+ jr nz, .exit_movement_2
+ call .RivalExit1Script
+ jr .next_script
+.exit_movement_2
+ call .RivalExit2Script
+.next_script
+ ld a, SCRIPT_ROUTE22_RIVAL1_EXIT
ld [wRoute22CurScript], a
ret
-Route22Script_51008:
- ld de, Route22RivalExitMovementData1
+.RivalExit1Script:
+ ld de, Route22Rival1ExitMovementData1
jr Route22MoveRival1
-Route22Script_5100d:
- ld de, Route22RivalExitMovementData2
+.RivalExit2Script:
+ ld de, Route22Rival1ExitMovementData2
Route22MoveRival1:
- ld a, $1
+ ld a, ROUTE22_RIVAL1
ldh [hSpriteIndex], a
jp MoveSprite
-Route22RivalExitMovementData1:
+Route22Rival1ExitMovementData1:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
@@ -206,7 +207,7 @@ Route22RivalExitMovementData1:
db NPC_MOVEMENT_DOWN
db -1 ; end
-Route22RivalExitMovementData2:
+Route22Rival1ExitMovementData2:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
@@ -219,7 +220,7 @@ Route22RivalExitMovementData2:
db NPC_MOVEMENT_DOWN
db -1 ; end
-Route22Script3:
+Route22Rival1ExitScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -230,134 +231,134 @@ Route22Script3:
predef HideObject
call PlayDefaultMusic
ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
- ld a, $0
+ ld a, SCRIPT_ROUTE22_DEFAULT
ld [wRoute22CurScript], a
ret
-Route22Script_5104e:
- ld a, $2
+Route22SecondRivalBattleScript:
+ ld a, ROUTE22_RIVAL2
ld [wEmotionBubbleSpriteIndex], a
xor a ; EXCLAMATION_BUBBLE
ld [wWhichEmotionBubble], a
predef EmotionBubble
ld a, [wWalkBikeSurfState]
and a
- jr z, .skipYVisibilityTesta
+ jr z, .walking
call StopAllMusic
-.skipYVisibilityTesta
+.walking
call StopAllMusic
farcall Music_RivalAlternateTempo
- ld a, $2
+ ld a, ROUTE22_RIVAL2
ldh [hSpriteIndex], a
- call Route22MoveRivalSprite
- ld a, $4
+ call Route22MoveRivalRightScript
+ ld a, SCRIPT_ROUTE22_RIVAL2_START_BATTLE
ld [wRoute22CurScript], a
ret
-Route22Script4:
+Route22Rival2StartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
- ld a, $2
+ ld a, ROUTE22_RIVAL2
ldh [hSpriteIndex], a
ld a, [wcf0d]
cp $1
- jr nz, .asm_510a1
+ jr nz, .set_player_direction_left
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_UP
- jr .asm_510a8
-.asm_510a1
+ jr .set_rival_facing_direction
+.set_player_direction_left
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_RIGHT
-.asm_510a8
+.set_rival_facing_direction
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
xor a
ld [wJoyIgnore], a
- ld a, $2
+ ld a, TEXT_ROUTE22_RIVAL2
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, Route22RivalDefeatedText2
- ld de, Route22Text_511d0
+ ld hl, Route22Rival2DefeatedText
+ ld de, Route22Rival2VictoryText
call SaveEndBattleTextPointers
call Route22Script_50ee1
- ld a, $5
+ ld a, SCRIPT_ROUTE22_RIVAL2_AFTER_BATTLE
ld [wRoute22CurScript], a
ret
-Route22RivalDefeatedText2:
- text_far _Route22RivalDefeatedText2
+Route22Rival2DefeatedText:
+ text_far _Route22Rival2DefeatedText
text_end
-Route22Text_511d0:
- text_far _Route22Text_511d0
+Route22Rival2VictoryText:
+ text_far _Route22Rival2VictoryText
text_end
-Route22Script5:
+Route22Rival2AfterBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, Route22Script_50ece
- ld a, $2
+ jp z, Route22SetDefaultScript
+ ld a, ROUTE22_RIVAL2
ldh [hSpriteIndex], a
ld a, [wcf0d]
cp $1
- jr nz, .asm_510fb
+ jr nz, .set_player_direction_left
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_UP
- jr .asm_51102
-.asm_510fb
+ jr .set_rival_facing_direction
+.set_player_direction_left
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_RIGHT
-.asm_51102
+.set_rival_facing_direction
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
- ld a, $2
+ ld a, TEXT_ROUTE22_RIVAL2
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
farcall Music_RivalAlternateStartAndTempo
ld a, [wcf0d]
cp $1
- jr nz, .asm_51134
- call Route22Script_5113d
- jr .asm_51137
-.asm_51134
- call Route22Script_51142
-.asm_51137
- ld a, $6
+ jr nz, .exit_movement_2
+ call .RivalExit1Script
+ jr .next_script
+.exit_movement_2
+ call .RivalExit2Script
+.next_script
+ ld a, SCRIPT_ROUTE22_RIVAL2_EXIT
ld [wRoute22CurScript], a
ret
-Route22Script_5113d:
- ld de, MovementData_5114c
+.RivalExit1Script:
+ ld de, Route22Rival2ExitMovementData1
jr Route22MoveRival2
-Route22Script_51142:
- ld de, MovementData_5114d
+.RivalExit2Script:
+ ld de, Route22Rival2ExitMovementData2
Route22MoveRival2:
- ld a, $2
+ ld a, ROUTE22_RIVAL2
ldh [hSpriteIndex], a
jp MoveSprite
-MovementData_5114c:
+Route22Rival2ExitMovementData1:
db NPC_MOVEMENT_LEFT
-MovementData_5114d:
+Route22Rival2ExitMovementData2:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_LEFT
db -1 ; end
-Route22Script6:
+Route22Rival2ExitScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -368,26 +369,27 @@ Route22Script6:
predef HideObject
call PlayDefaultMusic
ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
- ld a, $7
+ ld a, SCRIPT_ROUTE22_NOOP
ld [wRoute22CurScript], a
ret
Route22_TextPointers:
- dw Route22Text1
- dw Route22Text2
- dw Route22FrontGateText
+ def_text_pointers
+ dw_const Route22Rival1Text, TEXT_ROUTE22_RIVAL1
+ dw_const Route22Rival2Text, TEXT_ROUTE22_RIVAL2
+ dw_const Route22PokemonLeagueSignText, TEXT_ROUTE22_POKEMON_LEAGUE_SIGN
-Route22Text1:
+Route22Rival1Text:
text_asm
- farcall Func_f1b27
+ farcall Route22PrintRival1Text
jp TextScriptEnd
-Route22Text2:
+Route22Rival2Text:
text_asm
- farcall Func_f1b47
+ farcall Route22PrintRival2Text
jp TextScriptEnd
-Route22FrontGateText:
+Route22PokemonLeagueSignText:
text_asm
- farcall Func_f1b67
+ farcall Route22PrintPokemonLeagueSignText
jp TextScriptEnd
diff --git a/scripts/Route22Gate.asm b/scripts/Route22Gate.asm
index 9711549f..4ed252d4 100644
--- a/scripts/Route22Gate.asm
+++ b/scripts/Route22Gate.asm
@@ -6,18 +6,19 @@ Route22Gate_Script:
ld a, [wYCoord]
cp 4
ld a, ROUTE_23
- jr c, .asm_1e69a
+ jr c, .set_last_map
ld a, ROUTE_22
-.asm_1e69a
+.set_last_map
ld [wLastMap], a
ret
Route22Gate_ScriptPointers:
- dw Route22GateScript0
- dw Route22GateScript1
- dw Route22GateScript2
+ def_script_pointers
+ dw_const Route22GateDefaultScript, SCRIPT_ROUTE22GATE_DEFAULT
+ dw_const Route22GatePlayerMovingScript, SCRIPT_ROUTE22GATE_PLAYER_MOVING
+ dw_const Route22GateNoopScript, SCRIPT_ROUTE22GATE_NOOP
-Route22GateScript0:
+Route22GateDefaultScript:
ld hl, Route22GateScriptCoords
call ArePlayerCoordsInArray
ret nc
@@ -25,7 +26,7 @@ Route22GateScript0:
ldh [hJoyHeld], a
ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a
- ld a, $1
+ ld a, TEXT_ROUTE22GATE_GUARD
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ret
@@ -35,7 +36,7 @@ Route22GateScriptCoords:
dbmapcoord 5, 2
db -1 ; end
-Route22GateScript_1e6ba:
+Route22GateMovePlayerDownScript:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
ld a, D_DOWN
@@ -44,53 +45,54 @@ Route22GateScript_1e6ba:
ld [wJoyIgnore], a
jp StartSimulatingJoypadStates
-Route22GateScript1:
+Route22GatePlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
xor a
ld [wJoyIgnore], a
call Delay3
- ld a, $0
+ ld a, SCRIPT_ROUTE22GATE_DEFAULT
ld [wRoute22GateCurScript], a
-Route22GateScript2:
+Route22GateNoopScript:
ret
Route22Gate_TextPointers:
- dw Route22GateText1
+ def_text_pointers
+ dw_const Route22GateGuardText, TEXT_ROUTE22GATE_GUARD
-Route22GateText1:
+Route22GateGuardText:
text_asm
ld a, [wObtainedBadges]
bit BIT_BOULDERBADGE, a
- jr nz, .asm_1e6f6
- ld hl, Route22GateText_1e704
+ jr nz, .has_boulderbadge
+ ld hl, Route22GateGuardNoBoulderbadgeText
call PrintText
- call Route22GateScript_1e6ba
- ld a, $1
- jr .asm_1e6fe
-.asm_1e6f6
- ld hl, Route22GateText_1e71a
+ call Route22GateMovePlayerDownScript
+ ld a, SCRIPT_ROUTE22GATE_PLAYER_MOVING
+ jr .set_current_script
+.has_boulderbadge
+ ld hl, Route22GateGuardGoRightAheadText
call PrintText
- ld a, $2
-.asm_1e6fe
+ ld a, SCRIPT_ROUTE22GATE_NOOP
+.set_current_script
ld [wRoute22GateCurScript], a
jp TextScriptEnd
-Route22GateText_1e704:
- text_far _Route22GateText_1e704
+Route22GateGuardNoBoulderbadgeText:
+ text_far _Route22GateGuardNoBoulderbadgeText
text_asm
ld a, SFX_DENIED
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
- ld hl, Route22GateText_1e715
+ ld hl, Route22GateGuardICantLetYouPassText
ret
-Route22GateText_1e715:
- text_far _Route22GateText_1e715
+Route22GateGuardICantLetYouPassText:
+ text_far _Route22GateGuardICantLetYouPassText
text_end
-Route22GateText_1e71a:
- text_far _Route22GateText_1e71a
+Route22GateGuardGoRightAheadText:
+ text_far _Route22GateGuardGoRightAheadText
sound_get_item_1
text_end
diff --git a/scripts/Route22_2.asm b/scripts/Route22_2.asm
index 7f3fa54d..9d40bafc 100644
--- a/scripts/Route22_2.asm
+++ b/scripts/Route22_2.asm
@@ -1,14 +1,13 @@
-Func_f1b27::
+Route22PrintRival1Text::
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
- jr z, .asm_5118b
+ jr z, .before_battle
ld hl, Route22RivalAfterBattleText1
call PrintText
- jr .asm_51191
-
-.asm_5118b
+ jr .text_script_end
+.before_battle
ld hl, Route22RivalBeforeBattleText1
call PrintText
-.asm_51191
+.text_script_end
ret
Route22RivalBeforeBattleText1:
@@ -19,17 +18,16 @@ Route22RivalAfterBattleText1:
text_far _Route22RivalAfterBattleText1
text_end
-Func_f1b47::
+Route22PrintRival2Text::
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE
- jr z, .asm_511a4
+ jr z, .before_battle
ld hl, Route22RivalAfterBattleText2
call PrintText
- jr .asm_511aa
-
-.asm_511a4
+ jr .text_script_end
+.before_battle
ld hl, Route22RivalBeforeBattleText2
call PrintText
-.asm_511aa
+.text_script_end
ret
Route22RivalBeforeBattleText2:
@@ -40,11 +38,11 @@ Route22RivalAfterBattleText2:
text_far _Route22RivalAfterBattleText2
text_end
-Func_f1b67::
- ld hl, Route22FrontGateText_3c
+Route22PrintPokemonLeagueSignText::
+ ld hl, .text
call PrintText
ret
-Route22FrontGateText_3c:
- text_far _Route22FrontGateText
+.text
+ text_far _Route22PokemonLeagueSignText
text_end
diff --git a/scripts/Route23.asm b/scripts/Route23.asm
index e5318862..044d5e50 100644
--- a/scripts/Route23.asm
+++ b/scripts/Route23.asm
@@ -1,11 +1,11 @@
Route23_Script:
- call Route23Script_511e9
+ call Route23SetVictoryRoadBoulders
call EnableAutoTextBoxDrawing
ld hl, Route23_ScriptPointers
ld a, [wRoute23CurScript]
jp CallFunctionInTable
-Route23Script_511e9:
+Route23SetVictoryRoadBoulders:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
@@ -20,30 +20,31 @@ Route23Script_511e9:
predef_jump HideObject
Route23_ScriptPointers:
- dw Route23Script0
- dw Route23Script1
- dw Route23Script2
+ def_script_pointers
+ dw_const Route23DefaultScript, SCRIPT_ROUTE23_DEFAULT
+ dw_const Route23PlayerMovingScript, SCRIPT_ROUTE23_PLAYER_MOVING
+ dw_const Route23ResetToDefaultScript, SCRIPT_ROUTE23_RESET_TO_DEFAULT
-Route23Script0:
- ld hl, YCoordsData_51255
+Route23DefaultScript:
+ ld hl, Route23GuardsYCoords
ld a, [wYCoord]
ld b, a
ld e, $0
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
-.asm_51224
+.loop
ld a, [hli]
cp -1
ret z
inc e
dec c
cp b
- jr nz, .asm_51224
+ jr nz, .loop
cp 35
- jr nz, .asm_51237
+ jr nz, .not_past_victory_road
ld a, [wXCoord]
cp 14
ret nc
-.asm_51237
+.not_past_victory_road
ld a, e
ldh [hSpriteIndexOrTextID], a
ld a, c
@@ -54,13 +55,13 @@ Route23Script0:
ld a, c
and a
ret nz
- call Route23Script_5125d
+ call Route23CopyBadgeTextScript
call DisplayTextID
xor a
ldh [hJoyHeld], a
ret
-YCoordsData_51255:
+Route23GuardsYCoords:
db 35
db 56
db 85
@@ -70,7 +71,7 @@ YCoordsData_51255:
db 136
db -1 ; end
-Route23Script_5125d:
+Route23CopyBadgeTextScript:
ld hl, BadgeTextPointers
ld a, [wWhichBadge]
ld c, a
@@ -119,7 +120,7 @@ ThunderBadgeText:
CascadeBadgeText:
db "CASCADEBADGE@"
-Route23Script_512d8:
+Route23MovePlayerDownScript:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
ld a, D_DOWN
@@ -129,70 +130,71 @@ Route23Script_512d8:
ld [wJoyIgnore], a
jp StartSimulatingJoypadStates
-Route23Script1:
+Route23PlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
-Route23Script2:
- ld a, $0
+Route23ResetToDefaultScript:
+ ld a, SCRIPT_ROUTE23_DEFAULT
ld [wRoute23CurScript], a
ret
Route23_TextPointers:
- dw Route23Text1
- dw Route23Text2
- dw Route23Text3
- dw Route23Text4
- dw Route23Text5
- dw Route23Text6
- dw Route23Text7
- dw Route23Text8
+ def_text_pointers
+ dw_const Route23Guard1Text, TEXT_ROUTE23_GUARD1
+ dw_const Route23Guard2Text, TEXT_ROUTE23_GUARD2
+ dw_const Route23Swimmer1Text, TEXT_ROUTE23_SWIMMER1
+ dw_const Route23Swimmer2Text, TEXT_ROUTE23_SWIMMER2
+ dw_const Route23Guard3Text, TEXT_ROUTE23_GUARD3
+ dw_const Route23Guard4Text, TEXT_ROUTE23_GUARD4
+ dw_const Route23Guard5Text, TEXT_ROUTE23_GUARD5
+ dw_const Route23VictoryRoadGateSignText, TEXT_ROUTE23_VICTORY_ROAD_GATE_SIGN
-Route23Text1:
+Route23Guard1Text:
text_asm
EventFlagBit a, EVENT_PASSED_EARTHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text2:
+Route23Guard2Text:
text_asm
EventFlagBit a, EVENT_PASSED_VOLCANOBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text3:
+Route23Swimmer1Text:
text_asm
EventFlagBit a, EVENT_PASSED_MARSHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text4:
+Route23Swimmer2Text:
text_asm
EventFlagBit a, EVENT_PASSED_SOULBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text5:
+Route23Guard3Text:
text_asm
EventFlagBit a, EVENT_PASSED_RAINBOWBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text6:
+Route23Guard4Text:
text_asm
EventFlagBit a, EVENT_PASSED_THUNDERBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Text7:
+Route23Guard5Text:
text_asm
EventFlagBit a, EVENT_PASSED_CASCADEBADGE_CHECK
- call Route23Script_51346
+ call Route23CheckForBadgeScript
jp TextScriptEnd
-Route23Script_51346:
+Route23CheckForBadgeScript:
ld [wWhichBadge], a
- call Route23Script_5125d
+ call Route23CopyBadgeTextScript
ld a, [wWhichBadge]
inc a
ld c, a
@@ -201,43 +203,43 @@ Route23Script_51346:
predef FlagActionPredef
ld a, c
and a
- jr nz, .asm_5136e
- ld hl, VictoryRoadGuardText1
+ jr nz, .have_badge
+ ld hl, Route23YouDontHaveTheBadgeYetText
call PrintText
- call Route23Script_512d8
- ld a, $1
+ call Route23MovePlayerDownScript
+ ld a, SCRIPT_ROUTE23_PLAYER_MOVING
ld [wRoute23CurScript], a
ret
-.asm_5136e
- ld hl, VictoryRoadGuardText2
+.have_badge
+ ld hl, Route23OhThatIsTheBadgeText
call PrintText
ld a, [wWhichBadge]
ld c, a
ld b, FLAG_SET
EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK
predef FlagActionPredef
- ld a, $2
+ ld a, SCRIPT_ROUTE23_RESET_TO_DEFAULT
ld [wRoute23CurScript], a
ret
-Route23Script_51388:
- ld hl, VictoryRoadGuardText2
+Route23PrintOhThatsTheBadgeTextScript: ; unreferenced
+ ld hl, Route23OhThatIsTheBadgeText
jp PrintText
-VictoryRoadGuardText1:
- text_far _VictoryRoadGuardText1
+Route23YouDontHaveTheBadgeYetText:
+ text_far _Route23YouDontHaveTheBadgeYetText
text_asm
ld a, SFX_DENIED
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
jp TextScriptEnd
-VictoryRoadGuardText2:
- text_far _VictoryRoadGuardText2
+Route23OhThatIsTheBadgeText:
+ text_far _Route23OhThatIsTheBadgeText
sound_get_item_1
- text_far _VictoryRoadGuardText_513a3
+ text_far _Route23GoRightAheadText
text_end
-Route23Text8:
- text_far _Route23Text8
+Route23VictoryRoadGateSignText:
+ text_far _Route23VictoryRoadGateSignText
text_end
diff --git a/scripts/Route24.asm b/scripts/Route24.asm
index 79023d00..a5454773 100644
--- a/scripts/Route24.asm
+++ b/scripts/Route24.asm
@@ -7,29 +7,30 @@ Route24_Script:
ld [wRoute24CurScript], a
ret
-Route24Script_513c0:
- xor a
+Route24SetDefaultScript:
+ xor a ; SCRIPT_ROUTE24_DEFAULT
ld [wJoyIgnore], a
ld [wRoute24CurScript], a
ld [wCurMapScript], a
ret
Route24_ScriptPointers:
- dw Route24Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw Route24Script3
- dw Route24Script4
+ def_script_pointers
+ dw_const Route24DefaultScript, SCRIPT_ROUTE24_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE24_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE24_END_BATTLE
+ dw_const Route24AfterRocketBattleScript, SCRIPT_ROUTE24_AFTER_ROCKET_BATTLE
+ dw_const Route24PlayerMovingScript, SCRIPT_ROUTE24_PLAYER_MOVING
-Route24Script0:
+Route24DefaultScript:
CheckEvent EVENT_GOT_NUGGET
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_5140e
+ ld hl, .PlayerCoordsArray
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ldh [hJoyHeld], a
- ld a, $1
+ ld a, TEXT_ROUTE24_COOLTRAINER_M1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE
@@ -39,90 +40,91 @@ Route24Script0:
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $4
+ ld a, SCRIPT_ROUTE24_PLAYER_MOVING
ld [wRoute24CurScript], a
ld [wCurMapScript], a
ret
-CoordsData_5140e:
+.PlayerCoordsArray:
dbmapcoord 10, 15
db -1 ; end
-Route24Script4:
+Route24PlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $0
+ ld a, SCRIPT_ROUTE24_DEFAULT
ld [wRoute24CurScript], a
ld [wCurMapScript], a
ret
-Route24Script3:
+Route24AfterRocketBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, Route24Script_513c0
+ jp z, Route24SetDefaultScript
call UpdateSprites
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROUTE24_ROCKET
- ld a, $1
+ ld a, TEXT_ROUTE24_COOLTRAINER_M1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_ROUTE24_DEFAULT
ld [wRoute24CurScript], a
ld [wCurMapScript], a
ret
Route24_TextPointers:
- dw Route24Text1
- dw Route24Text2
- dw Route24Text3
- dw Route24Text4
- dw Route24Text5
- dw Route24Text6
- dw Route24Text7
- dw PickUpItemText
- dw Route24Text8
+ def_text_pointers
+ dw_const Route24CooltrainerM1Text, TEXT_ROUTE24_COOLTRAINER_M1
+ dw_const Route24CooltrainerM2Text, TEXT_ROUTE24_COOLTRAINER_M2
+ dw_const Route24CooltrainerM3Text, TEXT_ROUTE24_COOLTRAINER_M3
+ dw_const Route24CooltrainerF1Text, TEXT_ROUTE24_COOLTRAINER_F1
+ dw_const Route24Youngster1Text, TEXT_ROUTE24_YOUNGSTER1
+ dw_const Route24CooltrainerF2Text, TEXT_ROUTE24_COOLTRAINER_F2
+ dw_const Route24Youngster2Text, TEXT_ROUTE24_YOUNGSTER2
+ dw_const PickUpItemText, TEXT_ROUTE24_TM_THUNDER_WAVE
+ dw_const Route24CooltrainerM4Text, TEXT_ROUTE24_COOLTRAINER_M4
Route24TrainerHeaders:
def_trainers 2
Route24TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_0, 4, Route24BattleText1, Route24EndBattleText1, Route24AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_0, 4, Route24CooltrainerM2BattleText, Route24CooltrainerM2EndBattleText, Route24CooltrainerM2AfterBattleText
Route24TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_1, 1, Route24BattleText2, Route24EndBattleText2, Route24AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_1, 1, Route24CooltrainerM3BattleText, Route24CooltrainerM3EndBattleText, Route24CooltrainerM3AfterBattleText
Route24TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_2, 1, Route24BattleText3, Route24EndBattleText3, Route24AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_2, 1, Route24CooltrainerF1BattleText, Route24CooltrainerF1EndBattleText, Route24CooltrainerF1AfterBattleText
Route24TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_3, 1, Route24BattleText4, Route24EndBattleText4, Route24AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_3, 1, Route24Youngster1BattleText, Route24Youngster1EndBattleText, Route24Youngster1AfterBattleText
Route24TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_4, 1, Route24BattleText5, Route24EndBattleText5, Route24AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_4, 1, Route24CooltrainerF2BattleText, Route24CooltrainerF2EndBattleText, Route24CooltrainerF2AfterBattleText
Route24TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_24_TRAINER_5, 1, Route24BattleText6, Route24EndBattleText6, Route24AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_24_TRAINER_5, 1, Route24Youngster2BattleText, Route24Youngster2EndBattleText, Route24Youngster2AfterBattleText
db -1 ; end
-Route24Text1:
+Route24CooltrainerM1Text:
text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET
jr nz, .got_item
- ld hl, Route24Text_51510
+ ld hl, .YouBeatOurContestText
call PrintText
lb bc, NUGGET, 1
call GiveItem
jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET
- ld hl, Route24Text_5151a
+ ld hl, .ReceivedNuggetText
call PrintText
- ld hl, Route24Text_51526
+ ld hl, .JoinTeamRocketText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, Route24Text_5152b
- ld de, Route24Text_5152b
+ ld hl, .DefeatedText
+ ld de, .DefeatedText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndexOrTextID]
ld [wSpriteIndex], a
@@ -130,157 +132,157 @@ Route24Text1:
call InitBattleEnemyParameters
xor a
ldh [hJoyHeld], a
- ld a, $3
+ ld a, SCRIPT_ROUTE24_AFTER_ROCKET_BATTLE
ld [wRoute24CurScript], a
ld [wCurMapScript], a
jp TextScriptEnd
.got_item
- ld hl, Route24Text_51530
+ ld hl, .YouCouldBecomeATopLeaderText
call PrintText
jp TextScriptEnd
.bag_full
- ld hl, Route24Text_51521
+ ld hl, .NoRoomText
call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE
jp TextScriptEnd
-Route24Text_51510:
- text_far _Route24Text_51510
+.YouBeatOurContestText:
+ text_far _Route24CooltrainerM1YouBeatOurContestText
sound_get_item_1
- text_far _Route24Text_51515
+ text_far _Route24CooltrainerM1YouJustEarnedAPrizeText
text_end
-Route24Text_5151a:
- text_far _Route24Text_5151a
+.ReceivedNuggetText:
+ text_far _Route24CooltrainerM1ReceivedNuggetText
sound_get_key_item
text_promptbutton
text_end
-Route24Text_51521:
- text_far _Route24Text_51521
+.NoRoomText:
+ text_far _Route24CooltrainerM1NoRoomText
text_end
-Route24Text_51526:
- text_far _Route24Text_51526
+.JoinTeamRocketText:
+ text_far _Route24CooltrainerM1JoinTeamRocketText
text_end
-Route24Text_5152b:
- text_far _Route24Text_5152b
+.DefeatedText:
+ text_far _Route24CooltrainerM1DefeatedText
text_end
-Route24Text_51530:
- text_far _Route24Text_51530
+.YouCouldBecomeATopLeaderText:
+ text_far _Route24CooltrainerM1YouCouldBecomeATopLeaderText
text_end
-Route24Text2:
+Route24CooltrainerM2Text:
text_asm
ld hl, Route24TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route24Text3:
+Route24CooltrainerM3Text:
text_asm
ld hl, Route24TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route24Text4:
+Route24CooltrainerF1Text:
text_asm
ld hl, Route24TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route24Text5:
+Route24Youngster1Text:
text_asm
ld hl, Route24TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route24Text6:
+Route24CooltrainerF2Text:
text_asm
ld hl, Route24TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route24Text7:
+Route24Youngster2Text:
text_asm
ld hl, Route24TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route24BattleText1:
- text_far _Route24BattleText1
+Route24CooltrainerM2BattleText:
+ text_far _Route24CooltrainerM2BattleText
text_end
-Route24EndBattleText1:
- text_far _Route24EndBattleText1
+Route24CooltrainerM2EndBattleText:
+ text_far _Route24CooltrainerM2EndBattleText
text_end
-Route24AfterBattleText1:
- text_far _Route24AfterBattleText1
+Route24CooltrainerM2AfterBattleText:
+ text_far _Route24CooltrainerM2AfterBattleText
text_end
-Route24BattleText2:
- text_far _Route24BattleText2
+Route24CooltrainerM3BattleText:
+ text_far _Route24CooltrainerM3BattleText
text_end
-Route24EndBattleText2:
- text_far _Route24EndBattleText2
+Route24CooltrainerM3EndBattleText:
+ text_far _Route24CooltrainerM3EndBattleText
text_end
-Route24AfterBattleText2:
- text_far _Route24AfterBattleText2
+Route24CooltrainerM3AfterBattleText:
+ text_far _Route24CooltrainerM3AfterBattleText
text_end
-Route24BattleText3:
- text_far _Route24BattleText3
+Route24CooltrainerF1BattleText:
+ text_far _Route24CooltrainerF1BattleText
text_end
-Route24EndBattleText3:
- text_far _Route24EndBattleText3
+Route24CooltrainerF1EndBattleText:
+ text_far _Route24CooltrainerF1EndBattleText
text_end
-Route24AfterBattleText3:
- text_far _Route24AfterBattleText3
+Route24CooltrainerF1AfterBattleText:
+ text_far _Route24CooltrainerF1AfterBattleText
text_end
-Route24BattleText4:
- text_far _Route24BattleText4
+Route24Youngster1BattleText:
+ text_far _Route24Youngster1BattleText
text_end
-Route24EndBattleText4:
- text_far _Route24EndBattleText4
+Route24Youngster1EndBattleText:
+ text_far _Route24Youngster1EndBattleText
text_end
-Route24AfterBattleText4:
- text_far _Route24AfterBattleText4
+Route24Youngster1AfterBattleText:
+ text_far _Route24Youngster1AfterBattleText
text_end
-Route24BattleText5:
- text_far _Route24BattleText5
+Route24CooltrainerF2BattleText:
+ text_far _Route24CooltrainerF2BattleText
text_end
-Route24EndBattleText5:
- text_far _Route24EndBattleText5
+Route24CooltrainerF2EndBattleText:
+ text_far _Route24CooltrainerF2EndBattleText
text_end
-Route24AfterBattleText5:
- text_far _Route24AfterBattleText5
+Route24CooltrainerF2AfterBattleText:
+ text_far _Route24CooltrainerF2AfterBattleText
text_end
-Route24BattleText6:
- text_far _Route24BattleText6
+Route24Youngster2BattleText:
+ text_far _Route24Youngster2BattleText
text_end
-Route24EndBattleText6:
- text_far _Route24EndBattleText6
+Route24Youngster2EndBattleText:
+ text_far _Route24Youngster2EndBattleText
text_end
-Route24AfterBattleText6:
- text_far _Route24AfterBattleText6
+Route24Youngster2AfterBattleText:
+ text_far _Route24Youngster2AfterBattleText
text_end
-Route24Text8:
+Route24CooltrainerM4Text:
text_asm
CheckEvent EVENT_54F
jr nz, .asm_515d5
diff --git a/scripts/Route25.asm b/scripts/Route25.asm
index cc90a7d8..501592f9 100644
--- a/scripts/Route25.asm
+++ b/scripts/Route25.asm
@@ -5,10 +5,10 @@ Route25_Script:
ld a, [wRoute25CurScript]
call ExecuteCurMapScriptInTable
ld [wRoute25CurScript], a
- call Route25Script_515e1
+ call Route25ShowHideBillScript
ret
-Route25Script_515e1:
+Route25ShowHideBillScript:
ld hl, wd492
res 2, [hl]
res 3, [hl]
@@ -23,15 +23,15 @@ Route25Script_515e1:
CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
ret nz
CheckEventReuseHL EVENT_MET_BILL_2
- jr nz, .asm_51638
+ jr nz, .met_bill
ResetEventReuseHL EVENT_BILL_SAID_USE_CELL_SEPARATOR
ld a, HS_BILL_POKEMON
ld [wMissableObjectIndex], a
predef ShowObject
- jr .asm_5165c
-.asm_51638
+ jr .done
+.met_bill
CheckEventAfterBranchReuseHL EVENT_GOT_SS_TICKET, EVENT_MET_BILL_2
- jr z, .asm_5165c
+ jr z, .done
SetEventReuseHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
ld a, HS_NUGGET_BRIDGE_GUY
ld [wMissableObjectIndex], a
@@ -42,211 +42,213 @@ Route25Script_515e1:
ld a, HS_BILL_2
ld [wMissableObjectIndex], a
predef ShowObject
-.asm_5165c
+.done
ret
Route25_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE25_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE25_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE25_END_BATTLE
Route25_TextPointers:
- dw Route25Text1
- dw Route25Text2
- dw Route25Text3
- dw Route25Text4
- dw Route25Text5
- dw Route25Text6
- dw Route25Text7
- dw Route25Text8
- dw Route25Text9
- dw PickUpItemText
- dw Route25Text11
+ def_text_pointers
+ dw_const Route25Youngster1Text, TEXT_ROUTE25_YOUNGSTER1
+ dw_const Route25Youngster2Text, TEXT_ROUTE25_YOUNGSTER2
+ dw_const Route25CooltrainerMText, TEXT_ROUTE25_COOLTRAINER_M
+ dw_const Route25CooltrainerF1Text, TEXT_ROUTE25_COOLTRAINER_F1
+ dw_const Route25Youngster3Text, TEXT_ROUTE25_YOUNGSTER3
+ dw_const Route25CooltrainerF2Text, TEXT_ROUTE25_COOLTRAINER_F2
+ dw_const Route25Hiker1Text, TEXT_ROUTE25_HIKER1
+ dw_const Route25Hiker2Text, TEXT_ROUTE25_HIKER2
+ dw_const Route25Hiker3Text, TEXT_ROUTE25_HIKER3
+ dw_const PickUpItemText, TEXT_ROUTE25_TM_SEISMIC_TOSS
+ dw_const Route25BillSignText, TEXT_ROUTE25_BILL_SIGN
Route25TrainerHeaders:
def_trainers
Route25TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_0, 2, Route25BattleText1, Route25EndBattleText1, Route25AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_0, 2, Route25Youngster1BattleText, Route25Youngster1EndBattleText, Route25Youngster1AfterBattleText
Route25TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_1, 3, Route25BattleText2, Route25EndBattleText2, Route25AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_1, 3, Route25Youngster2BattleText, Route25Youngster2EndBattleText, Route25Youngster2AfterBattleText
Route25TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_2, 3, Route25BattleText3, Route25EndBattleText3, Route25AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_2, 3, Route25CooltrainerMBattleText, Route25CooltrainerMEndBattleText, Route25CooltrainerMAfterBattleText
Route25TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_3, 2, Route25BattleText4, Route25EndBattleText4, Route25AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_3, 2, Route25CooltrainerF1BattleText, Route25CooltrainerF1EndBattleText, Route25CooltrainerF1AfterBattleText
Route25TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_4, 4, Route25BattleText5, Route25EndBattleText5, Route25AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_4, 4, Route25Youngster3BattleText, Route25Youngster3EndBattleText, Route25Youngster3AfterBattleText
Route25TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_5, 4, Route25BattleText6, Route25EndBattleText6, Route25AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_5, 4, Route25CooltrainerF2BattleText, Route25CooltrainerF2EndBattleText, Route25CooltrainerF2AfterBattleText
Route25TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_6, 3, Route25BattleText7, Route25EndBattleText7, Route25AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_6, 3, Route25Hiker1BattleText, Route25Hiker1EndBattleText, Route25Hiker1AfterBattleText
Route25TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_7, 2, Route25BattleText8, Route25EndBattleText8, Route25AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_7, 2, Route25Hiker2BattleText, Route25Hiker2EndBattleText, Route25Hiker2AfterBattleText
Route25TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_25_TRAINER_8, 2, Route25BattleText9, Route25EndBattleText9, Route25AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_25_TRAINER_8, 2, Route25Hiker3BattleText, Route25Hiker3EndBattleText, Route25Hiker3AfterBattleText
db -1 ; end
-Route25Text1:
+Route25Youngster1Text:
text_asm
ld hl, Route25TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route25Text2:
+Route25Youngster2Text:
text_asm
ld hl, Route25TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route25Text3:
+Route25CooltrainerMText:
text_asm
ld hl, Route25TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route25Text4:
+Route25CooltrainerF1Text:
text_asm
ld hl, Route25TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route25Text5:
+Route25Youngster3Text:
text_asm
ld hl, Route25TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route25Text6:
+Route25CooltrainerF2Text:
text_asm
ld hl, Route25TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route25Text7:
+Route25Hiker1Text:
text_asm
ld hl, Route25TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route25Text8:
+Route25Hiker2Text:
text_asm
ld hl, Route25TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route25Text9:
+Route25Hiker3Text:
text_asm
ld hl, Route25TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route25BattleText1:
- text_far _Route25BattleText1
+Route25Youngster1BattleText:
+ text_far _Route25Youngster1BattleText
text_end
-Route25EndBattleText1:
- text_far _Route25EndBattleText1
+Route25Youngster1EndBattleText:
+ text_far _Route25Youngster1EndBattleText
text_end
-Route25AfterBattleText1:
- text_far _Route25AfterBattleText1
+Route25Youngster1AfterBattleText:
+ text_far _Route25Youngster1AfterBattleText
text_end
-Route25BattleText2:
- text_far _Route25BattleText2
+Route25Youngster2BattleText:
+ text_far _Route25Youngster2BattleText
text_end
-Route25EndBattleText2:
- text_far _Route25EndBattleText2
+Route25Youngster2EndBattleText:
+ text_far _Route25Youngster2EndBattleText
text_end
-Route25AfterBattleText2:
- text_far _Route25AfterBattleText2
+Route25Youngster2AfterBattleText:
+ text_far _Route25Youngster2AfterBattleText
text_end
-Route25BattleText3:
- text_far _Route25BattleText3
+Route25CooltrainerMBattleText:
+ text_far _Route25CooltrainerMBattleText
text_end
-Route25EndBattleText3:
- text_far _Route25EndBattleText3
+Route25CooltrainerMEndBattleText:
+ text_far _Route25CooltrainerMEndBattleText
text_end
-Route25AfterBattleText3:
- text_far _Route25AfterBattleText3
+Route25CooltrainerMAfterBattleText:
+ text_far _Route25CooltrainerMAfterBattleText
text_end
-Route25BattleText4:
- text_far _Route25BattleText4
+Route25CooltrainerF1BattleText:
+ text_far _Route25CooltrainerF1BattleText
text_end
-Route25EndBattleText4:
- text_far _Route25EndBattleText4
+Route25CooltrainerF1EndBattleText:
+ text_far _Route25CooltrainerF1EndBattleText
text_end
-Route25AfterBattleText4:
- text_far _Route25AfterBattleText4
+Route25CooltrainerF1AfterBattleText:
+ text_far _Route25CooltrainerF1AfterBattleText
text_end
-Route25BattleText5:
- text_far _Route25BattleText5
+Route25Youngster3BattleText:
+ text_far _Route25Youngster3BattleText
text_end
-Route25EndBattleText5:
- text_far _Route25EndBattleText5
+Route25Youngster3EndBattleText:
+ text_far _Route25Youngster3EndBattleText
text_end
-Route25AfterBattleText5:
- text_far _Route25AfterBattleText5
+Route25Youngster3AfterBattleText:
+ text_far _Route25Youngster3AfterBattleText
text_end
-Route25BattleText6:
- text_far _Route25BattleText6
+Route25CooltrainerF2BattleText:
+ text_far _Route25CooltrainerF2BattleText
text_end
-Route25EndBattleText6:
- text_far _Route25EndBattleText6
+Route25CooltrainerF2EndBattleText:
+ text_far _Route25CooltrainerF2EndBattleText
text_end
-Route25AfterBattleText6:
- text_far _Route25AfterBattleText6
+Route25CooltrainerF2AfterBattleText:
+ text_far _Route25CooltrainerF2AfterBattleText
text_end
-Route25BattleText7:
- text_far _Route25BattleText7
+Route25Hiker1BattleText:
+ text_far _Route25Hiker1BattleText
text_end
-Route25EndBattleText7:
- text_far _Route25EndBattleText7
+Route25Hiker1EndBattleText:
+ text_far _Route25Hiker1EndBattleText
text_end
-Route25AfterBattleText7:
- text_far _Route25AfterBattleText7
+Route25Hiker1AfterBattleText:
+ text_far _Route25Hiker1AfterBattleText
text_end
-Route25BattleText8:
- text_far _Route25BattleText8
+Route25Hiker2BattleText:
+ text_far _Route25Hiker2BattleText
text_end
-Route25EndBattleText8:
- text_far _Route25EndBattleText8
+Route25Hiker2EndBattleText:
+ text_far _Route25Hiker2EndBattleText
text_end
-Route25AfterBattleText8:
- text_far _Route25AfterBattleText8
+Route25Hiker2AfterBattleText:
+ text_far _Route25Hiker2AfterBattleText
text_end
-Route25BattleText9:
- text_far _Route25BattleText9
+Route25Hiker3BattleText:
+ text_far _Route25Hiker3BattleText
text_end
-Route25EndBattleText9:
- text_far _Route25EndBattleText9
+Route25Hiker3EndBattleText:
+ text_far _Route25Hiker3EndBattleText
text_end
-Route25AfterBattleText9:
- text_far _Route25AfterBattleText9
+Route25Hiker3AfterBattleText:
+ text_far _Route25Hiker3AfterBattleText
text_end
-Route25Text11:
- text_far _Route25Text11
+Route25BillSignText:
+ text_far _Route25BillSignText
text_end
diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm
index 60f6ffe1..a198dbd7 100644
--- a/scripts/Route2Gate.asm
+++ b/scripts/Route2Gate.asm
@@ -2,10 +2,11 @@ Route2Gate_Script:
jp EnableAutoTextBoxDrawing
Route2Gate_TextPointers:
- dw Route2GateText1
- dw Route2GateText2
+ def_text_pointers
+ dw_const Route2GateOaksAideText, TEXT_ROUTE2GATE_OAKS_AIDE
+ dw_const Route2GateYoungsterText, TEXT_ROUTE2GATE_YOUNGSTER
-Route2GateText1:
+Route2GateOaksAideText:
text_asm
CheckEvent EVENT_GOT_HM05
jr nz, .got_item
@@ -25,15 +26,15 @@ Route2GateText1:
jr nz, .no_item
SetEvent EVENT_GOT_HM05
.got_item
- ld hl, Route2GateText_5d616
+ ld hl, .FlashExplanationText
call PrintText
.no_item
jp TextScriptEnd
-Route2GateText_5d616:
- text_far _Route2GateText_5d616
+.FlashExplanationText:
+ text_far _Route2GateOaksAideFlashExplanationText
text_end
-Route2GateText2:
- text_far _Route2GateText2
+Route2GateYoungsterText:
+ text_far _Route2GateYoungsterText
text_end
diff --git a/scripts/Route2TradeHouse.asm b/scripts/Route2TradeHouse.asm
index 8f2661f1..0e5fcff3 100644
--- a/scripts/Route2TradeHouse.asm
+++ b/scripts/Route2TradeHouse.asm
@@ -2,14 +2,15 @@ Route2TradeHouse_Script:
jp EnableAutoTextBoxDrawing
Route2TradeHouse_TextPointers:
- dw Route2HouseText1
- dw Route2HouseText2
+ def_text_pointers
+ dw_const Route2TradeHouseScientistText, TEXT_ROUTE2TRADEHOUSE_SCIENTIST
+ dw_const Route2TradeHouseGameboyKidText, TEXT_ROUTE2TRADEHOUSE_GAMEBOY_KID
-Route2HouseText1:
- text_far _Route2HouseText1
+Route2TradeHouseScientistText:
+ text_far _Route2TradeHouseScientistText
text_end
-Route2HouseText2:
+Route2TradeHouseGameboyKidText:
text_asm
ld a, TRADE_FOR_MILES
ld [wWhichTrade], a
diff --git a/scripts/Route3.asm b/scripts/Route3.asm
index ecc16a0c..19a8a0eb 100644
--- a/scripts/Route3.asm
+++ b/scripts/Route3.asm
@@ -8,190 +8,192 @@ Route3_Script:
ret
Route3_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE3_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE3_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE3_END_BATTLE
Route3_TextPointers:
- dw Route3Text1
- dw Route3Text2
- dw Route3Text3
- dw Route3Text4
- dw Route3Text5
- dw Route3Text6
- dw Route3Text7
- dw Route3Text8
- dw Route3Text9
- dw Route3Text10
+ def_text_pointers
+ dw_const Route3SuperNerdText, TEXT_ROUTE3_SUPER_NERD
+ dw_const Route3Youngster1Text, TEXT_ROUTE3_YOUNGSTER1
+ dw_const Route3Youngster2Text, TEXT_ROUTE3_YOUNGSTER2
+ dw_const Route3CooltrainerF1Text, TEXT_ROUTE3_COOLTRAINER_F1
+ dw_const Route3Youngster3Text, TEXT_ROUTE3_YOUNGSTER3
+ dw_const Route3CooltrainerF2Text, TEXT_ROUTE3_COOLTRAINER_F2
+ dw_const Route3Youngster4Text, TEXT_ROUTE3_YOUNGSTER4
+ dw_const Route3Youngster5Text, TEXT_ROUTE3_YOUNGSTER5
+ dw_const Route3CooltrainerF3Text, TEXT_ROUTE3_COOLTRAINER_F3
+ dw_const Route3SignText, TEXT_ROUTE3_SIGN
Route3TrainerHeaders:
def_trainers 2
Route3TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_0, 2, Route3BattleText1, Route3EndBattleText1, Route3AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_0, 2, Route3Youngster1BattleText, Route3Youngster1EndBattleText, Route3Youngster1AfterBattleText
Route3TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_1, 3, Route3BattleText2, Route3EndBattleText2, Route3AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_1, 3, Route3Youngster2BattleText, Route3Youngster2EndBattleText, Route3Youngster2AfterBattleText
Route3TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_2, 2, Route3BattleText3, Route3EndBattleText3, Route3AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_2, 2, Route3CooltrainerF1BattleText, Route3CooltrainerF1EndBattleText, Route3CooltrainerF1AfterBattleText
Route3TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_3, 1, Route3BattleText4, Route3EndBattleText4, Route3AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_3, 1, Route3Youngster3BattleText, Route3Youngster3EndBattleText, Route3Youngster3AfterBattleText
Route3TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_4, 4, Route3BattleText5, Route3EndBattleText5, Route3AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_4, 4, Route3CooltrainerF2BattleText, Route3CooltrainerF2EndBattleText, Route3CooltrainerF2AfterBattleText
Route3TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_5, 3, Route3BattleText6, Route3EndBattleText6, Route3AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_5, 3, Route3Youngster4BattleText, Route3Youngster4EndBattleText, Route3Youngster4AfterBattleText
Route3TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_6, 3, Route3BattleText7, Route3EndBattleText7, Route3AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_6, 3, Route3Youngster5BattleText, Route3Youngster5EndBattleText, Route3Youngster5AfterBattleText
Route3TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_3_TRAINER_7, 2, Route3BattleText8, Route3EndBattleText8, Route3AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_3_TRAINER_7, 2, Route3CooltrainerF3BattleText, Route3CooltrainerF3EndBattleText, Route3CooltrainerF3AfterBattleText
db -1 ; end
-Route3Text1:
+Route3SuperNerdText:
text_far _Route3Text1
text_end
-Route3Text2:
+Route3Youngster1Text:
text_asm
ld hl, Route3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText1:
- text_far _Route3BattleText1
+Route3Youngster1BattleText:
+ text_far _Route3Youngster1BattleText
text_end
-Route3EndBattleText1:
- text_far _Route3EndBattleText1
+Route3Youngster1EndBattleText:
+ text_far _Route3Youngster1EndBattleText
text_end
-Route3AfterBattleText1:
- text_far _Route3AfterBattleText1
+Route3Youngster1AfterBattleText:
+ text_far _Route3Youngster1AfterBattleText
text_end
-Route3Text3:
+Route3Youngster2Text:
text_asm
ld hl, Route3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText2:
- text_far _Route3BattleText2
+Route3Youngster2BattleText:
+ text_far _Route3Youngster2BattleText
text_end
-Route3EndBattleText2:
- text_far _Route3EndBattleText2
+Route3Youngster2EndBattleText:
+ text_far _Route3Youngster2EndBattleText
text_end
-Route3AfterBattleText2:
- text_far _Route3AfterBattleText2
+Route3Youngster2AfterBattleText:
+ text_far _Route3Youngster2AfterBattleText
text_end
-Route3Text4:
+Route3CooltrainerF1Text:
text_asm
ld hl, Route3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText3:
- text_far _Route3BattleText3
+Route3CooltrainerF1BattleText:
+ text_far _Route3CooltrainerF1BattleText
text_end
-Route3EndBattleText3:
- text_far _Route3EndBattleText3
+Route3CooltrainerF1EndBattleText:
+ text_far _Route3CooltrainerF1EndBattleText
text_end
-Route3AfterBattleText3:
- text_far _Route3AfterBattleText3
+Route3CooltrainerF1AfterBattleText:
+ text_far _Route3CooltrainerF1AfterBattleText
text_end
-Route3Text5:
+Route3Youngster3Text:
text_asm
ld hl, Route3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText4:
- text_far _Route3BattleText4
+Route3Youngster3BattleText:
+ text_far _Route3Youngster3BattleText
text_end
-Route3EndBattleText4:
- text_far _Route3EndBattleText4
+Route3Youngster3EndBattleText:
+ text_far _Route3Youngster3EndBattleText
text_end
-Route3AfterBattleText4:
- text_far _Route3AfterBattleText4
+Route3Youngster3AfterBattleText:
+ text_far _Route3Youngster3AfterBattleText
text_end
-Route3Text6:
+Route3CooltrainerF2Text:
text_asm
ld hl, Route3TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText5:
- text_far _Route3BattleText5
+Route3CooltrainerF2BattleText:
+ text_far _Route3CooltrainerF2BattleText
text_end
-Route3EndBattleText5:
- text_far _Route3EndBattleText5
+Route3CooltrainerF2EndBattleText:
+ text_far _Route3CooltrainerF2EndBattleText
text_end
-Route3AfterBattleText5:
- text_far _Route3AfterBattleText5
+Route3CooltrainerF2AfterBattleText:
+ text_far _Route3CooltrainerF2AfterBattleText
text_end
-Route3Text7:
+Route3Youngster4Text:
text_asm
ld hl, Route3TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText6:
- text_far _Route3BattleText6
+Route3Youngster4BattleText:
+ text_far _Route3Youngster4BattleText
text_end
-Route3EndBattleText6:
- text_far _Route3EndBattleText6
+Route3Youngster4EndBattleText:
+ text_far _Route3Youngster4EndBattleText
text_end
-Route3AfterBattleText6:
- text_far _Route3AfterBattleText6
+Route3Youngster4AfterBattleText:
+ text_far _Route3Youngster4AfterBattleText
text_end
-Route3Text8:
+Route3Youngster5Text:
text_asm
ld hl, Route3TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText7:
- text_far _Route3BattleText7
+Route3Youngster5BattleText:
+ text_far _Route3Youngster5BattleText
text_end
-Route3EndBattleText7:
- text_far _Route3EndBattleText7
+Route3Youngster5EndBattleText:
+ text_far _Route3Youngster5EndBattleText
text_end
-Route3AfterBattleText7:
- text_far _Route3AfterBattleText7
+Route3Youngster5AfterBattleText:
+ text_far _Route3Youngster5AfterBattleText
text_end
-Route3Text9:
+Route3CooltrainerF3Text:
text_asm
ld hl, Route3TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route3BattleText8:
- text_far _Route3BattleText8
+Route3CooltrainerF3BattleText:
+ text_far _Route3CooltrainerF3BattleText
text_end
-Route3EndBattleText8:
- text_far _Route3EndBattleText8
+Route3CooltrainerF3EndBattleText:
+ text_far _Route3CooltrainerF3EndBattleText
text_end
-Route3AfterBattleText8:
- text_far _Route3AfterBattleText8
+Route3CooltrainerF3AfterBattleText:
+ text_far _Route3CooltrainerF3AfterBattleText
text_end
-Route3Text10:
- text_far _Route3Text10
+Route3SignText:
+ text_far _Route3SignText
text_end
diff --git a/scripts/Route4.asm b/scripts/Route4.asm
index d62f797d..39127f88 100644
--- a/scripts/Route4.asm
+++ b/scripts/Route4.asm
@@ -8,50 +8,52 @@ Route4_Script:
ret
Route4_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE4_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE4_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE4_END_BATTLE
Route4_TextPointers:
- dw Route4Text1
- dw Route4Text2
- dw PickUpItemText
- dw PokeCenterSignText
- dw Route4Text5
- dw Route4Text6
+ def_text_pointers
+ dw_const Route4CooltrainerF1Text, TEXT_ROUTE4_COOLTRAINER_F1
+ dw_const Route4CooltrainerF2Text, TEXT_ROUTE4_COOLTRAINER_F2
+ dw_const PickUpItemText, TEXT_ROUTE4_TM_WHIRLWIND
+ dw_const PokeCenterSignText, TEXT_ROUTE4_POKECENTER_SIGN
+ dw_const Route4MtMoonSignText, TEXT_ROUTE4_MT_MOON_SIGN
+ dw_const Route4SignText, TEXT_ROUTE4_SIGN
Route4TrainerHeaders:
def_trainers 2
Route4TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_4_TRAINER_0, 3, Route4BattleText1, Route4EndBattleText1, Route4AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_4_TRAINER_0, 3, Route4CooltrainerF2BattleText, Route4CooltrainerF2EndBattleText, Route4CooltrainerF2AfterBattleText
db -1 ; end
-Route4Text1:
- text_far _Route4Text1
+Route4CooltrainerF1Text:
+ text_far _Route4CooltrainerF1Text
text_end
-Route4Text2:
+Route4CooltrainerF2Text:
text_asm
ld hl, Route4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route4BattleText1:
- text_far _Route4BattleText1
+Route4CooltrainerF2BattleText:
+ text_far _Route4CooltrainerF2BattleText
text_end
-Route4EndBattleText1:
- text_far _Route4EndBattleText1
+Route4CooltrainerF2EndBattleText:
+ text_far _Route4CooltrainerF2EndBattleText
text_end
-Route4AfterBattleText1:
- text_far _Route4AfterBattleText1
+Route4CooltrainerF2AfterBattleText:
+ text_far _Route4CooltrainerF2AfterBattleText
text_end
-Route4Text5:
- text_far _Route4Text5
+Route4MtMoonSignText:
+ text_far _Route4MtMoonSignText
text_end
-Route4Text6:
- text_far _Route4Text6
+Route4SignText:
+ text_far _Route4SignText
text_end
diff --git a/scripts/Route5.asm b/scripts/Route5.asm
index 33f3c345..18d2d0ac 100644
--- a/scripts/Route5.asm
+++ b/scripts/Route5.asm
@@ -2,8 +2,9 @@ Route5_Script:
jp EnableAutoTextBoxDrawing
Route5_TextPointers:
- dw Route5Text1
+ def_text_pointers
+ dw_const Route5UndergroundPathSignText, TEXT_ROUTE5_UNDERGROUND_PATH_SIGN
-Route5Text1:
- text_far _Route5Text1
+Route5UndergroundPathSignText:
+ text_far _Route5UndergroundPathSignText
text_end
diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm
index 72efbd9e..d6e086ce 100644
--- a/scripts/Route5Gate.asm
+++ b/scripts/Route5Gate.asm
@@ -5,21 +5,22 @@ Route5Gate_Script:
jp CallFunctionInTable
Route5Gate_ScriptPointers:
- dw Route5GateScript0
- dw Route5GateScript1
+ def_script_pointers
+ dw_const Route5GateDefaultScript, SCRIPT_ROUTE5GATE_DEFAULT
+ dw_const Route5GatePlayerMovingScript, SCRIPT_ROUTE5GATE_PLAYER_MOVING
-Route5GateScript_1df43:
+Route5GateMovePlayerUpScript:
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
jp StartSimulatingJoypadStates
-Route5GateScript0:
+Route5GateDefaultScript:
ld a, [wd728]
bit 6, a
ret nz
- ld hl, CoordsData_1df8f
+ ld hl, .PlayerInCoordsArray
call ArePlayerCoordsInArray
ret nc
ld a, PLAYER_DIR_LEFT
@@ -29,28 +30,28 @@ Route5GateScript0:
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
- jr nz, .asm_1df82
- ld a, $2
+ jr nz, .have_drink
+ ld a, TEXT_ROUTE5GATE_GUARD_GEE_IM_THIRSTY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- call Route5GateScript_1df43
- ld a, $1
+ call Route5GateMovePlayerUpScript
+ ld a, SCRIPT_ROUTE5GATE_PLAYER_MOVING
ld [wRoute5GateCurScript], a
ret
-.asm_1df82
- ld a, $3
+.have_drink
+ ld a, TEXT_ROUTE5GATE_GUARD_GIVE_DRINK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd728
set 6, [hl]
ret
-CoordsData_1df8f:
+.PlayerInCoordsArray:
dbmapcoord 3, 3
dbmapcoord 4, 3
db -1 ; end
-Route5GateScript1:
+Route5GatePlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -61,55 +62,49 @@ Route5GateScript1:
ret
Route5Gate_TextPointers:
- dw Route5GateText1
- dw Route5GateText2
- dw Route5GateText3
+ def_text_pointers
+ dw_const SaffronGateGuardText, TEXT_ROUTE5GATE_GUARD
+ dw_const SaffronGateGuardGeeImThirstyText, TEXT_ROUTE5GATE_GUARD_GEE_IM_THIRSTY
+ dw_const SaffronGateGuardGiveDrinkText, TEXT_ROUTE5GATE_GUARD_GIVE_DRINK
-Route8GateText1:
-Route7GateText1:
-Route6GateText1:
-Route5GateText1:
+SaffronGateGuardText:
text_asm
ld a, [wd728]
bit 6, a
- jr nz, .asm_88856
+ jr nz, .thanks_for_drink
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
- jr nz, .asm_768a2
- ld hl, Route5GateText2
+ jr nz, .have_drink
+ ld hl, SaffronGateGuardGeeImThirstyText
call PrintText
- call Route5GateScript_1df43
- ld a, $1
+ call Route5GateMovePlayerUpScript
+ ld a, SCRIPT_ROUTE5GATE_PLAYER_MOVING
ld [wRoute5GateCurScript], a
jp TextScriptEnd
-.asm_768a2
- ld hl, Route5GateText3
+
+.have_drink
+ ld hl, SaffronGateGuardGiveDrinkText
call PrintText
ld hl, wd728
set 6, [hl]
jp TextScriptEnd
-.asm_88856
- ld hl, SaffronGateText_1dff6
+
+.thanks_for_drink
+ ld hl, SaffronGateGuardThanksForTheDrinkText
call PrintText
jp TextScriptEnd
-Route8GateText2:
-Route7GateText2:
-Route6GateText2:
-Route5GateText2:
- text_far _SaffronGateText_1dfe7
+SaffronGateGuardGeeImThirstyText:
+ text_far _SaffronGateGuardGeeImThirstyText
text_end
-Route8GateText3:
-Route7GateText3:
-Route6GateText3:
-Route5GateText3:
- text_far _SaffronGateText_8aaa9
+SaffronGateGuardGiveDrinkText:
+ text_far _SaffronGateGuardImParchedText
sound_get_key_item
- text_far _SaffronGateText_1dff1
+ text_far _SaffronGateGuardYouCanGoOnThroughText
text_end
-SaffronGateText_1dff6:
- text_far _SaffronGateText_1dff6
+SaffronGateGuardThanksForTheDrinkText:
+ text_far _SaffronGateGuardThanksForTheDrinkText
text_end
diff --git a/scripts/Route6.asm b/scripts/Route6.asm
index 5701cb9b..5fb24bac 100644
--- a/scripts/Route6.asm
+++ b/scripts/Route6.asm
@@ -8,143 +8,145 @@ Route6_Script:
ret
Route6_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE6_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE6_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE6_END_BATTLE
Route6_TextPointers:
- dw Route6Text1
- dw Route6Text2
- dw Route6Text3
- dw Route6Text4
- dw Route6Text5
- dw Route6Text6
- dw Route6Text7
+ def_text_pointers
+ dw_const Route6CooltrainerM1Text, TEXT_ROUTE6_COOLTRAINER_M1
+ dw_const Route6CooltrainerF1Text, TEXT_ROUTE6_COOLTRAINER_F1
+ dw_const Route6Youngster1Text, TEXT_ROUTE6_YOUNGSTER1
+ dw_const Route6CooltrainerM2Text, TEXT_ROUTE6_COOLTRAINER_M2
+ dw_const Route6CooltrainerF2Text, TEXT_ROUTE6_COOLTRAINER_F2
+ dw_const Route6Youngster2Text, TEXT_ROUTE6_YOUNGSTER2
+ dw_const Route6UndergroundPathSignText, TEXT_ROUTE6_UNDERGROUND_PATH_SIGN
Route6TrainerHeaders:
def_trainers
Route6TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_0, 0, Route6BattleText1, Route6EndBattleText1, Route6AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_0, 0, Route6CooltrainerM1BattleText, Route6CooltrainerM1EndBattleText, Route6CooltrainerM1AfterBattleText
Route6TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_1, 0, Route6BattleText2, Route6EndBattleText2, Route6AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_1, 0, Route6CooltrainerF1BattleText, Route6CooltrainerF1EndBattleText, Route6CooltrainerF1AfterBattleText
Route6TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_2, 4, Route6BattleText3, Route6EndBattleText3, Route6AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_2, 4, Route6Youngster1BattleText, Route6Youngster1EndBattleText, Route6Youngster1AfterBattleText
Route6TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_3, 3, Route6BattleText4, Route6EndBattleText4, Route6AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_3, 3, Route6CooltrainerM2BattleText, Route6CooltrainerM2EndBattleText, Route6CooltrainerM2AfterBattleText
Route6TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_4, 3, Route6BattleText5, Route6EndBattleText5, Route6AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_4, 3, Route6CooltrainerF2BattleText, Route6CooltrainerF2EndBattleText, Route6CooltrainerF2AfterBattleText
Route6TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_6_TRAINER_5, 3, Route6BattleText6, Route6EndBattleText6, Route6AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_6_TRAINER_5, 3, Route6Youngster2BattleText, Route6Youngster2EndBattleText, Route6Youngster2AfterBattleText
db -1 ; end
-Route6Text1:
+Route6CooltrainerM1Text:
text_asm
ld hl, Route6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText1:
- text_far _Route6BattleText1
+Route6CooltrainerM1BattleText:
+ text_far _Route6CooltrainerM1BattleText
text_end
-Route6EndBattleText1:
- text_far _Route6EndBattleText1
+Route6CooltrainerM1EndBattleText:
+ text_far _Route6CooltrainerM1EndBattleText
text_end
-Route6AfterBattleText1:
- text_far _Route6AfterBattleText1
+Route6CooltrainerM1AfterBattleText:
+ text_far _Route6CooltrainerM1AfterBattleText
text_end
-Route6Text2:
+Route6CooltrainerF1Text:
text_asm
ld hl, Route6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText2:
- text_far _Route6BattleText2
+Route6CooltrainerF1BattleText:
+ text_far _Route6CooltrainerF1BattleText
text_end
-Route6EndBattleText2:
- text_far _Route6EndBattleText2
+Route6CooltrainerF1EndBattleText:
+ text_far _Route6CooltrainerF1EndBattleText
text_end
-Route6AfterBattleText2:
- text_far _Route6AfterBattleText2
+Route6CooltrainerF1AfterBattleText:
+ text_far _Route6CooltrainerF1AfterBattleText
text_end
-Route6Text3:
+Route6Youngster1Text:
text_asm
ld hl, Route6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText3:
- text_far _Route6BattleText3
+Route6Youngster1BattleText:
+ text_far _Route6Youngster1BattleText
text_end
-Route6EndBattleText3:
- text_far _Route6EndBattleText3
+Route6Youngster1EndBattleText:
+ text_far _Route6Youngster1EndBattleText
text_end
-Route6AfterBattleText3:
- text_far _Route6AfterBattleText3
+Route6Youngster1AfterBattleText:
+ text_far _Route6Youngster1AfterBattleText
text_end
-Route6Text4:
+Route6CooltrainerM2Text:
text_asm
ld hl, Route6TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText4:
- text_far _Route6BattleText4
+Route6CooltrainerM2BattleText:
+ text_far _Route6CooltrainerM2BattleText
text_end
-Route6EndBattleText4:
- text_far _Route6EndBattleText4
+Route6CooltrainerM2EndBattleText:
+ text_far _Route6CooltrainerM2EndBattleText
text_end
-Route6AfterBattleText4:
- text_far _Route6AfterBattleText4
+Route6CooltrainerM2AfterBattleText:
+ text_far _Route6CooltrainerM2AfterBattleText
text_end
-Route6Text5:
+Route6CooltrainerF2Text:
text_asm
ld hl, Route6TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText5:
- text_far _Route6BattleText5
+Route6CooltrainerF2BattleText:
+ text_far _Route6CooltrainerF2BattleText
text_end
-Route6EndBattleText5:
- text_far _Route6EndBattleText5
+Route6CooltrainerF2EndBattleText:
+ text_far _Route6CooltrainerF2EndBattleText
text_end
-Route6AfterBattleText5:
- text_far _Route6AfterBattleText5
+Route6CooltrainerF2AfterBattleText:
+ text_far _Route6CooltrainerF2AfterBattleText
text_end
-Route6Text6:
+Route6Youngster2Text:
text_asm
ld hl, Route6TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route6BattleText6:
- text_far _Route6BattleText6
+Route6Youngster2BattleText:
+ text_far _Route6Youngster2BattleText
text_end
-Route6EndBattleText6:
- text_far _Route6EndBattleText6
+Route6Youngster2EndBattleText:
+ text_far _Route6Youngster2EndBattleText
text_end
-Route6AfterBattleText6:
- text_far _Route6AfterBattleText6
+Route6Youngster2AfterBattleText:
+ text_far _Route6Youngster2AfterBattleText
text_end
-Route6Text7:
- text_far _Route6Text7
+Route6UndergroundPathSignText:
+ text_far _Route6UndergroundPathSignText
text_end
diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm
index 143f60ae..db4cfcab 100644
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -6,14 +6,15 @@ Route6Gate_Script:
ret
Route6Gate_ScriptPointers:
- dw Route6GateScript0
- dw Route6GateScript1
+ def_script_pointers
+ dw_const Route6GateDefaultScript, SCRIPT_ROUTE6GATE_DEFAULT
+ dw_const Route6GatePlayerMovingScript, SCRIPT_ROUTE6GATE_PLAYER_MOVING
-Route6GateScript0:
+Route6GateDefaultScript:
ld a, [wd728]
bit 6, a
ret nz
- ld hl, CoordsData_1e08c
+ ld hl, .PlayerInCoordsArray
call ArePlayerCoordsInArray
ret nc
ld a, PLAYER_DIR_RIGHT
@@ -23,27 +24,27 @@ Route6GateScript0:
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
- jr nz, .asm_1e080
- ld a, $2
+ jr nz, .have_drink
+ ld a, TEXT_ROUTE6GATE_GUARD_GEE_IM_THIRSTY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- call Route6GateScript_1e0a1
- ld a, $1
+ call Route6GateMovePlayerDownScript
+ ld a, SCRIPT_ROUTE6GATE_PLAYER_MOVING
ld [wRoute6GateCurScript], a
ret
-.asm_1e080
+.have_drink
ld hl, wd728
set 6, [hl]
- ld a, $3
+ ld a, TEXT_ROUTE6GATE_GUARD_GIVE_DRINK
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
-CoordsData_1e08c:
+.PlayerInCoordsArray:
dbmapcoord 3, 2
dbmapcoord 4, 2
db -1 ; end
-Route6GateScript1:
+Route6GatePlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -53,10 +54,10 @@ Route6GateScript1:
ld [wRoute6GateCurScript], a
ret
-Route6GateScript_1e0a1:
+Route6GateMovePlayerDownScript:
ld hl, wd730
set 7, [hl]
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -66,6 +67,7 @@ Route6GateScript_1e0a1:
ret
Route6Gate_TextPointers:
- dw Route6GateText1
- dw Route6GateText2
- dw Route6GateText3
+ def_text_pointers
+ dw_const SaffronGateGuardText, TEXT_ROUTE6GATE_GUARD
+ dw_const SaffronGateGuardGeeImThirstyText, TEXT_ROUTE6GATE_GUARD_GEE_IM_THIRSTY
+ dw_const SaffronGateGuardGiveDrinkText, TEXT_ROUTE6GATE_GUARD_GIVE_DRINK
diff --git a/scripts/Route7.asm b/scripts/Route7.asm
index 648cbb58..7270a83c 100644
--- a/scripts/Route7.asm
+++ b/scripts/Route7.asm
@@ -3,8 +3,9 @@ Route7_Script:
ret
Route7_TextPointers:
- dw Route7Text1
+ def_text_pointers
+ dw_const Route7UndergroundPathSignText, TEXT_ROUTE7_UNDERGROUND_PATH_SIGN
-Route7Text1:
- text_far _Route7Text1
+Route7UndergroundPathSignText:
+ text_far _Route7UndergroundPathSignText
text_end
diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm
index 9a647965..0260fb48 100644
--- a/scripts/Route7Gate.asm
+++ b/scripts/Route7Gate.asm
@@ -6,13 +6,14 @@ Route7Gate_Script:
ret
Route7Gate_ScriptPointers:
- dw Route7GateScript0
- dw Route7GateScript1
+ def_script_pointers
+ dw_const Route7DefaultScript, SCRIPT_ROUTE7GATE_DEFAULT
+ dw_const Route7PlayerMovingScript, SCRIPT_ROUTE7GATE_PLAYER_MOVING
-Route7GateScript_1e111:
+Route7GateMovePlayerLeftScript:
ld hl, wd730
set 7, [hl]
- ld a, $20
+ ld a, D_LEFT
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -21,11 +22,11 @@ Route7GateScript_1e111:
ld [wOverrideSimulatedJoypadStatesMask], a
ret
-Route7GateScript0:
+Route7DefaultScript:
ld a, [wd728]
bit 6, a
ret nz
- ld hl, CoordsData_1e167
+ ld hl, .PlayerInCoordsArray
call ArePlayerCoordsInArray
ret nc
ld a, PLAYER_DIR_UP
@@ -35,28 +36,28 @@ Route7GateScript0:
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
- jr nz, .asm_1e15a
- ld a, $2
+ jr nz, .have_drink
+ ld a, TEXT_ROUTE7GATE_GUARD_GEE_IM_THIRSTY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- call Route7GateScript_1e111
- ld a, $1
+ call Route7GateMovePlayerLeftScript
+ ld a, SCRIPT_ROUTE7GATE_PLAYER_MOVING
ld [wRoute7GateCurScript], a
ret
-.asm_1e15a
- ld a, $3
+.have_drink
+ ld a, TEXT_ROUTE7GATE_GUARD_GIVE_DRINK
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wd728
set 6, [hl]
ret
-CoordsData_1e167:
+.PlayerInCoordsArray:
dbmapcoord 3, 3
dbmapcoord 3, 4
db -1 ; end
-Route7GateScript1:
+Route7PlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -68,6 +69,7 @@ Route7GateScript1:
ret
Route7Gate_TextPointers:
- dw Route7GateText1
- dw Route7GateText2
- dw Route7GateText3
+ def_text_pointers
+ dw_const SaffronGateGuardText, TEXT_ROUTE7GATE_GUARD
+ dw_const SaffronGateGuardGeeImThirstyText, TEXT_ROUTE7GATE_GUARD_GEE_IM_THIRSTY
+ dw_const SaffronGateGuardGiveDrinkText, TEXT_ROUTE7GATE_GUARD_GIVE_DRINK
diff --git a/scripts/Route8.asm b/scripts/Route8.asm
index 7ecdbe09..657d5c83 100644
--- a/scripts/Route8.asm
+++ b/scripts/Route8.asm
@@ -8,206 +8,208 @@ Route8_Script:
ret
Route8_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE8_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE8_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE8_END_BATTLE
Route8_TextPointers:
- dw Route8Text1
- dw Route8Text2
- dw Route8Text3
- dw Route8Text4
- dw Route8Text5
- dw Route8Text6
- dw Route8Text7
- dw Route8Text8
- dw Route8Text9
- dw Route8Text10
+ def_text_pointers
+ dw_const Route8SuperNerd1Text, TEXT_ROUTE8_SUPER_NERD1
+ dw_const Route8Gambler1Text, TEXT_ROUTE8_GAMBLER1
+ dw_const Route8SuperNerd2Text, TEXT_ROUTE8_SUPER_NERD2
+ dw_const Route8CooltrainerF1Text, TEXT_ROUTE8_COOLTRAINER_F1
+ dw_const Route8SuperNerd3Text, TEXT_ROUTE8_SUPER_NERD3
+ dw_const Route8CooltrainerF2Text, TEXT_ROUTE8_COOLTRAINER_F2
+ dw_const Route8CooltrainerF3Text, TEXT_ROUTE8_COOLTRAINER_F3
+ dw_const Route8Gambler2Text, TEXT_ROUTE8_GAMBLER2
+ dw_const Route8CooltrainerF4Text, TEXT_ROUTE8_COOLTRAINER_F4
+ dw_const Route8UndergroundSignText, TEXT_ROUTE8_UNDERGROUND_SIGN
Route8TrainerHeaders:
def_trainers
Route8TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_0, 4, Route8BattleText1, Route8EndBattleText1, Route8AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_0, 4, Route8SuperNerd1BattleText, Route8SuperNerd1EndBattleText, Route8SuperNerd1AfterBattleText
Route8TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_1, 4, Route8BattleText2, Route8EndBattleText2, Route8AfterBattleText2
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_1, 4, Route8Gambler1BattleText, Route8Gambler1EndBattleText, Route8Gambler1AfterBattleText
Route8TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_2, 4, Route8BattleText3, Route8EndBattleText3, Route8AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_2, 4, Route8SuperNerd2BattleText, Route8SuperNerd2EndBattleText, Route8SuperNerd2AfterBattleText
Route8TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_3, 2, Route8BattleText4, Route8EndBattleText4, Route8AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_3, 2, Route8CooltrainerF1BattleText, Route8CooltrainerF21EndBattleText, Route8CooltrainerF1AfterBattleText
Route8TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_4, 3, Route8BattleText5, Route8EndBattleText5, Route8AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_4, 3, Route8SuperNerd3BattleText, Route8SuperNerd3EndBattleText, Route8SuperNerd3AfterBattleText
Route8TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_5, 3, Route8BattleText6, Route8EndBattleText6, Route8AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_5, 3, Route8CooltrainerF2BattleText, Route8CooltrainerF2EndBattleText, Route8CooltrainerF2AfterBattleText
Route8TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_6, 2, Route8BattleText7, Route8EndBattleText7, Route8AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_6, 2, Route8CooltrainerF3BattleText, Route8CooltrainerF3EndBattleText, Route8CooltrainerF3AfterBattleText
Route8TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_7, 2, Route8BattleText8, Route8EndBattleText8, Route8AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_7, 2, Route8Gambler2BattleText, Route8Gambler2EndBattleText, Route8Gambler2AfterBattleText
Route8TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_8_TRAINER_8, 4, Route8BattleText9, Route8EndBattleText9, Route8AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_8_TRAINER_8, 4, Route8CooltrainerF4BattleText, Route8CooltrainerF4EndBattleText, Route8CooltrainerF4AfterBattleText
db -1 ; end
-Route8Text1:
+Route8SuperNerd1Text:
text_asm
ld hl, Route8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText1:
- text_far _Route8BattleText1
+Route8SuperNerd1BattleText:
+ text_far _Route8SuperNerd1BattleText
text_end
-Route8EndBattleText1:
- text_far _Route8EndBattleText1
+Route8SuperNerd1EndBattleText:
+ text_far _Route8SuperNerd1EndBattleText
text_end
-Route8AfterBattleText1:
- text_far _Route8AfterBattleText1
+Route8SuperNerd1AfterBattleText:
+ text_far _Route8SuperNerd1AfterBattleText
text_end
-Route8Text2:
+Route8Gambler1Text:
text_asm
ld hl, Route8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText2:
- text_far _Route8BattleText2
+Route8Gambler1BattleText:
+ text_far _Route8Gambler1BattleText
text_end
-Route8EndBattleText2:
- text_far _Route8EndBattleText2
+Route8Gambler1EndBattleText:
+ text_far _Route8Gambler1EndBattleText
text_end
-Route8AfterBattleText2:
- text_far _Route8AfterBattleText2
+Route8Gambler1AfterBattleText:
+ text_far _Route8Gambler1AfterBattleText
text_end
-Route8Text3:
+Route8SuperNerd2Text:
text_asm
ld hl, Route8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText3:
- text_far _Route8BattleText3
+Route8SuperNerd2BattleText:
+ text_far _Route8SuperNerd2BattleText
text_end
-Route8EndBattleText3:
- text_far _Route8EndBattleText3
+Route8SuperNerd2EndBattleText:
+ text_far _Route8SuperNerd2EndBattleText
text_end
-Route8AfterBattleText3:
- text_far _Route8AfterBattleText3
+Route8SuperNerd2AfterBattleText:
+ text_far _Route8SuperNerd2AfterBattleText
text_end
-Route8Text4:
+Route8CooltrainerF1Text:
text_asm
ld hl, Route8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText4:
- text_far _Route8BattleText4
+Route8CooltrainerF1BattleText:
+ text_far _Route8CooltrainerF1BattleText
text_end
-Route8EndBattleText4:
- text_far _Route8EndBattleText4
+Route8CooltrainerF21EndBattleText:
+ text_far _Route8CooltrainerF21EndBattleText
text_end
-Route8AfterBattleText4:
- text_far _Route8AfterBattleText4
+Route8CooltrainerF1AfterBattleText:
+ text_far _Route8CooltrainerF1AfterBattleText
text_end
-Route8Text5:
+Route8SuperNerd3Text:
text_asm
ld hl, Route8TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText5:
- text_far _Route8BattleText5
+Route8SuperNerd3BattleText:
+ text_far _Route8SuperNerd3BattleText
text_end
-Route8EndBattleText5:
- text_far _Route8EndBattleText5
+Route8SuperNerd3EndBattleText:
+ text_far _Route8SuperNerd3EndBattleText
text_end
-Route8AfterBattleText5:
- text_far _Route8AfterBattleText5
+Route8SuperNerd3AfterBattleText:
+ text_far _Route8SuperNerd3AfterBattleText
text_end
-Route8Text6:
+Route8CooltrainerF2Text:
text_asm
ld hl, Route8TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText6:
- text_far _Route8BattleText6
+Route8CooltrainerF2BattleText:
+ text_far _Route8CooltrainerF2BattleText
text_end
-Route8EndBattleText6:
- text_far _Route8EndBattleText6
+Route8CooltrainerF2EndBattleText:
+ text_far _Route8CooltrainerF2EndBattleText
text_end
-Route8AfterBattleText6:
- text_far _Route8AfterBattleText6
+Route8CooltrainerF2AfterBattleText:
+ text_far _Route8CooltrainerF2AfterBattleText
text_end
-Route8Text7:
+Route8CooltrainerF3Text:
text_asm
ld hl, Route8TrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText7:
- text_far _Route8BattleText7
+Route8CooltrainerF3BattleText:
+ text_far _Route8CooltrainerF3BattleText
text_end
-Route8EndBattleText7:
- text_far _Route8EndBattleText7
+Route8CooltrainerF3EndBattleText:
+ text_far _Route8CooltrainerF3EndBattleText
text_end
-Route8AfterBattleText7:
- text_far _Route8AfterBattleText7
+Route8CooltrainerF3AfterBattleText:
+ text_far _Route8CooltrainerF3AfterBattleText
text_end
-Route8Text8:
+Route8Gambler2Text:
text_asm
ld hl, Route8TrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText8:
- text_far _Route8BattleText8
+Route8Gambler2BattleText:
+ text_far _Route8Gambler2BattleText
text_end
-Route8EndBattleText8:
- text_far _Route8EndBattleText8
+Route8Gambler2EndBattleText:
+ text_far _Route8Gambler2EndBattleText
text_end
-Route8AfterBattleText8:
- text_far _Route8AfterBattleText8
+Route8Gambler2AfterBattleText:
+ text_far _Route8Gambler2AfterBattleText
text_end
-Route8Text9:
+Route8CooltrainerF4Text:
text_asm
ld hl, Route8TrainerHeader8
call TalkToTrainer
jp TextScriptEnd
-Route8BattleText9:
- text_far _Route8BattleText9
+Route8CooltrainerF4BattleText:
+ text_far _Route8CooltrainerF4BattleText
text_end
-Route8EndBattleText9:
- text_far _Route8EndBattleText9
+Route8CooltrainerF4EndBattleText:
+ text_far _Route8CooltrainerF4EndBattleText
text_end
-Route8AfterBattleText9:
- text_far _Route8AfterBattleText9
+Route8CooltrainerF4AfterBattleText:
+ text_far _Route8CooltrainerF4AfterBattleText
text_end
-Route8Text10:
- text_far _Route8Text10
+Route8UndergroundSignText:
+ text_far _Route8UndergroundSignText
text_end
diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm
index 55443931..07e3f5c7 100644
--- a/scripts/Route8Gate.asm
+++ b/scripts/Route8Gate.asm
@@ -5,13 +5,14 @@ Route8Gate_Script:
jp CallFunctionInTable
Route8Gate_ScriptPointers:
- dw Route8GateScript0
- dw Route8GateScript1
+ def_script_pointers
+ dw_const Route8GateDefaultScript, SCRIPT_ROUTE8GATE_DEFAULT
+ dw_const Route8GatePlayerMovingScript, SCRIPT_ROUTE8GATE_PLAYER_MOVING
-Route8GateScript_1e1d7:
+Route8GateMovePlayerRightScript:
ld hl, wd730
set 7, [hl]
- ld a, $10
+ ld a, D_RIGHT
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -20,11 +21,11 @@ Route8GateScript_1e1d7:
ld [wOverrideSimulatedJoypadStatesMask], a
ret
-Route8GateScript0:
+Route8GateDefaultScript:
ld a, [wd728]
bit 6, a
ret nz
- ld hl, CoordsData_1e22c
+ ld hl, .PlayerInCoordsArray
call ArePlayerCoordsInArray
ret nc
ld a, PLAYER_DIR_UP
@@ -34,27 +35,27 @@ Route8GateScript0:
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
- jr nz, .asm_1e220
- ld a, $2
+ jr nz, .have_drink
+ ld a, TEXT_ROUTE8GATE_GUARD_GEE_IM_THIRSTY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- call Route8GateScript_1e1d7
- ld a, $1
+ call Route8GateMovePlayerRightScript
+ ld a, SCRIPT_ROUTE8GATE_PLAYER_MOVING
ld [wRoute8GateCurScript], a
ret
-.asm_1e220
+.have_drink
ld hl, wd728
set 6, [hl]
- ld a, $3
+ ld a, TEXT_ROUTE8GATE_GUARD_GIVE_DRINK
ldh [hSpriteIndexOrTextID], a
jp DisplayTextID
-CoordsData_1e22c:
+.PlayerInCoordsArray:
dbmapcoord 2, 3
dbmapcoord 2, 4
db -1 ; end
-Route8GateScript1:
+Route8GatePlayerMovingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
@@ -65,6 +66,7 @@ Route8GateScript1:
ret
Route8Gate_TextPointers:
- dw Route8GateText1
- dw Route8GateText2
- dw Route8GateText3
+ def_text_pointers
+ dw_const SaffronGateGuardText, TEXT_ROUTE8GATE_GUARD
+ dw_const SaffronGateGuardGeeImThirstyText, TEXT_ROUTE8GATE_GUARD_GEE_IM_THIRSTY
+ dw_const SaffronGateGuardGiveDrinkText, TEXT_ROUTE8GATE_GUARD_GIVE_DRINK
diff --git a/scripts/Route9.asm b/scripts/Route9.asm
index f4dee72e..281a44f3 100644
--- a/scripts/Route9.asm
+++ b/scripts/Route9.asm
@@ -8,200 +8,202 @@ Route9_Script:
ret
Route9_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_ROUTE9_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_ROUTE9_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_ROUTE9_END_BATTLE
Route9_TextPointers:
- dw Route9Text1
- dw Route9TextAJ
- dw Route9Text3
- dw Route9Text4
- dw Route9Text5
- dw Route9Text6
- dw Route9Text7
- dw Route9Text8
- dw Route9Text9
- dw PickUpItemText
- dw Route9Text11
+ def_text_pointers
+ dw_const Route9CooltrainerF1Text, TEXT_ROUTE9_COOLTRAINER_F1
+ dw_const Route9AJText, TEXT_ROUTE9_COOLTRAINER_M1
+ dw_const Route9CooltrainerM2Text, TEXT_ROUTE9_COOLTRAINER_M2
+ dw_const Route9CooltrainerF2Text, TEXT_ROUTE9_COOLTRAINER_F2
+ dw_const Route9Hiker1Text, TEXT_ROUTE9_HIKER1
+ dw_const Route9Hiker2Text, TEXT_ROUTE9_HIKER2
+ dw_const Route9Youngster1Text, TEXT_ROUTE9_YOUNGSTER1
+ dw_const Route9Hiker3Text, TEXT_ROUTE9_HIKER3
+ dw_const Route9Youngster2Text, TEXT_ROUTE9_YOUNGSTER2
+ dw_const PickUpItemText, TEXT_ROUTE9_TM_TELEPORT
+ dw_const Route9SignText, TEXT_ROUTE9_SIGN
Route9TrainerHeaders:
def_trainers
Route9TrainerHeader0:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_0, 3, Route9BattleText1, Route9EndBattleText1, Route9AfterBattleText1
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_0, 3, Route9CooltrainerF1BattleText, Route9CooltrainerF1EndBattleText, Route9CooltrainerF1AfterBattleText
Route9TrainerHeader1:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_1, 2, Route9BattleTextAJ, Route9EndBattleTextAJ, Route9AfterBattleTextAJ
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_1, 2, Route9AJBattleText, Route9AJEndBattleText, Route9AJAfterBattleText
Route9TrainerHeader2:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_2, 4, Route9BattleText3, Route9EndBattleText3, Route9AfterBattleText3
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_2, 4, Route9CooltrainerM2BattleText, Route9CooltrainerM2EndBattleText, Route9CooltrainerM2AfterBattleText
Route9TrainerHeader3:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_3, 2, Route9BattleText4, Route9EndBattleText4, Route9AfterBattleText4
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_3, 2, Route9CooltrainerF2BattleText, Route9CooltrainerF2EndBattleText, Route9CooltrainerF2AfterBattleText
Route9TrainerHeader4:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_4, 2, Route9BattleText5, Route9EndBattleText5, Route9AfterBattleText5
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_4, 2, Route9Hiker1BattleText, Route9Hiker1EndBattleText, Route9Hiker1AfterBattleText
Route9TrainerHeader5:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_5, 3, Route9BattleText6, Route9EndBattleText6, Route9AfterBattleText6
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_5, 3, Route9Hiker2BattleText, Route9Hiker2EndBattleText, Route9Hiker2AfterBattleText
Route9TrainerHeader6:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_6, 4, Route9BattleText7, Route9EndBattleText7, Route9AfterBattleText7
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_6, 4, Route9Youngster1BattleText, Route9Youngster1EndBattleText, Route9Youngster1AfterBattleText
Route9TrainerHeader7:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_7, 2, Route9BattleText8, Route9EndBattleText8, Route9AfterBattleText8
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_7, 2, Route9Hiker3BattleText, Route9Hiker3EndBattleText, Route9Hiker3AfterBattleText
Route9TrainerHeader8:
- trainer EVENT_BEAT_ROUTE_9_TRAINER_8, 2, Route9BattleText9, Route9EndBattleText9, Route9AfterBattleText9
+ trainer EVENT_BEAT_ROUTE_9_TRAINER_8, 2, Route9Youngster2BattleText, Route9Youngster2EndBattleText, Route9Youngster2AfterBattleText
db -1 ; end
-Route9Text1:
+Route9CooltrainerF1Text:
text_asm
ld hl, Route9TrainerHeader0
jr Route9TalkToTrainer
-Route9TextAJ:
+Route9AJText:
text_asm
ld hl, Route9TrainerHeader1
jr Route9TalkToTrainer
-Route9Text3:
+Route9CooltrainerM2Text:
text_asm
ld hl, Route9TrainerHeader2
jr Route9TalkToTrainer
-Route9Text4:
+Route9CooltrainerF2Text:
text_asm
ld hl, Route9TrainerHeader3
jr Route9TalkToTrainer
-Route9Text5:
+Route9Hiker1Text:
text_asm
ld hl, Route9TrainerHeader4
jr Route9TalkToTrainer
-Route9Text6:
+Route9Hiker2Text:
text_asm
ld hl, Route9TrainerHeader5
jr Route9TalkToTrainer
-Route9Text7:
+Route9Youngster1Text:
text_asm
ld hl, Route9TrainerHeader6
jr Route9TalkToTrainer
-Route9Text8:
+Route9Hiker3Text:
text_asm
ld hl, Route9TrainerHeader7
jr Route9TalkToTrainer
-Route9Text9:
+Route9Youngster2Text:
text_asm
ld hl, Route9TrainerHeader8
Route9TalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-Route9BattleText1:
- text_far _Route9BattleText1
+Route9CooltrainerF1BattleText:
+ text_far _Route9CooltrainerF1BattleText
text_end
-Route9EndBattleText1:
- text_far _Route9EndBattleText1
+Route9CooltrainerF1EndBattleText:
+ text_far _Route9CooltrainerF1EndBattleText
text_end
-Route9AfterBattleText1:
- text_far _Route9AfterBattleText1
+Route9CooltrainerF1AfterBattleText:
+ text_far _Route9CooltrainerF1AfterBattleText
text_end
-Route9BattleTextAJ:
- text_far _Route9BattleTextAJ
+Route9AJBattleText:
+ text_far _Route9AJBattleText
text_end
-Route9EndBattleTextAJ:
- text_far _Route9EndBattleTextAJ
+Route9AJEndBattleText:
+ text_far _Route9AJEndBattleText
text_end
-Route9AfterBattleTextAJ:
- text_far _Route9AfterBattleTextAJ
+Route9AJAfterBattleText:
+ text_far _Route9AJAfterBattleText
text_end
-Route9BattleText3:
- text_far _Route9BattleText3
+Route9CooltrainerM2BattleText:
+ text_far _Route9CooltrainerM2BattleText
text_end
-Route9EndBattleText3:
- text_far _Route9EndBattleText3
+Route9CooltrainerM2EndBattleText:
+ text_far _Route9CooltrainerM2EndBattleText
text_end
-Route9AfterBattleText3:
- text_far _Route9AfterBattleText3
+Route9CooltrainerM2AfterBattleText:
+ text_far _Route9CooltrainerM2AfterBattleText
text_end
-Route9BattleText4:
- text_far _Route9BattleText4
+Route9CooltrainerF2BattleText:
+ text_far _Route9CooltrainerF2BattleText
text_end
-Route9EndBattleText4:
- text_far _Route9EndBattleText4
+Route9CooltrainerF2EndBattleText:
+ text_far _Route9CooltrainerF2EndBattleText
text_end
-Route9AfterBattleText4:
- text_far _Route9AfterBattleText4
+Route9CooltrainerF2AfterBattleText:
+ text_far _Route9CooltrainerF2AfterBattleText
text_end
-Route9BattleText5:
- text_far _Route9BattleText5
+Route9Hiker1BattleText:
+ text_far _Route9Hiker1BattleText
text_end
-Route9EndBattleText5:
- text_far _Route9EndBattleText5
+Route9Hiker1EndBattleText:
+ text_far _Route9Hiker1EndBattleText
text_end
-Route9AfterBattleText5:
- text_far _Route9AfterBattleText5
+Route9Hiker1AfterBattleText:
+ text_far _Route9Hiker1AfterBattleText
text_end
-Route9BattleText6:
- text_far _Route9BattleText6
+Route9Hiker2BattleText:
+ text_far _Route9Hiker2BattleText
text_end
-Route9EndBattleText6:
- text_far _Route9EndBattleText6
+Route9Hiker2EndBattleText:
+ text_far _Route9Hiker2EndBattleText
text_end
-Route9AfterBattleText6:
- text_far _Route9AfterBattleText6
+Route9Hiker2AfterBattleText:
+ text_far _Route9Hiker2AfterBattleText
text_end
-Route9BattleText7:
- text_far _Route9BattleText7
+Route9Youngster1BattleText:
+ text_far _Route9Youngster1BattleText
text_end
-Route9EndBattleText7:
- text_far _Route9EndBattleText7
+Route9Youngster1EndBattleText:
+ text_far _Route9Youngster1EndBattleText
text_end
-Route9AfterBattleText7:
- text_far _Route9AfterBattleText7
+Route9Youngster1AfterBattleText:
+ text_far _Route9Youngster1AfterBattleText
text_end
-Route9BattleText8:
- text_far _Route9BattleText8
+Route9Hiker3BattleText:
+ text_far _Route9Hiker3BattleText
text_end
-Route9EndBattleText8:
- text_far _Route9EndBattleText8
+Route9Hiker3EndBattleText:
+ text_far _Route9Hiker3EndBattleText
text_end
-Route9AfterBattleText8:
- text_far _Route9AfterBattleText8
+Route9Hiker3AfterBattleText:
+ text_far _Route9Hiker3AfterBattleText
text_end
-Route9BattleText9:
- text_far _Route9BattleText9
+Route9Youngster2BattleText:
+ text_far _Route9Youngster2BattleText
text_end
-Route9EndBattleText9:
- text_far _Route9EndBattleText9
+Route9Youngster2EndBattleText:
+ text_far _Route9Youngster2EndBattleText
text_end
-Route9AfterBattleText9:
- text_far _Route9AfterBattleText9
+Route9Youngster2AfterBattleText:
+ text_far _Route9Youngster2AfterBattleText
text_end
-Route9Text11:
- text_far _Route9Text11
+Route9SignText:
+ text_far _Route9SignText
text_end
diff --git a/scripts/SSAnne1F.asm b/scripts/SSAnne1F.asm
index c819f470..0bea07d5 100644
--- a/scripts/SSAnne1F.asm
+++ b/scripts/SSAnne1F.asm
@@ -3,13 +3,14 @@ SSAnne1F_Script:
ret
SSAnne1F_TextPointers:
- dw SSAnne1Text1
- dw SSAnne1Text2
+ def_text_pointers
+ dw_const SSAnne1FWaiterText, TEXT_SSANNE1F_WAITER
+ dw_const SSAnne1FSailorText, TEXT_SSANNE1F_SAILOR
-SSAnne1Text1:
- text_far _SSAnne1Text1
+SSAnne1FWaiterText:
+ text_far _SSAnne1FWaiterText
text_end
-SSAnne1Text2:
- text_far _SSAnne1Text2
+SSAnne1FSailorText:
+ text_far _SSAnne1FSailorText
text_end
diff --git a/scripts/SSAnne1FRooms.asm b/scripts/SSAnne1FRooms.asm
index f958dff8..10cc8cb9 100644
--- a/scripts/SSAnne1FRooms.asm
+++ b/scripts/SSAnne1FRooms.asm
@@ -8,130 +8,132 @@ SSAnne1FRooms_Script:
ret
SSAnne1FRooms_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SSANNE1FROOMS_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SSANNE1FROOMS_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SSANNE1FROOMS_END_BATTLE
SSAnne1FRooms_TextPointers:
- dw SSAnne8Text1
- dw SSAnne8Text2
- dw SSAnne8Text3
- dw SSAnne8Text4
- dw SSAnne8Text5
- dw SSAnne8Text6
- dw SSAnne8Text7
- dw SSAnne8Text8
- dw SSAnne8Text9
- dw PickUpItemText
- dw SSAnne8Text11
+ def_text_pointers
+ dw_const SSAnne1FRoomsGentleman1Text, TEXT_SSANNE1FROOMS_GENTLEMAN1
+ dw_const SSAnne1FRoomsGentleman2Text, TEXT_SSANNE1FROOMS_GENTLEMAN2
+ dw_const SSAnne1FRoomsYoungsterText, TEXT_SSANNE1FROOMS_YOUNGSTER
+ dw_const SSAnne1FRoomsCooltrainerFText, TEXT_SSANNE1FROOMS_COOLTRAINER_F
+ dw_const SSAnne1FRoomsGirl1Text, TEXT_SSANNE1FROOMS_GIRL1
+ dw_const SSAnne1FRoomsMiddleAgedManText, TEXT_SSANNE1FROOMS_MIDDLE_AGED_MAN
+ dw_const SSAnne1FRoomsLittleGirlText, TEXT_SSANNE1FROOMS_LITTLE_GIRL
+ dw_const SSAnne1FRoomsWigglytuffText, TEXT_SSANNE1FROOMS_WIGGLYTUFF
+ dw_const SSAnne1FRoomsGirl2Text, TEXT_SSANNE1FROOMS_GIRL2
+ dw_const PickUpItemText, TEXT_SSANNE1FROOMS_TM_BODY_SLAM
+ dw_const SSAnne1FRoomsGentleman3Text, TEXT_SSANNE1FROOMS_GENTLEMAN3
SSAnne8TrainerHeaders:
def_trainers
SSAnne8TrainerHeader0:
- trainer EVENT_BEAT_SS_ANNE_8_TRAINER_0, 2, SSAnne8BattleText1, SSAnne8EndBattleText1, SSAnne8AfterBattleText1
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_0, 2, SSAnne1FRoomsGentleman1BattleText, SSAnne1FRoomsGentleman1EndBattleText, SSAnne1FRoomsGentleman1AfterBattleText
SSAnne8TrainerHeader1:
- trainer EVENT_BEAT_SS_ANNE_8_TRAINER_1, 3, SSAnne8BattleText2, SSAnne8EndBattleText2, SSAnne8AfterBattleText2
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_1, 3, SSAnne1FRoomsGentleman2BattleText, SSAnne1FRoomsGentleman2EndBattleText, SSAnne1FRoomsGentleman2AfterBattleText
SSAnne8TrainerHeader2:
- trainer EVENT_BEAT_SS_ANNE_8_TRAINER_2, 2, SSAnne8BattleText3, SSAnne8EndBattleText3, SSAnne8AfterBattleText3
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_2, 2, SSAnne1FRoomsYoungsterBattleText, SSAnne1FRoomsYoungsterEndBattleText, SSAnne1FRoomsYoungsterAfterBattleText
SSAnne8TrainerHeader3:
- trainer EVENT_BEAT_SS_ANNE_8_TRAINER_3, 2, SSAnne8BattleText4, SSAnne8EndBattleText4, SSAnne8AfterBattleText4
+ trainer EVENT_BEAT_SS_ANNE_8_TRAINER_3, 2, SSAnne1FRoomsCooltrainerFBattleText, SSAnne1FRoomsCooltrainerFEndBattleText, SSAnne1FRoomsCooltrainerFAfterBattleText
db -1 ; end
-SSAnne8Text1:
+SSAnne1FRoomsGentleman1Text:
text_asm
ld hl, SSAnne8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SSAnne8Text2:
+SSAnne1FRoomsGentleman2Text:
text_asm
ld hl, SSAnne8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SSAnne8Text3:
+SSAnne1FRoomsYoungsterText:
text_asm
ld hl, SSAnne8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SSAnne8Text4:
+SSAnne1FRoomsCooltrainerFText:
text_asm
ld hl, SSAnne8TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SSAnne8Text8:
- text_far _SSAnne8Text8
+SSAnne1FRoomsWigglytuffText:
+ text_far _SSAnne1FRoomsWigglytuffText
text_asm
ld a, WIGGLYTUFF
call PlayCry
jp TextScriptEnd
-SSAnne8BattleText1:
- text_far _SSAnne8BattleText1
+SSAnne1FRoomsGentleman1BattleText:
+ text_far _SSAnne1FRoomsGentleman1BattleText
text_end
-SSAnne8EndBattleText1:
- text_far _SSAnne8EndBattleText1
+SSAnne1FRoomsGentleman1EndBattleText:
+ text_far _SSAnne1FRoomsGentleman1EndBattleText
text_end
-SSAnne8AfterBattleText1:
- text_far _SSAnne8AfterBattleText1
+SSAnne1FRoomsGentleman1AfterBattleText:
+ text_far _SSAnne1FRoomsGentleman1AfterBattleText
text_end
-SSAnne8BattleText2:
- text_far _SSAnne8BattleText2
+SSAnne1FRoomsGentleman2BattleText:
+ text_far _SSAnne1FRoomsGentleman2BattleText
text_end
-SSAnne8EndBattleText2:
- text_far _SSAnne8EndBattleText2
+SSAnne1FRoomsGentleman2EndBattleText:
+ text_far _SSAnne1FRoomsGentleman2EndBattleText
text_end
-SSAnne8AfterBattleText2:
- text_far _SSAnne8AfterBattleText2
+SSAnne1FRoomsGentleman2AfterBattleText:
+ text_far _SSAnne1FRoomsGentleman2AfterBattleText
text_end
-SSAnne8BattleText3:
- text_far _SSAnne8BattleText3
+SSAnne1FRoomsYoungsterBattleText:
+ text_far _SSAnne1FRoomsYoungsterBattleText
text_end
-SSAnne8EndBattleText3:
- text_far _SSAnne8EndBattleText3
+SSAnne1FRoomsYoungsterEndBattleText:
+ text_far _SSAnne1FRoomsYoungsterEndBattleText
text_end
-SSAnne8AfterBattleText3:
- text_far _SSAnne8AfterBattleText3
+SSAnne1FRoomsYoungsterAfterBattleText:
+ text_far _SSAnne1FRoomsYoungsterAfterBattleText
text_end
-SSAnne8BattleText4:
- text_far _SSAnne8BattleText4
+SSAnne1FRoomsCooltrainerFBattleText:
+ text_far _SSAnne1FRoomsCooltrainerFBattleText
text_end
-SSAnne8EndBattleText4:
- text_far _SSAnne8EndBattleText4
+SSAnne1FRoomsCooltrainerFEndBattleText:
+ text_far _SSAnne1FRoomsCooltrainerFEndBattleText
text_end
-SSAnne8AfterBattleText4:
- text_far _SSAnne8AfterBattleText4
+SSAnne1FRoomsCooltrainerFAfterBattleText:
+ text_far _SSAnne1FRoomsCooltrainerFAfterBattleText
text_end
-SSAnne8Text5:
- text_far _SSAnne8Text5
+SSAnne1FRoomsGirl1Text:
+ text_far _SSAnne1FRoomsGirl1Text
text_end
-SSAnne8Text6:
- text_far _SSAnne8Text6
+SSAnne1FRoomsMiddleAgedManText:
+ text_far _SSAnne1FRoomsMiddleAgedManText
text_end
-SSAnne8Text7:
- text_far _SSAnne8Text7
+SSAnne1FRoomsLittleGirlText:
+ text_far _SSAnne1FRoomsLittleGirlText
text_end
-SSAnne8Text9:
- text_far _SSAnne8Text9
+SSAnne1FRoomsGirl2Text:
+ text_far _SSAnne1FRoomsGirl2Text
text_end
-SSAnne8Text11:
- text_far _SSAnne8Text11
+SSAnne1FRoomsGentleman3Text:
+ text_far _SSAnne1FRoomsGentleman3Text
text_end
diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm
index d00917fe..d1e6b069 100644
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -4,24 +4,25 @@ SSAnne2F_Script:
ld a, [wSSAnne2FCurScript]
jp CallFunctionInTable
-SSAnne2Script_613ab:
+SSAnne2FResetScripts:
xor a
ld [wJoyIgnore], a
ld [wSSAnne2FCurScript], a
ret
SSAnne2F_ScriptPointers:
- dw SSAnne2Script0
- dw SSAnne2Script1
- dw SSAnne2Script2
- dw SSAnne2Script3
- dw SSAnne2Script4
+ def_script_pointers
+ dw_const SSAnne2FDefaultScript, SCRIPT_SSANNE2F_DEFAULT
+ dw_const SSAnne2FRivalStartBattleScript, SCRIPT_SSANNE2F_RIVAL_START_BATTLE
+ dw_const SSAnne2FRivalAfterBattleScript, SCRIPT_SSANNE2F_RIVAL_AFTER_BATTLE
+ dw_const SSAnne2FRivalExitScript, SCRIPT_SSANNE2F_RIVAL_EXIT
+ dw_const SSAnne2FNoopScript, SCRIPT_SSANNE2F_NOOP
-SSAnne2Script4:
+SSAnne2FNoopScript:
ret
-SSAnne2Script0:
- ld hl, CoordsData_61411
+SSAnne2FDefaultScript:
+ ld hl, .PlayerCoordinatesArray
call ArePlayerCoordsInArray
ret nc
call StopAllMusic
@@ -34,63 +35,63 @@ SSAnne2Script0:
ld [wMissableObjectIndex], a
predef ShowObject
call Delay3
- ld a, $2
+ ld a, SSANNE2F_RIVAL
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ldh a, [hSavedCoordIndex]
cp $2
- jr nz, .asm_61400
- ld de, MovementData_6140c
- jr .asm_61403
-.asm_61400
- ld de, MovementData_6140d
-.asm_61403
+ jr nz, .player_standing_right
+ ld de, .RivalDownFourMovement
+ jr .move_sprite
+.player_standing_right
+ ld de, .RivalDownThreeMovement
+.move_sprite
call MoveSprite
- ld a, $1
+ ld a, SCRIPT_SSANNE2F_RIVAL_START_BATTLE
ld [wSSAnne2FCurScript], a
ret
-MovementData_6140c:
+.RivalDownFourMovement:
db NPC_MOVEMENT_DOWN
-MovementData_6140d:
+.RivalDownThreeMovement:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db -1 ; end
-CoordsData_61411:
+.PlayerCoordinatesArray:
dbmapcoord 36, 8
dbmapcoord 37, 8
db -1 ; end
-SSAnne2Script_61416:
+SSAnne2FSetFacingDirectionScript:
ld a, [wXCoord]
cp 37
- jr nz, .asm_61426
+ jr nz, .player_standing_left
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
ld a, SPRITE_FACING_RIGHT
- jr .asm_61427
-.asm_61426
+ jr .set_facing_direction
+.player_standing_left
xor a ; SPRITE_FACING_DOWN
-.asm_61427
+.set_facing_direction
ldh [hSpriteFacingDirection], a
- ld a, $2
+ ld a, SSANNE2F_RIVAL
ldh [hSpriteIndex], a
jp SetSpriteFacingDirectionAndDelay
-SSAnne2Script1:
+SSAnne2FRivalStartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
- call SSAnne2Script_61416
+ call SSAnne2FSetFacingDirectionScript
xor a
ld [wJoyIgnore], a
- ld a, $2
+ ld a, TEXT_SSANNE2F_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
@@ -98,52 +99,52 @@ SSAnne2Script1:
ld [wCurOpponent], a
ld a, $1
ld [wTrainerNo], a
- call SSAnne2Script_61416
- ld a, $2
+ call SSAnne2FSetFacingDirectionScript
+ ld a, SCRIPT_SSANNE2F_RIVAL_AFTER_BATTLE
ld [wSSAnne2FCurScript], a
ret
-SSAnne2Script2:
+SSAnne2FRivalAfterBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, SSAnne2Script_613ab
- call SSAnne2Script_61416
- ld a, $f0
+ jp z, SSAnne2FResetScripts
+ call SSAnne2FSetFacingDirectionScript
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $3
+ ld a, TEXT_SSANNE2F_RIVAL_CUT_MASTER
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $2
+ ld a, SSANNE2F_RIVAL
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wXCoord]
cp 37
- jr nz, .asm_61497
- ld de, MovementData_614b9
- jr .asm_6149a
-.asm_61497
- ld de, MovementData_614b7
-.asm_6149a
- ld a, $2
+ jr nz, .player_standing_left
+ ld de, .RivalDownFourMovement
+ jr .move_sprite
+.player_standing_left
+ ld de, .RivalWalkAroundPlayerMovement
+.move_sprite
+ ld a, SSANNE2F_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
call StopAllMusic
farcall Music_RivalAlternateStart
- ld a, $3
+ ld a, SCRIPT_SSANNE2F_RIVAL_EXIT
ld [wSSAnne2FCurScript], a
ret
-MovementData_614b7:
+.RivalWalkAroundPlayerMovement:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_DOWN
-MovementData_614b9:
+.RivalDownFourMovement:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db -1 ; end
-SSAnne2Script3:
+SSAnne2FRivalExitScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -153,43 +154,44 @@ SSAnne2Script3:
ld [wMissableObjectIndex], a
predef HideObject
call PlayDefaultMusic
- ld a, $4
+ ld a, SCRIPT_SSANNE2F_NOOP
ld [wSSAnne2FCurScript], a
ret
SSAnne2F_TextPointers:
- dw SSAnne2Text1
- dw SSAnne2Text2
- dw SSAnne2Text3
+ def_text_pointers
+ dw_const SSAnne2FWaiterText, TEXT_SSANNE2F_WAITER
+ dw_const SSAnne2FRivalText, TEXT_SSANNE2F_RIVAL
+ dw_const SSAnne2FRivalCutMasterText, TEXT_SSANNE2F_RIVAL_CUT_MASTER
-SSAnne2Text1:
- text_far _SSAnne2Text1
+SSAnne2FWaiterText:
+ text_far _SSAnne2FWaiterText
text_end
-SSAnne2Text2:
+SSAnne2FRivalText:
text_asm
- ld hl, SSAnneRivalBeforeBattleText
+ ld hl, .Text
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SSAnneRivalDefeatedText
- ld de, SSAnneRivalWonText
+ ld hl, SSAnne2FRivalDefeatedText
+ ld de, SSAnne2FRivalVictoryText
call SaveEndBattleTextPointers
jp TextScriptEnd
-SSAnneRivalBeforeBattleText:
- text_far _SSAnneRivalBeforeBattleText
+.Text:
+ text_far _SSAnne2FRivalText
text_end
-SSAnneRivalDefeatedText:
- text_far _SSAnneRivalDefeatedText
+SSAnne2FRivalDefeatedText:
+ text_far _SSAnne2FRivalDefeatedText
text_end
-SSAnneRivalWonText:
- text_far _SSAnneRivalWonText
+SSAnne2FRivalVictoryText:
+ text_far _SSAnne2FRivalVictoryText
text_end
-SSAnne2Text3:
- text_far _SSAnneRivalCaptainText
+SSAnne2FRivalCutMasterText:
+ text_far _SSAnne2FRivalCutMasterText
text_end
diff --git a/scripts/SSAnne2FRooms.asm b/scripts/SSAnne2FRooms.asm
index f3346fe3..30266610 100644
--- a/scripts/SSAnne2FRooms.asm
+++ b/scripts/SSAnne2FRooms.asm
@@ -8,159 +8,161 @@ SSAnne2FRooms_Script:
ret
SSAnne2FRooms_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SSANNE2FROOMS_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SSANNE2FROOMS_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SSANNE2FROOMS_END_BATTLE
SSAnne2FRooms_TextPointers:
- dw SSAnne9Text1
- dw SSAnne9Text2
- dw SSAnne9Text3
- dw SSAnne9Text4
- dw SSAnne9Text5
- dw PickUpItemText
- dw SSAnne9Text7
- dw SSAnne9Text8
- dw PickUpItemText
- dw SSAnne9Text10
- dw SSAnne9Text11
- dw SSAnne9Text12
- dw SSAnne9Text13
+ def_text_pointers
+ dw_const SSAnne2FRoomsGentleman1Text, TEXT_SSANNE2FROOMS_GENTLEMAN1
+ dw_const SSAnne2FRoomsFisherText, TEXT_SSANNE2FROOMS_FISHER
+ dw_const SSAnne2FRoomsGentleman2Text, TEXT_SSANNE2FROOMS_GENTLEMAN2
+ dw_const SSAnne2FRoomsCooltrainerFText, TEXT_SSANNE2FROOMS_COOLTRAINER_F
+ dw_const SSAnne2FRoomsGentleman3Text, TEXT_SSANNE2FROOMS_GENTLEMAN3
+ dw_const PickUpItemText, TEXT_SSANNE2FROOMS_MAX_ETHER
+ dw_const SSAnne2FRoomsGentleman4Text, TEXT_SSANNE2FROOMS_GENTLEMAN4
+ dw_const SSAnne2FRoomsGrampsText, TEXT_SSANNE2FROOMS_GRAMPS
+ dw_const PickUpItemText, TEXT_SSANNE2FROOMS_RARE_CANDY
+ dw_const SSAnne2FRoomsGentleman5Text, TEXT_SSANNE2FROOMS_GENTLEMAN5
+ dw_const SSAnne2FRoomsLittleBoyText, TEXT_SSANNE2FROOMS_LITTLE_BOY
+ dw_const SSAnne2FRoomsBrunetteGirlText, TEXT_SSANNE2FROOMS_BRUNETTE_GIRL
+ dw_const SSAnne2FRoomsBeautyText, TEXT_SSANNE2FROOMS_BEAUTY
SSAnne9TrainerHeaders:
def_trainers
SSAnne9TrainerHeader0:
- trainer EVENT_BEAT_SS_ANNE_9_TRAINER_0, 2, SSAnne9BattleText1, SSAnne9EndBattleText1, SSAnne9AfterBattleText1
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_0, 2, SSAnne2FRoomsGentleman1BattleText, SSAnne2FRoomsGentleman1EndBattleText, SSAnne2FRoomsGentleman1AfterBattleText
SSAnne9TrainerHeader1:
- trainer EVENT_BEAT_SS_ANNE_9_TRAINER_1, 3, SSAnne9BattleText2, SSAnne9EndBattleText2, SSAnne9AfterBattleText2
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_1, 3, SSAnne2FRoomsFisherBattleText, SSAnne2FRoomsFisherEndBattleText, SSAnne2FRoomsFisherAfterBattleText
SSAnne9TrainerHeader2:
- trainer EVENT_BEAT_SS_ANNE_9_TRAINER_2, 3, SSAnne9BattleText3, SSAnne9EndBattleText3, SSAnne9AfterBattleText3
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_2, 3, SSAnne2FRoomsGentleman2BattleText, SSAnne2FRoomsGentleman2EndBattleText, SSAnne2FRoomsGentleman2AfterBattleText
SSAnne9TrainerHeader3:
- trainer EVENT_BEAT_SS_ANNE_9_TRAINER_3, 2, SSAnne9BattleText4, SSAnne9EndBattleText4, SSAnne9AfterBattleText4
+ trainer EVENT_BEAT_SS_ANNE_9_TRAINER_3, 2, SSAnne2FRoomsCooltrainerFBattleText, SSAnne2FRoomsCooltrainerFEndBattleText, SSAnne2FRoomsCooltrainerFAfterBattleText
db -1 ; end
-SSAnne9Text1:
+SSAnne2FRoomsGentleman1Text:
text_asm
ld hl, SSAnne9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SSAnne9Text2:
+SSAnne2FRoomsFisherText:
text_asm
ld hl, SSAnne9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SSAnne9Text3:
+SSAnne2FRoomsGentleman2Text:
text_asm
ld hl, SSAnne9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SSAnne9Text4:
+SSAnne2FRoomsCooltrainerFText:
text_asm
ld hl, SSAnne9TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SSAnne9Text5:
+SSAnne2FRoomsGentleman3Text:
text_asm
call SaveScreenTilesToBuffer1
- ld hl, SSAnne9Text_61bf2
+ ld hl, .Text
call PrintText
call LoadScreenTilesFromBuffer1
ld a, SNORLAX
call DisplayPokedex
jp TextScriptEnd
-SSAnne9Text_61bf2:
- text_far _SSAnne9Text_61bf2
+.Text:
+ text_far _SSAnne2FRoomsGentleman3Text
text_end
-SSAnne9Text7:
+SSAnne2FRoomsGentleman4Text:
text_asm
- ld hl, SSAnne9Text_61c01
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-SSAnne9Text_61c01:
- text_far _SSAnne9Text_61c01
+.Text:
+ text_far _SSAnne2FRoomsGentleman4Text
text_end
-SSAnne9Text8:
+SSAnne2FRoomsGrampsText:
text_asm
- ld hl, SSAnne9Text_61c10
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-SSAnne9Text_61c10:
- text_far _SSAnne9Text_61c10
+.Text:
+ text_far _SSAnne2FRoomsGrampsText
text_end
-SSAnne9Text10:
+SSAnne2FRoomsGentleman5Text:
text_asm
- farcall Func_f2570
+ farcall SSAnne2FRoomsPrintGentleman5Text
jp TextScriptEnd
-SSAnne9Text11:
+SSAnne2FRoomsLittleBoyText:
text_asm
- farcall Func_f257c
+ farcall SSAnne2FRoomsPrintLittleBoyText
jp TextScriptEnd
-SSAnne9Text12:
+SSAnne2FRoomsBrunetteGirlText:
text_asm
- farcall Func_f2588
+ farcall SSAnne2FRoomsPrintBrunetteGirlText
jp TextScriptEnd
-SSAnne9Text13:
+SSAnne2FRoomsBeautyText:
text_asm
- farcall Func_f2594
+ farcall SSAnne2FRoomsPrintBeautyText
jp TextScriptEnd
-SSAnne9BattleText1:
- text_far _SSAnne9BattleText1
+SSAnne2FRoomsGentleman1BattleText:
+ text_far _SSAnne2FRoomsGentleman1BattleText
text_end
-SSAnne9EndBattleText1:
- text_far _SSAnne9EndBattleText1
+SSAnne2FRoomsGentleman1EndBattleText:
+ text_far _SSAnne2FRoomsGentleman1EndBattleText
text_end
-SSAnne9AfterBattleText1:
- text_far _SSAnne9AfterBattleText1
+SSAnne2FRoomsGentleman1AfterBattleText:
+ text_far _SSAnne2FRoomsGentleman1AfterBattleText
text_end
-SSAnne9BattleText2:
- text_far _SSAnne9BattleText2
+SSAnne2FRoomsFisherBattleText:
+ text_far _SSAnne2FRoomsFisherBattleText
text_end
-SSAnne9EndBattleText2:
- text_far _SSAnne9EndBattleText2
+SSAnne2FRoomsFisherEndBattleText:
+ text_far _SSAnne2FRoomsFisherEndBattleText
text_end
-SSAnne9AfterBattleText2:
- text_far _SSAnne9AfterBattleText2
+SSAnne2FRoomsFisherAfterBattleText:
+ text_far _SSAnne2FRoomsFisherAfterBattleText
text_end
-SSAnne9BattleText3:
- text_far _SSAnne9BattleText3
+SSAnne2FRoomsGentleman2BattleText:
+ text_far _SSAnne2FRoomsGentleman2BattleText
text_end
-SSAnne9EndBattleText3:
- text_far _SSAnne9EndBattleText3
+SSAnne2FRoomsGentleman2EndBattleText:
+ text_far _SSAnne2FRoomsGentleman2EndBattleText
text_end
-SSAnne9AfterBattleText3:
- text_far _SSAnne9AfterBattleText3
+SSAnne2FRoomsGentleman2AfterBattleText:
+ text_far _SSAnne2FRoomsGentleman2AfterBattleText
text_end
-SSAnne9BattleText4:
- text_far _SSAnne9BattleText4
+SSAnne2FRoomsCooltrainerFBattleText:
+ text_far _SSAnne2FRoomsCooltrainerFBattleText
text_end
-SSAnne9EndBattleText4:
- text_far _SSAnne9EndBattleText4
+SSAnne2FRoomsCooltrainerFEndBattleText:
+ text_far _SSAnne2FRoomsCooltrainerFEndBattleText
text_end
-SSAnne9AfterBattleText4:
- text_far _SSAnne9AfterBattleText4
+SSAnne2FRoomsCooltrainerFAfterBattleText:
+ text_far _SSAnne2FRoomsCooltrainerFAfterBattleText
text_end
diff --git a/scripts/SSAnne2FRooms_2.asm b/scripts/SSAnne2FRooms_2.asm
index 2271e83d..a6029ac2 100644
--- a/scripts/SSAnne2FRooms_2.asm
+++ b/scripts/SSAnne2FRooms_2.asm
@@ -1,35 +1,35 @@
-Func_f2570::
- ld hl, SSAnne9Text_f2577
+SSAnne2FRoomsPrintGentleman5Text::
+ ld hl, .text
call PrintText
ret
-SSAnne9Text_f2577:
- text_far _SSAnne9Text_61c1f
+.text
+ text_far _SSAnne2FRoomsGentleman5Text
text_end
-Func_f257c::
- ld hl, SSAnne9Text_f2583
+SSAnne2FRoomsPrintLittleBoyText::
+ ld hl, .text
call PrintText
ret
-SSAnne9Text_f2583:
- text_far _SSAnne9Text_61c2e
+.text
+ text_far _SSAnne2FRoomsLittleBoyText
text_end
-Func_f2588::
- ld hl, SSAnne9Text_f258f
+SSAnne2FRoomsPrintBrunetteGirlText::
+ ld hl, .text
call PrintText
ret
-SSAnne9Text_f258f:
- text_far _SSAnne9Text_61c3d
+.text
+ text_far _SSAnne2FRoomsBrunetteGirlText
text_end
-Func_f2594::
- ld hl, SSAnne9Text_f259b
+SSAnne2FRoomsPrintBeautyText::
+ ld hl, .text
call PrintText
ret
-SSAnne9Text_f259b:
- text_far _SSAnne9Text_61c4c
+.text
+ text_far _SSAnne2FRoomsBeautyText
text_end
diff --git a/scripts/SSAnne3F.asm b/scripts/SSAnne3F.asm
index e3e7a1d3..21443fbc 100644
--- a/scripts/SSAnne3F.asm
+++ b/scripts/SSAnne3F.asm
@@ -2,8 +2,9 @@ SSAnne3F_Script:
jp EnableAutoTextBoxDrawing
SSAnne3F_TextPointers:
- dw SSAnne3Text1
+ def_text_pointers
+ dw_const SSAnne3FSailorText, TEXT_SSANNE3F_SAILOR
-SSAnne3Text1:
- text_far _SSAnne3Text1
+SSAnne3FSailorText:
+ text_far _SSAnne3FSailorText
text_end
diff --git a/scripts/SSAnneB1F.asm b/scripts/SSAnneB1F.asm
index f66fdfaa..218c9ec7 100644
--- a/scripts/SSAnneB1F.asm
+++ b/scripts/SSAnneB1F.asm
@@ -2,5 +2,6 @@ SSAnneB1F_Script:
jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers:
+ def_text_pointers
text_end ; unused
diff --git a/scripts/SSAnneB1FRooms.asm b/scripts/SSAnneB1FRooms.asm
index 610a0ca0..e4a61de5 100644
--- a/scripts/SSAnneB1FRooms.asm
+++ b/scripts/SSAnneB1FRooms.asm
@@ -8,154 +8,156 @@ SSAnneB1FRooms_Script:
ret
SSAnneB1FRooms_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SSANNEB1FROOMS_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SSANNEB1FROOMS_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SSANNEB1FROOMS_END_BATTLE
SSAnneB1FRooms_TextPointers:
- dw SSAnne10Text1
- dw SSAnne10Text2
- dw SSAnne10Text3
- dw SSAnne10Text4
- dw SSAnne10Text5
- dw SSAnne10Text6
- dw SSAnne10Text7
- dw SSAnne10Text8
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const SSAnneB1FRoomsSailor1Text, TEXT_SSANNEB1FROOMS_SAILOR1
+ dw_const SSAnneB1FRoomsSailor2Text, TEXT_SSANNEB1FROOMS_SAILOR2
+ dw_const SSAnneB1FRoomsSailor3Text, TEXT_SSANNEB1FROOMS_SAILOR3
+ dw_const SSAnneB1FRoomsSailor4Text, TEXT_SSANNEB1FROOMS_SAILOR4
+ dw_const SSAnneB1FRoomsSailor5Text, TEXT_SSANNEB1FROOMS_SAILOR5
+ dw_const SSAnneB1FRoomsFisherText, TEXT_SSANNEB1FROOMS_FISHER
+ dw_const SSAnneB1FRoomsSuperNerdText, TEXT_SSANNEB1FROOMS_SUPER_NERD
+ dw_const SSAnneB1FRoomsMachokeText, TEXT_SSANNEB1FROOMS_MACHOKE
+ dw_const PickUpItemText, TEXT_SSANNEB1FROOMS_ETHER
+ dw_const PickUpItemText, TEXT_SSANNEB1FROOMS_TM_REST
+ dw_const PickUpItemText, TEXT_SSANNEB1FROOMS_MAX_POTION
SSAnne10TrainerHeaders:
def_trainers
SSAnne10TrainerHeader0:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_0, 2, SSAnne10BattleText1, SSAnne10EndBattleText1, SSAnne10AfterBattleText1
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_0, 2, SSAnneB1FRoomsSailor1BattleText, SSAnneB1FRoomsSailor1EndBattleText, SSAnneB1FRoomsSailor1AfterBattleText
SSAnne10TrainerHeader1:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_1, 3, SSAnne10BattleText2, SSAnne10EndBattleText2, SSAnne10AfterBattleText2
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_1, 3, SSAnneB1FRoomsSailor2BattleText, SSAnneB1FRoomsSailor2EndBattleText, SSAnneB1FRoomsSailor2AfterBattleText
SSAnne10TrainerHeader2:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_2, 2, SSAnne10BattleText3, SSAnne10EndBattleText3, SSAnne10AfterBattleText3
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_2, 2, SSAnneB1FRoomsSailor3BattleText, SSAnneB1FRoomsSailor3EndBattleText, SSAnneB1FRoomsSailor3AfterBattleText
SSAnne10TrainerHeader3:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_3, 2, SSAnne10BattleText4, SSAnne10EndBattleText4, SSAnne10AfterBattleText4
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_3, 2, SSAnneB1FRoomsSailor4BattleText, SSAnneB1FRoomsSailor4EndBattleText, SSAnneB1FRoomsSailor4AfterBattleText
SSAnne10TrainerHeader4:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_4, 2, SSAnne10BattleText5, SSAnne10EndBattleText5, SSAnne10AfterBattleText5
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_4, 2, SSAnneB1FRoomsSailor5BattleText, SSAnneB1FRoomsSailor5EndBattleText, SSAnneB1FRoomsSailor5AfterBattleText
SSAnne10TrainerHeader5:
- trainer EVENT_BEAT_SS_ANNE_10_TRAINER_5, 3, SSAnne10BattleText6, SSAnne10EndBattleText6, SSAnne10AfterBattleText6
+ trainer EVENT_BEAT_SS_ANNE_10_TRAINER_5, 3, SSAnneB1FRoomsFisherBattleText, SSAnneB1FRoomsFisherEndBattleText, SSAnneB1FRoomsFisherAfterBattleText
db -1 ; end
-SSAnne10Text1:
+SSAnneB1FRoomsSailor1Text:
text_asm
ld hl, SSAnne10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text2:
+SSAnneB1FRoomsSailor2Text:
text_asm
ld hl, SSAnne10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text3:
+SSAnneB1FRoomsSailor3Text:
text_asm
ld hl, SSAnne10TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text4:
+SSAnneB1FRoomsSailor4Text:
text_asm
ld hl, SSAnne10TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text5:
+SSAnneB1FRoomsSailor5Text:
text_asm
ld hl, SSAnne10TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text6:
+SSAnneB1FRoomsFisherText:
text_asm
ld hl, SSAnne10TrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-SSAnne10Text8:
- text_far _SSAnne10Text8
+SSAnneB1FRoomsMachokeText:
+ text_far _SSAnneB1FRoomsMachokeText
text_asm
ld a, MACHOKE
call PlayCry
jp TextScriptEnd
-SSAnne10BattleText1:
- text_far _SSAnne10BattleText1
+SSAnneB1FRoomsSailor1BattleText:
+ text_far _SSAnneB1FRoomsSailor1BattleText
text_end
-SSAnne10EndBattleText1:
- text_far _SSAnne10EndBattleText1
+SSAnneB1FRoomsSailor1EndBattleText:
+ text_far _SSAnneB1FRoomsSailor1EndBattleText
text_end
-SSAnne10AfterBattleText1:
- text_far _SSAnne10AfterBattleText1
+SSAnneB1FRoomsSailor1AfterBattleText:
+ text_far _SSAnneB1FRoomsSailor1AfterBattleText
text_end
-SSAnne10BattleText2:
- text_far _SSAnne10BattleText2
+SSAnneB1FRoomsSailor2BattleText:
+ text_far _SSAnneB1FRoomsSailor2BattleText
text_end
-SSAnne10EndBattleText2:
- text_far _SSAnne10EndBattleText2
+SSAnneB1FRoomsSailor2EndBattleText:
+ text_far _SSAnneB1FRoomsSailor2EndBattleText
text_end
-SSAnne10AfterBattleText2:
- text_far _SSAnne10AfterBattleText2
+SSAnneB1FRoomsSailor2AfterBattleText:
+ text_far _SSAnneB1FRoomsSailor2AfterBattleText
text_end
-SSAnne10BattleText3:
- text_far _SSAnne10BattleText3
+SSAnneB1FRoomsSailor3BattleText:
+ text_far _SSAnneB1FRoomsSailor3BattleText
text_end
-SSAnne10EndBattleText3:
- text_far _SSAnne10EndBattleText3
+SSAnneB1FRoomsSailor3EndBattleText:
+ text_far _SSAnneB1FRoomsSailor3EndBattleText
text_end
-SSAnne10AfterBattleText3:
- text_far _SSAnne10AfterBattleText3
+SSAnneB1FRoomsSailor3AfterBattleText:
+ text_far _SSAnneB1FRoomsSailor3AfterBattleText
text_end
-SSAnne10BattleText4:
- text_far _SSAnne10BattleText4
+SSAnneB1FRoomsSailor4BattleText:
+ text_far _SSAnneB1FRoomsSailor4BattleText
text_end
-SSAnne10EndBattleText4:
- text_far _SSAnne10EndBattleText4
+SSAnneB1FRoomsSailor4EndBattleText:
+ text_far _SSAnneB1FRoomsSailor4EndBattleText
text_end
-SSAnne10AfterBattleText4:
- text_far _SSAnne10AfterBattleText4
+SSAnneB1FRoomsSailor4AfterBattleText:
+ text_far _SSAnneB1FRoomsSailor4AfterBattleText
text_end
-SSAnne10BattleText5:
- text_far _SSAnne10BattleText5
+SSAnneB1FRoomsSailor5BattleText:
+ text_far _SSAnneB1FRoomsSailor5BattleText
text_end
-SSAnne10EndBattleText5:
- text_far _SSAnne10EndBattleText5
+SSAnneB1FRoomsSailor5EndBattleText:
+ text_far _SSAnneB1FRoomsSailor5EndBattleText
text_end
-SSAnne10AfterBattleText5:
- text_far _SSAnne10AfterBattleText5
+SSAnneB1FRoomsSailor5AfterBattleText:
+ text_far _SSAnneB1FRoomsSailor5AfterBattleText
text_end
-SSAnne10BattleText6:
- text_far _SSAnne10BattleText6
+SSAnneB1FRoomsFisherBattleText:
+ text_far _SSAnneB1FRoomsFisherBattleText
text_end
-SSAnne10EndBattleText6:
- text_far _SSAnne10EndBattleText6
+SSAnneB1FRoomsFisherEndBattleText:
+ text_far _SSAnneB1FRoomsFisherEndBattleText
text_end
-SSAnne10AfterBattleText6:
- text_far _SSAnne10AfterBattleText6
+SSAnneB1FRoomsFisherAfterBattleText:
+ text_far _SSAnneB1FRoomsFisherAfterBattleText
text_end
-SSAnne10Text7:
- text_far _SSAnne10Text7
+SSAnneB1FRoomsSuperNerdText:
+ text_far _SSAnneB1FRoomsSuperNerdText
text_end
diff --git a/scripts/SSAnneBow.asm b/scripts/SSAnneBow.asm
index 80d98668..2e3b5e00 100644
--- a/scripts/SSAnneBow.asm
+++ b/scripts/SSAnneBow.asm
@@ -8,69 +8,71 @@ SSAnneBow_Script:
ret
SSAnneBow_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SSANNEBOW_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SSANNEBOW_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SSANNEBOW_END_BATTLE
SSAnneBow_TextPointers:
- dw SSAnne5Text1
- dw SSAnne5Text2
- dw SSAnne5Text3
- dw SSAnne5Text4
- dw SSAnne5Text5
+ def_text_pointers
+ dw_const SSAnneBowSuperNerdText, TEXT_SSANNEBOW_SUPER_NERD
+ dw_const SSAnneBowSailor1Text, TEXT_SSANNEBOW_SAILOR1
+ dw_const SSAnneBowCooltrainerMText, TEXT_SSANNEBOW_COOLTRAINER_M
+ dw_const SSAnneBowSailor2Text, TEXT_SSANNEBOW_SAILOR2
+ dw_const SSAnneBowSailor3Text, TEXT_SSANNEBOW_SAILOR3
SSAnne5TrainerHeaders:
def_trainers 4
SSAnne5TrainerHeader0:
- trainer EVENT_BEAT_SS_ANNE_5_TRAINER_0, 3, SSAnne5BattleText1, SSAnne5EndBattleText1, SSAnne5AfterBattleText1
+ trainer EVENT_BEAT_SS_ANNE_5_TRAINER_0, 3, SSAnneBowSailor2BattleText, SSAnneBowSailor2EndBattleText, SSAnneBowSailor2AfterBattleText
SSAnne5TrainerHeader1:
- trainer EVENT_BEAT_SS_ANNE_5_TRAINER_1, 3, SSAnne5BattleText2, SSAnne5EndBattleText2, SSAnne5AfterBattleText2
+ trainer EVENT_BEAT_SS_ANNE_5_TRAINER_1, 3, SSAnneBowSailor3BattleText, SSAnneBowSailor3EndBattleText, SSAnneBowSailor3AfterBattleText
db -1 ; end
-SSAnne5Text1:
- text_far _SSAnne5Text1
+SSAnneBowSuperNerdText:
+ text_far _SSAnneBowSuperNerdText
text_end
-SSAnne5Text2:
- text_far _SSAnne5Text2
+SSAnneBowSailor1Text:
+ text_far _SSAnneBowSailor1Text
text_end
-SSAnne5Text3:
- text_far _SSAnne5Text3
+SSAnneBowCooltrainerMText:
+ text_far _SSAnneBowCooltrainerMText
text_end
-SSAnne5Text4:
+SSAnneBowSailor2Text:
text_asm
ld hl, SSAnne5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SSAnne5BattleText1:
- text_far _SSAnne5BattleText1
+SSAnneBowSailor2BattleText:
+ text_far _SSAnneBowSailor2BattleText
text_end
-SSAnne5EndBattleText1:
- text_far _SSAnne5EndBattleText1
+SSAnneBowSailor2EndBattleText:
+ text_far _SSAnneBowSailor2EndBattleText
text_end
-SSAnne5AfterBattleText1:
- text_far _SSAnne5AfterBattleText1
+SSAnneBowSailor2AfterBattleText:
+ text_far _SSAnneBowSailor2AfterBattleText
text_end
-SSAnne5Text5:
+SSAnneBowSailor3Text:
text_asm
ld hl, SSAnne5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SSAnne5BattleText2:
- text_far _SSAnne5BattleText2
+SSAnneBowSailor3BattleText:
+ text_far _SSAnneBowSailor3BattleText
text_end
-SSAnne5EndBattleText2:
- text_far _SSAnne5EndBattleText2
+SSAnneBowSailor3EndBattleText:
+ text_far _SSAnneBowSailor3EndBattleText
text_end
-SSAnne5AfterBattleText2:
- text_far _SSAnne5AfterBattleText2
+SSAnneBowSailor3AfterBattleText:
+ text_far _SSAnneBowSailor3AfterBattleText
text_end
diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm
index 9af4744e..8926b604 100644
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -1,8 +1,8 @@
SSAnneCaptainsRoom_Script:
- call SSAnne7Script_6189b
+ call SSAnneCaptainsRoomEventScript
jp EnableAutoTextBoxDrawing
-SSAnne7Script_6189b:
+SSAnneCaptainsRoomEventScript:
CheckEvent EVENT_GOT_HM01
ret nz
ld hl, wd72d
@@ -10,82 +10,83 @@ SSAnne7Script_6189b:
ret
SSAnneCaptainsRoom_TextPointers:
- dw SSAnne7Text1
- dw SSAnne7Text2
- dw SSAnne7Text3
+ def_text_pointers
+ dw_const SSAnneCaptainsRoomCaptainText, TEXT_SSANNECAPTAINSROOM_CAPTAIN
+ dw_const SSAnneCaptainsRoomTrashText, TEXT_SSANNECAPTAINSROOM_TRASH
+ dw_const SSAnneCaptainsRoomSeasickBookText, TEXT_SSANNECAPTAINSROOM_SEASICK_BOOK
-SSAnne7Text1:
+SSAnneCaptainsRoomCaptainText:
text_asm
CheckEvent EVENT_GOT_HM01
jr nz, .got_item
- ld hl, SSAnne7RubText
+ ld hl, SSAnneCaptainsRoomRubCaptainsBackText
call PrintText
- ld hl, ReceivingHM01Text
+ ld hl, SSAnneCaptainsRoomCaptainIFeelMuchBetterText
call PrintText
lb bc, HM_CUT, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedHM01Text
+ ld hl, SSAnneCaptainsRoomCaptainReceivedHM01Text
call PrintText
SetEvent EVENT_GOT_HM01
ld hl, wd72d
res 5, [hl]
jr .done
.bag_full
- ld hl, HM01NoRoomText
+ ld hl, SSAnneCaptainsRoomCaptainHM01NoRoomText
call PrintText
jr .done
.got_item
- ld hl, SSAnne7Text_61932
+ ld hl, SSAnneCaptainsRoomCaptainNotSickAnymoreText
call PrintText
.done
jp TextScriptEnd
-SSAnne7RubText:
- text_far _SSAnne7RubText
+SSAnneCaptainsRoomRubCaptainsBackText:
+ text_far _SSAnneCaptainsRoomRubCaptainsBackText
text_asm
ld a, [wAudioROMBank]
cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a
- jr nz, .asm_61908
+ jr nz, .not_audio_engine_3
call StopAllMusic
ld a, BANK(Music_PkmnHealed)
ld [wAudioROMBank], a
-.asm_61908
+.not_audio_engine_3
ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a
call PlaySound
-.asm_61910
+.loop
ld a, [wChannelSoundIDs]
cp MUSIC_PKMN_HEALED
- jr z, .asm_61910
+ jr z, .loop
call PlayDefaultMusic
SetEvent EVENT_RUBBED_CAPTAINS_BACK
ld hl, wd72d
res 5, [hl]
jp TextScriptEnd
-ReceivingHM01Text:
- text_far _ReceivingHM01Text
+SSAnneCaptainsRoomCaptainIFeelMuchBetterText:
+ text_far _SSAnneCaptainsRoomCaptainIFeelMuchBetterText
text_end
-ReceivedHM01Text:
- text_far _ReceivedHM01Text
+SSAnneCaptainsRoomCaptainReceivedHM01Text:
+ text_far _SSAnneCaptainsRoomCaptainReceivedHM01Text
sound_get_key_item
text_end
-SSAnne7Text_61932:
- text_far _SSAnne7Text_61932
+SSAnneCaptainsRoomCaptainNotSickAnymoreText:
+ text_far _SSAnneCaptainsRoomCaptainNotSickAnymoreText
text_end
-HM01NoRoomText:
- text_far _HM01NoRoomText
+SSAnneCaptainsRoomCaptainHM01NoRoomText:
+ text_far _SSAnneCaptainsRoomCaptainHM01NoRoomText
text_end
-SSAnne7Text2:
- text_far _SSAnne7Text2
+SSAnneCaptainsRoomTrashText:
+ text_far _SSAnneCaptainsRoomTrashText
text_end
-SSAnne7Text3:
- text_far _SSAnne7Text3
+SSAnneCaptainsRoomSeasickBookText:
+ text_far _SSAnneCaptainsRoomSeasickBookText
text_end
diff --git a/scripts/SSAnneKitchen.asm b/scripts/SSAnneKitchen.asm
index 30a9830f..4062199c 100644
--- a/scripts/SSAnneKitchen.asm
+++ b/scripts/SSAnneKitchen.asm
@@ -3,70 +3,71 @@ SSAnneKitchen_Script:
ret
SSAnneKitchen_TextPointers:
- dw SSAnne6Text1
- dw SSAnne6Text2
- dw SSAnne6Text3
- dw SSAnne6Text4
- dw SSAnne6Text5
- dw SSAnne6Text6
- dw SSAnne6Text7
+ def_text_pointers
+ dw_const SSAnneKitchenCook1Text, TEXT_SSANNEKITCHEN_COOK1
+ dw_const SSAnneKitchenCook2Text, TEXT_SSANNEKITCHEN_COOK2
+ dw_const SSAnneKitchenCook3Text, TEXT_SSANNEKITCHEN_COOK3
+ dw_const SSAnneKitchenCook4Text, TEXT_SSANNEKITCHEN_COOK4
+ dw_const SSAnneKitchenCook5Text, TEXT_SSANNEKITCHEN_COOK5
+ dw_const SSAnneKitchenCook6Text, TEXT_SSANNEKITCHEN_COOK6
+ dw_const SSAnneKitchenCook7Text, TEXT_SSANNEKITCHEN_COOK7
-SSAnne6Text1:
- text_far _SSAnne6Text1
+SSAnneKitchenCook1Text:
+ text_far _SSAnneKitchenCook1Text
text_end
-SSAnne6Text2:
- text_far _SSAnne6Text2
+SSAnneKitchenCook2Text:
+ text_far _SSAnneKitchenCook2Text
text_end
-SSAnne6Text3:
- text_far _SSAnne6Text3
+SSAnneKitchenCook3Text:
+ text_far _SSAnneKitchenCook3Text
text_end
-SSAnne6Text4:
- text_far _SSAnne6Text4
+SSAnneKitchenCook4Text:
+ text_far _SSAnneKitchenCook4Text
text_end
-SSAnne6Text5:
- text_far _SSAnne6Text5
+SSAnneKitchenCook5Text:
+ text_far _SSAnneKitchenCook5Text
text_end
-SSAnne6Text6:
- text_far _SSAnne6Text6
+SSAnneKitchenCook6Text:
+ text_far _SSAnneKitchenCook6Text
text_end
-SSAnne6Text7:
+SSAnneKitchenCook7Text:
text_asm
- ld hl, SSAnne6Text_61807
+ ld hl, .MainCourseIsText
call PrintText
ldh a, [hRandomAdd]
bit 7, a
jr z, .not_dialog_1
- ld hl, SSAnne6Text_6180c
+ ld hl, .SalmonDuSaladText
jr .done
.not_dialog_1
bit 4, a
jr z, .not_dialog_2
- ld hl, SSAnne6Text_61811
+ ld hl, .EelsAuBarbecueText
jr .done
.not_dialog_2
- ld hl, SSAnne6Text_61816
+ ld hl, .PrimeBeefSteakText
.done
call PrintText
jp TextScriptEnd
-SSAnne6Text_61807:
- text_far _SSAnne6Text_61807
+.MainCourseIsText:
+ text_far _SSAnneKitchenCook7MainCourseIsText
text_end
-SSAnne6Text_6180c:
- text_far _SSAnne6Text_6180c
+.SalmonDuSaladText:
+ text_far SSAnneKitchenCook7SalmonDuSaladText
text_end
-SSAnne6Text_61811:
- text_far _SSAnne6Text_61811
+.EelsAuBarbecueText:
+ text_far SSAnneKitchenCook7EelsAuBarbecueText
text_end
-SSAnne6Text_61816:
- text_far _SSAnne6Text_61816
+.PrimeBeefSteakText:
+ text_far SSAnneKitchenCook7PrimeBeefSteakText
text_end
diff --git a/scripts/SafariZoneCenter.asm b/scripts/SafariZoneCenter.asm
index 1e7db243..4dd100eb 100644
--- a/scripts/SafariZoneCenter.asm
+++ b/scripts/SafariZoneCenter.asm
@@ -2,14 +2,15 @@ SafariZoneCenter_Script:
jp EnableAutoTextBoxDrawing
SafariZoneCenter_TextPointers:
- dw PickUpItemText
- dw SafariZoneCenterText2
- dw SafariZoneCenterText3
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_SAFARIZONECENTER_NUGGET
+ dw_const SafariZoneCenterRestHouseSignText, TEXT_SAFARIZONECENTER_REST_HOUSE_SIGN
+ dw_const SafariZoneCenterTrainerTipsSignText, TEXT_SAFARIZONECENTER_TRAINER_TIPS_SIGN
-SafariZoneCenterText2:
- text_far _SafariZoneCenterText2
+SafariZoneCenterRestHouseSignText:
+ text_far _SafariZoneCenterRestHouseSignText
text_end
-SafariZoneCenterText3:
- text_far _SafariZoneCenterText3
+SafariZoneCenterTrainerTipsSignText:
+ text_far _SafariZoneCenterTrainerTipsSignText
text_end
diff --git a/scripts/SafariZoneCenterRestHouse.asm b/scripts/SafariZoneCenterRestHouse.asm
index a03823cc..3bba2ca6 100644
--- a/scripts/SafariZoneCenterRestHouse.asm
+++ b/scripts/SafariZoneCenterRestHouse.asm
@@ -2,13 +2,14 @@ SafariZoneCenterRestHouse_Script:
jp EnableAutoTextBoxDrawing
SafariZoneCenterRestHouse_TextPointers:
- dw SafariZoneRestHouse1Text1
- dw SafariZoneRestHouse1Text2
+ def_text_pointers
+ dw_const SafariZoneCenterRestHouseGirlText, TEXT_SAFARIZONECENTERRESTHOUSE_GIRL
+ dw_const SafariZoneCenterRestHouseScientistText, TEXT_SAFARIZONECENTERRESTHOUSE_SCIENTIST
-SafariZoneRestHouse1Text1:
- text_far _SafariZoneRestHouse1Text1
+SafariZoneCenterRestHouseGirlText:
+ text_far _SafariZoneCenterRestHouseGirlText
text_end
-SafariZoneRestHouse1Text2:
- text_far _SafariZoneRestHouse1Text2
+SafariZoneCenterRestHouseScientistText:
+ text_far _SafariZoneCenterRestHouseScientistText
text_end
diff --git a/scripts/SafariZoneEast.asm b/scripts/SafariZoneEast.asm
index 062eeab1..6cb045d3 100644
--- a/scripts/SafariZoneEast.asm
+++ b/scripts/SafariZoneEast.asm
@@ -2,22 +2,23 @@ SafariZoneEast_Script:
jp EnableAutoTextBoxDrawing
SafariZoneEast_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw SafariZoneEastText5
- dw SafariZoneEastText6
- dw SafariZoneEastText7
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_SAFARIZONEEAST_FULL_RESTORE
+ dw_const PickUpItemText, TEXT_SAFARIZONEEAST_MAX_RESTORE
+ dw_const PickUpItemText, TEXT_SAFARIZONEEAST_CARBOS
+ dw_const PickUpItemText, TEXT_SAFARIZONEEAST_TM_EGG_BOMB
+ dw_const SafariZoneEastRestHouseSignText, TEXT_SAFARIZONEEAST_REST_HOUSE_SIGN
+ dw_const SafariZoneEastTrainerTipsText, TEXT_SAFARIZONEEAST_TRAINER_TIPS
+ dw_const SafariZoneEastSignText, TEXT_SAFARIZONEEAST_SIGN
-SafariZoneEastText5:
- text_far _SafariZoneEastText5
+SafariZoneEastRestHouseSignText:
+ text_far _SafariZoneEastRestHouseSignText
text_end
-SafariZoneEastText6:
- text_far _SafariZoneEastText6
+SafariZoneEastTrainerTipsText:
+ text_far _SafariZoneEastTrainerTipsText
text_end
-SafariZoneEastText7:
- text_far _SafariZoneEastText7
+SafariZoneEastSignText:
+ text_far _SafariZoneEastSignText
text_end
diff --git a/scripts/SafariZoneEastRestHouse.asm b/scripts/SafariZoneEastRestHouse.asm
index 03655d69..7d8e726d 100644
--- a/scripts/SafariZoneEastRestHouse.asm
+++ b/scripts/SafariZoneEastRestHouse.asm
@@ -3,18 +3,19 @@ SafariZoneEastRestHouse_Script:
ret
SafariZoneEastRestHouse_TextPointers:
- dw SafariZoneRestHouse3Text1
- dw SafariZoneRestHouse3Text2
- dw SafariZoneRestHouse3Text3
+ def_text_pointers
+ dw_const SafariZoneEastRestHouseScientistText, TEXT_SAFARIZONEEASTRESTHOUSE_SCIENTIST
+ dw_const SafariZoneEastRestHouseRockerText, TEXT_SAFARIZONEEASTRESTHOUSE_ROCKER
+ dw_const SafariZoneEastRestHouseSilphWorkerMText, TEXT_SAFARIZONEEASTRESTHOUSE_SILPH_WORKER_M
-SafariZoneRestHouse3Text1:
- text_far _SafariZoneRestHouse3Text1
+SafariZoneEastRestHouseScientistText:
+ text_far _SafariZoneEastRestHouseScientistText
text_end
-SafariZoneRestHouse3Text2:
- text_far _SafariZoneRestHouse3Text2
+SafariZoneEastRestHouseRockerText:
+ text_far _SafariZoneEastRestHouseRockerText
text_end
-SafariZoneRestHouse3Text3:
- text_far _SafariZoneRestHouse3Text3
+SafariZoneEastRestHouseSilphWorkerMText:
+ text_far _SafariZoneEastRestHouseSilphWorkerMText
text_end
diff --git a/scripts/SafariZoneGate.asm b/scripts/SafariZoneGate.asm
index 9e4cc5dd..f6ca2277 100644
--- a/scripts/SafariZoneGate.asm
+++ b/scripts/SafariZoneGate.asm
@@ -6,22 +6,24 @@ SafariZoneGate_Script:
ret
SafariZoneGate_ScriptPointers:
- dw .SafariZoneEntranceScript0
- dw .SafariZoneEntranceScript1
- dw .SafariZoneEntranceScript2
- dw .SafariZoneEntranceScript3
- dw .SafariZoneEntranceScript4
- dw .SafariZoneEntranceScript5
- dw .SafariZoneEntranceScript6
+ def_script_pointers
+ dw_const SafariZoneGateDefaultScript, SCRIPT_SAFARIZONEGATE_DEFAULT
+ dw_const SafariZoneGatePlayerMovingRightScript, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING_RIGHT
+ dw_const SafariZoneGateWouldYouLikeToJoinScript, SCRIPT_SAFARIZONEGATE_WOULD_YOU_LIKE_TO_JOIN
+ dw_const SafariZoneGatePlayerMovingUpScript, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING
+ dw_const SafariZoneGatePlayerMovingDownScript, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING_DOWN
+ dw_const SafariZoneGateLeavingSafariScript, SCRIPT_SAFARIZONEGATE_LEAVING_SAFARI
+ dw_const SafariZoneGateSetScriptAfterMoveScript, SCRIPT_SAFARIZONEGATE_SET_SCRIPT_AFTER_MOVE
+ EXPORT SCRIPT_SAFARIZONEGATE_LEAVING_SAFARI ; used by engine/events/hidden_objects/safari_game.asm
-.SafariZoneEntranceScript0
- ld hl, .CoordsData_75221
+SafariZoneGateDefaultScript:
+ ld hl, .PlayerNextToSafariZoneWorker1CoordsArray
call ArePlayerCoordsInArray
ret nc
- ld a, $3
+ ld a, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
xor a
ldh [hJoyHeld], a
@@ -29,59 +31,59 @@ SafariZoneGate_ScriptPointers:
ld [wSpritePlayerStateData1FacingDirection], a
ld a, [wCoordIndex]
cp $1
- jr z, .asm_7520f
- ld a, $2
+ jr z, .player_not_next_to_worker
+ ld a, SCRIPT_SAFARIZONEGATE_WOULD_YOU_LIKE_TO_JOIN
ld [wSafariZoneGateCurScript], a
ret
-.asm_7520f
+.player_not_next_to_worker
ld a, D_RIGHT
ld c, $1
call SafariZoneEntranceAutoWalk
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $1
+ ld a, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING_RIGHT
ld [wSafariZoneGateCurScript], a
ret
-.CoordsData_75221:
+.PlayerNextToSafariZoneWorker1CoordsArray:
dbmapcoord 3, 2
dbmapcoord 4, 2
db -1 ; end
-.SafariZoneEntranceScript1
- call SafariZoneEntranceScript_752b4
+SafariZoneGatePlayerMovingRightScript:
+ call SafariZoneGateReturnSimulatedJoypadStateScript
ret nz
-.SafariZoneEntranceScript2
+SafariZoneGateWouldYouLikeToJoinScript:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
call UpdateSprites
- ld a, $4
+ ld a, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_WOULD_YOU_LIKE_TO_JOIN
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ret
-.SafariZoneEntranceScript3
- call SafariZoneEntranceScript_752b4
+SafariZoneGatePlayerMovingUpScript:
+ call SafariZoneGateReturnSimulatedJoypadStateScript
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $5
+ ld a, SCRIPT_SAFARIZONEGATE_LEAVING_SAFARI
ld [wSafariZoneGateCurScript], a
ret
-.SafariZoneEntranceScript5
+SafariZoneGateLeavingSafariScript:
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
CheckAndResetEvent EVENT_SAFARI_GAME_OVER
- jr z, .asm_7527f
+ jr z, .leaving_early
ResetEventReuseHL EVENT_IN_SAFARI_ZONE
call UpdateSprites
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $6
+ ld a, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_GOOD_HAUL_COME_AGAIN
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -91,27 +93,27 @@ SafariZoneGate_ScriptPointers:
ld a, D_DOWN
ld c, $3
call SafariZoneEntranceAutoWalk
- ld a, $4
+ ld a, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING_DOWN
ld [wSafariZoneGateCurScript], a
- jr .asm_75286
-.asm_7527f
- ld a, $5
+ jr .return
+.leaving_early
+ ld a, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_LEAVING_EARLY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-.asm_75286
+.return
ret
-.SafariZoneEntranceScript4
- call SafariZoneEntranceScript_752b4
+SafariZoneGatePlayerMovingDownScript:
+ call SafariZoneGateReturnSimulatedJoypadStateScript
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_SAFARIZONEGATE_DEFAULT
ld [wSafariZoneGateCurScript], a
ret
-.SafariZoneEntranceScript6
- call SafariZoneEntranceScript_752b4
+SafariZoneGateSetScriptAfterMoveScript:
+ call SafariZoneGateReturnSimulatedJoypadStateScript
ret nz
call Delay3
ld a, [wcf0d]
@@ -128,36 +130,37 @@ SafariZoneEntranceAutoWalk:
call FillMemory
jp StartSimulatingJoypadStates
-SafariZoneEntranceScript_752b4:
+SafariZoneGateReturnSimulatedJoypadStateScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret
SafariZoneGate_TextPointers:
- dw .SafariZoneEntranceText1
- dw .SafariZoneEntranceText2
- dw .SafariZoneEntranceText1
- dw .SafariZoneEntranceText4
- dw .SafariZoneEntranceText5
- dw .SafariZoneEntranceText6
+ def_text_pointers
+ dw_const SafariZoneGateSafariZoneWorker1Text, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1
+ dw_const SafariZoneGateSafariZoneWorker2Text, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER2
+ dw_const SafariZoneGateSafariZoneWorker1Text, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_1
+ dw_const SafariZoneGateSafariZoneWorker1WouldYouLikeToJoinText, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_WOULD_YOU_LIKE_TO_JOIN
+ dw_const SafariZoneGateSafariZoneWorker1LeavingEarlyText, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_LEAVING_EARLY
+ dw_const SafariZoneGateSafariZoneWorker1GoodHaulComeAgainText, TEXT_SAFARIZONEGATE_SAFARI_ZONE_WORKER1_GOOD_HAUL_COME_AGAIN
-.SafariZoneEntranceText1
- text_far _SafariZoneEntranceText1
+SafariZoneGateSafariZoneWorker1Text:
+ text_far _SafariZoneGateSafariZoneWorker1Text
text_end
-.SafariZoneEntranceText4
+SafariZoneGateSafariZoneWorker1WouldYouLikeToJoinText:
text_asm
- callfar Func_f1f77
+ callfar SafariZoneGatePrintSafariZoneWorker1WouldYouLikeToJoinText
jp TextScriptEnd
-.SafariZoneEntranceText5
- text_far SafariZoneEntranceText_9e814
+SafariZoneGateSafariZoneWorker1LeavingEarlyText:
+ text_far _SafariZoneGateSafariZoneWorker1LeavingEarlyText
text_asm
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_7539c
- ld hl, .SafariZoneEntranceText_753bb
+ jr nz, .not_ready_to_leave
+ ld hl, .ReturnSafariBallsText
call PrintText
xor a
ld [wSpritePlayerStateData1FacingDirection], a
@@ -167,35 +170,35 @@ SafariZoneGate_TextPointers:
ResetEvents EVENT_SAFARI_GAME_OVER, EVENT_IN_SAFARI_ZONE
ld a, $0
ld [wcf0d], a
- jr .asm_753b3
-.asm_7539c
- ld hl, .SafariZoneEntranceText_753c0
+ jr .set_current_script
+.not_ready_to_leave
+ ld hl, .GoodLuckText
call PrintText
ld a, SPRITE_FACING_UP
ld [wSpritePlayerStateData1FacingDirection], a
ld a, D_UP
ld c, $1
call SafariZoneEntranceAutoWalk
- ld a, $5
+ ld a, SCRIPT_SAFARIZONEGATE_LEAVING_SAFARI
ld [wcf0d], a
-.asm_753b3
- ld a, $6
+.set_current_script
+ ld a, SCRIPT_SAFARIZONEGATE_SET_SCRIPT_AFTER_MOVE
ld [wSafariZoneGateCurScript], a
jp TextScriptEnd
-.SafariZoneEntranceText_753bb
- text_far _SafariZoneEntranceText_753bb
+.ReturnSafariBallsText
+ text_far _SafariZoneGateSafariZoneWorker1ReturnSafariBallsText
text_end
-.SafariZoneEntranceText_753c0
- text_far _SafariZoneEntranceText_753c0
+.GoodLuckText
+ text_far _SafariZoneGateSafariZoneWorker1GoodLuckText
text_end
-.SafariZoneEntranceText6
- text_far _SafariZoneEntranceText_753c5
+SafariZoneGateSafariZoneWorker1GoodHaulComeAgainText:
+ text_far _SafariZoneGateSafariZoneWorker1GoodHaulComeAgainText
text_end
-.SafariZoneEntranceText2
+SafariZoneGateSafariZoneWorker2Text:
text_asm
- callfar Func_f203e
+ callfar SafariZoneGatePrintSafariZoneWorker2Text
jp TextScriptEnd
diff --git a/scripts/SafariZoneGate2.asm b/scripts/SafariZoneGate_2.asm
index 6187b2c6..d760ed83 100644
--- a/scripts/SafariZoneGate2.asm
+++ b/scripts/SafariZoneGate_2.asm
@@ -1,4 +1,4 @@
-Func_f1f77::
+SafariZoneGatePrintSafariZoneWorker1WouldYouLikeToJoinText::
ld hl, .WelcomeText
call PrintText
ld a, MONEY_BOX
@@ -7,7 +7,7 @@ Func_f1f77::
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jp nz, .declined
+ jp nz, .PleaseComeAgain
ld hl, wPlayerMoney
ld a, [hli]
or [hl]
@@ -15,32 +15,32 @@ Func_f1f77::
or [hl]
jr nz, .has_positive_balance
call SafariZoneEntranceGetLowCostAdmissionText
- jr c, .deny_entry
+ jr c, .CantPayWalkDown
jr .poor_mans_discount
.has_positive_balance
xor a
ldh [hMoney], a
- ld a, $5
+ ld a, $05
ldh [hMoney + 1], a
- ld a, $0
+ ld a, $00
ldh [hMoney + 2], a
call HasEnoughMoney
- jr nc, .has_enough_money
+ jr nc, .success
ld hl, .NotEnoughMoneyText
call PrintText
call SafariZoneEntranceCalculateLowCostAdmission
- jr c, .deny_entry
+ jr c, .CantPayWalkDown
jr .poor_mans_discount
-.has_enough_money
+.success
xor a
- ld [wPriceTemp + 0], a
- ld a, $5
+ ld [wPriceTemp], a
+ ld a, $05
ld [wPriceTemp + 1], a
- ld a, $0
+ ld a, $00
ld [wPriceTemp + 2], a
- ld hl, wTrainerInfoTextBoxNextRowOffset
+ ld hl, wPriceTemp + 2
ld de, wPlayerMoney + 2
ld c, 3
predef SubBCDPredef
@@ -62,73 +62,74 @@ Func_f1f77::
ld [wSafariSteps + 1], a
ld a, D_UP
ld c, 3
- call SafariZoneEntranceStartSimulatingJoypadStates
+ call SafariZoneEntranceAutoWalk2
SetEvent EVENT_IN_SAFARI_ZONE
ResetEventReuseHL EVENT_SAFARI_GAME_OVER
- ld a, $3
+ ld a, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING
ld [wSafariZoneGateCurScript], a
- jr .asm_f2024
-.declined:
+ jr .done
+
+.PleaseComeAgain
ld hl, .PleaseComeAgainText
call PrintText
-.deny_entry
+.CantPayWalkDown
ld a, D_DOWN
ld c, 1
- call SafariZoneEntranceStartSimulatingJoypadStates
- ld a, $4
+ call SafariZoneEntranceAutoWalk2
+ ld a, SCRIPT_SAFARIZONEGATE_PLAYER_MOVING_DOWN
ld [wSafariZoneGateCurScript], a
-.asm_f2024
+.done
ret
.WelcomeText
- text_far SafariZoneEntranceText_9e6e4
+ text_far _SafariZoneGateSafariZoneWorker1WouldYouLikeToJoinText
text_end
.MakePaymentText
- text_far SafariZoneEntranceText_9e747
+ text_far _SafariZoneGateSafariZoneWorker1ThatllBe500PleaseText
sound_get_item_1
- text_far _SafariZoneEntranceText_75360
+ text_far _SafariZoneGateSafariZoneWorker1CallYouOnThePAText
text_end
.PleaseComeAgainText
- text_far _SafariZoneEntranceText_75365
+ text_far _SafariZoneGateSafariZoneWorker1PleaseComeAgainText
text_end
.NotEnoughMoneyText
- text_far _SafariZoneEntranceText_7536a
+ text_far _SafariZoneGateSafariZoneWorker1NotEnoughMoneyText
text_end
-Func_f203e::
- ld hl, .FirstTimeQuestionText
+SafariZoneGatePrintSafariZoneWorker2Text::
+ ld hl, .FirstTimeHereText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- ld hl, .RegularText
- jr nz, .Explanation
- ld hl, .ExplanationText
-.Explanation
+ ld hl, .YoureARegularHereText
+ jr nz, .print_text
+ ld hl, .SafariZoneExplanationText
+.print_text
call PrintText
ret
-.FirstTimeQuestionText
- text_far _SafariZoneEntranceText_753e6
+.FirstTimeHereText
+ text_far _SafariZoneGateSafariZoneWorker2FirstTimeHereText
text_end
-.ExplanationText
- text_far _SafariZoneEntranceText_753eb
+.SafariZoneExplanationText
+ text_far _SafariZoneGateSafariZoneWorker2SafariZoneExplanationText
text_end
-.RegularText
- text_far _SafariZoneEntranceText_753f0
+.YoureARegularHereText
+ text_far _SafariZoneGateSafariZoneWorker2YoureARegularHereText
text_end
-SafariZoneEntranceStartSimulatingJoypadStates:
+SafariZoneEntranceAutoWalk2:
push af
- ld b, $0
+ ld b, 0
ld a, c
ld [wSimulatedJoypadStatesIndex], a
- ld hl, wParentMenuItem
+ ld hl, wSimulatedJoypadStatesEnd
pop af
call FillMemory
jp StartSimulatingJoypadStates
diff --git a/scripts/SafariZoneNorth.asm b/scripts/SafariZoneNorth.asm
index aaf39ea2..7cdec6cb 100644
--- a/scripts/SafariZoneNorth.asm
+++ b/scripts/SafariZoneNorth.asm
@@ -2,30 +2,31 @@ SafariZoneNorth_Script:
jp EnableAutoTextBoxDrawing
SafariZoneNorth_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw SafariZoneNorthText3
- dw SafariZoneNorthText4
- dw SafariZoneNorthText5
- dw SafariZoneNorthText6
- dw SafariZoneNorthText7
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_SAFARIZONENORTH_PROTEIN
+ dw_const PickUpItemText, TEXT_SAFARIZONENORTH_TM_SKULL_BASH
+ dw_const SafariZoneNorthRestHouseSignText, TEXT_SAFARIZONENORTH_REST_HOUSE_SIGN
+ dw_const SafariZoneNorthTrainerTips1Text, TEXT_SAFARIZONENORTH_TRAINER_TIPS_1
+ dw_const SafariZoneNorthSignText, TEXT_SAFARIZONENORTH_SIGN
+ dw_const SafariZoneNorthTrainerTips2Text, TEXT_SAFARIZONENORTH_TRAINER_TIPS_2
+ dw_const SafariZoneNorthTrainerTips3Text, TEXT_SAFARIZONENORTH_TRAINER_TIPS_3
-SafariZoneNorthText3:
- text_far _SafariZoneNorthText3
+SafariZoneNorthRestHouseSignText:
+ text_far _SafariZoneNorthRestHouseSignText
text_end
-SafariZoneNorthText4:
- text_far _SafariZoneNorthText4
+SafariZoneNorthTrainerTips1Text:
+ text_far _SafariZoneNorthTrainerTips1Text
text_end
-SafariZoneNorthText5:
- text_far _SafariZoneNorthText5
+SafariZoneNorthSignText:
+ text_far _SafariZoneNorthSignText
text_end
-SafariZoneNorthText6:
- text_far _SafariZoneNorthText6
+SafariZoneNorthTrainerTips2Text:
+ text_far _SafariZoneNorthTrainerTips2Text
text_end
-SafariZoneNorthText7:
- text_far _SafariZoneNorthText7
+SafariZoneNorthTrainerTips3Text:
+ text_far _SafariZoneNorthTrainerTips3Text
text_end
diff --git a/scripts/SafariZoneNorthRestHouse.asm b/scripts/SafariZoneNorthRestHouse.asm
index b7a690a1..372e59c6 100644
--- a/scripts/SafariZoneNorthRestHouse.asm
+++ b/scripts/SafariZoneNorthRestHouse.asm
@@ -3,18 +3,19 @@ SafariZoneNorthRestHouse_Script:
ret
SafariZoneNorthRestHouse_TextPointers:
- dw SafariZoneRestHouse4Text1
- dw SafariZoneRestHouse4Text2
- dw SafariZoneRestHouse4Text3
+ def_text_pointers
+ dw_const SafariZoneNorthRestHouseScientistText, TEXT_SAFARIZONENORTHRESTHOUSE_SCIENTIST
+ dw_const SafariZoneNorthRestHouseSafariZoneWorkerText, TEXT_SAFARIZONENORTHRESTHOUSE_SAFARI_ZONE_WORKER
+ dw_const SafariZoneNorthRestHouseGentlemanText, TEXT_SAFARIZONENORTHRESTHOUSE_GENTLEMAN
-SafariZoneRestHouse4Text1:
- text_far _SafariZoneRestHouse4Text1
+SafariZoneNorthRestHouseScientistText:
+ text_far _SafariZoneNorthRestHouseScientistText
text_end
-SafariZoneRestHouse4Text2:
- text_far _SafariZoneRestHouse4Text2
+SafariZoneNorthRestHouseSafariZoneWorkerText:
+ text_far _SafariZoneNorthRestHouseSafariZoneWorkerText
text_end
-SafariZoneRestHouse4Text3:
- text_far _SafariZoneRestHouse4Text3
+SafariZoneNorthRestHouseGentlemanText:
+ text_far _SafariZoneNorthRestHouseGentlemanText
text_end
diff --git a/scripts/SafariZoneSecretHouse.asm b/scripts/SafariZoneSecretHouse.asm
index 6eeff8ad..f8058641 100644
--- a/scripts/SafariZoneSecretHouse.asm
+++ b/scripts/SafariZoneSecretHouse.asm
@@ -2,44 +2,45 @@ SafariZoneSecretHouse_Script:
jp EnableAutoTextBoxDrawing
SafariZoneSecretHouse_TextPointers:
- dw SafariZoneSecretHouseText1
+ def_text_pointers
+ dw_const SafariZoneSecretHouseFishingGuruText, TEXT_SAFARIZONESECRETHOUSE_FISHING_GURU
-SafariZoneSecretHouseText1:
+SafariZoneSecretHouseFishingGuruText:
text_asm
CheckEvent EVENT_GOT_HM03
jr nz, .got_item
- ld hl, SafariZoneSecretHouseText_4a350
+ ld hl, .YouHaveWonText
call PrintText
lb bc, HM_SURF, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedHM03Text
+ ld hl, .ReceivedHM03Text
call PrintText
SetEvent EVENT_GOT_HM03
jr .done
.bag_full
- ld hl, HM03NoRoomText
+ ld hl, .HM03NoRoomText
call PrintText
jr .done
.got_item
- ld hl, HM03ExplanationText
+ ld hl, .HM03ExplanationText
call PrintText
.done
jp TextScriptEnd
-SafariZoneSecretHouseText_4a350:
- text_far _SecretHouseText_4a350
+.YouHaveWonText:
+ text_far _SafariZoneSecretHouseFishingGuruYouHaveWonText
text_end
-ReceivedHM03Text:
- text_far _ReceivedHM03Text
+.ReceivedHM03Text:
+ text_far _SafariZoneSecretHouseFishingGuruReceivedHM03Text
sound_get_item_1
text_end
-HM03ExplanationText:
- text_far _HM03ExplanationText
+.HM03ExplanationText:
+ text_far _SafariZoneSecretHouseFishingGuruHM03ExplanationText
text_end
-HM03NoRoomText:
- text_far _HM03NoRoomText
+.HM03NoRoomText:
+ text_far _SafariZoneSecretHouseFishingGuruHM03NoRoomText
text_end
diff --git a/scripts/SafariZoneWest.asm b/scripts/SafariZoneWest.asm
index 7ae0807d..76021e33 100644
--- a/scripts/SafariZoneWest.asm
+++ b/scripts/SafariZoneWest.asm
@@ -2,27 +2,28 @@ SafariZoneWest_Script:
jp EnableAutoTextBoxDrawing
SafariZoneWest_TextPointers:
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw SafariZoneWestText5
- dw SafariZoneWestText6
- dw SafariZoneWestText7
- dw SafariZoneWestText8
+ def_text_pointers
+ dw_const PickUpItemText, TEXT_SAFARIZONEWEST_MAX_POTION
+ dw_const PickUpItemText, TEXT_SAFARIZONEWEST_TM_DOUBLE_TEAM
+ dw_const PickUpItemText, TEXT_SAFARIZONEWEST_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_SAFARIZONEWEST_GOLD_TEETH
+ dw_const SafariZoneWestRestHouseSignText, TEXT_SAFARIZONEWEST_REST_HOUSE_SIGN
+ dw_const SafariZoneWestFindWardensTeethSignText, TEXT_SAFARIZONEWEST_FIND_WARDENS_TEETH_SIGN
+ dw_const SafariZoneWestTrainerTipsText, TEXT_SAFARIZONEWEST_TRAINER_TIPS
+ dw_const SafariZoneWestSignText, TEXT_SAFARIZONEWEST_SIGN
-SafariZoneWestText5:
- text_far _SafariZoneWestText5
+SafariZoneWestRestHouseSignText:
+ text_far _SafariZoneWestRestHouseSignText
text_end
-SafariZoneWestText6:
- text_far _SafariZoneWestText6
+SafariZoneWestFindWardensTeethSignText:
+ text_far _SafariZoneWestFindWardensTeethSignText
text_end
-SafariZoneWestText7:
- text_far _SafariZoneWestText7
+SafariZoneWestTrainerTipsText:
+ text_far _SafariZoneWestTrainerTipsText
text_end
-SafariZoneWestText8:
- text_far _SafariZoneWestText8
+SafariZoneWestSignText:
+ text_far _SafariZoneWestSignText
text_end
diff --git a/scripts/SafariZoneWestRestHouse.asm b/scripts/SafariZoneWestRestHouse.asm
index 74ad98fe..6f3a9c93 100644
--- a/scripts/SafariZoneWestRestHouse.asm
+++ b/scripts/SafariZoneWestRestHouse.asm
@@ -3,18 +3,19 @@ SafariZoneWestRestHouse_Script:
ret
SafariZoneWestRestHouse_TextPointers:
- dw SafariZoneRestHouse2Text1
- dw SafariZoneRestHouse2Text2
- dw SafariZoneRestHouse2Text3
+ def_text_pointers
+ dw_const SafariZoneWestRestHouseScientistText, TEXT_SAFARIZONEWESTRESTHOUSE_SCIENTIST
+ dw_const SafariZoneWestRestHouseCooltrainerMText, TEXT_SAFARIZONEWESTRESTHOUSE_COOLTRAINER_M
+ dw_const SafariZoneWestRestHouseSilphWorkerFText, TEXT_SAFARIZONEWESTRESTHOUSE_SILPH_WORKER_F
-SafariZoneRestHouse2Text1:
- text_far _SafariZoneRestHouse2Text1
+SafariZoneWestRestHouseScientistText:
+ text_far _SafariZoneWestRestHouseScientistText
text_end
-SafariZoneRestHouse2Text2:
- text_far _SafariZoneRestHouse2Text2
+SafariZoneWestRestHouseCooltrainerMText:
+ text_far _SafariZoneWestRestHouseCooltrainerMText
text_end
-SafariZoneRestHouse2Text3:
- text_far _SafariZoneRestHouse2Text3
+SafariZoneWestRestHouseSilphWorkerFText:
+ text_far _SafariZoneWestRestHouseSilphWorkerFText
text_end
diff --git a/scripts/SaffronCity.asm b/scripts/SaffronCity.asm
index 84982534..b1ab8781 100644
--- a/scripts/SaffronCity.asm
+++ b/scripts/SaffronCity.asm
@@ -2,121 +2,122 @@ SaffronCity_Script:
jp EnableAutoTextBoxDrawing
SaffronCity_TextPointers:
- dw SaffronCityText1
- dw SaffronCityText2
- dw SaffronCityText3
- dw SaffronCityText4
- dw SaffronCityText5
- dw SaffronCityText6
- dw SaffronCityText7
- dw SaffronCityText8
- dw SaffronCityText9
- dw SaffronCityText10
- dw SaffronCityText11
- dw SaffronCityText12
- dw SaffronCityText13
- dw SaffronCityText14
- dw SaffronCityText15
- dw SaffronCityText16
- dw SaffronCityText17
- dw SaffronCityText18
- dw MartSignText
- dw SaffronCityText20
- dw SaffronCityText21
- dw SaffronCityText22
- dw PokeCenterSignText
- dw SaffronCityText24
- dw SaffronCityText25
+ def_text_pointers
+ dw_const SaffronCityRocket1Text, TEXT_SAFFRONCITY_ROCKET1
+ dw_const SaffronCityRocket2Text, TEXT_SAFFRONCITY_ROCKET2
+ dw_const SaffronCityRocket3Text, TEXT_SAFFRONCITY_ROCKET3
+ dw_const SaffronCityRocket4Text, TEXT_SAFFRONCITY_ROCKET4
+ dw_const SaffronCityRocket5Text, TEXT_SAFFRONCITY_ROCKET5
+ dw_const SaffronCityRocket6Text, TEXT_SAFFRONCITY_ROCKET6
+ dw_const SaffronCityRocket7Text, TEXT_SAFFRONCITY_ROCKET7
+ dw_const SaffronCityScientistText, TEXT_SAFFRONCITY_SCIENTIST
+ dw_const SaffronCitySilphWorkerMText, TEXT_SAFFRONCITY_SILPH_WORKER_M
+ dw_const SaffronCitySilphWorkerFText, TEXT_SAFFRONCITY_SILPH_WORKER_F
+ dw_const SaffronCityGentlemanText, TEXT_SAFFRONCITY_GENTLEMAN
+ dw_const SaffronCityPidgeotText, TEXT_SAFFRONCITY_PIDGEOT
+ dw_const SaffronCityRockerText, TEXT_SAFFRONCITY_ROCKER
+ dw_const SaffronCityRocket8Text, TEXT_SAFFRONCITY_ROCKET8
+ dw_const SaffronCityRocket9Text, TEXT_SAFFRONCITY_ROCKET9
+ dw_const SaffronCitySignText, TEXT_SAFFRONCITY_SIGN
+ dw_const SaffronCityFightingDojoSignText, TEXT_SAFFRONCITY_FIGHTING_DOJO_SIGN
+ dw_const SaffronCityGymSignText, TEXT_SAFFRONCITY_GYM_SIGN
+ dw_const MartSignText, TEXT_SAFFRONCITY_MART_SIGN
+ dw_const SaffronCityTrainerTips1Text, TEXT_SAFFRONCITY_TRAINER_TIPS1
+ dw_const SaffronCityTrainerTips2Text, TEXT_SAFFRONCITY_TRAINER_TIPS2
+ dw_const SaffronCitySilphCoSignText, TEXT_SAFFRONCITY_SILPH_CO_SIGN
+ dw_const PokeCenterSignText, TEXT_SAFFRONCITY_POKECENTER_SIGN
+ dw_const SaffronCityMrPsychicsHouseSignText, TEXT_SAFFRONCITY_MR_PSYCHICS_HOUSE_SIGN
+ dw_const SaffronCitySilphCoLatestProductSignText, TEXT_SAFFRONCITY_SILPH_CO_LATEST_PRODUCT_SIGN
-SaffronCityText1:
- text_far _SaffronCityText1
+SaffronCityRocket1Text:
+ text_far _SaffronCityRocket1Text
text_end
-SaffronCityText2:
- text_far _SaffronCityText2
+SaffronCityRocket2Text:
+ text_far _SaffronCityRocket2Text
text_end
-SaffronCityText3:
- text_far _SaffronCityText3
+SaffronCityRocket3Text:
+ text_far _SaffronCityRocket3Text
text_end
-SaffronCityText4:
- text_far _SaffronCityText4
+SaffronCityRocket4Text:
+ text_far _SaffronCityRocket4Text
text_end
-SaffronCityText5:
- text_far _SaffronCityText5
+SaffronCityRocket5Text:
+ text_far _SaffronCityRocket5Text
text_end
-SaffronCityText6:
- text_far _SaffronCityText6
+SaffronCityRocket6Text:
+ text_far _SaffronCityRocket6Text
text_end
-SaffronCityText7:
- text_far _SaffronCityText7
+SaffronCityRocket7Text:
+ text_far _SaffronCityRocket7Text
text_end
-SaffronCityText8:
- text_far _SaffronCityText8
+SaffronCityScientistText:
+ text_far _SaffronCityScientistText
text_end
-SaffronCityText9:
- text_far _SaffronCityText9
+SaffronCitySilphWorkerMText:
+ text_far _SaffronCitySilphWorkerMText
text_end
-SaffronCityText10:
- text_far _SaffronCityText10
+SaffronCitySilphWorkerFText:
+ text_far _SaffronCitySilphWorkerFText
text_end
-SaffronCityText11:
- text_far _SaffronCityText11
+SaffronCityGentlemanText:
+ text_far _SaffronCityGentlemanText
text_end
-SaffronCityText12:
- text_far _SaffronCityText12
+SaffronCityPidgeotText:
+ text_far _SaffronCityPidgeotText
sound_cry_pidgeot
text_end
-SaffronCityText13:
- text_far _SaffronCityText13
+SaffronCityRockerText:
+ text_far _SaffronCityRockerText
text_end
-SaffronCityText14:
- text_far _SaffronCityText14
+SaffronCityRocket8Text:
+ text_far _SaffronCityRocket8Text
text_end
-SaffronCityText15:
- text_far _SaffronCityText15
+SaffronCityRocket9Text:
+ text_far _SaffronCityRocket9Text
text_end
-SaffronCityText16:
- text_far _SaffronCityText16
+SaffronCitySignText:
+ text_far _SaffronCitySignText
text_end
-SaffronCityText17:
- text_far _SaffronCityText17
+SaffronCityFightingDojoSignText:
+ text_far _SaffronCityFightingDojoSignText
text_end
-SaffronCityText18:
- text_far _SaffronCityText18
+SaffronCityGymSignText:
+ text_far _SaffronCityGymSignText
text_end
-SaffronCityText20:
- text_far _SaffronCityText20
+SaffronCityTrainerTips1Text:
+ text_far _SaffronCityTrainerTips1Text
text_end
-SaffronCityText21:
- text_far _SaffronCityText21
+SaffronCityTrainerTips2Text:
+ text_far _SaffronCityTrainerTips2Text
text_end
-SaffronCityText22:
- text_far _SaffronCityText22
+SaffronCitySilphCoSignText:
+ text_far _SaffronCitySilphCoSignText
text_end
-SaffronCityText24:
- text_far _SaffronCityText24
+SaffronCityMrPsychicsHouseSignText:
+ text_far _SaffronCityMrPsychicsHouseSignText
text_end
-SaffronCityText25:
- text_far _SaffronCityText25
+SaffronCitySilphCoLatestProductSignText:
+ text_far _SaffronCitySilphCoLatestProductSignText
text_end
diff --git a/scripts/SaffronGym.asm b/scripts/SaffronGym.asm
index 23b2dd85..96e453df 100644
--- a/scripts/SaffronGym.asm
+++ b/scripts/SaffronGym.asm
@@ -23,40 +23,41 @@ SaffronGym_Script:
db "SABRINA@"
SaffronGymResetScripts:
- xor a
+ xor a ; SCRIPT_SAFFRONGYM_DEFAULT
ld [wJoyIgnore], a
ld [wSaffronGymCurScript], a
ld [wCurMapScript], a
ret
SaffronGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw SaffronGymSabrinaPostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SAFFRONGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SAFFRONGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SAFFRONGYM_END_BATTLE
+ dw_const SaffronGymSabrinaPostBattle, SCRIPT_SAFFRONGYM_SABRINA_POST_BATTLE
SaffronGymSabrinaPostBattle:
ld a, [wIsInBattle]
cp $ff
jp z, SaffronGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-SaffronGymReceiveTM46:
- ld a, $a
+SaffronGymSabrinaReceiveTM46Script:
+ ld a, TEXT_SAFFRONGYM_SABRINA_MARSH_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_SABRINA
lb bc, TM_PSYWAVE, 1
call GiveItem
jr nc, .BagFull
- ld a, $b
+ ld a, TEXT_SAFFRONGYM_SABRINA_RECEIVED_TM46
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM46
jr .gymVictory
.BagFull
- ld a, $c
+ ld a, TEXT_SAFFRONGYM_SABRINA_TM46_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
.gymVictory
@@ -71,58 +72,59 @@ SaffronGymReceiveTM46:
jp SaffronGymResetScripts
SaffronGym_TextPointers:
- dw SabrinaText
- dw SaffronGymTrainerText1
- dw SaffronGymTrainerText2
- dw SaffronGymTrainerText3
- dw SaffronGymTrainerText4
- dw SaffronGymTrainerText5
- dw SaffronGymTrainerText6
- dw SaffronGymTrainerText7
- dw SaffronGymGuideText
- dw KogaMarshBadgeInfoText
- dw ReceivedTM46Text
- dw TM46NoRoomText
+ def_text_pointers
+ dw_const SaffronGymSabrinaText, TEXT_SAFFRONGYM_SABRINA
+ dw_const SaffronGymChanneler1Text, TEXT_SAFFRONGYM_CHANNELER1
+ dw_const SaffronGymYoungster1Text, TEXT_SAFFRONGYM_YOUNGSTER1
+ dw_const SaffronGymChanneler2Text, TEXT_SAFFRONGYM_CHANNELER2
+ dw_const SaffronGymYoungster2Text, TEXT_SAFFRONGYM_YOUNGSTER2
+ dw_const SaffronGymChanneler3Text, TEXT_SAFFRONGYM_CHANNELER3
+ dw_const SaffronGymYoungster3Text, TEXT_SAFFRONGYM_YOUNGSTER3
+ dw_const SaffronGymYoungster4Text, TEXT_SAFFRONGYM_YOUNGSTER4
+ dw_const SaffronGymGymGuideText, TEXT_SAFFRONGYM_GYM_GUIDE
+ dw_const SaffronGymSabrinaMarshBadgeInfoText, TEXT_SAFFRONGYM_SABRINA_MARSH_BADGE_INFO
+ dw_const SaffronGymSabrinaReceivedTM46Text, TEXT_SAFFRONGYM_SABRINA_RECEIVED_TM46
+ dw_const SaffronGymSabrinaTM46NoRoomText, TEXT_SAFFRONGYM_SABRINA_TM46_NO_ROOM
SaffronGymTrainerHeaders:
def_trainers 2
SaffronGymTrainerHeader0:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_0, 3, SaffronGymBattleText1, SaffronGymEndBattleText1, SaffronGymAfterBattleText1
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_0, 3, SaffronGymChanneler1BattleText, SaffronGymChanneler1EndBattleText, SaffronGymChanneler1AfterBattleText
SaffronGymTrainerHeader1:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_1, 3, SaffronGymBattleText2, SaffronGymEndBattleText2, SaffronGymAfterBattleText2
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_1, 3, SaffronGymYoungster1BattleText, SaffronGymYoungster1EndBattleText, SaffronGymYoungster1AfterBattleText
SaffronGymTrainerHeader2:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_2, 3, SaffronGymBattleText3, SaffronGymEndBattleText3, SaffronGymAfterBattleText3
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_2, 3, SaffronGymChanneler2BattleText, SaffronGymChanneler2EndBattleText, SaffronGymChanneler2AfterBattleText
SaffronGymTrainerHeader3:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_3, 3, SaffronGymBattleText4, SaffronGymEndBattleText4, SaffronGymAfterBattleText4
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_3, 3, SaffronGymYoungster2BattleText, SaffronGymYoungster2EndBattleText, SaffronGymYoungster2AfterBattleText
SaffronGymTrainerHeader4:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_4, 3, SaffronGymBattleText5, SaffronGymEndBattleText5, SaffronGymAfterBattleText5
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_4, 3, SaffronGymChanneler3BattleText, SaffronGymChanneler3EndBattleText, SaffronGymChanneler3AfterBattleText
SaffronGymTrainerHeader5:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_5, 3, SaffronGymBattleText6, SaffronGymEndBattleText6, SaffronGymAfterBattleText6
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_5, 3, SaffronGymYoungster3BattleText, SaffronGymYoungster3EndBattleText, SaffronGymYoungster3AfterBattleText
SaffronGymTrainerHeader6:
- trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 3, SaffronGymBattleText7, SaffronGymEndBattleText7, SaffronGymAfterBattleText7
+ trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 3, SaffronGymYoungster4BattleText, SaffronGymYoungster4EndBattleText, SaffronGymYoungster4AfterBattleText
db -1 ; end
-SabrinaText:
+SaffronGymSabrinaText:
text_asm
CheckEvent EVENT_BEAT_SABRINA
jr z, .beforeBeat
CheckEventReuseA EVENT_GOT_TM46
jr nz, .afterBeat
- call z, SaffronGymReceiveTM46
+ call z, SaffronGymSabrinaReceiveTM46Script
call DisableWaitingAfterTextDisplay
jr .done
.afterBeat
- ld hl, SabrinaPostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
jr .done
.beforeBeat
- ld hl, SabrinaPreBattleText
+ ld hl, .Text
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedMarshBadgeText
- ld de, ReceivedMarshBadgeText
+ ld hl, .ReceivedMarshBadgeText
+ ld de, .ReceivedMarshBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -130,182 +132,182 @@ SabrinaText:
call InitBattleEnemyParameters
ld a, $6
ld [wGymLeaderNo], a
- ld a, $3
+ ld a, SCRIPT_SAFFRONGYM_SABRINA_POST_BATTLE
ld [wSaffronGymCurScript], a
.done
jp TextScriptEnd
-SabrinaPreBattleText:
- text_far _SabrinaPreBattleText
+.Text:
+ text_far _SaffronGymSabrinaText
text_end
-ReceivedMarshBadgeText:
- text_far _ReceivedMarshBadgeText
+.ReceivedMarshBadgeText:
+ text_far _SaffronGymSabrinaReceivedMarshBadgeText
sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded
text_promptbutton
text_end
-SabrinaPostBattleAdviceText:
- text_far _SabrinaPostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _SaffronGymSabrinaPostBattleAdviceText
text_end
-KogaMarshBadgeInfoText:
- text_far _KogaMarshBadgeInfoText
+SaffronGymSabrinaMarshBadgeInfoText:
+ text_far _SaffronGymSabrinaMarshBadgeInfoText
text_end
-ReceivedTM46Text:
- text_far _ReceivedTM46Text
+SaffronGymSabrinaReceivedTM46Text:
+ text_far _SaffronGymSabrinaReceivedTM46Text
sound_get_item_1
text_far _TM46ExplanationText
text_end
-TM46NoRoomText:
- text_far _TM46NoRoomText
+SaffronGymSabrinaTM46NoRoomText:
+ text_far _SaffronGymSabrinaTM46NoRoomText
text_end
-SaffronGymTrainerText1:
+SaffronGymChanneler1Text:
text_asm
ld hl, SaffronGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText2:
+SaffronGymYoungster1Text:
text_asm
ld hl, SaffronGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText3:
+SaffronGymChanneler2Text:
text_asm
ld hl, SaffronGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText4:
+SaffronGymYoungster2Text:
text_asm
ld hl, SaffronGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText5:
+SaffronGymChanneler3Text:
text_asm
ld hl, SaffronGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText6:
+SaffronGymYoungster3Text:
text_asm
ld hl, SaffronGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-SaffronGymTrainerText7:
+SaffronGymYoungster4Text:
text_asm
ld hl, SaffronGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-SaffronGymGuideText:
+SaffronGymGymGuideText:
text_asm
CheckEvent EVENT_BEAT_SABRINA
jr nz, .afterBeat
- ld hl, SaffronGymGuidePreBattleText
+ ld hl, .ChampInMakingText
call PrintText
jr .done
.afterBeat
- ld hl, SaffronGymGuidePostBattleText
+ ld hl, .BeatSabrinaText
call PrintText
.done
jp TextScriptEnd
-SaffronGymGuidePreBattleText:
- text_far _SaffronGymGuidePreBattleText
+.ChampInMakingText:
+ text_far _SaffronGymGuideChampInMakingText
text_end
-SaffronGymGuidePostBattleText:
- text_far _SaffronGymGuidePostBattleText
+.BeatSabrinaText:
+ text_far _SaffronGymGuideBeatSabrinaText
text_end
-SaffronGymBattleText1:
- text_far _SaffronGymBattleText1
+SaffronGymChanneler1BattleText:
+ text_far _SaffronGymChanneler1BattleText
text_end
-SaffronGymEndBattleText1:
- text_far _SaffronGymEndBattleText1
+SaffronGymChanneler1EndBattleText:
+ text_far _SaffronGymChanneler1EndBattleText
text_end
-SaffronGymAfterBattleText1:
- text_far _SaffronGymAfterBattleText1
+SaffronGymChanneler1AfterBattleText:
+ text_far _SaffronGymChanneler1AfterBattleText
text_end
-SaffronGymBattleText2:
- text_far _SaffronGymBattleText2
+SaffronGymYoungster1BattleText:
+ text_far _SaffronGymYoungster1BattleText
text_end
-SaffronGymEndBattleText2:
- text_far _SaffronGymEndBattleText2
+SaffronGymYoungster1EndBattleText:
+ text_far _SaffronGymYoungster1EndBattleText
text_end
-SaffronGymAfterBattleText2:
- text_far _SaffronGymAfterBattleText2
+SaffronGymYoungster1AfterBattleText:
+ text_far _SaffronGymYoungster1AfterBattleText
text_end
-SaffronGymBattleText3:
- text_far _SaffronGymBattleText3
+SaffronGymChanneler2BattleText:
+ text_far _SaffronGymChanneler2BattleText
text_end
-SaffronGymEndBattleText3:
- text_far _SaffronGymEndBattleText3
+SaffronGymChanneler2EndBattleText:
+ text_far _SaffronGymChanneler2EndBattleText
text_end
-SaffronGymAfterBattleText3:
- text_far _SaffronGymAfterBattleText3
+SaffronGymChanneler2AfterBattleText:
+ text_far _SaffronGymChanneler2AfterBattleText
text_end
-SaffronGymBattleText4:
- text_far _SaffronGymBattleText4
+SaffronGymYoungster2BattleText:
+ text_far _SaffronGymYoungster2BattleText
text_end
-SaffronGymEndBattleText4:
- text_far _SaffronGymEndBattleText4
+SaffronGymYoungster2EndBattleText:
+ text_far _SaffronGymYoungster2EndBattleText
text_end
-SaffronGymAfterBattleText4:
- text_far _SaffronGymAfterBattleText4
+SaffronGymYoungster2AfterBattleText:
+ text_far _SaffronGymYoungster2AfterBattleText
text_end
-SaffronGymBattleText5:
- text_far _SaffronGymBattleText5
+SaffronGymChanneler3BattleText:
+ text_far _SaffronGymChanneler3BattleText
text_end
-SaffronGymEndBattleText5:
- text_far _SaffronGymEndBattleText5
+SaffronGymChanneler3EndBattleText:
+ text_far _SaffronGymChanneler3EndBattleText
text_end
-SaffronGymAfterBattleText5:
- text_far _SaffronGymAfterBattleText5
+SaffronGymChanneler3AfterBattleText:
+ text_far _SaffronGymChanneler3AfterBattleText
text_end
-SaffronGymBattleText6:
- text_far _SaffronGymBattleText6
+SaffronGymYoungster3BattleText:
+ text_far _SaffronGymYoungster3BattleText
text_end
-SaffronGymEndBattleText6:
- text_far _SaffronGymEndBattleText6
+SaffronGymYoungster3EndBattleText:
+ text_far _SaffronGymYoungster3EndBattleText
text_end
-SaffronGymAfterBattleText6:
- text_far _SaffronGymAfterBattleText6
+SaffronGymYoungster3AfterBattleText:
+ text_far _SaffronGymYoungster3AfterBattleText
text_end
-SaffronGymBattleText7:
- text_far _SaffronGymBattleText7
+SaffronGymYoungster4BattleText:
+ text_far _SaffronGymYoungster4BattleText
text_end
-SaffronGymEndBattleText7:
- text_far _SaffronGymEndBattleText7
+SaffronGymYoungster4EndBattleText:
+ text_far _SaffronGymYoungster4EndBattleText
text_end
-SaffronGymAfterBattleText7:
- text_far _SaffronGymAfterBattleText7
+SaffronGymYoungster4AfterBattleText:
+ text_far _SaffronGymYoungster4AfterBattleText
text_end
diff --git a/scripts/SaffronMart.asm b/scripts/SaffronMart.asm
index bfa47eb1..aaf6f4ba 100644
--- a/scripts/SaffronMart.asm
+++ b/scripts/SaffronMart.asm
@@ -2,14 +2,15 @@ SaffronMart_Script:
jp EnableAutoTextBoxDrawing
SaffronMart_TextPointers:
- dw SaffronCashierText
- dw SaffronMartText2
- dw SaffronMartText3
+ def_text_pointers
+ dw_const SaffronMartClerkText, TEXT_SAFFRONMART_CLERK
+ dw_const SaffronMartSuperNerdText, TEXT_SAFFRONMART_SUPER_NERD
+ dw_const SaffronMartCooltrainerFText, TEXT_SAFFRONMART_COOLTRAINER_F
-SaffronMartText2:
- text_far _SaffronMartText2
+SaffronMartSuperNerdText:
+ text_far _SaffronMartSuperNerdText
text_end
-SaffronMartText3:
- text_far _SaffronMartText3
+SaffronMartCooltrainerFText:
+ text_far _SaffronMartCooltrainerFText
text_end
diff --git a/scripts/SaffronPidgeyHouse.asm b/scripts/SaffronPidgeyHouse.asm
index 90078e81..83ff5ce7 100644
--- a/scripts/SaffronPidgeyHouse.asm
+++ b/scripts/SaffronPidgeyHouse.asm
@@ -2,26 +2,27 @@ SaffronPidgeyHouse_Script:
jp EnableAutoTextBoxDrawing
SaffronPidgeyHouse_TextPointers:
- dw SaffronHouse1Text1
- dw SaffronHouse1Text2
- dw SaffronHouse1Text3
- dw SaffronHouse1Text4
+ def_text_pointers
+ dw_const SaffronPidgeyHouseBrunetteGirlText, TEXT_SAFFRONPIDGEYHOUSE_BRUNETTE_GIRL
+ dw_const SaffronPidgeyHousePidgeyText, TEXT_SAFFRONPIDGEYHOUSE_PIDGEY
+ dw_const SaffronPidgeyHouseYoungsterText, TEXT_SAFFRONPIDGEYHOUSE_YOUNGSTER
+ dw_const SaffronPidgeyHousePaperText, TEXT_SAFFRONPIDGEYHOUSE_PAPER
-SaffronHouse1Text1:
- text_far _SaffronHouse1Text1
+SaffronPidgeyHouseBrunetteGirlText:
+ text_far _SaffronPidgeyHouseBrunetteGirlText
text_end
-SaffronHouse1Text2:
- text_far _SaffronHouse1Text2
+SaffronPidgeyHousePidgeyText:
+ text_far _SaffronPidgeyHousePidgeyText
text_asm
ld a, PIDGEY
call PlayCry
jp TextScriptEnd
-SaffronHouse1Text3:
- text_far _SaffronHouse1Text3
+SaffronPidgeyHouseYoungsterText:
+ text_far _SaffronPidgeyHouseYoungsterText
text_end
-SaffronHouse1Text4:
- text_far _SaffronHouse1Text4
+SaffronPidgeyHousePaperText:
+ text_far _SaffronPidgeyHousePaperText
text_end
diff --git a/scripts/SaffronPokecenter.asm b/scripts/SaffronPokecenter.asm
index f4d9f192..6b116aee 100644
--- a/scripts/SaffronPokecenter.asm
+++ b/scripts/SaffronPokecenter.asm
@@ -3,27 +3,28 @@ SaffronPokecenter_Script:
jp EnableAutoTextBoxDrawing
SaffronPokecenter_TextPointers:
- dw SaffronHealNurseText
- dw SaffronPokecenterText2
- dw SaffronPokecenterText3
- dw SaffronTradeNurseText
- dw SaffronPokecenterText5
+ def_text_pointers
+ dw_const SaffronPokecenterNurseText, TEXT_SAFFRONPOKECENTER_NURSE
+ dw_const SaffronPokecenterBeautyText, TEXT_SAFFRONPOKECENTER_BEAUTY
+ dw_const SaffronPokecenterGentlemanText, TEXT_SAFFRONPOKECENTER_GENTLEMAN
+ dw_const SaffronPokecenterLinkReceptionistText, TEXT_SAFFRONPOKECENTER_LINK_RECEPTIONIST
+ dw_const SaffronPokecenterChanseyText, TEXT_SAFFRONPOKECENTER_CHANSEY
-SaffronHealNurseText:
+SaffronPokecenterNurseText:
script_pokecenter_nurse
-SaffronPokecenterText2:
- text_far _SaffronPokecenterText2
+SaffronPokecenterBeautyText:
+ text_far _SaffronPokecenterBeautyText
text_end
-SaffronPokecenterText3:
- text_far _SaffronPokecenterText3
+SaffronPokecenterGentlemanText:
+ text_far _SaffronPokecenterGentlemanText
text_end
-SaffronTradeNurseText:
+SaffronPokecenterLinkReceptionistText:
script_cable_club_receptionist
-SaffronPokecenterText5:
+SaffronPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/SeafoamIslands1F.asm b/scripts/SeafoamIslands1F.asm
index ceb2a2fb..27ddc276 100644
--- a/scripts/SeafoamIslands1F.asm
+++ b/scripts/SeafoamIslands1F.asm
@@ -4,34 +4,34 @@ SeafoamIslands1F_Script:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_4483b
+ jr z, .noBoulderWasPushed
ld hl, Seafoam1HolesCoords
call CheckBoulderCoords
ret nc
EventFlagAddress hl, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_44819
+ jr nz, .boulder2FellDownHole
SetEventReuseHL EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_1
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_1
ld [wObjectToShow], a
- jr .asm_44825
-.asm_44819
+ jr .hideAndShowBoulderObjects
+.boulder2FellDownHole
SetEventAfterBranchReuseHL EVENT_SEAFOAM1_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM1_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_1F_BOULDER_2
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_2
ld [wObjectToShow], a
-.asm_44825
+.hideAndShowBoulderObjects
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef_jump ShowObject
-.asm_4483b
+.noBoulderWasPushed
ld a, SEAFOAM_ISLANDS_B1F
ld [wDungeonWarpDestinationMap], a
ld hl, Seafoam1HolesCoords
@@ -43,5 +43,6 @@ Seafoam1HolesCoords:
db -1 ; end
SeafoamIslands1F_TextPointers:
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const BoulderText, TEXT_SEAFOAMISLANDS1F_BOULDER1
+ dw_const BoulderText, TEXT_SEAFOAMISLANDS1F_BOULDER2
diff --git a/scripts/SeafoamIslandsB1F.asm b/scripts/SeafoamIslandsB1F.asm
index ac667513..271775ed 100644
--- a/scripts/SeafoamIslandsB1F.asm
+++ b/scripts/SeafoamIslandsB1F.asm
@@ -3,34 +3,34 @@ SeafoamIslandsB1F_Script:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_46362
+ jr z, .noBoulderWasPushed
ld hl, Seafoam2HolesCoords
call CheckBoulderCoords
ret nc
EventFlagAddress hl, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_46340
+ jr nz, .boulder2FellDownHole
SetEventReuseHL EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_1
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B2F_BOULDER_1
ld [wObjectToShow], a
- jr .asm_4634c
-.asm_46340
+ jr .hideAndShowBoulderObjects
+.boulder2FellDownHole
SetEventAfterBranchReuseHL EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B1F_BOULDER_2
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B2F_BOULDER_2
ld [wObjectToShow], a
-.asm_4634c
+.hideAndShowBoulderObjects
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef_jump ShowObject
-.asm_46362
+.noBoulderWasPushed
ld a, SEAFOAM_ISLANDS_B2F
ld [wDungeonWarpDestinationMap], a
ld hl, Seafoam2HolesCoords
@@ -42,5 +42,6 @@ Seafoam2HolesCoords:
db -1 ; end
SeafoamIslandsB1F_TextPointers:
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB1F_BOULDER1
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB1F_BOULDER2
diff --git a/scripts/SeafoamIslandsB2F.asm b/scripts/SeafoamIslandsB2F.asm
index fe4b3ead..71ae2e1a 100644
--- a/scripts/SeafoamIslandsB2F.asm
+++ b/scripts/SeafoamIslandsB2F.asm
@@ -3,34 +3,34 @@ SeafoamIslandsB2F_Script:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_4649e
+ jr z, .noBoulderWasPushed
ld hl, Seafoam3HolesCoords
call CheckBoulderCoords
ret nc
EventFlagAddress hl, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_4647c
+ jr nz, .boulder2FellDownHole
SetEventReuseHL EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B2F_BOULDER_1
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_3
ld [wObjectToShow], a
- jr .asm_46488
-.asm_4647c
+ jr .hideAndShowBoulderObjects
+.boulder2FellDownHole
SetEventAfterBranchReuseHL EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B2F_BOULDER_2
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_4
ld [wObjectToShow], a
-.asm_46488
+.hideAndShowBoulderObjects
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef_jump ShowObject
-.asm_4649e
+.noBoulderWasPushed
ld a, SEAFOAM_ISLANDS_B3F
ld [wDungeonWarpDestinationMap], a
ld hl, Seafoam3HolesCoords
@@ -42,5 +42,6 @@ Seafoam3HolesCoords:
db -1 ; end
SeafoamIslandsB2F_TextPointers:
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB2F_BOULDER1
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB2F_BOULDER2
diff --git a/scripts/SeafoamIslandsB3F.asm b/scripts/SeafoamIslandsB3F.asm
index 9d1093e5..8c225dcc 100644
--- a/scripts/SeafoamIslandsB3F.asm
+++ b/scripts/SeafoamIslandsB3F.asm
@@ -3,35 +3,35 @@ SeafoamIslandsB3F_Script:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jr z, .asm_465dc
+ jr z, .noBoulderWasPushed
ld hl, Seafoam4HolesCoords
call CheckBoulderCoords
ret nc
EventFlagAddress hl, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_465b8
+ jr nz, .boulder2FellDownHole
SetEventReuseHL EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_1
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B4F_BOULDER_1
ld [wObjectToShow], a
- jr .asm_465c4
-.asm_465b8
+ jr .hideAndShowBoulderObjects
+.boulder2FellDownHole
SetEventAfterBranchReuseHL EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE
ld a, HS_SEAFOAM_ISLANDS_B3F_BOULDER_2
ld [wObjectToHide], a
ld a, HS_SEAFOAM_ISLANDS_B4F_BOULDER_2
ld [wObjectToShow], a
-.asm_465c4
+.hideAndShowBoulderObjects
ld a, [wObjectToHide]
ld [wMissableObjectIndex], a
predef HideObject
ld a, [wObjectToShow]
ld [wMissableObjectIndex], a
predef ShowObject
- jr .asm_465ed
-.asm_465dc
+ jr .runCurrentMapScript
+.noBoulderWasPushed
ld a, SEAFOAM_ISLANDS_B4F
ld [wDungeonWarpDestinationMap], a
ld hl, Seafoam4HolesCoords
@@ -39,7 +39,7 @@ SeafoamIslandsB3F_Script:
ld a, [wd732]
bit 4, a
ret nz
-.asm_465ed
+.runCurrentMapScript
ld hl, SeafoamIslandsB3F_ScriptPointers
ld a, [wSeafoamIslandsB3FCurScript]
jp CallFunctionInTable
@@ -50,12 +50,14 @@ Seafoam4HolesCoords:
db -1 ; end
SeafoamIslandsB3F_ScriptPointers:
- dw SeafoamIslands4Script0
- dw SeafoamIslands4Script1
- dw SeafoamIslands4Script2
- dw SeafoamIslands4Script3
+ def_script_pointers
+ dw_const SeafoamIslandsB3FDefaultScript, SCRIPT_SEAFOAMISLANDSB3F_DEFAULT
+ dw_const SeafoamIslandsB3FObjectMoving1Script, SCRIPT_SEAFOAMISLANDSB3F_OBJECT_MOVING1
+ dw_const SeafoamIslandsB3FMoveObjectScript, SCRIPT_SEAFOAMISLANDSB3F_MOVE_OBJECT
+ dw_const SeafoamIslandsB3FObjectMoving2Script, SCRIPT_SEAFOAMISLANDSB3F_OBJECT_MOVING2
+ EXPORT SCRIPT_SEAFOAMISLANDSB3F_MOVE_OBJECT ; used by engine/overworld/player_state.asm
-SeafoamIslands4Script0:
+SeafoamIslandsB3FDefaultScript:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
ld a, [wYCoord]
@@ -65,45 +67,45 @@ SeafoamIslands4Script0:
cp 15
ret nz
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEMovement46632
+ ld de, RLEList_ForcedSurfingStrongCurrentNearSteps
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld hl, wFlags_D733
set 2, [hl]
- ld a, $1
+ ld a, SCRIPT_SEAFOAMISLANDSB3F_OBJECT_MOVING1
ld [wSeafoamIslandsB3FCurScript], a
ret
-RLEMovement46632:
+RLEList_ForcedSurfingStrongCurrentNearSteps:
db D_DOWN, 6
db D_RIGHT, 5
db D_DOWN, 3
db -1 ; end
-SeafoamIslands4Script1:
+SeafoamIslandsB3FObjectMoving1Script:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld a, $0
+ ld a, SCRIPT_SEAFOAMISLANDSB3F_DEFAULT
ld [wSeafoamIslandsB3FCurScript], a
ret
-SeafoamIslands4Script2:
+SeafoamIslandsB3FMoveObjectScript:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
ld a, [wXCoord]
cp 18
- jr z, .asm_4665e
+ jr z, .playerFellThroughHoleLeft
cp 19
- ld a, $0
- jr nz, .asm_4667b
- ld de, RLEData_4667f
- jr .asm_46661
-.asm_4665e
- ld de, RLEData_46688
-.asm_46661
+ ld a, SCRIPT_SEAFOAMISLANDSB3F_DEFAULT
+ jr nz, .playerNotInStrongCurrent
+ ld de, .RLEList_StrongCurrentNearRightBoulder
+ jr .forceSurfMovement
+.playerFellThroughHoleLeft
+ ld de, .RLEList_StrongCurrentNearLeftBoulder
+.forceSurfMovement
ld hl, wSimulatedJoypadStatesEnd
call DecodeRLEList
dec a
@@ -114,36 +116,37 @@ SeafoamIslands4Script2:
set 7, [hl]
ld hl, wFlags_D733
set 2, [hl]
- ld a, $3
-.asm_4667b
+ ld a, SCRIPT_SEAFOAMISLANDSB3F_OBJECT_MOVING2
+.playerNotInStrongCurrent
ld [wSeafoamIslandsB3FCurScript], a
ret
-RLEData_4667f:
+.RLEList_StrongCurrentNearRightBoulder:
db D_DOWN, 6
db D_RIGHT, 2
db D_DOWN, 4
db D_LEFT, 1
db -1 ; end
-RLEData_46688:
+.RLEList_StrongCurrentNearLeftBoulder:
db D_DOWN, 6
db D_RIGHT, 2
db D_DOWN, 4
db -1 ; end
-SeafoamIslands4Script3:
+SeafoamIslandsB3FObjectMoving2Script:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
- ld a, $0
+ ld a, SCRIPT_SEAFOAMISLANDSB3F_DEFAULT
ld [wSeafoamIslandsB3FCurScript], a
ret
SeafoamIslandsB3F_TextPointers:
- dw BoulderText
- dw BoulderText
- dw BoulderText
- dw BoulderText
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER1
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER2
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER3
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER4
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER5
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB3F_BOULDER6
diff --git a/scripts/SeafoamIslandsB4F.asm b/scripts/SeafoamIslandsB4F.asm
index 21db0a4d..dc7be7d1 100644
--- a/scripts/SeafoamIslandsB4F.asm
+++ b/scripts/SeafoamIslandsB4F.asm
@@ -4,7 +4,7 @@ SeafoamIslandsB4F_Script:
ld hl, SeafoamIslandsB4F_ScriptPointers
jp CallFunctionInTable
-SeafoamIslands5Script_467a5:
+SeafoamIslandsB4FResetScript:
xor a
ld [wJoyIgnore], a
ld [wSeafoamIslandsB4FCurScript], a
@@ -12,22 +12,24 @@ SeafoamIslands5Script_467a5:
ret
SeafoamIslandsB4F_ScriptPointers:
- dw SeafoamIslands5Script0
- dw SeafoamIslands5Script1
- dw SeafoamIslands5Script2
- dw SeafoamIslands5Script3
- dw SeafoamIslands5Script4
+ def_script_pointers
+ dw_const SeafoamIslandsB4FDefaultScript, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
+ dw_const SeafoamIslandsB4FObjectMoving1Script, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING1
+ dw_const SeafoamIslandsB4FMoveObjectScript, SCRIPT_SEAFOAMISLANDSB4F_MOVE_OBJECT
+ dw_const SeafoamIslandsB4FObjectMoving2Script, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING2
+ dw_const SeafoamIslandsB4FObjectMoving3Script, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING3
+ EXPORT SCRIPT_SEAFOAMISLANDSB4F_MOVE_OBJECT ; used by engine/overworld/player_state.asm
-SeafoamIslands5Script4:
+SeafoamIslandsB4FObjectMoving3Script:
ld a, [wIsInBattle]
cp $ff
- jr z, SeafoamIslands5Script_467a5
+ jr z, SeafoamIslandsB4FResetScript
call EndTrainerBattle
- ld a, $0
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
ld [wSeafoamIslandsB4FCurScript], a
ret
-SeafoamIslands5Script0:
+SeafoamIslandsB4FDefaultScript:
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
ld hl, .Coords
@@ -35,21 +37,21 @@ SeafoamIslands5Script0:
ret nc
ld a, [wCoordIndex]
cp $3
- jr nc, .asm_467e6
+ jr nc, .only1UpInputNeeded
ld a, NPC_MOVEMENT_UP
ld [wSimulatedJoypadStatesEnd + 1], a
ld a, 2
- jr .asm_467e8
-.asm_467e6
+ jr .forcePlayerUpFromSurfExit
+.only1UpInputNeeded
ld a, 1
-.asm_467e8
+.forcePlayerUpFromSurfExit
ld [wSimulatedJoypadStatesIndex], a
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld hl, wFlags_D733
res 2, [hl]
- ld a, $1
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING1
ld [wSeafoamIslandsB4FCurScript], a
ret
@@ -60,39 +62,39 @@ SeafoamIslands5Script0:
dbmapcoord 21, 16
db -1 ; end
-SeafoamIslands5Script1:
+SeafoamIslandsB4FObjectMoving1Script:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $0
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
ld [wSeafoamIslandsB4FCurScript], a
ret
-SeafoamIslands5Script2:
+SeafoamIslandsB4FMoveObjectScript:
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
- ld a, $0
- jr z, .asm_46849
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
+ jr z, .playerNotInStrongCurrent
ld hl, .Coords
call ArePlayerCoordsInArray
- ld a, $0
- jr nc, .asm_46849
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
+ jr nc, .playerNotInStrongCurrent
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_46837
- ld de, RLEMovementData_46859
- jr .asm_4683a
-.asm_46837
- ld de, RLEMovementData_46852
-.asm_4683a
+ jr nz, .nearRightBoulder
+ ld de, .RLEList_StrongCurrentNearLeftBoulder
+ jr .forceSurfMovement
+.nearRightBoulder
+ ld de, .RLEList_StrongCurrentNearRightBoulder
+.forceSurfMovement
ld hl, wSimulatedJoypadStatesEnd
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
-.asm_46849
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING2
+.playerNotInStrongCurrent
ld [wSeafoamIslandsB4FCurScript], a
ret
@@ -101,71 +103,72 @@ SeafoamIslands5Script2:
dbmapcoord 5, 14
db -1 ; end
-RLEMovementData_46852:
+.RLEList_StrongCurrentNearRightBoulder:
db D_UP, 3
db D_RIGHT, 2
db D_UP, 1
db -1 ; end
-RLEMovementData_46859:
+.RLEList_StrongCurrentNearLeftBoulder:
db D_UP, 3
db D_RIGHT, 3
db D_UP, 1
db -1 ; end
-SeafoamIslands5Script3:
+SeafoamIslandsB4FObjectMoving2Script:
ld a, [wSimulatedJoypadStatesIndex]
ld b, a
cp $1
- call z, SeaFoamIslands5Script_46872
+ call z, .doneForcedSurfMovement
ld a, b
and a
ret nz
- ld a, $0
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_DEFAULT
ld [wSeafoamIslandsB4FCurScript], a
ret
-SeaFoamIslands5Script_46872:
+.doneForcedSurfMovement:
xor a
ld [wWalkBikeSurfState], a
ld [wWalkBikeSurfStateCopy], a
jp ForceBikeOrSurf
SeafoamIslandsB4F_TextPointers:
- dw BoulderText
- dw BoulderText
- dw ArticunoText
- dw SeafoamIslands5Text4
- dw SeafoamIslands5Text5
+ def_text_pointers
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB4F_BOULDER1
+ dw_const BoulderText, TEXT_SEAFOAMISLANDSB4F_BOULDER2
+ dw_const SeafoamIslandsB4FArticunoText, TEXT_SEAFOAMISLANDSB4F_ARTICUNO
+ dw_const SeafoamIslandsB4FBouldersSignText, TEXT_SEAFOAMISLANDSB4F_BOULDERS_SIGN
+ dw_const SeafoamIslandsB4FDangerSignText, TEXT_SEAFOAMISLANDSB4F_DANGER_SIGN
; Articuno is object 3, but its event flag is bit 2.
; This is not a problem because its sight range is 0, and
; trainer headers were not stored by ExecuteCurMapScriptInTable.
def_trainers 2
ArticunoTrainerHeader:
- trainer EVENT_BEAT_ARTICUNO, 0, ArticunoBattleText, ArticunoBattleText, ArticunoBattleText
+ trainer EVENT_BEAT_ARTICUNO, 0, SeafoamIslandsB4FArticunoBattleText, SeafoamIslandsB4FArticunoBattleText, SeafoamIslandsB4FArticunoBattleText
db -1 ; end
-ArticunoText:
+SeafoamIslandsB4FArticunoText:
text_asm
ld hl, ArticunoTrainerHeader
call TalkToTrainer
- ld a, $4
+ ld a, SCRIPT_SEAFOAMISLANDSB4F_OBJECT_MOVING3
ld [wSeafoamIslandsB4FCurScript], a
jp TextScriptEnd
-ArticunoBattleText:
- text_far _ArticunoBattleText
+SeafoamIslandsB4FArticunoBattleText:
+ text_far _SeafoamIslandsB4FArticunoBattleText
text_asm
ld a, ARTICUNO
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-SeafoamIslands5Text4:
- text_far _SeafoamIslands5Text4
+SeafoamIslandsB4FBouldersSignText:
+ text_far _SeafoamIslandsB4FBouldersSignText
text_end
-SeafoamIslands5Text5:
- text_far _SeafoamIslands5Text5
+SeafoamIslandsB4FDangerSignText:
+ text_far _SeafoamIslandsB4FDangerSignText
text_end
diff --git a/scripts/SilphCo10F.asm b/scripts/SilphCo10F.asm
index b8b5bfea..7cc2c58e 100644
--- a/scripts/SilphCo10F.asm
+++ b/scripts/SilphCo10F.asm
@@ -1,5 +1,5 @@
SilphCo10F_Script:
- call SilphCo10Script_5a14f
+ call SilphCo10FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo10TrainerHeaders
ld de, SilphCo10F_ScriptPointers
@@ -8,14 +8,14 @@ SilphCo10F_Script:
ld [wSilphCo10FCurScript], a
ret
-SilphCo10Script_5a14f:
+SilphCo10FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo10GateCoords
- call SilphCo2Script_59d43
- call SilphCo10Text_5a176
+ ld hl, .GateCoordinates
+ call SilphCo2F_SetCardKeyDoorYScript
+ call SilphCo10F_SetUnlockedSilphCoDoorsScript
CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
ret nz
ld a, $54
@@ -23,11 +23,11 @@ SilphCo10Script_5a14f:
lb bc, 4, 5
predef_jump ReplaceTileBlock
-SilphCo10GateCoords:
+.GateCoordinates:
dbmapcoord 5, 4
db -1 ; end
-SilphCo10Text_5a176:
+SilphCo10F_SetUnlockedSilphCoDoorsScript:
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
@@ -35,76 +35,78 @@ SilphCo10Text_5a176:
ret
SilphCo10F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO10F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO10F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO10F_END_BATTLE
SilphCo10F_TextPointers:
- dw SilphCo10Text1
- dw SilphCo10Text2
- dw SilphCo10Text3
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const SilphCo10FRocketText, TEXT_SILPHCO10F_ROCKET
+ dw_const SilphCo10FScientistText, TEXT_SILPHCO10F_SCIENTIST
+ dw_const SilphCo10FSilphWorkerFText, TEXT_SILPHCO10F_SILPH_WORKER_F
+ dw_const PickUpItemText, TEXT_SILPHCO10F_TM_EARTHQUAKE
+ dw_const PickUpItemText, TEXT_SILPHCO10F_RARE_CANDY
+ dw_const PickUpItemText, TEXT_SILPHCO10F_CARBOS
SilphCo10TrainerHeaders:
def_trainers
SilphCo10TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_0, 3, SilphCo10BattleText1, SilphCo10EndBattleText1, SilphCo10AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_0, 3, SilphCo10FRocketBattleText, SilphCo10FRocketEndBattleText, SilphCo10FRocketAfterBattleText
SilphCo10TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_1, 4, SilphCo10BattleText2, SilphCo10EndBattleText2, SilphCo10AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_1, 4, SilphCo10FScientistBattleText, SilphCo10FScientistEndBattleText, SilphCo10FScientistAfterBattleText
db -1 ; end
-SilphCo10Text1:
+SilphCo10FRocketText:
text_asm
ld hl, SilphCo10TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo10Text2:
+SilphCo10FScientistText:
text_asm
ld hl, SilphCo10TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo10Text3:
+SilphCo10FSilphWorkerFText:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- ld hl, SilphCo10Text_5a1d8
- jr nz, .asm_cf85f
- ld hl, SilphCo10Text_5a1d3
-.asm_cf85f
+ ld hl, .QuietAboutMyCryingText
+ jr nz, .beat_giovanni
+ ld hl, .ImScaredText
+.beat_giovanni
call PrintText
jp TextScriptEnd
-SilphCo10Text_5a1d3:
- text_far _SilphCo10Text_5a1d3
+.ImScaredText:
+ text_far _SilphCo10FSilphWorkerFImScaredText
text_end
-SilphCo10Text_5a1d8:
- text_far _SilphCo10Text_5a1d8
+.QuietAboutMyCryingText:
+ text_far _SilphCo10FSilphWorkerFQuietAboutMyCryingText
text_end
-SilphCo10BattleText1:
- text_far _SilphCo10BattleText1
+SilphCo10FRocketBattleText:
+ text_far _SilphCo10FRocketBattleText
text_end
-SilphCo10EndBattleText1:
- text_far _SilphCo10EndBattleText1
+SilphCo10FRocketEndBattleText:
+ text_far _SilphCo10FRocketEndBattleText
text_end
-SilphCo10AfterBattleText1:
- text_far _SilphCo10AfterBattleText1
+SilphCo10FRocketAfterBattleText:
+ text_far _SilphCo10FRocketAfterBattleText
text_end
-SilphCo10BattleText2:
- text_far _SilphCo10BattleText2
+SilphCo10FScientistBattleText:
+ text_far _SilphCo10FScientistBattleText
text_end
-SilphCo10EndBattleText2:
- text_far _SilphCo10EndBattleText2
+SilphCo10FScientistEndBattleText:
+ text_far _SilphCo10FScientistEndBattleText
text_end
-SilphCo10AfterBattleText2:
- text_far _SilphCo10AfterBattleText2
+SilphCo10FScientistAfterBattleText:
+ text_far _SilphCo10FScientistAfterBattleText
text_end
diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm
index dfbf5951..237efd0b 100644
--- a/scripts/SilphCo11F.asm
+++ b/scripts/SilphCo11F.asm
@@ -1,5 +1,5 @@
SilphCo11F_Script:
- call SilphCo11Script_62127
+ call SilphCo11FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo11TrainerHeaders
ld de, SilphCo11F_ScriptPointers
@@ -8,14 +8,14 @@ SilphCo11F_Script:
ld [wSilphCo11FCurScript], a
ret
-SilphCo11Script_62127:
+SilphCo11FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
ld hl, SilphCo11GateCoords
- call SilphCo11Script_6214f
- call SilphCo11Script_6217b
+ call SilphCo11F_SetCardKeyDoorYScript
+ call SilphCo11FSetUnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
ret nz
ld a, $20
@@ -28,7 +28,7 @@ SilphCo11GateCoords:
dbmapcoord 3, 6
db -1 ; end
-SilphCo11Script_6214f:
+SilphCo11F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -38,111 +38,113 @@ SilphCo11Script_6214f:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_62143
+.loop_check_doors
ld a, [hli]
cp $ff
- jr z, .asm_6215f
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_62154
+ jr z, .check_y_coord
inc hl
- jr .asm_62143
-.asm_62154
+ jr .loop_check_doors
+.check_y_coord
ld a, [hli]
cp c
- jr nz, .asm_62143
+ jr nz, .loop_check_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_6215f
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo11Script_6217b:
+SilphCo11FSetUnlockedDoorEventScript:
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
ret
-SilphCo11Script_62185:
+SilphCo11FResetCurScript:
xor a
ld [wJoyIgnore], a
-SilphCo11Script_62189:
+; fallthrough
+SilphCo11FSetCurScript:
ld [wSilphCo11FCurScript], a
ld [wCurMapScript], a
ret
SilphCo11F_ScriptPointers:
- dw SilphCo11Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw SilphCo11Script3
- dw SilphCo11Script4
- dw SilphCo11Script5
- dw SilphCo11Script6
- dw SilphCo11Script7
- dw SilphCo11Script8
- dw SilphCo11Script9
- dw SilphCo11Script10
- dw SilphCo11Script11
- dw SilphCo11Script12
- dw SilphCo11Script13
- dw SilphCo11Script14
+ def_script_pointers
+ dw_const SilphCo11FDefaultScript, SCRIPT_SILPHCO11F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO11F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO11F_END_BATTLE
+ dw_const SilphCo11FGiovanniAfterBattleScript, SCRIPT_SILPHCO11F_GIOVANNI_AFTER_BATTLE
+ dw_const SilphCo11FGiovanniStartBattleScript, SCRIPT_SILPHCO11F_GIOVANNI_START_BATTLE
+ dw_const SilphCo11FScript5, SCRIPT_SILPHCO11F_SCRIPT5
+ dw_const SilphCo11FScript6, SCRIPT_SILPHCO11F_SCRIPT6
+ dw_const SilphCo11FScript7, SCRIPT_SILPHCO11F_SCRIPT7
+ dw_const SilphCo11FScript8, SCRIPT_SILPHCO11F_SCRIPT8
+ dw_const SilphCo11FScript9, SCRIPT_SILPHCO11F_SCRIPT9
+ dw_const SilphCo11FScript10, SCRIPT_SILPHCO11F_SCRIPT10
+ dw_const SilphCo11FScript11, SCRIPT_SILPHCO11F_SCRIPT11
+ dw_const SilphCo11FScript12, SCRIPT_SILPHCO11F_SCRIPT12
+ dw_const SilphCo11FScript13, SCRIPT_SILPHCO11F_SCRIPT13
+ dw_const SilphCo11FScript14, SCRIPT_SILPHCO11F_SCRIPT14
-SilphCo11Script0:
+SilphCo11FDefaultScript:
IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_SILPH_CO_11F_TRAINER_0
- call z, SilphCo11Script_6229c
+ call z, SilphCo11FScript_6229c
CheckEvent EVENT_782
ret nz
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- call z, SilphCo11Script_621c5
+ call z, SilphCo11FScript_621c5
ret
-SilphCo11Script_621c5:
- ld hl, CoordsData_62211
+SilphCo11FScript_621c5:
+ ld hl, .PlayerCoordsArray
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
ld a, [wCoordIndex]
ld [wcf0d], a
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $3
+ ld a, TEXT_SILPHCO11F_GIOVANNI
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $3
+ ld a, SILPHCO11F_GIOVANNI
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
- ld de, MovementData_62216
+ ld de, .GiovanniMovement
call MoveSprite
- ld a, $4
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_GIOVANNI_START_BATTLE
+ call SilphCo11FSetCurScript
ret
-CoordsData_62211:
+.PlayerCoordsArray:
dbmapcoord 6, 13
dbmapcoord 7, 12
db -1 ; end
-MovementData_62216:
+.GiovanniMovement:
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db NPC_MOVEMENT_DOWN
db -1 ; end
-SilphCo11Script_621ff:
+SilphCo11FScript_621ff:
ld [wPlayerMovingDirection], a
ld a, b
ld [wSprite03StateData1FacingDirection], a
@@ -150,71 +152,71 @@ SilphCo11Script_621ff:
ld [wSprite03StateData1MovementStatus], a
ret
-SilphCo11Script3:
+SilphCo11FGiovanniAfterBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, SilphCo11Script_62185
+ jp z, SilphCo11FResetCurScript
ld a, [wcf0d]
cp $1
- jr z, .asm_6223c
+ jr z, .face_player_up
ld a, PLAYER_DIR_LEFT
ld b, SPRITE_FACING_RIGHT
- jr .asm_62240
-.asm_6223c
+ jr .continue
+.face_player_up
ld a, PLAYER_DIR_UP
ld b, SPRITE_FACING_DOWN
-.asm_62240
- call SilphCo11Script_621ff
- ld a, $f0
+.continue
+ call SilphCo11FScript_621ff
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $7
+ ld a, TEXT_SILPHCO11F_GIOVANNI_YOU_RUINED_OUR_PLANS
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call GBFadeOutToBlack
- farcall SaffronCityHideRocketsShowCitizens
+ farcall SilphCo11FTeamRocketLeavesScript
call UpdateSprites
call Delay3
call GBFadeInFromBlack
SetEvent EVENT_BEAT_SILPH_CO_GIOVANNI
xor a
ld [wJoyIgnore], a
- jp SilphCo11Script_62189
+ jp SilphCo11FSetCurScript
-SilphCo11Script4:
+SilphCo11FGiovanniStartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
- ld a, $3
+ ld a, SILPHCO11F_GIOVANNI
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
ld a, [wcf0d]
cp $1
- jr z, .asm_62284
+ jr z, .face_player_up
ld a, PLAYER_DIR_LEFT
ld b, SPRITE_FACING_RIGHT
- jr .asm_62288
-.asm_62284
+ jr .continue
+.face_player_up
ld a, PLAYER_DIR_UP
ld b, SPRITE_FACING_DOWN
-.asm_62288
- call SilphCo11Script_621ff
+.continue
+ call SilphCo11FScript_621ff
call Delay3
xor a
ld [wJoyIgnore], a
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SilphCo10Text_62528
- ld de, SilphCo10Text_62528
+ ld hl, SilphCo10FGiovanniILostAgainText
+ ld de, SilphCo10FGiovanniILostAgainText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
call EngageMapTrainer
call InitBattleEnemyParameters
- ld a, $3
- jp SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_GIOVANNI_AFTER_BATTLE
+ jp SilphCo11FSetCurScript
-SilphCo11Script_6229c:
+SilphCo11FScript_6229c:
ld a, [wYCoord]
cp $3
ret nz
@@ -238,23 +240,23 @@ SilphCo11Script_6229c:
call PlayMusic
xor a
ldh [hJoyHeld], a
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $8
+ ld a, TEXT_SILPHCO11F_TEXT8
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_782
- ld a, $5
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT5
+ call SilphCo11FSetCurScript
ret
-SilphCo11MovementData_622f5:
+SilphCo11FMovementData_622f5:
db $5
db $5
db $5
@@ -262,21 +264,21 @@ SilphCo11MovementData_622f5:
db $5
db $ff
-SilphCo11MovementData_622fb:
+SilphCo11FMovementData_622fb:
db $5
db $5
db $5
db $5
db $ff
-SilphCo11MovementData_62300:
+SilphCo11FMovementData_62300:
db $5
db $5
db $5
db $5
db $ff
-SilphCo11MovementData_62305:
+SilphCo11FMovementData_62305:
db $5
db $5
db $5
@@ -284,7 +286,7 @@ SilphCo11MovementData_62305:
db $5
db $ff
-SilphCo11MovementData_6230b:
+SilphCo11FMovementData_6230b:
db $5
db $5
db $6
@@ -292,7 +294,7 @@ SilphCo11MovementData_6230b:
db $5
db $ff
-SilphCo11MovementData_62311:
+SilphCo11FMovementData_62311:
db $5
db $5
db $5
@@ -301,32 +303,32 @@ SilphCo11MovementData_62311:
db $5
db $ff
-SilphCo11Script5:
- ld de, SilphCo11MovementData_622f5
+SilphCo11FScript5:
+ ld de, SilphCo11FMovementData_622f5
CheckEitherEventSet EVENT_780, EVENT_781
and a
jr z, .asm_6232d
- ld de, SilphCo11MovementData_62300
+ ld de, SilphCo11FMovementData_62300
cp $1
jr z, .asm_6232d
- ld de, SilphCo11MovementData_6230b
+ ld de, SilphCo11FMovementData_6230b
.asm_6232d
- ld a, $4
+ ld a, SILPHCO11F_JAMES
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $6
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT6
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script6:
- ld a, $ff
+SilphCo11FScript6:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
-SilphCo11Script7:
+SilphCo11FScript7:
ld a, $2
ld [wSprite04StateData1MovementStatus], a
ld hl, wSprite04StateData1FacingDirection
@@ -337,36 +339,36 @@ SilphCo11Script7:
ld [hl], SPRITE_FACING_UP
.asm_6235e
call Delay3
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-SilphCo11Script8:
- ld de, SilphCo11MovementData_622fb
+SilphCo11FScript8:
+ ld de, SilphCo11FMovementData_622fb
CheckEitherEventSet EVENT_780, EVENT_781
and a
jr z, .asm_6237b
- ld de, SilphCo11MovementData_62305
+ ld de, SilphCo11FMovementData_62305
cp $1
jr z, .asm_6237b
- ld de, SilphCo11MovementData_62311
+ ld de, SilphCo11FMovementData_62311
.asm_6237b
- ld a, $6
+ ld a, SILPHCO11F_JESSIE
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $9
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT9
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script9:
- ld a, $ff
+SilphCo11FScript9:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wd730]
bit 0, a
ret nz
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-SilphCo11Script10:
+SilphCo11FScript10:
ld a, $2
ld [wSprite06StateData1MovementStatus], a
ld hl, wSprite06StateData1FacingDirection
@@ -377,15 +379,15 @@ SilphCo11Script10:
ld [hl], SPRITE_FACING_LEFT
.asm_623b1
call Delay3
- ld a, $9
+ ld a, TEXT_SILPHCO11F_TEXT9
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-SilphCo11Script11:
+SilphCo11FScript11:
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SilphCo11Text_624c2
- ld de, SilphCo11Text_624c2
+ ld hl, SilphCo11FText_624c2
+ ld de, SilphCo11FText_624c2
call SaveEndBattleTextPointers
ld a, OPP_ROCKET
ld [wCurOpponent], a
@@ -394,27 +396,27 @@ SilphCo11Script11:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
- ld a, $c
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT12
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script12:
- ld a, $ff
+SilphCo11FScript12:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, [wIsInBattle]
cp $ff
- jp z, SilphCo11Script_62185
+ jp z, SilphCo11FResetCurScript
ld a, $2
ld [wSprite04StateData1MovementStatus], a
ld [wSprite06StateData1MovementStatus], a
xor a
ld [wSprite04StateData1FacingDirection], a
ld [wSprite06StateData1FacingDirection], a
- ld a, $fc
+ ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, $a
+ ld a, TEXT_SILPHCO11F_TEXT10
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
@@ -423,71 +425,70 @@ SilphCo11Script12:
ld c, BANK(Music_MeetJessieJames)
ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $d
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT13
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script13:
- ld a, $ff
+SilphCo11FScript13:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
call GBFadeOutToBlack
ld a, HS_SILPH_CO_11F_JAMES
- call SilphCo11Script_6246d
+ call SilphCo11FScript_HideObject
ld a, HS_SILPH_CO_11F_JESSIE
- call SilphCo11Script_6246d
+ call SilphCo11FScript_HideObject
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- ld a, $e
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_SCRIPT14
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script14:
+SilphCo11FScript14:
call PlayDefaultMusic
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
ResetEvent EVENT_782
SetEventReuseHL EVENT_BEAT_SILPH_CO_11F_TRAINER_0
- ld a, $0
- call SilphCo11Script_62189
+ ld a, SCRIPT_SILPHCO11F_DEFAULT
+ call SilphCo11FSetCurScript
ret
-SilphCo11Script_6245e:
+SilphCo11FScript_ShowObject:
ld [wMissableObjectIndex], a
predef ShowObject
call UpdateSprites
call Delay3
ret
-SilphCo11Script_6246d:
+SilphCo11FScript_HideObject:
ld [wMissableObjectIndex], a
predef HideObject
ret
SilphCo11F_TextPointers:
- dw SilphCo11Text1
- dw SilphCo11Text2
- dw SilphCo11Text3
- dw SilphCo11Text4
- dw SilphCo11Text5
- dw SilphCo11Text6
- dw SilphCo11Text7
- dw SilphCo11Text8
- dw SilphCo11Text9
- dw SilphCo11Text10
+ def_text_pointers
+ dw_const SilphCo11FSilphPresidentText, TEXT_SILPHCO11F_SILPH_PRESIDENT
+ dw_const SilphCo11FBeautyText, TEXT_SILPHCO11F_BEAUTY
+ dw_const SilphCo11FGiovanniText, TEXT_SILPHCO11F_GIOVANNI
+ dw_const SilphCo11FJessieJamesText, TEXT_SILPHCO11F_JAMES
+ dw_const SilphCo11FRocketText, TEXT_SILPHCO11F_ROCKET
+ dw_const SilphCo11FJessieJamesText, TEXT_SILPHCO11F_JESSIE
+ dw_const SilphCo11FGiovanniYouRuinedOurPlansText, TEXT_SILPHCO11F_GIOVANNI_YOU_RUINED_OUR_PLANS
+ dw_const SilphCo11FJessieJamesText, TEXT_SILPHCO11F_TEXT8
+ dw_const SilphCo11FText9, TEXT_SILPHCO11F_TEXT9
+ dw_const SilphCo11FText10, TEXT_SILPHCO11F_TEXT10
SilphCo11TrainerHeaders:
def_trainers 5
SilphCo11TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_1, 3, SilphCo11Trainer1BattleText, SilphCo11Trainer1EndBattleText, SilphCo11Trainer1AfterBattleText
+ trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_1, 3, SilphCo11FRocketBattleText, SilphCo11FRocketEndBattleText, SilphCo11FRocketAfterBattleText
db -1 ; end
-SilphCo11Text4:
-SilphCo11Text6:
-SilphCo11Text8:
+SilphCo11FJessieJamesText:
text_far _SilphCoJessieJamesText1
text_asm
ld c, 10
@@ -503,91 +504,91 @@ SilphCo11Text8:
call DelayFrames
jp TextScriptEnd
-SilphCo11Text9:
+SilphCo11FText9:
text_far _SilphCoJessieJamesText2
text_end
-SilphCo11Text_624c2:
+SilphCo11FText_624c2:
text_far _SilphCoJessieJamesText3
text_end
-SilphCo11Text10:
+SilphCo11FText10:
text_far _SilphCoJessieJamesText4
text_asm
ld c, 64
call DelayFrames
jp TextScriptEnd
-SilphCo11Text1:
+SilphCo11FSilphPresidentText:
text_asm
CheckEvent EVENT_GOT_MASTER_BALL
jp nz, .got_item
- ld hl, SilphCoPresidentText
+ ld hl, .Text
call PrintText
lb bc, MASTER_BALL, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedSilphCoMasterBallText
+ ld hl, .ReceivedMasterBallText
call PrintText
SetEvent EVENT_GOT_MASTER_BALL
jr .done
.bag_full
- ld hl, SilphCoMasterBallNoRoomText
+ ld hl, .NoRoomText
call PrintText
jr .done
.got_item
- ld hl, SilphCo10Text_6231c
+ ld hl, .MasterBallDescriptionText
call PrintText
.done
jp TextScriptEnd
-SilphCoPresidentText:
- text_far _SilphCoPresidentText
+.Text:
+ text_far _SilphCo11FSilphPresidentText
text_end
-ReceivedSilphCoMasterBallText:
- text_far _ReceivedSilphCoMasterBallText
+.ReceivedMasterBallText:
+ text_far _SilphCo11FSilphPresidentReceivedMasterBallText
sound_get_key_item
text_end
-SilphCo10Text_6231c:
- text_far _SilphCo10Text_6231c
+.MasterBallDescriptionText:
+ text_far _SilphCo11FSilphPresidentMasterBallDescriptionText
text_end
-SilphCoMasterBallNoRoomText:
- text_far _SilphCoMasterBallNoRoomText
+.NoRoomText:
+ text_far _SilphCo11FSilphPresidentNoRoomText
text_end
-SilphCo11Text2:
- text_far _SilphCo11Text2
+SilphCo11FBeautyText:
+ text_far _SilphCo11FBeautyText
text_end
-SilphCo11Text3:
- text_far _SilphCo11Text3
+SilphCo11FGiovanniText:
+ text_far _SilphCo11FGiovanniText
text_end
-SilphCo10Text_62528:
- text_far _SilphCo10Text_62330
+SilphCo10FGiovanniILostAgainText:
+ text_far _SilphCo10FGiovanniILostAgainText
text_end
-SilphCo11Text7:
- text_far _SilphCo10Text_62335
+SilphCo11FGiovanniYouRuinedOurPlansText:
+ text_far _SilphCo11FGiovanniYouRuinedOurPlansText
text_end
-SilphCo11Text5:
+SilphCo11FRocketText:
text_asm
ld hl, SilphCo11TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo11Trainer1BattleText:
- text_far _SilphCo11BattleText2
+SilphCo11FRocketBattleText:
+ text_far _SilphCo11FRocket2BattleText
text_end
-SilphCo11Trainer1EndBattleText:
- text_far _SilphCo11EndBattleText2
+SilphCo11FRocketEndBattleText:
+ text_far _SilphCo11FRocket2EndBattleText
text_end
-SilphCo11Trainer1AfterBattleText:
- text_far _SilphCo11AfterBattleText2
+SilphCo11FRocketAfterBattleText:
+ text_far _SilphCo11FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCo11F_2.asm b/scripts/SilphCo11F_2.asm
index 658e79eb..fbc5bb1b 100644
--- a/scripts/SilphCo11F_2.asm
+++ b/scripts/SilphCo11F_2.asm
@@ -1,37 +1,36 @@
-SaffronCityHideRocketsShowCitizens::
- ld hl, SaffronCityRockets
-.hideLoop
+SilphCo11FTeamRocketLeavesScript::
+ ld hl, .HideMissableObjectIDs
+.hide_loop
ld a, [hli]
- cp $ff ; have we run out of rockets to hide?
- jr z, .showCitizens ; if so, start showing the citizens
+ cp $ff
+ jr z, .done_hiding
push hl
ld [wMissableObjectIndex], a
predef HideObject
pop hl
- jr .hideLoop
-
-.showCitizens
- ld hl, SaffronCityCitizens
-.showLoop
+ jr .hide_loop
+.done_hiding
+ ld hl, .ShowMissableObjectIDs
+.show_loop
ld a, [hli]
- cp $ff ; have we run out of citizens to show?
- ret z ; if so, we're done here
+ cp -1
+ ret z
push hl
ld [wMissableObjectIndex], a
predef ShowObject
pop hl
- jr .showLoop
+ jr .show_loop
-SaffronCityCitizens:
+.ShowMissableObjectIDs:
db HS_SAFFRON_CITY_8
db HS_SAFFRON_CITY_9
db HS_SAFFRON_CITY_A
db HS_SAFFRON_CITY_B
db HS_SAFFRON_CITY_C
db HS_SAFFRON_CITY_D
- db $FF
+ db -1 ; end
-SaffronCityRockets:
+.HideMissableObjectIDs:
db HS_SAFFRON_CITY_1
db HS_SAFFRON_CITY_2
db HS_SAFFRON_CITY_3
@@ -73,4 +72,4 @@ SaffronCityRockets:
db HS_SILPH_CO_11F_JAMES
db HS_SILPH_CO_11F_2
db HS_SILPH_CO_11F_JESSIE
- db $ff
+ db -1 ; end
diff --git a/scripts/SilphCo1F.asm b/scripts/SilphCo1F.asm
index bc484b7c..fbc70d77 100644
--- a/scripts/SilphCo1F.asm
+++ b/scripts/SilphCo1F.asm
@@ -9,8 +9,9 @@ SilphCo1F_Script:
predef_jump ShowObject
SilphCo1F_TextPointers:
- dw SilphCo1Text1
+ def_text_pointers
+ dw_const SilphCo1FLinkReceptionistText, TEXT_SILPHCO1F_LINK_RECEPTIONIST
-SilphCo1Text1:
- text_far _SilphCo1Text1
+SilphCo1FLinkReceptionistText:
+ text_far _SilphCo1FLinkReceptionistText
text_end
diff --git a/scripts/SilphCo2F.asm b/scripts/SilphCo2F.asm
index f8e157e8..52241b95 100644
--- a/scripts/SilphCo2F.asm
+++ b/scripts/SilphCo2F.asm
@@ -1,5 +1,5 @@
SilphCo2F_Script:
- call SilphCo2Script_59d07
+ call SilphCo2FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo2TrainerHeaders
ld de, SilphCo2F_ScriptPointers
@@ -8,23 +8,23 @@ SilphCo2F_Script:
ld [wSilphCo2FCurScript], a
ret
-SilphCo2Script_59d07:
+SilphCo2FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo2GateCoords
- call SilphCo2Script_59d43
- call SilphCo2Script_59d6f
+ ld hl, .GateCoordinates
+ call SilphCo2F_SetCardKeyDoorYScript
+ call SilphCo2F_UnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1
- jr nz, .asm_59d2e
+ jr nz, .unlock_door1
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 2, 2
predef ReplaceTileBlock
pop af
-.asm_59d2e
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
ret nz
ld a, $54
@@ -32,12 +32,12 @@ SilphCo2Script_59d07:
lb bc, 5, 2
predef_jump ReplaceTileBlock
-SilphCo2GateCoords:
+.GateCoordinates:
dbmapcoord 2, 2
dbmapcoord 2, 5
db -1 ; end
-SilphCo2Script_59d43:
+SilphCo2F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -47,173 +47,175 @@ SilphCo2Script_59d43:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_59d4f
+.loop_check_doors
ld a, [hli]
cp $ff
- jr z, .asm_59d6b
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_59d60
+ jr z, .check_y_coord
inc hl
- jr .asm_59d4f
-.asm_59d60
+ jr .loop_check_doors
+.check_y_coord
ld a, [hli]
cp c
- jr nz, .asm_59d4f
+ jr nz, .loop_check_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_59d6b
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo2Script_59d6f:
+SilphCo2F_UnlockedDoorEventScript:
EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR1
ret
-.next
+.unlock_door1
SetEventAfterBranchReuseHL EVENT_SILPH_CO_2_UNLOCKED_DOOR2, EVENT_SILPH_CO_2_UNLOCKED_DOOR1
ret
SilphCo2F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO2F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO2F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO2F_END_BATTLE
SilphCo2F_TextPointers:
- dw SilphCo2Text1
- dw SilphCo2Text2
- dw SilphCo2Text3
- dw SilphCo2Text4
- dw SilphCo2Text5
+ def_text_pointers
+ dw_const SilphCo2FSilphWorkerFText, TEXT_SILPHCO2F_SILPH_WORKER_F
+ dw_const SilphCo2FScientist1Text, TEXT_SILPHCO2F_SCIENTIST1
+ dw_const SilphCo2FScientist2Text, TEXT_SILPHCO2F_SCIENTIST2
+ dw_const SilphCo2FRocket1Text, TEXT_SILPHCO2F_ROCKET1
+ dw_const SilphCo2FRocket2Text, TEXT_SILPHCO2F_ROCKET2
SilphCo2TrainerHeaders:
def_trainers 2
SilphCo2TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_0, 3, SilphCo2BattleText1, SilphCo2EndBattleText1, SilphCo2AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_0, 3, SilphCo2FScientist1BattleText, SilphCo2FScientist1EndBattleText, SilphCo2FScientist1AfterBattleText
SilphCo2TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_1, 4, SilphCo2BattleText2, SilphCo2EndBattleText2, SilphCo2AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_1, 4, SilphCo2FScientist2BattleText, SilphCo2FScientist2EndBattleText, SilphCo2FScientist2AfterBattleText
SilphCo2TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_2, 3, SilphCo2BattleText3, SilphCo2EndBattleText3, SilphCo2AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_2, 3, SilphCo2FRocket1BattleText, SilphCo2FRocket1EndBattleText, SilphCo2FRocket1AfterBattleText
SilphCo2TrainerHeader3:
- trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_3, 3, SilphCo2BattleText4, SilphCo2EndBattleText4, SilphCo2AfterBattleText4
+ trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_3, 3, SilphCo2FRocket2BattleText, SilphCo2FRocket2EndBattleText, SilphCo2FRocket2AfterBattleText
db -1 ; end
-SilphCo2Text1:
+SilphCo2FSilphWorkerFText:
text_asm
CheckEvent EVENT_GOT_TM36
- jr nz, .asm_59de4
- ld hl, SilphCo2Text_59ded
+ jr nz, .already_have_tm
+ ld hl, .PleaseTakeThisText
call PrintText
lb bc, TM_SELFDESTRUCT, 1
call GiveItem
- ld hl, TM36NoRoomText
- jr nc, .asm_59de7
+ ld hl, .TM36NoRoomText
+ jr nc, .print_text
SetEvent EVENT_GOT_TM36
- ld hl, ReceivedTM36Text
- jr .asm_59de7
-.asm_59de4
- ld hl, TM36ExplanationText
-.asm_59de7
+ ld hl, .ReceivedTM36Text
+ jr .print_text
+.already_have_tm
+ ld hl, .TM36ExplanationText
+.print_text
call PrintText
jp TextScriptEnd
-SilphCo2Text_59ded:
- text_far _SilphCo2Text_59ded
+.PleaseTakeThisText:
+ text_far SilphCo2FSilphWorkerFPleaseTakeThisText
text_end
-ReceivedTM36Text:
- text_far _ReceivedTM36Text
+.ReceivedTM36Text:
+ text_far _SilphCo2FSilphWorkerFReceivedTM36Text
sound_get_item_1
text_end
-TM36ExplanationText:
- text_far _TM36ExplanationText
+.TM36ExplanationText:
+ text_far _SilphCo2FSilphWorkerFTM36ExplanationText
text_end
-TM36NoRoomText:
- text_far _TM36NoRoomText
+.TM36NoRoomText:
+ text_far _SilphCo2FSilphWorkerFTM36NoRoomText
text_end
-SilphCo2Text2:
+SilphCo2FScientist1Text:
text_asm
ld hl, SilphCo2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo2Text3:
+SilphCo2FScientist2Text:
text_asm
ld hl, SilphCo2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo2Text4:
+SilphCo2FRocket1Text:
text_asm
ld hl, SilphCo2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo2Text5:
+SilphCo2FRocket2Text:
text_asm
ld hl, SilphCo2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SilphCo2BattleText1:
- text_far _SilphCo2BattleText1
+SilphCo2FScientist1BattleText:
+ text_far _SilphCo2FScientist1BattleText
text_end
-SilphCo2EndBattleText1:
- text_far _SilphCo2EndBattleText1
+SilphCo2FScientist1EndBattleText:
+ text_far _SilphCo2FScientist1EndBattleText
text_end
-SilphCo2AfterBattleText1:
- text_far _SilphCo2AfterBattleText1
+SilphCo2FScientist1AfterBattleText:
+ text_far _SilphCo2FScientist1AfterBattleText
text_end
-SilphCo2BattleText2:
- text_far _SilphCo2BattleText2
+SilphCo2FScientist2BattleText:
+ text_far _SilphCo2FScientist2BattleText
text_end
-SilphCo2EndBattleText2:
- text_far _SilphCo2EndBattleText2
+SilphCo2FScientist2EndBattleText:
+ text_far _SilphCo2FScientist2EndBattleText
text_end
-SilphCo2AfterBattleText2:
- text_far _SilphCo2AfterBattleText2
+SilphCo2FScientist2AfterBattleText:
+ text_far _SilphCo2FScientist2AfterBattleText
text_end
-SilphCo2BattleText3:
- text_far _SilphCo2BattleText3
+SilphCo2FRocket1BattleText:
+ text_far _SilphCo2FRocket1BattleText
text_end
-SilphCo2EndBattleText3:
- text_far _SilphCo2EndBattleText3
+SilphCo2FRocket1EndBattleText:
+ text_far _SilphCo2FRocket1EndBattleText
text_end
-SilphCo2AfterBattleText3:
- text_far _SilphCo2AfterBattleText3
+SilphCo2FRocket1AfterBattleText:
+ text_far _SilphCo2FRocket1AfterBattleText
text_end
-SilphCo2BattleText4:
- text_far _SilphCo2BattleText4
+SilphCo2FRocket2BattleText:
+ text_far _SilphCo2FRocket2BattleText
text_end
-SilphCo2EndBattleText4:
- text_far _SilphCo2EndBattleText4
+SilphCo2FRocket2EndBattleText:
+ text_far _SilphCo2FRocket2EndBattleText
text_end
-SilphCo2AfterBattleText4:
- text_far _SilphCo2AfterBattleText4
+SilphCo2FRocket2AfterBattleText:
+ text_far _SilphCo2FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm
index eb92dd78..df9df9e8 100644
--- a/scripts/SilphCo3F.asm
+++ b/scripts/SilphCo3F.asm
@@ -1,5 +1,5 @@
SilphCo3F_Script:
- call SilphCo3Script_59f71
+ call SilphCo3FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo3TrainerHeaders
ld de, SilphCo3F_ScriptPointers
@@ -8,23 +8,23 @@ SilphCo3F_Script:
ld [wSilphCo3FCurScript], a
ret
-SilphCo3Script_59f71:
+SilphCo3FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo3GateCoords
- call SilphCo2Script_59d43
- call SilphCo3Script_59fad
+ ld hl, .GateCoordinates
+ call SilphCo2F_SetCardKeyDoorYScript
+ call SilphCo3F_UnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1
- jr nz, .asm_59f98
+ jr nz, .unlock_door1
push af
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 4, 4
predef ReplaceTileBlock
pop af
-.asm_59f98
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret nz
ld a, $5f
@@ -32,93 +32,95 @@ SilphCo3Script_59f71:
lb bc, 4, 8
predef_jump ReplaceTileBlock
-SilphCo3GateCoords:
+.GateCoordinates:
dbmapcoord 4, 4
dbmapcoord 8, 4
db -1 ; end
-SilphCo3Script_59fad:
+SilphCo3F_UnlockedDoorEventScript:
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret
-.next
+.unlock_door1
SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
ret
SilphCo3F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO3F_END_BATTLE
SilphCo3F_TextPointers:
- dw SilphCo3Text1
- dw SilphCo3Text2
- dw SilphCo3Text3
- dw PickUpItemText
+ def_text_pointers
+ dw_const SilphCo3FSilphWorkerMText, TEXT_SILPHCO3F_SILPH_WORKER_M
+ dw_const SilphCo3FRocketText, TEXT_SILPHCO3F_ROCKET
+ dw_const SilphCo3FScientistText, TEXT_SILPHCO3F_SCIENTIST
+ dw_const PickUpItemText, TEXT_SILPHCO3F_HYPER_POTION
SilphCo3TrainerHeaders:
def_trainers 2
SilphCo3TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3BattleText1, SilphCo3EndBattleText1, SilphCo3AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3FRocketBattleText, SilphCo3FRocketEndBattleText, SilphCo3FRocketAfterBattleText
SilphCo3TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3BattleText2, SilphCo3EndBattleText2, SilphCo3AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3FScientistBattleText, SilphCo3FScientistEndBattleText, SilphCo3FScientistAfterBattleText
db -1 ; end
-SilphCo3Text1:
+SilphCo3FSilphWorkerMText:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- ld hl, SilphCo3Text_59ffe
- jr nz, .asm_59fee
- ld hl, SilphCo3Text_59ff9
-.asm_59fee
+ ld hl, .YouSavedUsText
+ jr nz, .beat_giovanni
+ ld hl, .WhatShouldIDoText
+.beat_giovanni
call PrintText
jp TextScriptEnd
-SilphCo3Text_59ff9:
- text_far _SilphCo3Text_59ff9
+.WhatShouldIDoText:
+ text_far _SilphCo3FSilphWorkerMWhatShouldIDoText
text_end
-SilphCo3Text_59ffe:
- text_far _SilphCo3Text_59ffe
+.YouSavedUsText:
+ text_far _SilphCo3FSilphWorkerMYouSavedUsText
text_end
-SilphCo3Text2:
+SilphCo3FRocketText:
text_asm
ld hl, SilphCo3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo3BattleText1:
- text_far _SilphCo3BattleText1
+SilphCo3FRocketBattleText:
+ text_far _SilphCo3FRocketBattleText
text_end
-SilphCo3EndBattleText1:
- text_far _SilphCo3EndBattleText1
+SilphCo3FRocketEndBattleText:
+ text_far _SilphCo3FRocketEndBattleText
text_end
-SilphCo3AfterBattleText1:
- text_far _SilphCo3AfterBattleText1
+SilphCo3FRocketAfterBattleText:
+ text_far _SilphCo3FRocketAfterBattleText
text_end
-SilphCo3Text3:
+SilphCo3FScientistText:
text_asm
ld hl, SilphCo3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo3BattleText2:
- text_far _SilphCo3BattleText2
+SilphCo3FScientistBattleText:
+ text_far _SilphCo3FScientistBattleText
text_end
-SilphCo3EndBattleText2:
- text_far _SilphCo3EndBattleText2
+SilphCo3FScientistEndBattleText:
+ text_far _SilphCo3FScientistEndBattleText
text_end
-SilphCo3AfterBattleText2:
- text_far _SilphCo3AfterBattleText2
+SilphCo3FScientistAfterBattleText:
+ text_far _SilphCo3FScientistAfterBattleText
text_end
diff --git a/scripts/SilphCo4F.asm b/scripts/SilphCo4F.asm
index 486b68ac..91453d65 100644
--- a/scripts/SilphCo4F.asm
+++ b/scripts/SilphCo4F.asm
@@ -1,5 +1,5 @@
SilphCo4F_Script:
- call SilphCo4Script_19d21
+ call SilphCo4FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo4TrainerHeaders
ld de, SilphCo4F_ScriptPointers
@@ -8,23 +8,23 @@ SilphCo4F_Script:
ld [wSilphCo4FCurScript], a
ret
-SilphCo4Script_19d21:
+SilphCo4FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo4GateCoords
- call SilphCo4Script_19d5d
- call SilphCo4Script_19d89
+ ld hl, .GateCoordinates
+ call SilphCo4F_SetCardKeyDoorYScript
+ call SilphCo4FUnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1
- jr nz, .asm_19d48
+ jr nz, .unlock_door1
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 6, 2
predef ReplaceTileBlock
pop af
-.asm_19d48
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
ret nz
ld a, $54
@@ -32,12 +32,12 @@ SilphCo4Script_19d21:
lb bc, 4, 6
predef_jump ReplaceTileBlock
-SilphCo4GateCoords:
+.GateCoordinates:
dbmapcoord 2, 6
dbmapcoord 6, 4
db -1 ; end
-SilphCo4Script_19d5d:
+SilphCo4F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -47,134 +47,136 @@ SilphCo4Script_19d5d:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_19d69
+.loop_check_doors
ld a, [hli]
cp $ff
- jr z, .asm_19d85
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_19d7a
+ jr z, .check_y_coord
inc hl
- jr .asm_19d69
-.asm_19d7a
+ jr .loop_check_doors
+.check_y_coord
ld a, [hli]
cp c
- jr nz, .asm_19d69
+ jr nz, .loop_check_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_19d85
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo4Script_19d89:
+SilphCo4FUnlockedDoorEventScript:
EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR1
ret
-.next
+.unlock_door1
SetEventAfterBranchReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1
ret
SilphCo4F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO4F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO4F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO4F_END_BATTLE
SilphCo4F_TextPointers:
- dw SilphCo4Text1
- dw SilphCo4Text2
- dw SilphCo4Text3
- dw SilphCo4Text4
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const SilphCo4FSilphWorkerMText, TEXT_SILPHCO4F_SILPH_WORKER_M
+ dw_const SilphCo4FRocket1Text, TEXT_SILPHCO4F_ROCKET1
+ dw_const SilphCo4FScientistText, TEXT_SILPHCO4F_SCIENTIST
+ dw_const SilphCo4FRocket2Text, TEXT_SILPHCO4F_ROCKET2
+ dw_const PickUpItemText, TEXT_SILPHCO4F_FULL_HEAL
+ dw_const PickUpItemText, TEXT_SILPHCO4F_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_SILPHCO4F_ESCAPE_ROPE
SilphCo4TrainerHeaders:
def_trainers 2
SilphCo4TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_0, 4, SilphCo4BattleText2, SilphCo4EndBattleText2, SilphCo4AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_0, 4, SilphCo4FRocket1BattleText, SilphCo4FRocket1EndBattleText, SilphCo4FRocket1AfterBattleText
SilphCo4TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_1, 3, SilphCo4BattleText3, SilphCo4EndBattleText3, SilphCo4AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_1, 3, SilphCo4FScientistBattleText, SilphCo4FScientistEndBattleText, SilphCo4FScientistAfterBattleText
SilphCo4TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_2, 4, SilphCo4BattleText4, SilphCo4EndBattleText4, SilphCo4AfterBattleText4
+ trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_2, 4, SilphCo4FRocket2BattleText, SilphCo4FRocket2EndBattleText, SilphCo4FRocket2AfterBattleText
db -1 ; end
-SilphCo4Text1:
+SilphCo4FSilphWorkerMText:
text_asm
- ld hl, SilphCo4Text_19de0
- ld de, SilphCo4Text_19de5
- call SilphCo6Script_1a22f
+ ld hl, .ImHidingText
+ ld de, .TeamRocketIsGoneText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo4Text_19de0:
- text_far _SilphCo4Text_19de0
+.ImHidingText:
+ text_far _SilphCo4FSilphWorkerMImHidingText
text_end
-SilphCo4Text_19de5:
- text_far _SilphCo4Text_19de5
+.TeamRocketIsGoneText:
+ text_far _SilphCo4FSilphWorkerMTeamRocketIsGoneText
text_end
-SilphCo4Text2:
+SilphCo4FRocket1Text:
text_asm
ld hl, SilphCo4TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo4BattleText2:
- text_far _SilphCo4BattleText2
+SilphCo4FRocket1BattleText:
+ text_far _SilphCo4FRocket1BattleText
text_end
-SilphCo4EndBattleText2:
- text_far _SilphCo4EndBattleText2
+SilphCo4FRocket1EndBattleText:
+ text_far _SilphCo4FRocket1EndBattleText
text_end
-SilphCo4AfterBattleText2:
- text_far _SilphCo4AfterBattleText2
+SilphCo4FRocket1AfterBattleText:
+ text_far _SilphCo4FRocket1AfterBattleText
text_end
-SilphCo4Text3:
+SilphCo4FScientistText:
text_asm
ld hl, SilphCo4TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo4BattleText3:
- text_far _SilphCo4BattleText3
+SilphCo4FScientistBattleText:
+ text_far _SilphCo4FScientistBattleText
text_end
-SilphCo4EndBattleText3:
- text_far _SilphCo4EndBattleText3
+SilphCo4FScientistEndBattleText:
+ text_far _SilphCo4FScientistEndBattleText
text_end
-SilphCo4AfterBattleText3:
- text_far _SilphCo4AfterBattleText3
+SilphCo4FScientistAfterBattleText:
+ text_far _SilphCo4FScientistAfterBattleText
text_end
-SilphCo4Text4:
+SilphCo4FRocket2Text:
text_asm
ld hl, SilphCo4TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo4BattleText4:
- text_far _SilphCo4BattleText4
+SilphCo4FRocket2BattleText:
+ text_far _SilphCo4FRocket2BattleText
text_end
-SilphCo4EndBattleText4:
- text_far _SilphCo4EndBattleText4
+SilphCo4FRocket2EndBattleText:
+ text_far _SilphCo4FRocket2EndBattleText
text_end
-SilphCo4AfterBattleText4:
- text_far _SilphCo4AfterBattleText4
+SilphCo4FRocket2AfterBattleText:
+ text_far _SilphCo4FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCo5F.asm b/scripts/SilphCo5F.asm
index 58b64ba2..1834bfa8 100644
--- a/scripts/SilphCo5F.asm
+++ b/scripts/SilphCo5F.asm
@@ -1,5 +1,5 @@
SilphCo5F_Script:
- call SilphCo5Script_19f4d
+ call SilphCo5FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo5TrainerHeaders
ld de, SilphCo5F_ScriptPointers
@@ -8,32 +8,32 @@ SilphCo5F_Script:
ld [wSilphCo5FCurScript], a
ret
-SilphCo5Script_19f4d:
+SilphCo5FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo5GateCoords
- call SilphCo4Script_19d5d
- call SilphCo5Script_19f9e
+ ld hl, .GateCoordinates
+ call SilphCo4F_SetCardKeyDoorYScript
+ call SilphCo5F_SetUnlockedSilphCoDoorsScript
CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1
- jr nz, .asm_19f74
+ jr nz, .unlock_door1
push af
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 2, 3
predef ReplaceTileBlock
pop af
-.asm_19f74
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
- jr nz, .asm_19f87
+ jr nz, .unlock_door2
push af
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 6, 3
predef ReplaceTileBlock
pop af
-.asm_19f87
+.unlock_door2
CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2
ret nz
ld a, $5f
@@ -41,155 +41,157 @@ SilphCo5Script_19f4d:
lb bc, 5, 7
predef_jump ReplaceTileBlock
-SilphCo5GateCoords:
+.GateCoordinates:
dbmapcoord 3, 2
dbmapcoord 3, 6
dbmapcoord 7, 5
db -1 ; end
-SilphCo5Script_19f9e:
+SilphCo5F_SetUnlockedSilphCoDoorsScript:
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next1
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR1
ret
-.next1
+.unlock_door1
cp $2
- jr nz, .next2
+ jr nz, .unlock_door2
SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
ret
-.next2
+.unlock_door2
SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR1
ret
SilphCo5F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO5F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO5F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO5F_END_BATTLE
SilphCo5F_TextPointers:
- dw SilphCo5Text1
- dw SilphCo5Text2
- dw SilphCo5Text3
- dw SilphCo5Text4
- dw SilphCo5Text5
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw SilphCo5Text9
- dw SilphCo5Text10
- dw SilphCo5Text11
+ def_text_pointers
+ dw_const SilphCo5FSilphWorkerMText, TEXT_SILPHCO5F_SILPH_WORKER_M
+ dw_const SilphCo5FRocket1Text, TEXT_SILPHCO5F_ROCKET1
+ dw_const SilphCo5FScientistText, TEXT_SILPHCO5F_SCIENTIST
+ dw_const SilphCo5FRockerText, TEXT_SILPHCO5F_ROCKER
+ dw_const SilphCo5FRocket2Text, TEXT_SILPHCO5F_ROCKET2
+ dw_const PickUpItemText, TEXT_SILPHCO5F_TM_TAKE_DOWN
+ dw_const PickUpItemText, TEXT_SILPHCO5F_PROTEIN
+ dw_const PickUpItemText, TEXT_SILPHCO5F_CARD_KEY
+ dw_const SilphCo5FPokemonReport1Text, TEXT_SILPHCO5F_POKEMON_REPORT1
+ dw_const SilphCo5FPokemonReport2Text, TEXT_SILPHCO5F_POKEMON_REPORT2
+ dw_const SilphCo5FPokemonReport3Text, TEXT_SILPHCO5F_POKEMON_REPORT3
SilphCo5TrainerHeaders:
def_trainers 2
SilphCo5TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_0, 1, SilphCo5BattleText2, SilphCo5EndBattleText2, SilphCo5AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_0, 1, SilphCo5FRocket1BattleText, SilphCo5FRocket1EndBattleText, SilphCo5FRocket1AfterBattleText
SilphCo5TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_1, 2, SilphCo5BattleText3, SilphCo5EndBattleText3, SilphCo5AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_1, 2, SilphCo5FScientistBattleText, SilphCo5FScientistEndBattleText, SilphCo5FScientistAfterBattleText
SilphCo5TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_2, 4, SilphCo5BattleText4, SilphCo5EndBattleText4, SilphCo5AfterBattleText4
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_2, 4, SilphCo5FRockerBattleText, SilphCo5FRockerEndBattleText, SilphCo5FRockerAfterBattleText
SilphCo5TrainerHeader3:
- trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_3, 3, SilphCo5BattleText5, SilphCo5EndBattleText5, SilphCo5AfterBattleText5
+ trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_3, 3, SilphCo5FRocket2BattleText, SilphCo5FRocket2EndBattleText, SilphCo5FRocket2AfterBattleText
db -1 ; end
-SilphCo5Text1:
+SilphCo5FSilphWorkerMText:
text_asm
- ld hl, SilphCo5Text_1a010
- ld de, SilphCo5Text_1a015
- call SilphCo6Script_1a22f
+ ld hl, .ThatsYouRightText
+ ld de, .YoureOurHeroText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo5Text_1a010:
- text_far _SilphCo5Text_1a010
+.ThatsYouRightText:
+ text_far _SilphCo5FSilphWorkerMThatsYouRightText
text_end
-SilphCo5Text_1a015:
- text_far _SilphCo5Text_1a015
+.YoureOurHeroText:
+ text_far _SilphCo5FSilphWorkerMYoureOurHeroText
text_end
-SilphCo5Text2:
+SilphCo5FRocket1Text:
text_asm
ld hl, SilphCo5TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo5BattleText2:
- text_far _SilphCo5BattleText2
+SilphCo5FRocket1BattleText:
+ text_far _SilphCo5FRocket1BattleText
text_end
-SilphCo5EndBattleText2:
- text_far _SilphCo5EndBattleText2
+SilphCo5FRocket1EndBattleText:
+ text_far _SilphCo5FRocket1EndBattleText
text_end
-SilphCo5AfterBattleText2:
- text_far _SilphCo5AfterBattleText2
+SilphCo5FRocket1AfterBattleText:
+ text_far _SilphCo5FRocket1AfterBattleText
text_end
-SilphCo5Text3:
+SilphCo5FScientistText:
text_asm
ld hl, SilphCo5TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo5BattleText3:
- text_far _SilphCo5BattleText3
+SilphCo5FScientistBattleText:
+ text_far _SilphCo5FScientistBattleText
text_end
-SilphCo5EndBattleText3:
- text_far _SilphCo5EndBattleText3
+SilphCo5FScientistEndBattleText:
+ text_far _SilphCo5FScientistEndBattleText
text_end
-SilphCo5AfterBattleText3:
- text_far _SilphCo5AfterBattleText3
+SilphCo5FScientistAfterBattleText:
+ text_far _SilphCo5FScientistAfterBattleText
text_end
-SilphCo5Text4:
+SilphCo5FRockerText:
text_asm
ld hl, SilphCo5TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo5BattleText4:
- text_far _SilphCo5BattleText4
+SilphCo5FRockerBattleText:
+ text_far _SilphCo5FRockerBattleText
text_end
-SilphCo5EndBattleText4:
- text_far _SilphCo5EndBattleText4
+SilphCo5FRockerEndBattleText:
+ text_far _SilphCo5FRockerEndBattleText
text_end
-SilphCo5AfterBattleText4:
- text_far _SilphCo5AfterBattleText4
+SilphCo5FRockerAfterBattleText:
+ text_far _SilphCo5FRockerAfterBattleText
text_end
-SilphCo5Text5:
+SilphCo5FRocket2Text:
text_asm
ld hl, SilphCo5TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SilphCo5BattleText5:
- text_far _SilphCo5BattleText5
+SilphCo5FRocket2BattleText:
+ text_far _SilphCo5FRocket2BattleText
text_end
-SilphCo5EndBattleText5:
- text_far _SilphCo5EndBattleText5
+SilphCo5FRocket2EndBattleText:
+ text_far _SilphCo5FRocket2EndBattleText
text_end
-SilphCo5AfterBattleText5:
- text_far _SilphCo5AfterBattleText5
+SilphCo5FRocket2AfterBattleText:
+ text_far _SilphCo5FRocket2AfterBattleText
text_end
-SilphCo5Text9:
- text_far _SilphCo5Text9
+SilphCo5FPokemonReport1Text:
+ text_far _SilphCo5FPokemonReport1Text
text_end
-SilphCo5Text10:
- text_far _SilphCo5Text10
+SilphCo5FPokemonReport2Text:
+ text_far _SilphCo5FPokemonReport2Text
text_end
-SilphCo5Text11:
- text_far _SilphCo5Text11
+SilphCo5FPokemonReport3Text:
+ text_far _SilphCo5FPokemonReport3Text
text_end
diff --git a/scripts/SilphCo6F.asm b/scripts/SilphCo6F.asm
index 74cad978..0626ffdb 100644
--- a/scripts/SilphCo6F.asm
+++ b/scripts/SilphCo6F.asm
@@ -1,5 +1,5 @@
SilphCo6F_Script:
- call SilphCo6Script_1a1bf
+ call SilphCo6F_GateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo6TrainerHeaders
ld de, SilphCo6F_ScriptPointers
@@ -8,14 +8,14 @@ SilphCo6F_Script:
ld [wSilphCo6FCurScript], a
ret
-SilphCo6Script_1a1bf:
+SilphCo6F_GateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo6GateCoords
- call SilphCo4Script_19d5d
- call SilphCo6Script_1a1e6
+ ld hl, .GateCoordinates
+ call SilphCo4F_SetCardKeyDoorYScript
+ call SilphCo6F_UnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
ret nz
ld a, $5f
@@ -23,11 +23,11 @@ SilphCo6Script_1a1bf:
lb bc, 6, 2
predef_jump ReplaceTileBlock
-SilphCo6GateCoords:
+.GateCoordinates:
dbmapcoord 2, 6
db -1 ; end
-SilphCo6Script_1a1e6:
+SilphCo6F_UnlockedDoorEventScript:
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
@@ -35,167 +35,169 @@ SilphCo6Script_1a1e6:
ret
SilphCo6F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO6F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO6F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO6F_END_BATTLE
SilphCo6F_TextPointers:
- dw SilphCo6Text1
- dw SilphCo6Text2
- dw SilphCo6Text3
- dw SilphCo6Text4
- dw SilphCo6Text5
- dw SilphCo6Text6
- dw SilphCo6Text7
- dw SilphCo6Text8
- dw PickUpItemText
- dw PickUpItemText
+ def_text_pointers
+ dw_const SilphCo6FSilphWorkerM1Text, TEXT_SILPHCO6F_SILPH_WORKER_M1
+ dw_const SilphCo6FSilphWorkerM2Text, TEXT_SILPHCO6F_SILPH_WORKER_M2
+ dw_const SilphCo6FSilphWorkerF1Text, TEXT_SILPHCO6F_SILPH_WORKER_F1
+ dw_const SilphCo6FSilphWorkerF2Text, TEXT_SILPHCO6F_SILPH_WORKER_F2
+ dw_const SilphCo6FSilphWorkerM3Text, TEXT_SILPHCO6F_SILPH_WORKER_M3
+ dw_const SilphCo6FRocket1Text, TEXT_SILPHCO6F_ROCKET1
+ dw_const SilphCo6FScientistText, TEXT_SILPHCO6F_SCIENTIST
+ dw_const SilphCo6FRocket2Text, TEXT_SILPHCO6F_ROCKET2
+ dw_const PickUpItemText, TEXT_SILPHCO6F_HP_UP
+ dw_const PickUpItemText, TEXT_SILPHCO6F_X_ACCURACY
SilphCo6TrainerHeaders:
def_trainers 6
SilphCo6TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_0, 2, SilphCo6BattleText2, SilphCo6EndBattleText2, SilphCo6AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_0, 2, SilphCo6FRocket1BattleText, SilphCo6Rocket1EndBattleText, SilphCo6Rocket1AfterBattleText
SilphCo6TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_1, 3, SilphCo6BattleText3, SilphCo6EndBattleText3, SilphCo6AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_1, 3, SilphCo6FScientistBattleText, SilphCo6FScientistEndBattleText, SilphCo6FScientistAfterBattleText
SilphCo6TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 2, SilphCo6BattleText4, SilphCo6EndBattleText4, SilphCo6AfterBattleText4
+ trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 2, SilphCo6FRocket2BattleText, SilphCo6FRocket2EndBattleText, SilphCo6FRocket2AfterBattleText
db -1 ; end
-SilphCo6Script_1a22f:
+SilphCo6FBeatGiovanniPrintDEOrPrintHLScript:
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .asm_1a238
- jr .asm_1a23a
-.asm_1a238
+ jr nz, .beat_giovanni
+ jr .print_text
+.beat_giovanni
ld h, d
ld l, e
-.asm_1a23a
+.print_text
jp PrintText
-SilphCo6Text1:
+SilphCo6FSilphWorkerM1Text:
text_asm
- ld hl, SilphCo6Text_1a24a
- ld de, SilphCo6Text_1a24f
- call SilphCo6Script_1a22f
+ ld hl, .TookOverTheBuildingText
+ ld de, .BackToWorkText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo6Text_1a24a:
- text_far _SilphCo6Text_1a24a
+.TookOverTheBuildingText:
+ text_far _SilphCo6FSilphWorkerM1TookOverTheBuildingText
text_end
-SilphCo6Text_1a24f:
- text_far _SilphCo6Text_1a24f
+.BackToWorkText:
+ text_far _SilphCo6FSilphWorkerM1BackToWorkText
text_end
-SilphCo6Text2:
+SilphCo6FSilphWorkerM2Text:
text_asm
- ld hl, SilphCo6Text_1a261
- ld de, SilphCo6Text_1a266
- call SilphCo6Script_1a22f
+ ld hl, .HelpMePleaseText
+ ld de, .WeGotEngagedText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo6Text_1a261:
- text_far _SilphCo6Text_1a261
+.HelpMePleaseText:
+ text_far _SilphCo6FSilphWorkerMHelpMePleaseText
text_end
-SilphCo6Text_1a266:
- text_far _SilphCo6Text_1a266
+.WeGotEngagedText:
+ text_far _SilphCo6FSilphWorkerMWeGotEngagedText
text_end
-SilphCo6Text3:
+SilphCo6FSilphWorkerF1Text:
text_asm
- ld hl, SilphCo6Text_1a278
- ld de, SilphCo6Text_1a27d
- call SilphCo6Script_1a22f
+ ld hl, .SuchACowardText
+ ld de, .HaveToMarryHimText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo6Text_1a278:
- text_far _SilphCo6Text_1a278
+.SuchACowardText:
+ text_far _SilphCo6FSilphWorkerF1SuchACowardText
text_end
-SilphCo6Text_1a27d:
- text_far _SilphCo6Text_1a27d
+.HaveToMarryHimText:
+ text_far _SilphCo6FSilphWorkerF1HaveToMarryHimText
text_end
-SilphCo6Text4:
+SilphCo6FSilphWorkerF2Text:
text_asm
- ld hl, SilphCo6Text_1a28f
- ld de, SilphCo6Text_1a294
- call SilphCo6Script_1a22f
+ ld hl, .TeamRocketConquerWorldText
+ ld de, .TeamRocketRanText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo6Text_1a28f:
- text_far _SilphCo6Text_1a28f
+.TeamRocketConquerWorldText:
+ text_far _SilphCo6FSilphWorkerF2TeamRocketConquerWorldText
text_end
-SilphCo6Text_1a294:
- text_far _SilphCo6Text_1a294
+.TeamRocketRanText:
+ text_far _SilphCo6FSilphWorkerF2TeamRocketRanText
text_end
-SilphCo6Text5:
+SilphCo6FSilphWorkerM3Text:
text_asm
- ld hl, SilphCo6Text_1a2a6
- ld de, SilphCo6Text_1a2ab
- call SilphCo6Script_1a22f
+ ld hl, .TargetedSilphText
+ ld de, .WorkForSilphText
+ call SilphCo6FBeatGiovanniPrintDEOrPrintHLScript
jp TextScriptEnd
-SilphCo6Text_1a2a6:
- text_far _SilphCo6Text_1a2a6
+.TargetedSilphText:
+ text_far _SilphCo6FSilphWorkerM3TargetedSilphText
text_end
-SilphCo6Text_1a2ab:
- text_far _SilphCo6Text_1a2ab
+.WorkForSilphText:
+ text_far _SilphCo6FSilphWorkerM3WorkForSilphText
text_end
-SilphCo6Text6:
+SilphCo6FRocket1Text:
text_asm
ld hl, SilphCo6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo6BattleText2:
- text_far _SilphCo6BattleText2
+SilphCo6FRocket1BattleText:
+ text_far _SilphCo6FRocket1BattleText
text_end
-SilphCo6EndBattleText2:
- text_far _SilphCo6EndBattleText2
+SilphCo6Rocket1EndBattleText:
+ text_far _SilphCo6Rocket1EndBattleText
text_end
-SilphCo6AfterBattleText2:
- text_far _SilphCo6AfterBattleText2
+SilphCo6Rocket1AfterBattleText:
+ text_far _SilphCo6Rocket1AfterBattleText
text_end
-SilphCo6Text7:
+SilphCo6FScientistText:
text_asm
ld hl, SilphCo6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo6BattleText3:
- text_far _SilphCo6BattleText3
+SilphCo6FScientistBattleText:
+ text_far _SilphCo6FScientistBattleText
text_end
-SilphCo6EndBattleText3:
- text_far _SilphCo6EndBattleText3
+SilphCo6FScientistEndBattleText:
+ text_far _SilphCo6FScientistEndBattleText
text_end
-SilphCo6AfterBattleText3:
- text_far _SilphCo6AfterBattleText3
+SilphCo6FScientistAfterBattleText:
+ text_far _SilphCo6FScientistAfterBattleText
text_end
-SilphCo6Text8:
+SilphCo6FRocket2Text:
text_asm
ld hl, SilphCo6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo6BattleText4:
- text_far _SilphCo6BattleText4
+SilphCo6FRocket2BattleText:
+ text_far _SilphCo6FRocket2BattleText
text_end
-SilphCo6EndBattleText4:
- text_far _SilphCo6EndBattleText4
+SilphCo6FRocket2EndBattleText:
+ text_far _SilphCo6FRocket2EndBattleText
text_end
-SilphCo6AfterBattleText4:
- text_far _SilphCo6AfterBattleText4
+SilphCo6FRocket2AfterBattleText:
+ text_far _SilphCo6FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm
index b2a63292..131cf851 100644
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -1,5 +1,5 @@
SilphCo7F_Script:
- call SilphCo7Script_51b77
+ call SilphCo7F_GateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo7TrainerHeaders
ld de, SilphCo7F_ScriptPointers
@@ -8,32 +8,32 @@ SilphCo7F_Script:
ld [wSilphCo7FCurScript], a
ret
-SilphCo7Script_51b77:
+SilphCo7F_GateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo7GateCoords
- call SilphCo7Text_51bc8
- call SilphCo7Text_51bf4
+ ld hl, .GateCoordinates
+ call SilphCo7F_SetCardKeyDoorYScript
+ call SilphCo7F_UnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1
- jr nz, .asm_51b9e
+ jr nz, .unlock_door1
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 3, 5
predef ReplaceTileBlock
pop af
-.asm_51b9e
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
- jr nz, .asm_51bb1
+ jr nz, .unlock_door2
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 2, 10
predef ReplaceTileBlock
pop af
-.asm_51bb1
+.unlock_door2
CheckEventAfterBranchReuseA EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR2
ret nz
ld a, $54
@@ -41,13 +41,13 @@ SilphCo7Script_51b77:
lb bc, 6, 10
predef_jump ReplaceTileBlock
-SilphCo7GateCoords:
+.GateCoordinates:
dbmapcoord 5, 3
dbmapcoord 10, 2
dbmapcoord 10, 6
db -1 ; end
-SilphCo7Text_51bc8:
+SilphCo7F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -57,76 +57,77 @@ SilphCo7Text_51bc8:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_51bd4
+.loop_check_doors
ld a, [hli]
cp $ff
- jr z, .asm_51bf0
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_51be5
+ jr z, .check_y_coord
inc hl
- jr .asm_51bd4
-.asm_51be5
+ jr .loop_check_doors
+.check_y_coord
ld a, [hli]
cp c
- jr nz, .asm_51bd4
+ jr nz, .loop_check_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_51bf0
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo7Text_51bf4:
+SilphCo7F_UnlockedDoorEventScript:
EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next1
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR1
ret
-.next1
+.unlock_door1
cp $2
- jr nz, .next2
+ jr nz, .unlock_door2
SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR2, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
ret
-.next2
+.unlock_door2
SetEventAfterBranchReuseHL EVENT_SILPH_CO_7_UNLOCKED_DOOR3, EVENT_SILPH_CO_7_UNLOCKED_DOOR1
ret
-SilphCo7Text_51c0c:
+SilphCo7FSetDefaultScript:
xor a
ld [wJoyIgnore], a
-SilphCo7Text_51c10:
+SilphCo7FSetCurScript:
ld [wSilphCo7FCurScript], a
ld [wCurMapScript], a
ret
SilphCo7F_ScriptPointers:
- dw SilphCo7Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw SilphCo7Script3
- dw SilphCo7Script4
- dw SilphCo7Script5
+ def_script_pointers
+ dw_const SilphCo7FDefaultScript, SCRIPT_SILPHCO7F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO7F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO7F_END_BATTLE
+ dw_const SilphCo7FRivalStartBattleScript, SCRIPT_SILPHCO7F_RIVAL_START_BATTLE
+ dw_const SilphCo7FRivalAfterBattleScript, SCRIPT_SILPHCO7F_RIVAL_AFTER_BATTLE
+ dw_const SilphCo7FRivalExitScript, SCRIPT_SILPHCO7F_RIVAL_EXIT
-SilphCo7Script0:
+SilphCo7FDefaultScript:
CheckEvent EVENT_BEAT_SILPH_CO_RIVAL
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_51c78
+ ld hl, .RivalEncounterCoordinates
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ldh [hJoyHeld], a
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
@@ -134,99 +135,99 @@ SilphCo7Script0:
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
- ld a, $9
+ ld a, TEXT_SILPHCO7F_RIVAL
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $9
+ ld a, SILPHCO7F_RIVAL
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
- ld de, MovementData_51c7d
+ ld de, .RivalMovementUp
ld a, [wCoordIndex]
ld [wcf0d], a
cp $1
- jr z, .asm_51c6c
+ jr z, .full_rival_movement
inc de
-.asm_51c6c
- ld a, $9
+.full_rival_movement
+ ld a, SILPHCO7F_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $3
- jp SilphCo7Text_51c10
+ ld a, SCRIPT_SILPHCO7F_RIVAL_START_BATTLE
+ jp SilphCo7FSetCurScript
-CoordsData_51c78:
+.RivalEncounterCoordinates:
dbmapcoord 3, 2
dbmapcoord 3, 3
db -1 ; end
-MovementData_51c7d:
+.RivalMovementUp:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db -1 ; end
-SilphCo7Script3:
+SilphCo7FRivalStartBattleScript:
ld a, [wd730]
bit 0, a
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $d
+ ld a, TEXT_SILPHCO7F_RIVAL_WAITED_HERE
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, SilphCo7Text14
- ld de, SilphCo7Text_51ecd
+ ld hl, SilphCo7FRivalDefeatedText
+ ld de, SilphCo7FRivalVictoryText
call SaveEndBattleTextPointers
ld a, OPP_RIVAL2
ld [wCurOpponent], a
ld a, [wRivalStarter]
add 4
ld [wTrainerNo], a
- ld a, $4
- call SilphCo7Text_51c10
+ ld a, SCRIPT_SILPHCO7F_RIVAL_AFTER_BATTLE
+ call SilphCo7FSetCurScript
ret
-SilphCo7Script4:
+SilphCo7FRivalAfterBattleScript:
ld a, [wIsInBattle]
cp $ff
- jp z, SilphCo7Text_51c0c
- ld a, $f0
+ jp z, SilphCo7FSetDefaultScript
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_SILPH_CO_RIVAL
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
- ld a, $9
+ ld a, SILPHCO7F_RIVAL
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_UP
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $f
+ ld a, TEXT_SILPHCO7F_RIVAL_GOOD_LUCK_TO_YOU
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StopAllMusic
farcall Music_RivalAlternateStart
- ld de, MovementData_51d1d
+ ld de, .RivalWalkAroundPlayerMovement
ld a, [wcf0d]
cp $1
- jr nz, .asm_51d0e
- ld de, MovementData_51d1a
-.asm_51d0e
- ld a, $9
+ jr nz, .walk_around_player
+ ld de, .RivalExitRightMovement
+.walk_around_player
+ ld a, SILPHCO7F_RIVAL
ldh [hSpriteIndex], a
call MoveSprite
- ld a, $5
- jp SilphCo7Text_51c10
+ ld a, SCRIPT_SILPHCO7F_RIVAL_EXIT
+ jp SilphCo7FSetCurScript
-MovementData_51d1a:
+.RivalExitRightMovement:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_RIGHT
db -1 ; end
-MovementData_51d1d:
+.RivalWalkAroundPlayerMovement:
db NPC_MOVEMENT_LEFT
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
@@ -236,7 +237,7 @@ MovementData_51d1d:
db NPC_MOVEMENT_DOWN
db -1 ; end
-SilphCo7Script5:
+SilphCo7FRivalExitScript:
ld a, [wd730]
bit 0, a
ret nz
@@ -246,50 +247,51 @@ SilphCo7Script5:
call PlayDefaultMusic
xor a
ld [wJoyIgnore], a
- jp SilphCo7Text_51c10
+ jp SilphCo7FSetCurScript
SilphCo7F_TextPointers:
- dw SilphCo7Text1
- dw SilphCo7Text2
- dw SilphCo7Text3
- dw SilphCo7Text4
- dw SilphCo7Text5
- dw SilphCo7Text6
- dw SilphCo7Text7
- dw SilphCo7Text8
- dw SilphCo7Text9
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw SilphCo7Text13
- dw SilphCo7Text14
- dw SilphCo7Text15
+ def_text_pointers
+ dw_const SilphCo7FSilphWorkerM1Text, TEXT_SILPHCO7F_SILPH_WORKER_M1
+ dw_const SilphCo7FSilphWorkerM2Text, TEXT_SILPHCO7F_SILPH_WORKER_M2
+ dw_const SilphCo7FSilphWorkerM3Text, TEXT_SILPHCO7F_SILPH_WORKER_M3
+ dw_const SilphCo7FSilphWorkerM4Text, TEXT_SILPHCO7F_SILPH_WORKER_M4
+ dw_const SilphCo7FRocket1Text, TEXT_SILPHCO7F_ROCKET1
+ dw_const SilphCo7FScientistText, TEXT_SILPHCO7F_SCIENTIST
+ dw_const SilphCo7FRocket2Text, TEXT_SILPHCO7F_ROCKET2
+ dw_const SilphCo7FRocket3Text, TEXT_SILPHCO7F_ROCKET3
+ dw_const SilphCo7FRivalText, TEXT_SILPHCO7F_RIVAL
+ dw_const PickUpItemText, TEXT_SILPHCO7F_CALCIUM
+ dw_const PickUpItemText, TEXT_SILPHCO7F_TM_SWORDS_DANCE
+ dw_const PickUpItemText, TEXT_SILPHCO7F_UNREFERENCED_ITEM ; unreferenced
+ dw_const SilphCo7FRivalWaitedHereText, TEXT_SILPHCO7F_RIVAL_WAITED_HERE
+ dw_const SilphCo7FRivalDefeatedText, TEXT_SILPHCO7F_RIVAL_DEFEATED
+ dw_const SilphCo7FRivalGoodLuckToYouText, TEXT_SILPHCO7F_RIVAL_GOOD_LUCK_TO_YOU
SilphCo7TrainerHeaders:
def_trainers 5
SilphCo7TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_0, 2, SilphCo7BattleText1, SilphCo7EndBattleText1, SilphCo7AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_0, 2, SilphCo7FRocket1BattleText, SilphCo7FRocket1EndBattleText, SilphCo7FRocket1AfterBattleText
SilphCo7TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_1, 3, SilphCo7BattleText2, SilphCo7EndBattleText2, SilphCo7AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_1, 3, SilphCo7FScientistBattleText, SilphCo7FScientistEndBattleText, SilphCo7FScientistAfterBattleText
SilphCo7TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_2, 3, SilphCo7BattleText3, SilphCo7EndBattleText3, SilphCo7AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_2, 3, SilphCo7FRocket2BattleText, SilphCo7FRocket2EndBattleText, SilphCo7FRocket2AfterBattleText
SilphCo7TrainerHeader3:
- trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 4, SilphCo7BattleText4, SilphCo7EndBattleText4, SilphCo7AfterBattleText4
+ trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 4, SilphCo7FRocket3BattleText, SilphCo7FRocket3EndBattleText, SilphCo7FRocket3AfterBattleText
db -1 ; end
-SilphCo7Text1:
+SilphCo7FSilphWorkerM1Text:
; lapras guy
text_asm
ld a, [wd72e]
bit 0, a ; got lapras?
- jr z, .givelapras
+ jr z, .give_lapras
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .savedsilph
- ld hl, .LaprasGuyText
+ jr nz, .saved_silph
+ ld hl, .IsOurPresidentOkText
call PrintText
jr .done
-.givelapras
- ld hl, .MeetLaprasGuyText
+.give_lapras
+ ld hl, .HaveThisPokemonText
call PrintText
lb bc, LAPRAS, 15
call GivePokemon
@@ -298,190 +300,190 @@ SilphCo7Text1:
and a
call z, WaitForTextScrollButtonPress
call EnableAutoTextBoxDrawing
- ld hl, .HeresYourLaprasText
+ ld hl, .LaprasDescriptionText
call PrintText
ld hl, wd72e
set 0, [hl]
jr .done
-.savedsilph
- ld hl, .LaprasGuySavedText
+.saved_silph
+ ld hl, .SavedText
call PrintText
.done
jp TextScriptEnd
-.MeetLaprasGuyText
- text_far _MeetLaprasGuyText
+.HaveThisPokemonText
+ text_far _SilphCo7FSilphWorkerM1HaveThisPokemonText
text_end
-.HeresYourLaprasText
- text_far _HeresYourLaprasText
+.LaprasDescriptionText
+ text_far _SilphCo7FSilphWorkerM1LaprasDescriptionText
text_end
-.LaprasGuyText
- text_far _LaprasGuyText
+.IsOurPresidentOkText
+ text_far _SilphCo7FSilphWorkerM1IsOurPresidentOkText
text_end
-.LaprasGuySavedText
- text_far _LaprasGuySavedText
+.SavedText
+ text_far _SilphCo7FSilphWorkerM1SavedText
text_end
-SilphCo7Text2:
+SilphCo7FSilphWorkerM2Text:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .savedsilph
- ld hl, .rockettext
+ jr nz, .saved_silph
+ ld hl, .AfterTheMasterBallText
call PrintText
jr .done
-.savedsilph
- ld hl, .savedtext
+.saved_silph
+ ld hl, .CancelledTheMasterBallText
call PrintText
.done
jp TextScriptEnd
-.rockettext
- text_far _SilphCo7Text_51e00
+.AfterTheMasterBallText
+ text_far _SilphCo7FSilphWorkerM2AfterTheMasterBallText
text_end
-.savedtext
- text_far _CanceledMasterBallText
+.CancelledTheMasterBallText
+ text_far _SilphCo7FSilphWorkerM2CancelledMasterBallText
text_end
-SilphCo7Text3:
+SilphCo7FSilphWorkerM3Text:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .savedsilph
- ld hl, .rockettext
+ jr nz, .saved_silph
+ ld hl, .ItWouldBeBadText
call PrintText
jr .done
-.savedsilph
- ld hl, .savedtext
+.saved_silph
+ ld hl, .YouChasedOffTeamRocketText
call PrintText
.done
jp TextScriptEnd
-.rockettext
- text_far _SilphCo7Text_51e23
+.ItWouldBeBadText
+ text_far _SilphCo7FSilphWorkerM3ItWouldBeBadText
text_end
-.savedtext
- text_far _SilphCo7Text_51e28
+.YouChasedOffTeamRocketText
+ text_far _SilphCo7FSilphWorkerM3YouChasedOffTeamRocketText
text_end
-SilphCo7Text4:
+SilphCo7FSilphWorkerM4Text:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .savedsilph
- ld hl, .rockettext
+ jr nz, .saved_silph
+ ld hl, .ItsReallyDangerousHereText
call PrintText
jr .done
-.savedsilph
- ld hl, .savedtext
+.saved_silph
+ ld hl, .SafeAtLastText
call PrintText
.done
jp TextScriptEnd
-.rockettext
- text_far _SilphCo7Text_51e46
+.ItsReallyDangerousHereText
+ text_far _SilphCo7FSilphWorkerM4ItsReallyDangerousHereText
text_end
-.savedtext
- text_far _SilphCo7Text_51e4b
+.SafeAtLastText
+ text_far _SilphCo7FSilphWorkerM4SafeAtLastText
text_end
-SilphCo7Text5:
+SilphCo7FRocket1Text:
text_asm
ld hl, SilphCo7TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo7BattleText1:
- text_far _SilphCo7BattleText1
+SilphCo7FRocket1BattleText:
+ text_far _SilphCo7FRocket1BattleText
text_end
-SilphCo7EndBattleText1:
- text_far _SilphCo7EndBattleText1
+SilphCo7FRocket1EndBattleText:
+ text_far _SilphCo7FRocket1EndBattleText
text_end
-SilphCo7AfterBattleText1:
- text_far _SilphCo7AfterBattleText1
+SilphCo7FRocket1AfterBattleText:
+ text_far _SilphCo7FRocket1AfterBattleText
text_end
-SilphCo7Text6:
+SilphCo7FScientistText:
text_asm
ld hl, SilphCo7TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo7BattleText2:
- text_far _SilphCo7BattleText2
+SilphCo7FScientistBattleText:
+ text_far _SilphCo7FScientistBattleText
text_end
-SilphCo7EndBattleText2:
- text_far _SilphCo7EndBattleText2
+SilphCo7FScientistEndBattleText:
+ text_far _SilphCo7FScientistEndBattleText
text_end
-SilphCo7AfterBattleText2:
- text_far _SilphCo7AfterBattleText2
+SilphCo7FScientistAfterBattleText:
+ text_far _SilphCo7FScientistAfterBattleText
text_end
-SilphCo7Text7:
+SilphCo7FRocket2Text:
text_asm
ld hl, SilphCo7TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo7BattleText3:
- text_far _SilphCo7BattleText3
+SilphCo7FRocket2BattleText:
+ text_far _SilphCo7FRocket2BattleText
text_end
-SilphCo7EndBattleText3:
- text_far _SilphCo7EndBattleText3
+SilphCo7FRocket2EndBattleText:
+ text_far _SilphCo7FRocket2EndBattleText
text_end
-SilphCo7AfterBattleText3:
- text_far _SilphCo7AfterBattleText3
+SilphCo7FRocket2AfterBattleText:
+ text_far _SilphCo7FRocket2AfterBattleText
text_end
-SilphCo7Text8:
+SilphCo7FRocket3Text:
text_asm
ld hl, SilphCo7TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-SilphCo7BattleText4:
- text_far _SilphCo7BattleText4
+SilphCo7FRocket3BattleText:
+ text_far _SilphCo7FRocket3BattleText
text_end
-SilphCo7EndBattleText4:
- text_far _SilphCo7EndBattleText4
+SilphCo7FRocket3EndBattleText:
+ text_far _SilphCo7FRocket3EndBattleText
text_end
-SilphCo7AfterBattleText4:
- text_far _SilphCo7AfterBattleText4
+SilphCo7FRocket3AfterBattleText:
+ text_far _SilphCo7FRocket3AfterBattleText
text_end
-SilphCo7Text9:
+SilphCo7FRivalText:
text_asm
- ld hl, SilphCo7Text_51ebe
+ ld hl, .Text
call PrintText
jp TextScriptEnd
-SilphCo7Text_51ebe:
- text_far _SilphCo7Text_51ebe
+.Text:
+ text_far _SilphCo7FRivalText
text_end
-SilphCo7Text13:
- text_far _SilphCo7Text_51ec3
+SilphCo7FRivalWaitedHereText:
+ text_far _SilphCo7FRivalWaitedHereText
text_end
-SilphCo7Text14:
- text_far _SilphCo7Text_51ec8
+SilphCo7FRivalDefeatedText:
+ text_far _SilphCo7FRivalDefeatedText
text_end
-SilphCo7Text_51ecd:
- text_far _SilphCo7Text_51ecd
+SilphCo7FRivalVictoryText:
+ text_far _SilphCo7FRivalVictoryText
text_end
-SilphCo7Text15:
- text_far _SilphCo7Text_51ed2
+SilphCo7FRivalGoodLuckToYouText:
+ text_far _SilphCo7FRivalGoodLuckToYouText
text_end
diff --git a/scripts/SilphCo8F.asm b/scripts/SilphCo8F.asm
index d86f433a..cdd7f486 100644
--- a/scripts/SilphCo8F.asm
+++ b/scripts/SilphCo8F.asm
@@ -1,5 +1,5 @@
SilphCo8F_Script:
- call SilphCo8Script_5651a
+ call SilphCo8FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo8TrainerHeaders
ld de, SilphCo8F_ScriptPointers
@@ -8,14 +8,14 @@ SilphCo8F_Script:
ld [wSilphCo8FCurScript], a
ret
-SilphCo8Script_5651a:
+SilphCo8FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo8GateCoords
- call SilphCo8Script_56541
- call SilphCo8Script_5656d
+ ld hl, .GateCoordinates
+ call SilphCo8F_SetCardKeyDoorYScript
+ call SilphCo8F_UnlockedDoorEventScript
CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR
ret nz
ld a, $5f
@@ -23,11 +23,11 @@ SilphCo8Script_5651a:
lb bc, 4, 3
predef_jump ReplaceTileBlock
-SilphCo8GateCoords:
+.GateCoordinates:
dbmapcoord 3, 4
db -1 ; end
-SilphCo8Script_56541:
+SilphCo8F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -37,33 +37,33 @@ SilphCo8Script_56541:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_5654d
+.loop_check_doors
ld a, [hli]
cp $ff
- jr z, .asm_56569
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_5655e
+ jr z, .check_y_coord
inc hl
- jr .asm_5654d
-.asm_5655e
+ jr .loop_check_doors
+.check_y_coord
ld a, [hli]
cp c
- jr nz, .asm_5654d
+ jr nz, .loop_check_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_56569
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo8Script_5656d:
+SilphCo8F_UnlockedDoorEventScript:
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
@@ -71,94 +71,96 @@ SilphCo8Script_5656d:
ret
SilphCo8F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO8F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO8F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO8F_END_BATTLE
SilphCo8F_TextPointers:
- dw SilphCo8Text1
- dw SilphCo8Text2
- dw SilphCo8Text3
- dw SilphCo8Text4
+ def_text_pointers
+ dw_const SilphCo8FSilphWorkerMText, TEXT_SILPHCO8F_SILPH_WORKER_M
+ dw_const SilphCo8FRocket1Text, TEXT_SILPHCO8F_ROCKET1
+ dw_const SilphCo8FScientistText, TEXT_SILPHCO8F_SCIENTIST
+ dw_const SilphCo8FRocket2Text, TEXT_SILPHCO8F_ROCKET2
SilphCo8TrainerHeaders:
def_trainers 2
SilphCo8TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_0, 4, SilphCo8BattleText1, SilphCo8EndBattleText1, SilphCo8AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_0, 4, SilphCo8FRocket1BattleText, SilphCo8FRocket1EndBattleText, SilphCo8FRocket1AfterBattleText
SilphCo8TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_1, 4, SilphCo8BattleText2, SilphCo8EndBattleText2, SilphCo8AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_1, 4, SilphCo8FScientistBattleText, SilphCo8FScientistEndBattleText, SilphCo8FScientistAfterBattleText
SilphCo8TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_2, 4, SilphCo8BattleText3, SilphCo8EndBattleText3, SilphCo8AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_2, 4, SilphCo8FRocket2BattleText, SilphCo8FRocket2EndBattleText, SilphCo8FRocket2AfterBattleText
db -1 ; end
-SilphCo8Text1:
+SilphCo8FSilphWorkerMText:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- ld hl, SilphCo8Text_565c3
- jr nz, .asm_565b8
- ld hl, SilphCo8Text_565be
-.asm_565b8
+ ld hl, .ThanksForSavingUsText
+ jr nz, .beat_giovanni
+ ld hl, .SilphIsFinishedText
+.beat_giovanni
call PrintText
jp TextScriptEnd
-SilphCo8Text_565be:
- text_far _SilphCo8Text_565be
+.SilphIsFinishedText:
+ text_far __SilphCo8FSilphWorkerMThanksForSavingUsText
text_end
-SilphCo8Text_565c3:
- text_far _SilphCo8Text_565c3
+.ThanksForSavingUsText:
+ text_far _SilphCo8FSilphWorkerMThanksForSavingUsText
text_end
-SilphCo8Text2:
+SilphCo8FRocket1Text:
text_asm
ld hl, SilphCo8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo8Text3:
+SilphCo8FScientistText:
text_asm
ld hl, SilphCo8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo8Text4:
+SilphCo8FRocket2Text:
text_asm
ld hl, SilphCo8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo8BattleText1:
- text_far _SilphCo8BattleText1
+SilphCo8FRocket1BattleText:
+ text_far _SilphCo8FRocket1BattleText
text_end
-SilphCo8EndBattleText1:
- text_far _SilphCo8EndBattleText1
+SilphCo8FRocket1EndBattleText:
+ text_far _SilphCo8FRocket1EndBattleText
text_end
-SilphCo8AfterBattleText1:
- text_far _SilphCo8AfterBattleText1
+SilphCo8FRocket1AfterBattleText:
+ text_far _SilphCo8FRocket1AfterBattleText
text_end
-SilphCo8BattleText2:
- text_far _SilphCo8BattleText2
+SilphCo8FScientistBattleText:
+ text_far _SilphCo8FScientistBattleText
text_end
-SilphCo8EndBattleText2:
- text_far _SilphCo8EndBattleText2
+SilphCo8FScientistEndBattleText:
+ text_far _SilphCo8FScientistEndBattleText
text_end
-SilphCo8AfterBattleText2:
- text_far _SilphCo8AfterBattleText2
+SilphCo8FScientistAfterBattleText:
+ text_far _SilphCo8FScientistAfterBattleText
text_end
-SilphCo8BattleText3:
- text_far _SilphCo8BattleText3
+SilphCo8FRocket2BattleText:
+ text_far _SilphCo8FRocket2BattleText
text_end
-SilphCo8EndBattleText3:
- text_far _SilphCo8EndBattleText3
+SilphCo8FRocket2EndBattleText:
+ text_far _SilphCo8FRocket2EndBattleText
text_end
-SilphCo8AfterBattleText3:
- text_far _SilphCo8AfterBattleText3
+SilphCo8FRocket2AfterBattleText:
+ text_far _SilphCo8FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCo9F.asm b/scripts/SilphCo9F.asm
index 3f76fb52..fe7f3da2 100644
--- a/scripts/SilphCo9F.asm
+++ b/scripts/SilphCo9F.asm
@@ -1,5 +1,5 @@
SilphCo9F_Script:
- call SilphCo9Script_5d7d1
+ call SilphCo9FGateCallbackScript
call EnableAutoTextBoxDrawing
ld hl, SilphCo9TrainerHeaders
ld de, SilphCo9F_ScriptPointers
@@ -8,41 +8,41 @@ SilphCo9F_Script:
ld [wSilphCo9FCurScript], a
ret
-SilphCo9Script_5d7d1:
+SilphCo9FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
- ld hl, SilphCo9GateCoords
- call SilphCo9Script_5d837
- call SilphCo9Script_5d863
+ ld hl, .GateCoordinates
+ call SilphCo9F_SetCardKeyDoorYScript
+ call SilphCo9F_SetUnlockedSilphCoDoorsScript
CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1
- jr nz, .asm_5d7f8
+ jr nz, .unlock_door1
push af
ld a, $5f
ld [wNewTileBlockID], a
lb bc, 4, 1
predef ReplaceTileBlock
pop af
-.asm_5d7f8
+.unlock_door1
CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
- jr nz, .asm_5d80b
+ jr nz, .unlock_door2
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 2, 9
predef ReplaceTileBlock
pop af
-.asm_5d80b
+.unlock_door2
CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR2
- jr nz, .asm_5d81e
+ jr nz, .unlock_door3
push af
ld a, $54
ld [wNewTileBlockID], a
lb bc, 5, 9
predef ReplaceTileBlock
pop af
-.asm_5d81e
+.unlock_door3
CheckEventAfterBranchReuseA EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR3
ret nz
ld a, $5f
@@ -50,14 +50,14 @@ SilphCo9Script_5d7d1:
lb bc, 6, 5
predef_jump ReplaceTileBlock
-SilphCo9GateCoords:
+.GateCoordinates:
dbmapcoord 1, 4
dbmapcoord 9, 2
dbmapcoord 9, 5
dbmapcoord 5, 6
db -1 ; end
-SilphCo9Script_5d837:
+SilphCo9F_SetCardKeyDoorYScript:
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
@@ -67,159 +67,161 @@ SilphCo9Script_5d837:
xor a
ldh [hUnlockedSilphCoDoors], a
pop hl
-.asm_5d843
+.loop_card_key_doors
ld a, [hli]
cp $ff
- jr z, .asm_5d85f
+ jr z, .exit_loop
push hl
ld hl, hUnlockedSilphCoDoors
inc [hl]
pop hl
cp b
- jr z, .asm_5d854
+ jr z, .check_door
inc hl
- jr .asm_5d843
-.asm_5d854
+ jr .loop_card_key_doors
+.check_door
ld a, [hli]
cp c
- jr nz, .asm_5d843
+ jr nz, .loop_card_key_doors
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
-.asm_5d85f
+.exit_loop
xor a
ldh [hUnlockedSilphCoDoors], a
ret
-SilphCo9Script_5d863:
+SilphCo9F_SetUnlockedSilphCoDoorsScript:
EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
ldh a, [hUnlockedSilphCoDoors]
and a
ret z
cp $1
- jr nz, .next1
+ jr nz, .unlock_door1
SetEventReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR1
ret
-.next1
+.unlock_door1
cp $2
- jr nz, .next2
+ jr nz, .unlock_door2
SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR2, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
ret
-.next2
+.unlock_door2
cp $3
- jr nz, .next3
+ jr nz, .unlock_door3
SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR3, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
ret
-.next3
+.unlock_door3
cp $4
ret nz
SetEventAfterBranchReuseHL EVENT_SILPH_CO_9_UNLOCKED_DOOR4, EVENT_SILPH_CO_9_UNLOCKED_DOOR1
ret
SilphCo9F_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO9F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO9F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_SILPHCO9F_END_BATTLE
SilphCo9F_TextPointers:
- dw SilphCo9Text1
- dw SilphCo9Text2
- dw SilphCo9Text3
- dw SilphCo9Text4
+ def_text_pointers
+ dw_const SilphCo9FNurseText, TEXT_SILPHCO9F_NURSE
+ dw_const SilphCo9FRocket1Text, TEXT_SILPHCO9F_ROCKET1
+ dw_const SilphCo9FScientistText, TEXT_SILPHCO9F_SCIENTIST
+ dw_const SilphCo9FRocket2Text, TEXT_SILPHCO9F_ROCKET2
SilphCo9TrainerHeaders:
def_trainers 2
SilphCo9TrainerHeader0:
- trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_0, 4, SilphCo9BattleText1, SilphCo9EndBattleText1, SilphCo9AfterBattleText1
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_0, 4, SilphCo9FRocket1BattleText, SilphCo9FRocket1EndBattleText, SilphCo9FRocket1AfterBattleText
SilphCo9TrainerHeader1:
- trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_1, 2, SilphCo9BattleText2, SilphCo9EndBattleText2, SilphCo9AfterBattleText2
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_1, 2, SilphCo9FScientistBattleText, SilphCo9FScientistEndBattleText, SilphCo9FScientistAfterBattleText
SilphCo9TrainerHeader2:
- trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_2, 4, SilphCo9BattleText3, SilphCo9EndBattleText3, SilphCo9AfterBattleText3
+ trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_2, 4, SilphCo9FRocket2BattleText, SilphCo9FRocket2EndBattleText, SilphCo9FRocket2AfterBattleText
db -1 ; end
-SilphCo9Text1:
+SilphCo9FNurseText:
text_asm
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
- jr nz, .asm_5d8dc
- ld hl, SilphCo9Text_5d8e5
+ jr nz, .beat_giovanni
+ ld hl, .YouLookTiredText
call PrintText
predef HealParty
call GBFadeOutToWhite
call Delay3
call GBFadeInFromWhite
- ld hl, SilphCo9Text_5d8ea
+ ld hl, .DontGiveUpText
call PrintText
- jr .asm_5d8e2
-.asm_5d8dc
- ld hl, SilphCo9Text_5d8ef
+ jr .text_script_end
+.beat_giovanni
+ ld hl, .ThankYouText
call PrintText
-.asm_5d8e2
+.text_script_end
jp TextScriptEnd
-SilphCo9Text_5d8e5:
- text_far _SilphCo9Text_5d8e5
+.YouLookTiredText:
+ text_far SilphCo9FNurseYouLookTiredText
text_end
-SilphCo9Text_5d8ea:
- text_far _SilphCo9Text_5d8ea
+.DontGiveUpText:
+ text_far SilphCo9FNurseDontGiveUpText
text_end
-SilphCo9Text_5d8ef:
- text_far _SilphCo9Text_5d8ef
+.ThankYouText:
+ text_far SilphCo9FNurseThankYouText
text_end
-SilphCo9Text2:
+SilphCo9FRocket1Text:
text_asm
ld hl, SilphCo9TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-SilphCo9Text3:
+SilphCo9FScientistText:
text_asm
ld hl, SilphCo9TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-SilphCo9Text4:
+SilphCo9FRocket2Text:
text_asm
ld hl, SilphCo9TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-SilphCo9BattleText1:
- text_far _SilphCo9BattleText1
+SilphCo9FRocket1BattleText:
+ text_far _SilphCo9FRocket1BattleText
text_end
-SilphCo9EndBattleText1:
- text_far _SilphCo9EndBattleText1
+SilphCo9FRocket1EndBattleText:
+ text_far _SilphCo9FRocket1EndBattleText
text_end
-SilphCo9AfterBattleText1:
- text_far _SilphCo9AfterBattleText1
+SilphCo9FRocket1AfterBattleText:
+ text_far _SilphCo9FRocket1AfterBattleText
text_end
-SilphCo9BattleText2:
- text_far _SilphCo9BattleText2
+SilphCo9FScientistBattleText:
+ text_far _SilphCo9FScientistBattleText
text_end
-SilphCo9EndBattleText2:
- text_far _SilphCo9EndBattleText2
+SilphCo9FScientistEndBattleText:
+ text_far _SilphCo9FScientistEndBattleText
text_end
-SilphCo9AfterBattleText2:
- text_far _SilphCo9AfterBattleText2
+SilphCo9FScientistAfterBattleText:
+ text_far _SilphCo9FScientistAfterBattleText
text_end
-SilphCo9BattleText3:
- text_far _SilphCo9BattleText3
+SilphCo9FRocket2BattleText:
+ text_far _SilphCo9FRocket2BattleText
text_end
-SilphCo9EndBattleText3:
- text_far _SilphCo9EndBattleText3
+SilphCo9FRocket2EndBattleText:
+ text_far _SilphCo9FRocket2EndBattleText
text_end
-SilphCo9AfterBattleText3:
- text_far _SilphCo9AfterBattleText3
+SilphCo9FRocket2AfterBattleText:
+ text_far _SilphCo9FRocket2AfterBattleText
text_end
diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm
index c898cbd1..a2ed009e 100644
--- a/scripts/SilphCoElevator.asm
+++ b/scripts/SilphCoElevator.asm
@@ -3,26 +3,26 @@ SilphCoElevator_Script:
bit 5, [hl]
res 5, [hl]
push hl
- call nz, SilphCoElevatorScript_457dc
+ call nz, SilphCoElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
- call nz, SilphCoElevatorScript_45827
+ call nz, SilphCoElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a
inc a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ret
-SilphCoElevatorScript_457dc:
+SilphCoElevatorStoreWarpEntriesScript:
ld hl, wWarpEntries
ld a, [wWarpedFromWhichWarp]
ld b, a
ld a, [wWarpedFromWhichMap]
ld c, a
- call SilphCoElevatorScript_457ea
-
-SilphCoElevatorScript_457ea:
+ call .StoreWarpEntry
+ ; fallthrough
+.StoreWarpEntry:
inc hl
inc hl
ld a, b
@@ -31,12 +31,12 @@ SilphCoElevatorScript_457ea:
ld [hli], a
ret
-SilphCoElevatorScript_457f1:
+SilphCoElevatorCopyWarpMapsScript:
ld hl, SilphCoElevatorFloors
call LoadItemList
ld hl, SilphCoElevatorWarpMaps
ld de, wElevatorWarpMaps
- ld bc, SilphCoElevatorWarpMapsEnd - SilphCoElevatorWarpMaps
+ ld bc, SilphCoElevatorWarpMaps.End - SilphCoElevatorWarpMaps
call CopyData
ret
@@ -69,19 +69,20 @@ SilphCoElevatorWarpMaps:
db 2, SILPH_CO_9F
db 2, SILPH_CO_10F
db 1, SILPH_CO_11F
-SilphCoElevatorWarpMapsEnd:
+.End:
-SilphCoElevatorScript_45827:
+SilphCoElevatorShakeScript:
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
diff --git a/scripts/SummerBeachHouse.asm b/scripts/SummerBeachHouse.asm
index e0bc01b4..285d1e97 100644
--- a/scripts/SummerBeachHouse.asm
+++ b/scripts/SummerBeachHouse.asm
@@ -3,14 +3,15 @@ SummerBeachHouse_Script:
ret
SummerBeachHouse_TextPointers:
- dw SurfinDudeText
- dw SummerBeachHousePikachuText
- dw SummerBeachHouseSign1Text
- dw SummerBeachHouseSign2Text
- dw SummerBeachHouseSign3Text
- dw SummerBeachHouseSign4Text
+ def_text_pointers
+ dw_const SummerBeachHouseSurfinDudeText, TEXT_SUMMERBEACHHOUSE_SURFINDUDE
+ dw_const SummerBeachHousePikachuText, TEXT_SUMMERBEACHHOUSE_PIKACHU
+ dw_const SummerBeachHousePoster1Text, TEXT_SUMMERBEACHHOUSE_POSTER1
+ dw_const SummerBeachHousePoster2Text, TEXT_SUMMERBEACHHOUSE_POSTER2
+ dw_const SummerBeachHousePoster3Text, TEXT_SUMMERBEACHHOUSE_POSTER3
+ dw_const SummerBeachHousePrinterText, TEXT_SUMMERBEACHHOUSE_PRINTER
-SurfinDudeText:
+SummerBeachHouseSurfinDudeText:
text_asm
ld a, [wd472]
vc_patch Bypass_need_Pikachu_with_Surf_for_minigame
@@ -52,16 +53,16 @@ ENDC
jp TextScriptEnd
.SurfinDudeText1
- text_far _SurfinDudeText1
+ text_far _SummerBeachHouseSurfinDudeText1
text_end
.SurfinDudeText2
- text_far _SurfinDudeText2
+ text_far _SummerBeachHouseSurfinDudeText2
text_end
.SurfinDudeText3
- text_far _SurfinDudeText3
+ text_far _SummerBeachHouseSurfinDudeText3
text_end
.SurfinDudeText4
- text_far _SurfinDudeText4
+ text_far _SummerBeachHouseSurfinDudeText4
text_end
SummerBeachHousePikachuText:
@@ -77,61 +78,61 @@ SummerBeachHousePikachuText:
text_far _SummerBeachHousePikachuText
text_end
-SummerBeachHouseSign1Text:
+SummerBeachHousePoster1Text:
text_asm
- ld hl, .SummerBeachHouseSign1Text2
+ ld hl, .SummerBeachHousePoster1Text2
ld a, [wd472]
bit 6, a
jr z, .next
- ld hl, .SummerBeachHouseSign1Text1
+ ld hl, .SummerBeachHousePoster1Text1
.next
call PrintText
jp TextScriptEnd
-.SummerBeachHouseSign1Text1
- text_far _SummerBeachHouseSign1Text1
+.SummerBeachHousePoster1Text1
+ text_far _SummerBeachHousePoster1Text1
text_end
-.SummerBeachHouseSign1Text2
- text_far _SummerBeachHouseSign1Text2
+.SummerBeachHousePoster1Text2
+ text_far _SummerBeachHousePoster1Text2
text_end
-SummerBeachHouseSign2Text:
+SummerBeachHousePoster2Text:
text_asm
- ld hl, .SummerBeachHouseSign2Text2
+ ld hl, .SummerBeachHousePoster2Text2
ld a, [wd472]
bit 6, a
jr z, .next
- ld hl, .SummerBeachHouseSign2Text1
+ ld hl, .SummerBeachHousePoster2Text1
.next
call PrintText
jp TextScriptEnd
-.SummerBeachHouseSign2Text1
- text_far _SummerBeachHouseSign2Text1
+.SummerBeachHousePoster2Text1
+ text_far _SummerBeachHousePoster2Text1
text_end
-.SummerBeachHouseSign2Text2
- text_far _SummerBeachHouseSign2Text2
+.SummerBeachHousePoster2Text2
+ text_far _SummerBeachHousePoster2Text2
text_end
-SummerBeachHouseSign3Text:
+SummerBeachHousePoster3Text:
text_asm
- ld hl, .SummerBeachHouseSign3Text2
+ ld hl, .SummerBeachHousePoster3Text2
ld a, [wd472]
bit 6, a
jr z, .next
- ld hl, .SummerBeachHouseSign3Text1
+ ld hl, .SummerBeachHousePoster3Text1
.next
call PrintText
jp TextScriptEnd
-.SummerBeachHouseSign3Text1
- text_far _SummerBeachHouseSign3Text1
+.SummerBeachHousePoster3Text1
+ text_far _SummerBeachHousePoster3Text1
text_end
-.SummerBeachHouseSign3Text2
- text_far _SummerBeachHouseSign3Text2
+.SummerBeachHousePoster3Text2
+ text_far _SummerBeachHousePoster3Text2
text_end
-SummerBeachHouseSign4Text:
+SummerBeachHousePrinterText:
text_asm
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
diff --git a/scripts/SummerBeachHouse2.asm b/scripts/SummerBeachHouse_2.asm
index 4ac1f705..4ac1f705 100644
--- a/scripts/SummerBeachHouse2.asm
+++ b/scripts/SummerBeachHouse_2.asm
diff --git a/scripts/TradeCenter.asm b/scripts/TradeCenter.asm
index dbed79c1..d7e7c54c 100644
--- a/scripts/TradeCenter.asm
+++ b/scripts/TradeCenter.asm
@@ -7,7 +7,7 @@ TradeCenter_Script:
ld a, SPRITE_FACING_RIGHT
.next
ldh [hSpriteFacingDirection], a
- ld a, $1
+ ld a, TRADECENTER_OPPONENT
ldh [hSpriteIndex], a
call SetSpriteFacingDirection
ld hl, wd72d
@@ -31,8 +31,9 @@ TradeCenter_Script:
ret
TradeCenter_TextPointers:
- dw TradeCenterText1
+ def_text_pointers
+ dw_const TradeCenterOpponentText, TEXT_TRADECENTER_OPPONENT
-TradeCenterText1:
- text_far _TradeCenterText1
+TradeCenterOpponentText:
+ text_far _TradeCenterOpponentText
text_end
diff --git a/scripts/UndergroundPathNorthSouth.asm b/scripts/UndergroundPathNorthSouth.asm
index 00a7ef90..18b86f4e 100644
--- a/scripts/UndergroundPathNorthSouth.asm
+++ b/scripts/UndergroundPathNorthSouth.asm
@@ -2,5 +2,6 @@ UndergroundPathNorthSouth_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathNorthSouth_TextPointers:
+ def_text_pointers
text_end ; unused
diff --git a/scripts/UndergroundPathRoute5.asm b/scripts/UndergroundPathRoute5.asm
index 47c75fef..dead20ce 100644
--- a/scripts/UndergroundPathRoute5.asm
+++ b/scripts/UndergroundPathRoute5.asm
@@ -7,9 +7,10 @@ UndergroundPathEntranceRoute5_TextScriptEndingText:
text_end
UndergroundPathRoute5_TextPointers:
- dw UndergroundPathEntranceRoute5Text1
+ def_text_pointers
+ dw_const UndergroundPathRoute5LittleGirlText, TEXT_UNDERGROUNDPATHROUTE5_LITTLE_GIRL
-UndergroundPathEntranceRoute5Text1:
+UndergroundPathRoute5LittleGirlText:
text_asm
ld a, TRADE_FOR_RICKY
ld [wWhichTrade], a
diff --git a/scripts/UndergroundPathRoute6.asm b/scripts/UndergroundPathRoute6.asm
index e3994e33..2afa7676 100644
--- a/scripts/UndergroundPathRoute6.asm
+++ b/scripts/UndergroundPathRoute6.asm
@@ -4,8 +4,9 @@ UndergroundPathRoute6_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathRoute6_TextPointers:
- dw UndergroundPathEntranceRoute6Text1
+ def_text_pointers
+ dw_const UndergroundPathRoute6GirlText, TEXT_UNDERGROUNDPATHROUTE6_GIRL
-UndergroundPathEntranceRoute6Text1:
- text_far _UndergrdTunnelEntRoute6Text1
+UndergroundPathRoute6GirlText:
+ text_far _UndergroundPathRoute6GirlText
text_end
diff --git a/scripts/UndergroundPathRoute7.asm b/scripts/UndergroundPathRoute7.asm
index c311b409..04ca5403 100644
--- a/scripts/UndergroundPathRoute7.asm
+++ b/scripts/UndergroundPathRoute7.asm
@@ -4,8 +4,9 @@ UndergroundPathRoute7_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathRoute7_TextPointers:
- dw UndergroundPathEntranceRoute7Text1
+ def_text_pointers
+ dw_const UndergroundPathRoute7MiddleAgedManText, TEXT_UNDERGROUNDPATHROUTE7_MIDDLE_AGED_MAN
-UndergroundPathEntranceRoute7Text1:
- text_far _UndergroundPathEntRoute7Text1
+UndergroundPathRoute7MiddleAgedManText:
+ text_far _UndergroundPathRoute7MiddleAgedManText
text_end
diff --git a/scripts/UndergroundPathRoute7Copy.asm b/scripts/UndergroundPathRoute7Copy.asm
index 2eb74fce..c6678141 100644
--- a/scripts/UndergroundPathRoute7Copy.asm
+++ b/scripts/UndergroundPathRoute7Copy.asm
@@ -4,21 +4,22 @@ UndergroundPathRoute7Copy_Script:
ret
UndergroundPathRoute7Copy_TextPointers:
- dw UGPathRoute7EntranceUnusedText_5d773
- dw UGPathRoute7EntranceUnusedText_5d77d
+ def_text_pointers
+ dw_const UndergroundPathRoute7CopyUnusedGirlText, TEXT_UNDERGROUNDPATHROUTE7COPY_UNUSED_GIRL
+ dw_const UndergroundPathRoute7CopyUnusedMiddleAgedManText, TEXT_UNDERGROUNDPATHROUTE7COPY_UNUSED_MIDDLE_AGED_MAN
-UGPathRoute7EntranceUnusedText_5d773:
- text_far _UGPathRoute7EntranceUnusedText_5d773
+UndergroundPathRoute7CopyUnusedGirlText:
+ text_far _UndergroundPathRoute7CopyUnusedGirlText
text_end
-UGPathRoute7EntranceUnusedText_5d778:
- text_far _UGPathRoute7EntranceUnusedText_5d778
+UndergroundPathRoute7CopyUnusedTeamRocketHadAHideoutText:
+ text_far _UndergroundPathRoute7CopyUnusedTeamRocketHadAHideoutText
text_end
-UGPathRoute7EntranceUnusedText_5d77d:
- text_far _UGPathRoute7EntranceUnusedText_5d77d
+UndergroundPathRoute7CopyUnusedMiddleAgedManText:
+ text_far _UndergroundPathRoute7CopyUnusedMiddleAgedManText
text_end
-UGPathRoute7EntranceUnusedText_5d782:
- text_far _UGPathRoute7EntranceUnusedText_5d782
+UndergroundPathRoute7CopyUnusedGoesUnderSaffronText:
+ text_far _UndergroundPathRoute7CopyUnusedGoesUnderSaffronText
text_end
diff --git a/scripts/UndergroundPathRoute8.asm b/scripts/UndergroundPathRoute8.asm
index 6eab58c2..5c77875e 100644
--- a/scripts/UndergroundPathRoute8.asm
+++ b/scripts/UndergroundPathRoute8.asm
@@ -4,8 +4,9 @@ UndergroundPathRoute8_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathRoute8_TextPointers:
- dw UndergroundPathEntranceRoute8Text1
+ def_text_pointers
+ dw_const UndergroundPathRoute8GirlText, TEXT_UNDERGROUNDPATHROUTE8_GIRL
-UndergroundPathEntranceRoute8Text1:
- text_far _UndergroundPathEntRoute8Text1
+UndergroundPathRoute8GirlText:
+ text_far _UndergroundPathRoute8GirlText
text_end
diff --git a/scripts/UndergroundPathWestEast.asm b/scripts/UndergroundPathWestEast.asm
index 98571e17..258c28fb 100644
--- a/scripts/UndergroundPathWestEast.asm
+++ b/scripts/UndergroundPathWestEast.asm
@@ -2,5 +2,6 @@ UndergroundPathWestEast_Script:
jp EnableAutoTextBoxDrawing
UndergroundPathWestEast_TextPointers:
+ def_text_pointers
text_end ; unused
diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm
index 8a93b6da..0f69174c 100644
--- a/scripts/VermilionCity.asm
+++ b/scripts/VermilionCity.asm
@@ -6,7 +6,7 @@ VermilionCity_Script:
bit 6, [hl]
res 6, [hl]
push hl
- call nz, .initCityScript
+ call nz, VermilionCityLeftSSAnneCallbackScript
pop hl
bit 5, [hl]
res 5, [hl]
@@ -18,11 +18,11 @@ VermilionCity_Script:
ret
.vermilionCityScript_19869
- CheckEventHL EVENT_152
+ CheckEventHL EVENT_LEFT_FANCLUB_AFTER_BIKE_VOUCHER
ret nz
CheckEventReuseHL EVENT_GOT_BIKE_VOUCHER
ret z
- SetEventReuseHL EVENT_152
+ SetEventReuseHL EVENT_LEFT_FANCLUB_AFTER_BIKE_VOUCHER
ret
.setFirstLockTrashCanIndex
@@ -35,24 +35,25 @@ VermilionCity_Script:
ld [wFirstLockTrashCanIndex], a
ret
-.initCityScript
+VermilionCityLeftSSAnneCallbackScript:
CheckEventHL EVENT_SS_ANNE_LEFT
ret z
CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
SetEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
ret nz
- ld a, $2
+ ld a, SCRIPT_VERMILIONCITY_PLAYER_EXIT_SHIP
ld [wVermilionCityCurScript], a
ret
VermilionCity_ScriptPointers:
- dw VermilionCityScript0
- dw VermilionCityScript1
- dw VermilionCityScript2
- dw VermilionCityScript3
- dw VermilionCityScript4
+ def_script_pointers
+ dw_const VermilionCityDefaultScript, SCRIPT_VERMILIONCITY_DEFAULT
+ dw_const VermilionCityPlayerMovingUp1Script, SCRIPT_VERMILIONCITY_PLAYER_MOVING_UP1
+ dw_const VermilionCityPlayerExitShipScript, SCRIPT_VERMILIONCITY_PLAYER_EXIT_SHIP
+ dw_const VermilionCityPlayerMovingUp2Script, SCRIPT_VERMILIONCITY_PLAYER_MOVING_UP2
+ dw_const VermilionCityPlayerAllowedToPassScript, SCRIPT_VERMILIONCITY_PLAYER_ALLOWED_TO_PASS
-VermilionCityScript0:
+VermilionCityDefaultScript:
ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
jr nz, .return
@@ -62,23 +63,23 @@ VermilionCityScript0:
xor a
ldh [hJoyHeld], a
ld [wcf0d], a
- ld a, $3
+ ld a, TEXT_VERMILIONCITY_SAILOR1
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
CheckEvent EVENT_SS_ANNE_LEFT
- jr nz, .shipHasDeparted
+ jr nz, .ship_departed
ld b, S_S_TICKET
predef GetQuantityOfItemInBag
ld a, b
and a
ret nz
-.shipHasDeparted
+.ship_departed
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, SCRIPT_VERMILIONCITY_PLAYER_MOVING_UP1
ld [wVermilionCityCurScript], a
ret
@@ -89,16 +90,16 @@ SSAnneTicketCheckCoords:
dbmapcoord 18, 30
db -1 ; end
-VermilionCityScript4:
+VermilionCityPlayerAllowedToPassScript:
ld hl, SSAnneTicketCheckCoords
call ArePlayerCoordsInArray
ret c
- ld a, $0
+ ld a, SCRIPT_VERMILIONCITY_DEFAULT
ld [wVermilionCityCurScript], a
ret
-VermilionCityScript2:
- ld a, $ff
+VermilionCityPlayerExitShipScript:
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
@@ -106,105 +107,106 @@ VermilionCityScript2:
ld a, 2
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $3
+ ld a, SCRIPT_VERMILIONCITY_PLAYER_MOVING_UP2
ld [wVermilionCityCurScript], a
ret
-VermilionCityScript3:
+VermilionCityPlayerMovingUp2Script:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
xor a
ld [wJoyIgnore], a
ldh [hJoyHeld], a
- ld a, $0
+ ld a, SCRIPT_VERMILIONCITY_DEFAULT
ld [wVermilionCityCurScript], a
ret
-VermilionCityScript1:
+VermilionCityPlayerMovingUp1Script:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
ld c, 10
call DelayFrames
- ld a, $0
+ ld a, SCRIPT_VERMILIONCITY_DEFAULT
ld [wVermilionCityCurScript], a
ret
VermilionCity_TextPointers:
- dw VermilionCityText1
- dw VermilionCityText2
- dw VermilionCityText3
- dw VermilionCityText4
- dw VermilionCityText5
- dw VermilionCityText6
- dw VermilionCityText7
- dw VermilionCityText8
- dw VermilionCityText9
- dw MartSignText
- dw PokeCenterSignText
- dw VermilionCityText12
- dw VermilionCityText13
- dw VermilionCityText14
+ def_text_pointers
+ dw_const VermilionCityBeautyText, TEXT_VERMILIONCITY_BEAUTY
+ dw_const VermilionCityGambler1Text, TEXT_VERMILIONCITY_GAMBLER1
+ dw_const VermilionCitySailor1Text, TEXT_VERMILIONCITY_SAILOR1
+ dw_const VermilionCityGambler2Text, TEXT_VERMILIONCITY_GAMBLER2
+ dw_const VermilionCityMachopText, TEXT_VERMILIONCITY_MACHOP
+ dw_const VermilionCitySailor2Text, TEXT_VERMILIONCITY_SAILOR2
+ dw_const VermilionCityOfficerJennyText, TEXT_VERMILIONCITY_OFFICER_JENNY
+ dw_const VermilionCitySignText, TEXT_VERMILIONCITY_SIGN
+ dw_const VermilionCityNoticeSignText, TEXT_VERMILIONCITY_NOTICE_SIGN
+ dw_const MartSignText, TEXT_VERMILIONCITY_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_VERMILIONCITY_POKECENTER_SIGN
+ dw_const VermilionCityPokemonFanClubSignText, TEXT_VERMILIONCITY_POKEMON_FAN_CLUB_SIGN
+ dw_const VermilionCityGymSignText, TEXT_VERMILIONCITY_GYM_SIGN
+ dw_const VermilionCityHarborSignText, TEXT_VERMILIONCITY_HARBOR_SIGN
-VermilionCityText1:
- text_far _VermilionCityText1
+VermilionCityBeautyText:
+ text_far _VermilionCityBeautyText
text_end
-VermilionCityText2:
+VermilionCityGambler1Text:
text_asm
CheckEvent EVENT_SS_ANNE_LEFT
- jr nz, .shipHasDeparted
- ld hl, VermilionCityTextDidYouSee
+ jr nz, .ship_departed
+ ld hl, .DidYouSeeText
call PrintText
- jr .end
-.shipHasDeparted
- ld hl, VermilionCityTextSSAnneDeparted
+ jr .text_script_end
+.ship_departed
+ ld hl, .SSAnneDepartedText
call PrintText
-.end
+.text_script_end
jp TextScriptEnd
-VermilionCityTextDidYouSee:
- text_far _VermilionCityTextDidYouSee
+.DidYouSeeText:
+ text_far _VermilionCityGambler1DidYouSeeText
text_end
-VermilionCityTextSSAnneDeparted:
- text_far _VermilionCityTextSSAnneDeparted
+.SSAnneDepartedText:
+ text_far _VermilionCityGambler1SSAnneDepartedText
text_end
-VermilionCityText3:
+VermilionCitySailor1Text:
text_asm
CheckEvent EVENT_SS_ANNE_LEFT
- jr nz, .shipHasDeparted
+ jr nz, .ship_departed
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_RIGHT
- jr z, .greetPlayer
+ jr z, .greet_player
ld hl, .inFrontOfOrBehindGuardCoords
call ArePlayerCoordsInArray
- jr nc, .greetPlayerAndCheckTicket
-.greetPlayer
- ld hl, SSAnneWelcomeText4
+ jr nc, .greet_player_and_check_ticket
+.greet_player
+ ld hl, .WelcomeToSSAnneText
call PrintText
jr .end
-.greetPlayerAndCheckTicket
- ld hl, SSAnneWelcomeText9
+.greet_player_and_check_ticket
+ ld hl, .DoYouHaveATicketText
call PrintText
ld b, S_S_TICKET
predef GetQuantityOfItemInBag
ld a, b
and a
- jr nz, .playerHasTicket
- ld hl, SSAnneNoTicketText
+ jr nz, .player_has_ticket
+ ld hl, .YouNeedATicketText
call PrintText
jr .end
-.playerHasTicket
- ld hl, SSAnneFlashedTicketText
+.player_has_ticket
+ ld hl, .FlashedTicketText
call PrintText
- ld a, $4
+ ld a, SCRIPT_VERMILIONCITY_PLAYER_ALLOWED_TO_PASS
ld [wVermilionCityCurScript], a
jr .end
-.shipHasDeparted
- ld hl, SSAnneNotHereText
+.ship_departed
+ ld hl, .ShipSetSailText
call PrintText
.end
jp TextScriptEnd
@@ -214,73 +216,73 @@ VermilionCityText3:
dbmapcoord 19, 31 ; behind guard
db -1 ; end
-SSAnneWelcomeText4:
- text_far _SSAnneWelcomeText4
+.WelcomeToSSAnneText:
+ text_far _VermilionCitySailor1WelcomeToSSAnneText
text_end
-SSAnneWelcomeText9:
- text_far _SSAnneWelcomeText9
+.DoYouHaveATicketText:
+ text_far _VermilionCitySailor1DoYouHaveATicketText
text_end
-SSAnneFlashedTicketText:
- text_far _SSAnneFlashedTicketText
+.FlashedTicketText:
+ text_far _VermilionCitySailor1FlashedTicketText
text_end
-SSAnneNoTicketText:
- text_far _SSAnneNoTicketText
+.YouNeedATicketText:
+ text_far _VermilionCitySailor1YouNeedATicketText
text_end
-SSAnneNotHereText:
- text_far _SSAnneNotHereText
+.ShipSetSailText:
+ text_far _VermilionCitySailor1ShipSetSailText
text_end
-VermilionCityText4:
- text_far _VermilionCityText4
+VermilionCityGambler2Text:
+ text_far _VermilionCityGambler2Text
text_end
-VermilionCityText5:
- text_far _VermilionCityText5
+VermilionCityMachopText:
+ text_far _VermilionCityMachopText
text_asm
ld a, MACHOP
call PlayCry
call WaitForSoundToFinish
- ld hl, VermilionCityText15
+ ld hl, .StompingTheLandFlatText
ret
-VermilionCityText15:
- text_far _VermilionCityText15
+.StompingTheLandFlatText:
+ text_far _VermilionCityMachopStompingTheLandFlatText
text_end
-VermilionCityText6:
- text_far _VermilionCityText6
+VermilionCitySailor2Text:
+ text_far _VermilionCitySailor2Text
text_end
-VermilionCityText8:
+VermilionCitySignText:
text_asm
- farcall Func_f1a8a
+ farcall VermilionCityPrintSignText
jp TextScriptEnd
-VermilionCityText9:
+VermilionCityNoticeSignText:
text_asm
- farcall Func_f1a96
+ farcall VermilionCityPrintNoticeSignText
jp TextScriptEnd
-VermilionCityText12:
+VermilionCityPokemonFanClubSignText:
text_asm
- farcall Func_f1aa2
+ farcall VermilionCityPrintPokemonFanClubSignText
jp TextScriptEnd
-VermilionCityText13:
+VermilionCityGymSignText:
text_asm
- farcall Func_f1aae
+ farcall VermilionCityPrintGymSignText
jp TextScriptEnd
-VermilionCityText14:
+VermilionCityHarborSignText:
text_asm
- farcall Func_f1aba
+ farcall VermilionCityPrintHarborSignText
jp TextScriptEnd
-VermilionCityText7:
+VermilionCityOfficerJennyText:
text_asm
- farcall Func_f1a0f
+ farcall VermilionCityPrintOfficerJennyText
jp TextScriptEnd
diff --git a/scripts/VermilionCity2.asm b/scripts/VermilionCity_2.asm
index 93aa8df5..52721a55 100644
--- a/scripts/VermilionCity2.asm
+++ b/scripts/VermilionCity_2.asm
@@ -1,4 +1,4 @@
-Func_f1a0f::
+VermilionCityPrintOfficerJennyText::
CheckEvent EVENT_GOT_SQUIRTLE_FROM_OFFICER_JENNY
jr nz, .asm_f1a69
ld a, [wBeatGymFlags]
@@ -65,47 +65,47 @@ OfficerJennyText5:
text_far _OfficerJennyText5
text_end
-Func_f1a8a::
- ld hl, VermilionCityText_f1a91
+VermilionCityPrintSignText::
+ ld hl, .text
call PrintText
ret
-VermilionCityText_f1a91:
- text_far _VermilionCityText8
+.text
+ text_far _VermilionCitySignText
text_end
-Func_f1a96::
- ld hl, VermilionCityText_f1a9d
+VermilionCityPrintNoticeSignText::
+ ld hl, .text
call PrintText
ret
-VermilionCityText_f1a9d:
- text_far _VermilionCityText9
+.text
+ text_far _VermilionCityNoticeSignText
text_end
-Func_f1aa2::
- ld hl, VermilionCityText_f1aa9
+VermilionCityPrintPokemonFanClubSignText::
+ ld hl, .text
call PrintText
ret
-VermilionCityText_f1aa9:
- text_far _VermilionCityText12
+.text
+ text_far _VermilionCityPokemonFanClubSignText
text_end
-Func_f1aae::
- ld hl, VermilionCityText_f1ab5
+VermilionCityPrintGymSignText::
+ ld hl, .text
call PrintText
ret
-VermilionCityText_f1ab5:
- text_far _VermilionCityText13
+.text
+ text_far _VermilionCityGymSignText
text_end
-Func_f1aba::
- ld hl, VermilionCityText_f1ac1
+VermilionCityPrintHarborSignText::
+ ld hl, .text
call PrintText
ret
-VermilionCityText_f1ac1:
- text_far _VermilionCityText14
+.text
+ text_far _VermilionCityHarborSignText
text_end
diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm
index a0f9d63e..934b8d2f 100644
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -1,14 +1,14 @@
VermilionDock_Script:
call EnableAutoTextBoxDrawing
CheckEventHL EVENT_STARTED_WALKING_OUT_OF_DOCK
- jr nz, .asm_1db8d
+ jr nz, .walking_out_of_dock
CheckEventReuseHL EVENT_GOT_HM01
ret z
ld a, [wDestinationWarpID]
cp $1
ret nz
CheckEventReuseHL EVENT_SS_ANNE_LEFT
- jp z, VermilionDock_1db9b
+ jp z, VermilionDockSSAnneLeavesScript
SetEventReuseHL EVENT_STARTED_WALKING_OUT_OF_DOCK
call Delay3
ld hl, wd730
@@ -26,7 +26,7 @@ VermilionDock_Script:
dec a
ld [wJoyIgnore], a
ret
-.asm_1db8d
+.walking_out_of_dock
CheckEventAfterBranchReuseHL EVENT_WALKED_OUT_OF_DOCK, EVENT_STARTED_WALKING_OUT_OF_DOCK
ret nz
ld a, [wSimulatedJoypadStatesIndex]
@@ -36,7 +36,7 @@ VermilionDock_Script:
SetEventReuseHL EVENT_WALKED_OUT_OF_DOCK
ret
-VermilionDock_1db9b:
+VermilionDockSSAnneLeavesScript:
SetEventForceReuseHL EVENT_SS_ANNE_LEFT
ld a, $ff
ld [wJoyIgnore], a
@@ -77,7 +77,7 @@ VermilionDock_1db9b:
ld [wUpdateSpritesEnabled], a
ld d, $0
ld e, $8
-.asm_1dbfa
+.shift_columns_up
ld hl, $2
add hl, bc
ld a, l
@@ -90,19 +90,19 @@ VermilionDock_1db9b:
call VermilionDock_EmitSmokePuff
pop de
ld b, $10
-.asm_1dc11
+.smoke_puff_drift_loop
call VermilionDock_AnimSmokePuffDriftRight
ld c, $8
-.asm_1dc16
- call VermilionDock_1dc7c
+.delay_between_drifts
+ call VermilionDock_SyncScrollWithLY
dec c
- jr nz, .asm_1dc16
+ jr nz, .delay_between_drifts
inc d
dec b
- jr nz, .asm_1dc11
+ jr nz, .smoke_puff_drift_loop
pop bc
dec e
- jr nz, .asm_1dbfa
+ jr nz, .shift_columns_up
xor a
ldh [rWY], a
ldh [hWY], a
@@ -129,12 +129,12 @@ VermilionDock_AnimSmokePuffDriftRight:
swap a
ld c, a
ld de, 4
-.loop
+.drift_loop
inc [hl]
inc [hl]
add hl, de
dec c
- jr nz, .loop
+ jr nz, .drift_loop
pop de
pop bc
ret
@@ -161,22 +161,22 @@ VermilionDockOAMBlock:
db $fe, $10
db $ff, $10
-VermilionDock_1dc7c:
+VermilionDock_SyncScrollWithLY:
ld h, d
ld l, $50
- call .asm_1dc86
+ call .sync_scroll_ly
ld h, $0
ld l, $80
-.asm_1dc86
+.sync_scroll_ly
ldh a, [rLY]
cp l
- jr nz, .asm_1dc86
+ jr nz, .sync_scroll_ly
ld a, h
ldh [rSCX], a
-.asm_1dc8e
+.wait_for_ly_match
ldh a, [rLY]
cp h
- jr z, .asm_1dc8e
+ jr z, .wait_for_ly_match
ret
VermilionDock_EraseSSAnne:
@@ -209,8 +209,9 @@ VermilionDock_EraseSSAnne:
ret
VermilionDock_TextPointers:
- dw VermilionDockText1
+ def_text_pointers
+ dw_const VermilionDockUnusedText, TEXT_VERMILIONDOCK_UNUSED
-VermilionDockText1:
- text_far _VermilionDockText1
+VermilionDockUnusedText:
+ text_far _VermilionDockUnusedText
text_end
diff --git a/scripts/VermilionGym.asm b/scripts/VermilionGym.asm
index 3bbb8743..a4fab952 100644
--- a/scripts/VermilionGym.asm
+++ b/scripts/VermilionGym.asm
@@ -49,36 +49,37 @@ VermilionGymResetScripts:
ret
VermilionGym_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw VermilionGymLTSurgePostBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_VERMILIONGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VERMILIONGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VERMILIONGYM_END_BATTLE
+ dw_const VermilionGymLTSurgeAfterBattleScript, SCRIPT_VERMILIONGYM_LT_SURGE_AFTER_BATTLE
-VermilionGymLTSurgePostBattle:
+VermilionGymLTSurgeAfterBattleScript:
ld a, [wIsInBattle]
cp $ff ; did we lose?
jp z, VermilionGymResetScripts
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
-VermilionGymReceiveTM24:
- ld a, $6
+VermilionGymLTSurgeReceiveTM24Script:
+ ld a, TEXT_VERMILIONGYM_LT_SURGE_THUNDER_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_LT_SURGE
lb bc, TM_THUNDERBOLT, 1
call GiveItem
- jr nc, .BagFull
- ld a, $7
+ jr nc, .bag_full
+ ld a, TEXT_VERMILIONGYM_LT_SURGE_RECEIVED_TM24
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM24
- jr .gymVictory
-.BagFull
- ld a, $8
+ jr .gym_victory
+.bag_full
+ ld a, TEXT_VERMILIONGYM_LT_SURGE_TM24_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-.gymVictory
+.gym_victory
ld hl, wObtainedBadges
set BIT_THUNDERBADGE, [hl]
ld hl, wBeatGymFlags
@@ -90,46 +91,47 @@ VermilionGymReceiveTM24:
jp VermilionGymResetScripts
VermilionGym_TextPointers:
- dw LTSurgeText
- dw VermilionGymTrainerText1
- dw VermilionGymTrainerText2
- dw VermilionGymTrainerText3
- dw VermilionGymGuideText
- dw LTSurgeThunderBadgeInfoText
- dw ReceivedTM24Text
- dw TM24NoRoomText
+ def_text_pointers
+ dw_const VermilionGymLTSurgeText, TEXT_VERMILIONGYM_LT_SURGE
+ dw_const VermilionGymGentlemanText, TEXT_VERMILIONGYM_GENTLEMAN
+ dw_const VermilionGymSuperNerdText, TEXT_VERMILIONGYM_SUPER_NERD
+ dw_const VermilionGymSailorText, TEXT_VERMILIONGYM_SAILOR
+ dw_const VermilionGymGymGuideText, TEXT_VERMILIONGYM_GYM_GUIDE
+ dw_const VermilionGymLTSurgeThunderBadgeInfoText, TEXT_VERMILIONGYM_LT_SURGE_THUNDER_BADGE_INFO
+ dw_const VermilionGymLTSurgeReceivedTM24Text, TEXT_VERMILIONGYM_LT_SURGE_RECEIVED_TM24
+ dw_const VermilionGymLTSurgeTM24NoRoomText, TEXT_VERMILIONGYM_LT_SURGE_TM24_NO_ROOM
VermilionGymTrainerHeaders:
def_trainers 2
VermilionGymTrainerHeader0:
- trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymBattleText1, VermilionGymEndBattleText1, VermilionGymAfterBattleText1
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymGentlemanBattleText, VermilionGymGentlemanEndBattleText, VermilionGymGentlemanAfterBattleText
VermilionGymTrainerHeader1:
- trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymBattleText2, VermilionGymEndBattleText2, VermilionGymAfterBattleText2
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymSuperNerdBattleText, VermilionGymSuperNerdEndBattleText, VermilionGymSuperNerdAfterBattleText
VermilionGymTrainerHeader2:
- trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymBattleText3, VermilionGymEndBattleText3, VermilionGymAfterBattleText3
+ trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymSailorBattleText, VermilionGymSailorEndBattleText, VermilionGymSailorAfterBattleText
db -1 ; end
-LTSurgeText:
+VermilionGymLTSurgeText:
text_asm
CheckEvent EVENT_BEAT_LT_SURGE
- jr z, .beforeBeat
+ jr z, .before_beat
CheckEventReuseA EVENT_GOT_TM24
- jr nz, .afterBeat
- call z, VermilionGymReceiveTM24
+ jr nz, .got_tm24_already
+ call z, VermilionGymLTSurgeReceiveTM24Script
call DisableWaitingAfterTextDisplay
- jr .done
-.afterBeat
- ld hl, LTSurgePostBattleAdviceText
+ jr .text_script_end
+.got_tm24_already
+ ld hl, .PostBattleAdviceText
call PrintText
- jr .done
-.beforeBeat
- ld hl, LTSurgePreBattleText
+ jr .text_script_end
+.before_beat
+ ld hl, .PreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedThunderBadgeText
- ld de, ReceivedThunderBadgeText
+ ld hl, VermilionGymLTSurgeReceivedThunderBadgeText
+ ld de, VermilionGymLTSurgeReceivedThunderBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -139,110 +141,110 @@ LTSurgeText:
ld [wGymLeaderNo], a
xor a
ldh [hJoyHeld], a
- ld a, $3 ; set script index to LT Surge post-battle script
+ ld a, SCRIPT_VERMILIONGYM_LT_SURGE_AFTER_BATTLE
ld [wVermilionGymCurScript], a
ld [wCurMapScript], a
-.done
+.text_script_end
jp TextScriptEnd
-LTSurgePreBattleText:
- text_far _LTSurgePreBattleText
+.PreBattleText:
+ text_far _VermilionGymLTSurgePreBattleText
text_end
-LTSurgePostBattleAdviceText:
- text_far _LTSurgePostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _VermilionGymLTSurgePostBattleAdviceText
text_end
-LTSurgeThunderBadgeInfoText:
- text_far _LTSurgeThunderBadgeInfoText
+VermilionGymLTSurgeThunderBadgeInfoText:
+ text_far _VermilionGymLTSurgeThunderBadgeInfoText
text_end
-ReceivedTM24Text:
- text_far _ReceivedTM24Text
+VermilionGymLTSurgeReceivedTM24Text:
+ text_far _VermilionGymLTSurgeReceivedTM24Text
sound_get_key_item
text_far _TM24ExplanationText
text_end
-TM24NoRoomText:
- text_far _TM24NoRoomText
+VermilionGymLTSurgeTM24NoRoomText:
+ text_far _VermilionGymLTSurgeTM24NoRoomText
text_end
-ReceivedThunderBadgeText:
- text_far _ReceivedThunderBadgeText
+VermilionGymLTSurgeReceivedThunderBadgeText:
+ text_far _VermilionGymLTSurgeReceivedThunderBadgeText
text_end
-VermilionGymTrainerText1:
+VermilionGymGentlemanText:
text_asm
ld hl, VermilionGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-VermilionGymBattleText1:
- text_far _VermilionGymBattleText1
+VermilionGymGentlemanBattleText:
+ text_far _VermilionGymGentlemanBattleText
text_end
-VermilionGymEndBattleText1:
- text_far _VermilionGymEndBattleText1
+VermilionGymGentlemanEndBattleText:
+ text_far _VermilionGymGentlemanEndBattleText
text_end
-VermilionGymAfterBattleText1:
- text_far _VermilionGymAfterBattleText1
+VermilionGymGentlemanAfterBattleText:
+ text_far _VermilionGymGentlemanAfterBattleText
text_end
-VermilionGymTrainerText2:
+VermilionGymSuperNerdText:
text_asm
ld hl, VermilionGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-VermilionGymBattleText2:
- text_far _VermilionGymBattleText2
+VermilionGymSuperNerdBattleText:
+ text_far _VermilionGymSuperNerdBattleText
text_end
-VermilionGymEndBattleText2:
- text_far _VermilionGymEndBattleText2
+VermilionGymSuperNerdEndBattleText:
+ text_far _VermilionGymSuperNerdEndBattleText
text_end
-VermilionGymAfterBattleText2:
- text_far _VermilionGymAfterBattleText2
+VermilionGymSuperNerdAfterBattleText:
+ text_far _VermilionGymSuperNerdAfterBattleText
text_end
-VermilionGymTrainerText3:
+VermilionGymSailorText:
text_asm
ld hl, VermilionGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-VermilionGymBattleText3:
- text_far _VermilionGymBattleText3
+VermilionGymSailorBattleText:
+ text_far _VermilionGymSailorBattleText
text_end
-VermilionGymEndBattleText3:
- text_far _VermilionGymEndBattleText3
+VermilionGymSailorEndBattleText:
+ text_far _VermilionGymSailorEndBattleText
text_end
-VermilionGymAfterBattleText3:
- text_far _VermilionGymAfterBattleText3
+VermilionGymSailorAfterBattleText:
+ text_far _VermilionGymSailorAfterBattleText
text_end
-VermilionGymGuideText:
+VermilionGymGymGuideText:
text_asm
ld a, [wBeatGymFlags]
bit BIT_THUNDERBADGE, a
- jr nz, .afterBeat
- ld hl, VermilionGymGuidePreBattleText
+ jr nz, .got_thunderbadge
+ ld hl, .ChampInMakingText
call PrintText
- jr .done
-.afterBeat
- ld hl, VermilionGymGuidePostBattleText
+ jr .text_script_end
+.got_thunderbadge
+ ld hl, .BeatLTSurgeText
call PrintText
-.done
+.text_script_end
jp TextScriptEnd
-VermilionGymGuidePreBattleText:
- text_far _VermilionGymGuidePreBattleText
+.ChampInMakingText:
+ text_far _VermilionGymGymGuideChampInMakingText
text_end
-VermilionGymGuidePostBattleText:
- text_far _VermilionGymGuidePostBattleText
+.BeatLTSurgeText:
+ text_far _VermilionGymGymGuideBeatLTSurgeText
text_end
diff --git a/scripts/VermilionMart.asm b/scripts/VermilionMart.asm
index 88a632c8..dd848d21 100644
--- a/scripts/VermilionMart.asm
+++ b/scripts/VermilionMart.asm
@@ -2,14 +2,15 @@ VermilionMart_Script:
jp EnableAutoTextBoxDrawing
VermilionMart_TextPointers:
- dw VermilionCashierText
- dw VermilionMartText2
- dw VermilionMartText3
+ def_text_pointers
+ dw_const VermilionMartClerkText, TEXT_VERMILIONMART_CLERK
+ dw_const VermilionMartCooltrainerMText, TEXT_VERMILIONMART_COOLTRAINER_M
+ dw_const VermilionMartCooltrainerFText, TEXT_VERMILIONMART_COOLTRAINER_F
-VermilionMartText2:
- text_far _VermilionMartText2
+VermilionMartCooltrainerMText:
+ text_far _VermilionMartCooltrainerMText
text_end
-VermilionMartText3:
- text_far _VermilionMartText3
+VermilionMartCooltrainerFText:
+ text_far _VermilionMartCooltrainerFText
text_end
diff --git a/scripts/VermilionOldRodHouse.asm b/scripts/VermilionOldRodHouse.asm
index 524395d4..f170bcaf 100644
--- a/scripts/VermilionOldRodHouse.asm
+++ b/scripts/VermilionOldRodHouse.asm
@@ -2,14 +2,15 @@ VermilionOldRodHouse_Script:
jp EnableAutoTextBoxDrawing
VermilionOldRodHouse_TextPointers:
- dw VermilionHouse2Text1
+ def_text_pointers
+ dw_const VermilionOldRodHouseFishingGuruText, TEXT_VERMILIONOLDRODHOUSE_FISHING_GURU
-VermilionHouse2Text1:
+VermilionOldRodHouseFishingGuruText:
text_asm
ld a, [wd728]
bit 3, a ; got old rod?
- jr nz, .got_item
- ld hl, VermilionHouse2Text_560b1
+ jr nz, .got_old_rod
+ ld hl, .DoYouLikeToFishText
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
@@ -20,38 +21,38 @@ VermilionHouse2Text1:
jr nc, .bag_full
ld hl, wd728
set 3, [hl] ; got old rod
- ld hl, VermilionHouse2Text_560b6
- jr .done
+ ld hl, .TakeThisText
+ jr .print_text
.bag_full
- ld hl, VermilionHouse2Text_560ca
- jr .done
+ ld hl, .NoRoomText
+ jr .print_text
.refused
- ld hl, VermilionHouse2Text_560c0
- jr .done
-.got_item
- ld hl, VermilionHouse2Text_560c5
-.done
+ ld hl, .ThatsSoDisappointingText
+ jr .print_text
+.got_old_rod
+ ld hl, .HowAreTheFishBitingText
+.print_text
call PrintText
jp TextScriptEnd
-VermilionHouse2Text_560b1:
- text_far _VermilionHouse2Text_560b1
+.DoYouLikeToFishText:
+ text_far _VermilionOldRodHouseFishingGuruDoYouLikeToFishText
text_end
-VermilionHouse2Text_560b6:
- text_far _VermilionHouse2Text_560b6
+.TakeThisText:
+ text_far _VermilionOldRodHouseFishingGuruTakeThisText
sound_get_item_1
- text_far _VermilionHouse2Text_560bb
+ text_far _VermilionOldRodHouseFishingGuruFishingIsAWayOfLifeText
text_end
-VermilionHouse2Text_560c0:
- text_far _VermilionHouse2Text_560c0
+.ThatsSoDisappointingText:
+ text_far _VermilionOldRodHouseFishingGuruThatsSoDisappointingText
text_end
-VermilionHouse2Text_560c5:
- text_far _VermilionHouse2Text_560c5
+.HowAreTheFishBitingText:
+ text_far _VermilionOldRodHouseFishingGuruHowAreTheFishBitingText
text_end
-VermilionHouse2Text_560ca:
- text_far _VermilionHouse2Text_560ca
+.NoRoomText:
+ text_far _VermilionOldRodHouseFishingGuruNoRoomText
text_end
diff --git a/scripts/VermilionPidgeyHouse.asm b/scripts/VermilionPidgeyHouse.asm
index fef476d5..1265f109 100644
--- a/scripts/VermilionPidgeyHouse.asm
+++ b/scripts/VermilionPidgeyHouse.asm
@@ -3,22 +3,23 @@ VermilionPidgeyHouse_Script:
ret
VermilionPidgeyHouse_TextPointers:
- dw VermilionHouse1Text1
- dw VermilionHouse1Text2
- dw VermilionHouse1Text3
+ def_text_pointers
+ dw_const VermilionPidgeyHouseYoungsterText, TEXT_VERMILIONPIDGEYHOUSE_YOUNGSTER
+ dw_const VermilionPidgeyHousePidgeyText, TEXT_VERMILIONPIDGEYHOUSE_PIDGEY
+ dw_const VermilionPidgeyHouseLetterText, TEXT_VERMILIONPIDGEYHOUSE_LETTER
-VermilionHouse1Text1:
- text_far _VermilionHouse1Text1
+VermilionPidgeyHouseYoungsterText:
+ text_far _VermilionPidgeyHouseYoungsterText
text_end
-VermilionHouse1Text2:
- text_far _VermilionHouse1Text2
+VermilionPidgeyHousePidgeyText:
+ text_far _VermilionPidgeyHousePidgeyText
text_asm
ld a, PIDGEY
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-VermilionHouse1Text3:
- text_far _VermilionHouse1Text3
+VermilionPidgeyHouseLetterText:
+ text_far _VermilionPidgeyHouseLetterText
text_end
diff --git a/scripts/VermilionPokecenter.asm b/scripts/VermilionPokecenter.asm
index dd3b514e..0db74128 100644
--- a/scripts/VermilionPokecenter.asm
+++ b/scripts/VermilionPokecenter.asm
@@ -3,27 +3,28 @@ VermilionPokecenter_Script:
jp EnableAutoTextBoxDrawing
VermilionPokecenter_TextPointers:
- dw VermilionHealNurseText
- dw VermilionPokecenterText2
- dw VermilionPokecenterText3
- dw VermilionTradeNurseText
- dw VermilionPokecenterText5
+ def_text_pointers
+ dw_const VermilionPokecenterNurseText, TEXT_VERMILIONPOKECENTER_NURSE
+ dw_const VermilionPokecenterFishingGuruText, TEXT_VERMILIONPOKECENTER_FISHING_GURU
+ dw_const VermilionPokecenterSailorText, TEXT_VERMILIONPOKECENTER_SAILOR
+ dw_const VermilionPokecenterLinkReceptionistText, TEXT_VERMILIONPOKECENTER_LINK_RECEPTIONIST
+ dw_const VermilionPokecenterChanseyText, TEXT_VERMILIONPOKECENTER_CHANSEY
-VermilionHealNurseText:
+VermilionPokecenterNurseText:
script_pokecenter_nurse
-VermilionPokecenterText2:
- text_far _VermilionPokecenterText2
+VermilionPokecenterFishingGuruText:
+ text_far _VermilionPokecenterFishingGuruText
text_end
-VermilionPokecenterText3:
- text_far _VermilionPokecenterText3
+VermilionPokecenterSailorText:
+ text_far _VermilionPokecenterSailorText
text_end
-VermilionTradeNurseText:
+VermilionPokecenterLinkReceptionistText:
script_cable_club_receptionist
-VermilionPokecenterText5:
+VermilionPokecenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/VermilionTradeHouse.asm b/scripts/VermilionTradeHouse.asm
index 6cdd849a..f190eded 100644
--- a/scripts/VermilionTradeHouse.asm
+++ b/scripts/VermilionTradeHouse.asm
@@ -2,8 +2,9 @@ VermilionTradeHouse_Script:
jp EnableAutoTextBoxDrawing
VermilionTradeHouse_TextPointers:
- dw VermilionHouse3Text1
+ def_text_pointers
+ dw_const VermilionTradeHouseGentlemanText, TEXT_VERMILIONTRADEHOUSE_GENTLEMAN
-VermilionHouse3Text1:
+VermilionTradeHouseGentlemanText:
text_far TeachingHMsText
text_end
diff --git a/scripts/VictoryRoad1F.asm b/scripts/VictoryRoad1F.asm
index f7b3b65f..42852692 100644
--- a/scripts/VictoryRoad1F.asm
+++ b/scripts/VictoryRoad1F.asm
@@ -19,14 +19,15 @@ VictoryRoad1F_Script:
predef_jump ReplaceTileBlock
VictoryRoad1F_ScriptPointers:
- dw VictoryRoad1Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const VictoryRoad1FDefaultScript, SCRIPT_VICTORYROAD1F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VICTORYROAD1F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VICTORYROAD1F_END_BATTLE
-VictoryRoad1Script0:
+VictoryRoad1FDefaultScript:
CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
jp nz, CheckFightingMapTrainers
- ld hl, CoordsData_5da5c
+ ld hl, .SwitchCoords
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ldh a, [hSpriteIndex]
@@ -37,59 +38,60 @@ VictoryRoad1Script0:
SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
ret
-CoordsData_5da5c:
+.SwitchCoords:
dbmapcoord 17, 13
db -1 ; end
VictoryRoad1F_TextPointers:
- dw VictoryRoad1Text1
- dw VictoryRoad1Text2
- dw PickUpItemText
- dw PickUpItemText
- dw BoulderText
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const VictoryRoad1FCooltrainerFText, TEXT_VICTORYROAD1F_COOLTRAINER_F
+ dw_const VictoryRoad1FCooltrainerMText, TEXT_VICTORYROAD1F_COOLTRAINER_M
+ dw_const PickUpItemText, TEXT_VICTORYROAD1F_TM_SKY_ATTACK
+ dw_const PickUpItemText, TEXT_VICTORYROAD1F_RARE_CANDY
+ dw_const BoulderText, TEXT_VICTORYROAD1F_BOULDER1
+ dw_const BoulderText, TEXT_VICTORYROAD1F_BOULDER2
+ dw_const BoulderText, TEXT_VICTORYROAD1F_BOULDER3
VictoryRoad1TrainerHeaders:
def_trainers
VictoryRoad1TrainerHeader0:
- trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0, 2, VictoryRoad1BattleText1, VictoryRoad1EndBattleText1, VictoryRoad1AfterBattleText1
+ trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0, 2, VictoryRoad1FCooltrainerFBattleText, VictoryRoad1FCooltrainerFEndBattleText, VictoryRoad1FCooltrainerFAfterBattleText
VictoryRoad1TrainerHeader1:
- trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1, 2, VictoryRoad1BattleText2, VictoryRoad1EndBattleText2, VictoryRoad1AfterBattleText2
+ trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1, 2, VictoryRoad1FCooltrainerMBattleText, VictoryRoad1FCooltrainerMEndBattleText, VictoryRoad1FCooltrainerMAfterBattleText
db -1 ; end
-VictoryRoad1Text1:
+VictoryRoad1FCooltrainerFText:
text_asm
ld hl, VictoryRoad1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad1Text2:
+VictoryRoad1FCooltrainerMText:
text_asm
ld hl, VictoryRoad1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad1BattleText1:
- text_far _VictoryRoad1BattleText1
+VictoryRoad1FCooltrainerFBattleText:
+ text_far _VictoryRoad1FCooltrainerFBattleText
text_end
-VictoryRoad1EndBattleText1:
- text_far _VictoryRoad1EndBattleText1
+VictoryRoad1FCooltrainerFEndBattleText:
+ text_far _VictoryRoad1FCooltrainerFEndBattleText
text_end
-VictoryRoad1AfterBattleText1:
- text_far _VictoryRoad1AfterBattleText1
+VictoryRoad1FCooltrainerFAfterBattleText:
+ text_far _VictoryRoad1FCooltrainerFAfterBattleText
text_end
-VictoryRoad1BattleText2:
- text_far _VictoryRoad1BattleText2
+VictoryRoad1FCooltrainerMBattleText:
+ text_far _VictoryRoad1FCooltrainerMBattleText
text_end
-VictoryRoad1EndBattleText2:
- text_far _VictoryRoad1EndBattleText2
+VictoryRoad1FCooltrainerMEndBattleText:
+ text_far _VictoryRoad1FCooltrainerMEndBattleText
text_end
-VictoryRoad1AfterBattleText2:
- text_far _VictoryRoad1AfterBattleText2
+VictoryRoad1FCooltrainerMAfterBattleText:
+ text_far _VictoryRoad1FCooltrainerMAfterBattleText
text_end
diff --git a/scripts/VictoryRoad2F.asm b/scripts/VictoryRoad2F.asm
index 2bf46e98..67244ef4 100644
--- a/scripts/VictoryRoad2F.asm
+++ b/scripts/VictoryRoad2F.asm
@@ -2,11 +2,11 @@ VictoryRoad2F_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
- call nz, VictoryRoad2Script_517c4
+ call nz, VictoryRoad2FResetBoulderEventScript
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
- call nz, VictoryRoad2Script_517c9
+ call nz, VictoryRoad2FCheckBoulderEventScript
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad2TrainerHeaders
ld de, VictoryRoad2F_ScriptPointers
@@ -15,33 +15,35 @@ VictoryRoad2F_Script:
ld [wVictoryRoad2FCurScript], a
ret
-VictoryRoad2Script_517c4:
+VictoryRoad2FResetBoulderEventScript:
ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
-VictoryRoad2Script_517c9:
+; fallthrough
+VictoryRoad2FCheckBoulderEventScript:
CheckEvent EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
- jr z, .asm_517da
+ jr z, .not_on_switch
push af
ld a, $15
lb bc, 4, 3
- call VictoryRoad2Script_517e2
+ call VictoryRoad2FReplaceTileBlockScript
pop af
-.asm_517da
+.not_on_switch
bit 7, a
ret z
ld a, $1d
lb bc, 7, 11
-VictoryRoad2Script_517e2:
+VictoryRoad2FReplaceTileBlockScript:
ld [wNewTileBlockID], a
predef ReplaceTileBlock
ret
VictoryRoad2F_ScriptPointers:
- dw VictoryRoad2Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const VictoryRoad2FDefaultScript, SCRIPT_VICTORYROAD2F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VICTORYROAD2F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VICTORYROAD2F_END_BATTLE
-VictoryRoad2Script0:
- ld hl, CoordsData_51816
+VictoryRoad2FDefaultScript:
+ ld hl, .SwitchCoords
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ldh a, [hSpriteIndexOrTextID]
@@ -50,156 +52,157 @@ VictoryRoad2Script0:
EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
ld a, [wCoordIndex]
cp $2
- jr z, .asm_5180b
+ jr z, .second_switch
CheckEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
ret nz
- jr .asm_51810
-.asm_5180b
+ jr .set_script_flag
+.second_switch
CheckEventAfterBranchReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1
SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
ret nz
-.asm_51810
+.set_script_flag
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ret
-CoordsData_51816:
+.SwitchCoords:
dbmapcoord 1, 16
dbmapcoord 9, 16
db -1 ; end
VictoryRoad2F_TextPointers:
- dw VictoryRoad2Text1
- dw VictoryRoad2Text2
- dw VictoryRoad2Text3
- dw VictoryRoad2Text4
- dw VictoryRoad2Text5
- dw MoltresText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw BoulderText
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const VictoryRoad2FHikerText, TEXT_VICTORYROAD2F_HIKER
+ dw_const VictoryRoad2FSuperNerd1Text, TEXT_VICTORYROAD2F_SUPER_NERD1
+ dw_const VictoryRoad2FCooltrainerMText, TEXT_VICTORYROAD2F_COOLTRAINER_M
+ dw_const VictoryRoad2FSuperNerd2Text, TEXT_VICTORYROAD2F_SUPER_NERD2
+ dw_const VictoryRoad2FSuperNerd3Text, TEXT_VICTORYROAD2F_SUPER_NERD3
+ dw_const VictoryRoad2FMoltresText, TEXT_VICTORYROAD2F_MOLTRES
+ dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_SUBMISSION
+ dw_const PickUpItemText, TEXT_VICTORYROAD2F_FULL_HEAL
+ dw_const PickUpItemText, TEXT_VICTORYROAD2F_TM_MEGA_KICK
+ dw_const PickUpItemText, TEXT_VICTORYROAD2F_GUARD_SPEC
+ dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER1
+ dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER2
+ dw_const BoulderText, TEXT_VICTORYROAD2F_BOULDER3
VictoryRoad2TrainerHeaders:
def_trainers
VictoryRoad2TrainerHeader0:
- trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2BattleText1, VictoryRoad2EndBattleText1, VictoryRoad2AfterBattleText1
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2FHikerBattleText, VictoryRoad2FHikerEndBattleText, VictoryRoad2FHikerAfterBattleText
VictoryRoad2TrainerHeader1:
- trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2BattleText2, VictoryRoad2EndBattleText2, VictoryRoad2AfterBattleText2
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2FSuperNerd1BattleText, VictoryRoad2FSuperNerd1EndBattleText, VictoryRoad2FSuperNerd1AfterBattleText
VictoryRoad2TrainerHeader2:
- trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2BattleText3, VictoryRoad2EndBattleText3, VictoryRoad2AfterBattleText3
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2FCooltrainerMBattleText, VictoryRoad2FCooltrainerMEndBattleText, VictoryRoad2FCooltrainerMAfterBattleText
VictoryRoad2TrainerHeader3:
- trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2BattleText4, VictoryRoad2EndBattleText4, VictoryRoad2AfterBattleText4
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2FSuperNerd2BattleText, VictoryRoad2FSuperNerd2EndBattleText, VictoryRoad2FSuperNerd2AfterBattleText
VictoryRoad2TrainerHeader4:
- trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2BattleText5, VictoryRoad2EndBattleText5, VictoryRoad2AfterBattleText5
+ trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2FSuperNerd3BattleText, VictoryRoad2FSuperNerd3EndBattleText, VictoryRoad2FSuperNerd3AfterBattleText
MoltresTrainerHeader:
- trainer EVENT_BEAT_MOLTRES, 0, MoltresBattleText, MoltresBattleText, MoltresBattleText
+ trainer EVENT_BEAT_MOLTRES, 0, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText, VictoryRoad2FMoltresBattleText
db -1 ; end
-VictoryRoad2Text1:
+VictoryRoad2FHikerText:
text_asm
ld hl, VictoryRoad2TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad2Text2:
+VictoryRoad2FSuperNerd1Text:
text_asm
ld hl, VictoryRoad2TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad2Text3:
+VictoryRoad2FCooltrainerMText:
text_asm
ld hl, VictoryRoad2TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad2Text4:
+VictoryRoad2FSuperNerd2Text:
text_asm
ld hl, VictoryRoad2TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad2Text5:
+VictoryRoad2FSuperNerd3Text:
text_asm
ld hl, VictoryRoad2TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-MoltresText:
+VictoryRoad2FMoltresText:
text_asm
ld hl, MoltresTrainerHeader
call TalkToTrainer
jp TextScriptEnd
-MoltresBattleText:
- text_far _MoltresBattleText
+VictoryRoad2FMoltresBattleText:
+ text_far _VictoryRoad2FMoltresBattleText
text_asm
ld a, MOLTRES
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-VictoryRoad2BattleText1:
- text_far _VictoryRoad2BattleText1
+VictoryRoad2FHikerBattleText:
+ text_far _VictoryRoad2FHikerBattleText
text_end
-VictoryRoad2EndBattleText1:
- text_far _VictoryRoad2EndBattleText1
+VictoryRoad2FHikerEndBattleText:
+ text_far _VictoryRoad2FHikerEndBattleText
text_end
-VictoryRoad2AfterBattleText1:
- text_far _VictoryRoad2AfterBattleText1
+VictoryRoad2FHikerAfterBattleText:
+ text_far _VictoryRoad2FHikerAfterBattleText
text_end
-VictoryRoad2BattleText2:
- text_far _VictoryRoad2BattleText2
+VictoryRoad2FSuperNerd1BattleText:
+ text_far _VictoryRoad2FSuperNerd1BattleText
text_end
-VictoryRoad2EndBattleText2:
- text_far _VictoryRoad2EndBattleText2
+VictoryRoad2FSuperNerd1EndBattleText:
+ text_far _VictoryRoad2FSuperNerd1EndBattleText
text_end
-VictoryRoad2AfterBattleText2:
- text_far _VictoryRoad2AfterBattleText2
+VictoryRoad2FSuperNerd1AfterBattleText:
+ text_far _VictoryRoad2FSuperNerd1AfterBattleText
text_end
-VictoryRoad2BattleText3:
- text_far _VictoryRoad2BattleText3
+VictoryRoad2FCooltrainerMBattleText:
+ text_far _VictoryRoad2FCooltrainerMBattleText
text_end
-VictoryRoad2EndBattleText3:
- text_far _VictoryRoad2EndBattleText3
+VictoryRoad2FCooltrainerMEndBattleText:
+ text_far _VictoryRoad2FCooltrainerMEndBattleText
text_end
-VictoryRoad2AfterBattleText3:
- text_far _VictoryRoad2AfterBattleText3
+VictoryRoad2FCooltrainerMAfterBattleText:
+ text_far _VictoryRoad2FCooltrainerMAfterBattleText
text_end
-VictoryRoad2BattleText4:
- text_far _VictoryRoad2BattleText4
+VictoryRoad2FSuperNerd2BattleText:
+ text_far _VictoryRoad2FSuperNerd2BattleText
text_end
-VictoryRoad2EndBattleText4:
- text_far _VictoryRoad2EndBattleText4
+VictoryRoad2FSuperNerd2EndBattleText:
+ text_far _VictoryRoad2FSuperNerd2EndBattleText
text_end
-VictoryRoad2AfterBattleText4:
- text_far _VictoryRoad2AfterBattleText4
+VictoryRoad2FSuperNerd2AfterBattleText:
+ text_far _VictoryRoad2FSuperNerd2AfterBattleText
text_end
-VictoryRoad2BattleText5:
- text_far _VictoryRoad2BattleText5
+VictoryRoad2FSuperNerd3BattleText:
+ text_far _VictoryRoad2FSuperNerd3BattleText
text_end
-VictoryRoad2EndBattleText5:
- text_far _VictoryRoad2EndBattleText5
+VictoryRoad2FSuperNerd3EndBattleText:
+ text_far _VictoryRoad2FSuperNerd3EndBattleText
text_end
-VictoryRoad2AfterBattleText5:
- text_far _VictoryRoad2AfterBattleText5
+VictoryRoad2FSuperNerd3AfterBattleText:
+ text_far _VictoryRoad2FSuperNerd3AfterBattleText
text_end
diff --git a/scripts/VictoryRoad3F.asm b/scripts/VictoryRoad3F.asm
index d1f42ac1..66f5c86e 100644
--- a/scripts/VictoryRoad3F.asm
+++ b/scripts/VictoryRoad3F.asm
@@ -1,5 +1,5 @@
VictoryRoad3F_Script:
- call VictoryRoad3Script_44996
+ call VictoryRoad3FCheckBoulderEventScript
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad3TrainerHeaders
ld de, VictoryRoad3F_ScriptPointers
@@ -8,7 +8,7 @@ VictoryRoad3F_Script:
ld [wVictoryRoad3FCurScript], a
ret
-VictoryRoad3Script_44996:
+VictoryRoad3FCheckBoulderEventScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
@@ -21,31 +21,32 @@ VictoryRoad3Script_44996:
predef_jump ReplaceTileBlock
VictoryRoad3F_ScriptPointers:
- dw VictoryRoad3Script0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const VictoryRoad3FDefaultScript, SCRIPT_VICTORYROAD3F_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VICTORYROAD3F_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VICTORYROAD3F_END_BATTLE
-VictoryRoad3Script0:
+VictoryRoad3FDefaultScript:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
- jp z, .asm_449fe
- ld hl, .coordsData_449f9
+ jp z, .check_switch_hole
+ ld hl, .SwitchOrHoleCoords
call CheckBoulderCoords
- jp nc, .asm_449fe
+ jp nc, .check_switch_hole
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_449dc
+ jr nz, .handle_hole
ldh a, [hSpriteIndexOrTextID]
cp $f ; Pikachu
- jp z, .asm_449fe
+ jp z, .check_switch_hole
ld hl, wCurrentMapScriptFlags
set 5, [hl]
SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret
-.asm_449dc
+.handle_hole
CheckAndSetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2
- jr nz, .asm_449fe
+ jr nz, .check_switch_hole
ld a, HS_VICTORY_ROAD_3F_BOULDER
ld [wMissableObjectIndex], a
predef HideObject
@@ -53,122 +54,123 @@ VictoryRoad3Script0:
ld [wMissableObjectIndex], a
predef_jump ShowObject
-.coordsData_449f9:
- dbmapcoord 3, 5
- dbmapcoord 23, 15
+.SwitchOrHoleCoords:
+ dbmapcoord 3, 5 ; switch
+ dbmapcoord 23, 15 ; hole
db -1 ; end
-.asm_449fe
+.check_switch_hole
ld a, VICTORY_ROAD_2F
ld [wDungeonWarpDestinationMap], a
- ld hl, .coordsData_449f9
+ ld hl, .SwitchOrHoleCoords
call IsPlayerOnDungeonWarp
ld a, [wCoordIndex]
cp $1
- jr nz, .asm_44a1b
+ jr nz, .hole
ld hl, wd72d
res 4, [hl]
ld hl, wd732
res 4, [hl]
ret
-.asm_44a1b
+.hole
ld a, [wd72d]
bit 4, a
jp z, CheckFightingMapTrainers
ret
VictoryRoad3F_TextPointers:
- dw VictoryRoad3Text1
- dw VictoryRoad3Text2
- dw VictoryRoad3Text3
- dw VictoryRoad3Text4
- dw PickUpItemText
- dw PickUpItemText
- dw BoulderText
- dw BoulderText
- dw BoulderText
- dw BoulderText
+ def_text_pointers
+ dw_const VictoryRoad3FCooltrainerM1Text, TEXT_VICTORYROAD3F_COOLTRAINER_M1
+ dw_const VictoryRoad3FCooltrainerF1Text, TEXT_VICTORYROAD3F_COOLTRAINER_F1
+ dw_const VictoryRoad3FCooltrainerM2Text, TEXT_VICTORYROAD3F_COOLTRAINER_M2
+ dw_const VictoryRoad3FCooltrainerF2Text, TEXT_VICTORYROAD3F_COOLTRAINER_F2
+ dw_const PickUpItemText, TEXT_VICTORYROAD3F_MAX_REVIVE
+ dw_const PickUpItemText, TEXT_VICTORYROAD3F_TM_EXPLOSION
+ dw_const BoulderText, TEXT_VICTORYROAD3F_BOULDER1
+ dw_const BoulderText, TEXT_VICTORYROAD3F_BOULDER2
+ dw_const BoulderText, TEXT_VICTORYROAD3F_BOULDER3
+ dw_const BoulderText, TEXT_VICTORYROAD3F_BOULDER4
VictoryRoad3TrainerHeaders:
def_trainers
VictoryRoad3TrainerHeader0:
- trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0, 1, VictoryRoad3BattleText2, VictoryRoad3EndBattleText2, VictoryRoad3AfterBattleText2
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0, 1, VictoryRoad3FCooltrainerM1BattleText, VictoryRoad3FCooltrainerM1EndBattleText, VictoryRoad3FCooltrainerM1AfterBattleText
VictoryRoad3TrainerHeader1:
- trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1, 4, VictoryRoad3BattleText3, VictoryRoad3EndBattleText3, VictoryRoad3AfterBattleText3
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1, 4, VictoryRoad3FCooltrainerF1BattleText, VictoryRoad3FCooltrainerF1EndBattleText, VictoryRoad3FCooltrainerF1AfterBattleText
VictoryRoad3TrainerHeader2:
- trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2, 4, VictoryRoad3BattleText4, VictoryRoad3EndBattleText4, VictoryRoad3AfterBattleText4
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2, 4, VictoryRoad3FCooltrainerM2BattleText, VictoryRoad3FCooltrainerM2EndBattleText, VictoryRoad3FCooltrainerM2AfterBattleText
VictoryRoad3TrainerHeader3:
- trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3, 4, VictoryRoad3BattleText5, VictoryRoad3EndBattleText5, VictoryRoad3AfterBattleText5
+ trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3, 4, VictoryRoad3FCooltrainerF2BattleText, VictoryRoad3FCooltrainerF2EndBattleText, VictoryRoad3FCooltrainerF2AfterBattleText
db -1 ; end
-VictoryRoad3Text1:
+VictoryRoad3FCooltrainerM1Text:
text_asm
ld hl, VictoryRoad3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad3Text2:
+VictoryRoad3FCooltrainerF1Text:
text_asm
ld hl, VictoryRoad3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad3Text3:
+VictoryRoad3FCooltrainerM2Text:
text_asm
ld hl, VictoryRoad3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad3Text4:
+VictoryRoad3FCooltrainerF2Text:
text_asm
ld hl, VictoryRoad3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-VictoryRoad3BattleText2:
- text_far _VictoryRoad3BattleText2
+VictoryRoad3FCooltrainerM1BattleText:
+ text_far _VictoryRoad3FCooltrainerM1BattleText
text_end
-VictoryRoad3EndBattleText2:
- text_far _VictoryRoad3EndBattleText2
+VictoryRoad3FCooltrainerM1EndBattleText:
+ text_far _VictoryRoad3FCooltrainerM1EndBattleText
text_end
-VictoryRoad3AfterBattleText2:
- text_far _VictoryRoad3AfterBattleText2
+VictoryRoad3FCooltrainerM1AfterBattleText:
+ text_far _VictoryRoad3FCooltrainerM1AfterBattleText
text_end
-VictoryRoad3BattleText3:
- text_far _VictoryRoad3BattleText3
+VictoryRoad3FCooltrainerF1BattleText:
+ text_far _VictoryRoad3FCooltrainerF1BattleText
text_end
-VictoryRoad3EndBattleText3:
- text_far _VictoryRoad3EndBattleText3
+VictoryRoad3FCooltrainerF1EndBattleText:
+ text_far _VictoryRoad3FCooltrainerF1EndBattleText
text_end
-VictoryRoad3AfterBattleText3:
- text_far _VictoryRoad3AfterBattleText3
+VictoryRoad3FCooltrainerF1AfterBattleText:
+ text_far _VictoryRoad3FCooltrainerF1AfterBattleText
text_end
-VictoryRoad3BattleText4:
- text_far _VictoryRoad3BattleText4
+VictoryRoad3FCooltrainerM2BattleText:
+ text_far _VictoryRoad3FCooltrainerM2BattleText
text_end
-VictoryRoad3EndBattleText4:
- text_far _VictoryRoad3EndBattleText4
+VictoryRoad3FCooltrainerM2EndBattleText:
+ text_far _VictoryRoad3FCooltrainerM2EndBattleText
text_end
-VictoryRoad3AfterBattleText4:
- text_far _VictoryRoad3AfterBattleText4
+VictoryRoad3FCooltrainerM2AfterBattleText:
+ text_far _VictoryRoad3FCooltrainerM2AfterBattleText
text_end
-VictoryRoad3BattleText5:
- text_far _VictoryRoad3BattleText5
+VictoryRoad3FCooltrainerF2BattleText:
+ text_far _VictoryRoad3FCooltrainerF2BattleText
text_end
-VictoryRoad3EndBattleText5:
- text_far _VictoryRoad3EndBattleText5
+VictoryRoad3FCooltrainerF2EndBattleText:
+ text_far _VictoryRoad3FCooltrainerF2EndBattleText
text_end
-VictoryRoad3AfterBattleText5:
- text_far _VictoryRoad3AfterBattleText5
+VictoryRoad3FCooltrainerF2AfterBattleText:
+ text_far _VictoryRoad3FCooltrainerF2AfterBattleText
text_end
diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm
index 44d7b780..0219fc91 100644
--- a/scripts/ViridianCity.asm
+++ b/scripts/ViridianCity.asm
@@ -6,30 +6,31 @@ ViridianCity_Script:
ret
ViridianCity_ScriptPointers:
- dw ViridianCityScript0
- dw ViridianCityScript1
- dw ViridianCityScript2
- dw ViridianCityScript3
- dw ViridianCityScript4
- dw ViridianCityScript5
- dw ViridianCityScript6
- dw ViridianCityScript7
- dw ViridianCityScript8
- dw ViridianCityScript9
- dw ViridianCityScript10
+ def_script_pointers
+ dw_const ViridianCityDefaultScript, SCRIPT_VIRIDIANCITY_DEFAULT
+ dw_const ViridianCityAfterPokedexScript, SCRIPT_VIRIDIANCITY_AFTER_POKEDEX
+ dw_const ViridianCityPostCatchTraining, SCRIPT_VIRIDIANCITY_POST_CATCH_TRAINING
+ dw_const ViridianCityOldManStartCatchTrainingScript, SCRIPT_VIRIDIANCITY_OLD_MAN_START_CATCH_TRAINING
+ dw_const ViridianCityOldManEndCatchTrainingScript, SCRIPT_VIRIDIANCITY_OLD_MAN_END_CATCH_TRAINING
+ dw_const ViridianCityPlayerMovingDownScript, SCRIPT_VIRIDIANCITY_PLAYER_MOVING_DOWN
+ dw_const ViridianCityPlayerMovingDownPostTrainingScript, SCRIPT_VIRIDIANCITY_PLAYER_MOVING_DOWN_POST_TRAINING
+ dw_const ViridianCityOldManInitialCatchTrainingScript, SCRIPT_VIRIDIANCITY_OLD_MAN_INITIAL_CATCH_TRAINING
+ dw_const ViridianCityOldManEndInitialCatchTrainingScript, SCRIPT_VIRIDIANCITY_OLD_MAN_END_INITIAL_CATCH_TRAINING
+ dw_const ViridianCityPostInitialCatchTraining, SCRIPT_VIRIDIANCITY_POST_INITIAL_CATCH_TRAINING
+ dw_const ViridianCityOldManMovingDownScript, SCRIPT_VIRIDIANCITY_OLD_MAN_MOVING_DOWN
-ViridianCityScript0:
- call ViridianCityScript_1905b
- call ViridianCityScript_190ab
+ViridianCityDefaultScript:
+ call ViridianCityCheckGymOpenScript
+ call ViridianCityCheckSleepingOldMan
ret
-ViridianCityScript1:
- call ViridianCityScript_19162
-ViridianCityScript2:
- call ViridianCityScript_1905b
+ViridianCityAfterPokedexScript:
+ call ViridianCityCheckWaitingOldMan
+ViridianCityPostCatchTraining:
+ call ViridianCityCheckGymOpenScript
ret
-ViridianCityScript_1905b:
+ViridianCityCheckGymOpenScript:
CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz
ld a, [wObtainedBadges]
@@ -44,7 +45,7 @@ ViridianCityScript_1905b:
ld a, [wXCoord]
cp 32
ret nz
- ld a, $f
+ ld a, TEXT_VIRIDIANCITY_GYM_LOCKED
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
call StartSimulatingJoypadStates
@@ -56,45 +57,45 @@ ViridianCityScript_1905b:
ld [wSpritePlayerStateData1FacingDirection], a
ld [wJoyIgnore], a
ldh [hJoyHeld], a
- ld a, $6
+ ld a, SCRIPT_VIRIDIANCITY_PLAYER_MOVING_DOWN_POST_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript6:
+ViridianCityPlayerMovingDownPostTrainingScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $2
+ ld a, SCRIPT_VIRIDIANCITY_POST_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript_190ab:
+ViridianCityCheckSleepingOldMan:
ld a, [wYCoord]
cp 9
ret nz
ld a, [wXCoord]
cp 19
ret nz
- ld a, $5
+ ld a, TEXT_VIRIDIANCITY_OLD_MAN_SLEEPY
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ldh [hJoyHeld], a
- call ViridianCityScript_1914d
- ld a, $5
+ call ViridianCityMovePlayerDownScript
+ ld a, SCRIPT_VIRIDIANCITY_PLAYER_MOVING_DOWN
ld [wViridianCityCurScript], a
ret
-ViridianCityScript3:
- call ViridianCityScript_190ef
- call ViridianCityScript_190db
- ResetEvent EVENT_02F
- ld a, $4
+ViridianCityOldManStartCatchTrainingScript:
+ call .SetupSprite
+ call .SetupBattle
+ ResetEvent EVENT_INITIAL_CATCH_TRAINING
+ ld a, SCRIPT_VIRIDIANCITY_OLD_MAN_END_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript_190db:
+.SetupBattle:
xor a
ld [wListScrollOffset], a
ld a, BATTLE_TYPE_OLD_MAN
@@ -105,7 +106,7 @@ ViridianCityScript_190db:
ld [wCurOpponent], a
ret
-ViridianCityScript_190ef:
+.SetupSprite:
ld a, [wSprite03StateData1YPixels]
ldh [hSpriteScreenYCoord], a
ld a, [wSprite03StateData1XPixels]
@@ -116,24 +117,24 @@ ViridianCityScript_190ef:
ldh [hSpriteMapXCoord], a
ret
-ViridianCityScript4:
- call ViridianCityScript_1912a
+ViridianCityOldManEndCatchTrainingScript:
+ call .SetupSprite
call UpdateSprites
call Delay3
- SetEvent EVENT_02E
+ SetEvent EVENT_COMPLETED_CATCH_TRAINING_AGAIN
xor a
ld [wJoyIgnore], a
- ld a, $10
+ ld a, TEXT_VIRIDIANCITY_OLD_MAN_YOU_NEED_TO_WEAKEN_THE_TARGET
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wBattleType], a
ld [wJoyIgnore], a
- ld a, $2
+ ld a, SCRIPT_VIRIDIANCITY_POST_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript_1912a:
+.SetupSprite:
ldh a, [hSpriteScreenYCoord]
ld [wSprite03StateData1YPixels], a
ldh a, [hSpriteScreenXCoord]
@@ -144,16 +145,16 @@ ViridianCityScript_1912a:
ld [wSprite03StateData2MapX], a
ret
-ViridianCityScript5:
+ViridianCityPlayerMovingDownScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $0
+ ld a, SCRIPT_VIRIDIANCITY_DEFAULT
ld [wViridianCityCurScript], a
ret
-ViridianCityScript_1914d:
+ViridianCityMovePlayerDownScript:
call StartSimulatingJoypadStates
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -164,8 +165,8 @@ ViridianCityScript_1914d:
ld [wJoyIgnore], a
ret
-ViridianCityScript_19162:
- CheckEvent EVENT_02D
+ViridianCityCheckWaitingOldMan:
+ CheckEvent EVENT_COMPLETED_CATCH_TRAINING
ret nz
ld a, [wYCoord]
cp 9
@@ -173,60 +174,60 @@ ViridianCityScript_19162:
ld a, [wXCoord]
cp 19
ret nz
- ld a, $8
+ ld a, VIRIDIANCITY_OLD_MAN2
ldh [hSpriteIndexOrTextID], a
ld a, SPRITE_FACING_RIGHT
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [wSpritePlayerStateData1FacingDirection], a
- ld a, $8
+ ld a, TEXT_VIRIDIANCITY_OLD_MAN2
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT
ld [wJoyIgnore], a
ret
-ViridianCityScript7:
- call ViridianCityScript_190ef
- call ViridianCityScript_190db
- SetEvent EVENT_02F
+ViridianCityOldManInitialCatchTrainingScript:
+ call ViridianCityOldManStartCatchTrainingScript.SetupSprite
+ call ViridianCityOldManStartCatchTrainingScript.SetupBattle
+ SetEvent EVENT_INITIAL_CATCH_TRAINING
ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT
ld [wJoyIgnore], a
- ld a, $8
+ ld a, SCRIPT_VIRIDIANCITY_OLD_MAN_END_INITIAL_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript8:
- call ViridianCityScript_1912a
+ViridianCityOldManEndInitialCatchTrainingScript:
+ call ViridianCityOldManEndCatchTrainingScript.SetupSprite
call UpdateSprites
call Delay3
- SetEvent EVENT_02D
+ SetEvent EVENT_COMPLETED_CATCH_TRAINING
ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT
ld [wJoyIgnore], a
- ld a, $8
+ ld a, TEXT_VIRIDIANCITY_OLD_MAN2
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wBattleType], a
dec a
ld [wJoyIgnore], a
- ld a, $9
+ ld a, SCRIPT_VIRIDIANCITY_POST_INITIAL_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
-ViridianCityScript9:
+ViridianCityPostInitialCatchTraining:
ld de, ViridianCityOldManMovementData2
ld a, [wXCoord]
cp 19
- jr z, .asm_191e4
- callfar Func_f1a01
+ jr z, .move_old_man
+ callfar ViridianCityMovePikachu
ld de, ViridianCityOldManMovementData1
-.asm_191e4
- ld a, $8
+.move_old_man
+ ld a, VIRIDIANCITY_OLD_MAN2
ldh [hSpriteIndexOrTextID], a
call MoveSprite
- ld a, $a
+ ld a, SCRIPT_VIRIDIANCITY_OLD_MAN_MOVING_DOWN
ld [wViridianCityCurScript], a
ret
@@ -241,123 +242,124 @@ ViridianCityOldManMovementData2:
db NPC_MOVEMENT_DOWN
db $ff
-ViridianCityScript10:
+ViridianCityOldManMovingDownScript:
ld a, [wd730]
bit 0, a
ret nz
- ld a, $3
+ ld a, HS_OLD_MAN_2
ld [wMissableObjectIndex], a
predef HideObject
xor a
ld [wJoyIgnore], a
- ld a, $2
+ ld a, SCRIPT_VIRIDIANCITY_POST_CATCH_TRAINING
ld [wViridianCityCurScript], a
ret
ViridianCity_TextPointers:
- dw ViridianCityText_0
- dw ViridianCityText_1
- dw ViridianCityText_2
- dw ViridianCityText_3
- dw ViridianCityText_4
- dw ViridianCityText_5
- dw ViridianCityText_6
- dw ViridianCityText_7
- dw ViridianCityText_8
- dw ViridianCityText_9
- dw ViridianCityText_10
- dw MartSignText
- dw PokeCenterSignText
- dw ViridianCityText_11
- dw ViridianCityText_12
- dw ViridianCityText_13
+ def_text_pointers
+ dw_const ViridianCityYoungster1Text, TEXT_VIRIDIANCITY_YOUNGSTER1
+ dw_const ViridianCityGambler1Text, TEXT_VIRIDIANCITY_GAMBLER1
+ dw_const ViridianCityYoungster2Text, TEXT_VIRIDIANCITY_YOUNGSTER2
+ dw_const ViridianCityGirlText, TEXT_VIRIDIANCITY_GIRL
+ dw_const ViridianCityOldManSleepyText, TEXT_VIRIDIANCITY_OLD_MAN_SLEEPY
+ dw_const ViridianCityFisherText, TEXT_VIRIDIANCITY_FISHER
+ dw_const ViridianCityOldManText, TEXT_VIRIDIANCITY_OLD_MAN
+ dw_const ViridianCityOldMan2Text, TEXT_VIRIDIANCITY_OLD_MAN2
+ dw_const ViridianCitySignText, TEXT_VIRIDIANCITY_SIGN
+ dw_const ViridianCityTrainerTips1Text, TEXT_VIRIDIANCITY_TRAINER_TIPS1
+ dw_const ViridianCityTrainerTips2Text, TEXT_VIRIDIANCITY_TRAINER_TIPS2
+ dw_const MartSignText, TEXT_VIRIDIANCITY_MART_SIGN
+ dw_const PokeCenterSignText, TEXT_VIRIDIANCITY_POKECENTER_SIGN
+ dw_const ViridianCityGymSignText, TEXT_VIRIDIANCITY_GYM_SIGN
+ dw_const ViridianCityGymLockedText, TEXT_VIRIDIANCITY_GYM_LOCKED
+ dw_const ViridianCityOldManYouNeedToWeakenTheTargetText, TEXT_VIRIDIANCITY_OLD_MAN_YOU_NEED_TO_WEAKEN_THE_TARGET
-ViridianCityText_0:
+ViridianCityYoungster1Text:
text_asm
- farcall Func_f18bb
+ farcall ViridianCityPrintYoungster1Text
jp TextScriptEnd
-ViridianCityText_1:
+ViridianCityGambler1Text:
text_asm
- farcall Func_f18c7
+ farcall ViridianCityPrintGambler1Text
jp TextScriptEnd
-ViridianCityText_2:
+ViridianCityYoungster2Text:
text_asm
- farcall Func_f18e9
+ farcall ViridianCityPrintYoungster2Text
jp TextScriptEnd
-ViridianCityText_3:
+ViridianCityGirlText:
text_asm
- farcall Func_f1911
+ farcall ViridianCityPrintGirlText
jp TextScriptEnd
-ViridianCityText_4:
+ViridianCityOldManSleepyText:
text_asm
- farcall Func_f192c
+ farcall ViridianCityPrintOldManSleepyText
jp TextScriptEnd
-ViridianCityText_5:
+ViridianCityFisherText:
text_asm
- farcall Func_f194a
+ farcall ViridianCityPrintFisherText
jp TextScriptEnd
-ViridianCityText_6:
+ViridianCityOldManText:
text_asm
- farcall Func_f198e
+ farcall ViridianCityPrintOldManText
jp TextScriptEnd
-ViridianCityText_13:
- text_far _ViridianCityText_19219
+ViridianCityOldManYouNeedToWeakenTheTargetText:
+ text_far _ViridianCityOldManYouNeedToWeakenTheTargetText
text_end
-ViridianCityText_7:
+ViridianCityOldMan2Text:
text_asm
- CheckEvent EVENT_02D
- jr nz, .asm_192a6
- ld hl, ViridianCityText_192af
+ CheckEvent EVENT_COMPLETED_CATCH_TRAINING
+ jr nz, .completed_training
+ ld hl, .HadMyCoffeeNowText
call PrintText
ld c, 2
call DelayFrames
- ld a, $7
+ ld a, SCRIPT_VIRIDIANCITY_OLD_MAN_INITIAL_CATCH_TRAINING
ld [wViridianCityCurScript], a
- jr .asm_192ac
+ jr .done
-.asm_192a6
- ld hl, ViridianCityText_192b4
+.completed_training
+ ld hl, .LosingMyTouchText
call PrintText
-.asm_192ac
+.done
jp TextScriptEnd
-ViridianCityText_192af:
- text_far _ViridianCityText_1920a
+.HadMyCoffeeNowText:
+ text_far _ViridianCityOldManHadMyCoffeeNowText
text_end
-ViridianCityText_192b4:
- text_far _OldManTextAfterBattle
+.LosingMyTouchText:
+ text_far _ViridianCityOldManLosingMyTouchText
text_end
-ViridianCityText_8:
+ViridianCitySignText:
text_asm
- farcall Func_f19c5
+ farcall ViridianCityPrintSignText
jp TextScriptEnd
-ViridianCityText_9:
+ViridianCityTrainerTips1Text:
text_asm
- farcall Func_f19d1
+ farcall ViridianCityPrintTrainerTips1Text
jp TextScriptEnd
-ViridianCityText_10:
+ViridianCityTrainerTips2Text:
text_asm
- farcall Func_f19dd
+ farcall ViridianCityPrintTrainerTips2Text
jp TextScriptEnd
-ViridianCityText_11:
+ViridianCityGymSignText:
text_asm
- farcall Func_f19e9
+ farcall ViridianCityPrintGymSignText
jp TextScriptEnd
-ViridianCityText_12:
+ViridianCityGymLockedText:
text_asm
- farcall Func_f19f5
+ farcall ViridianCityPrintGymLockedText
jp TextScriptEnd
diff --git a/scripts/ViridianCity2.asm b/scripts/ViridianCity2.asm
deleted file mode 100644
index 55f1a79d..00000000
--- a/scripts/ViridianCity2.asm
+++ /dev/null
@@ -1,215 +0,0 @@
-Func_f18bb::
- ld hl, ViridianCityText_f18c2
- call PrintText
- ret
-
-ViridianCityText_f18c2:
- text_far _ViridianCityText1
- text_end
-
-Func_f18c7::
- ld hl, ViridianCityText_19127
- ld a, [wObtainedBadges]
- cp ~(1 << BIT_EARTHBADGE)
- jr z, .done
- CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
- jr nz, .done
- ld hl, ViridianCityText_19122
-.done
- call PrintText
- ret
-
-ViridianCityText_19122:
- text_far _ViridianCityText_19122
- text_end
-
-ViridianCityText_19127:
- text_far _ViridianCityText_19127
- text_end
-
-Func_f18e9::
- ld hl, ViridianCityText_f1902
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- ld hl, ViridianCityText_f1907
- jr nz, .no
- ld hl, ViridianCityText_f190c
-.no
- call PrintText
- ret
-
-ViridianCityText_f1902:
- text_far _ViridianCityText_1914d
- text_end
-
-ViridianCityText_f1907:
- text_far _ViridianCityText_19152
- text_end
-
-ViridianCityText_f190c:
- text_far _ViridianCityText_19157
- text_end
-
-Func_f1911::
- ld hl, ViridianCityText_f1927
- CheckEvent EVENT_GOT_POKEDEX
- jr nz, .gotPokedex
- ld hl, ViridianCityText_f1922
-.gotPokedex
- call PrintText
- ret
-
-ViridianCityText_f1922:
- text_far _ViridianCityText_19175
- text_end
-
-ViridianCityText_f1927:
- text_far _ViridianCityText_1917a
- text_end
-
-Func_f192c::
- ld hl, ViridianCityText_f1945
- call PrintText
- call StartSimulatingJoypadStates
- ld a, $1
- ld [wSimulatedJoypadStatesIndex], a
- ld a, D_DOWN
- ld [wSimulatedJoypadStatesEnd], a
- ld a, $5
- ld [wViridianCityCurScript], a
- ret
-
-ViridianCityText_f1945:
- text_far _ViridianCityText_19191
- text_end
-
-Func_f194a::
- CheckEvent EVENT_GOT_TM42
- jr nz, .got_item
- ld hl, ViridianCityText_191ca
- call PrintText
- lb bc, TM_DREAM_EATER, 1
- call GiveItem
- jr nc, .bag_full
- ld hl, ReceivedTM42Text
- call PrintText
- SetEvent EVENT_GOT_TM42
- ret
-.bag_full
- ld hl, TM42NoRoomText
- call PrintText
- ret
-.got_item
- ld hl, TM42Explanation
- call PrintText
- ret
-
-ViridianCityText_191ca:
- text_far _ViridianCityText_191ca
- text_end
-
-ReceivedTM42Text:
- text_far _ReceivedTM42Text
- sound_get_item_2
- text_end
-
-TM42Explanation:
- text_far _TM42Explanation
- text_end
-
-TM42NoRoomText:
- text_far _TM42NoRoomText
- text_end
-
-Func_f198e::
- ld hl, ViridianCityText_f19b6
- call PrintText
- ld c, 2
- call DelayFrames
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .refused
- ld hl, ViridianCityText_f19bb
- call PrintText
- ld a, $3
- ld [wViridianCityCurScript], a
- jr .done
-.refused
- ld hl, ViridianCityText_f19c0
- call PrintText
-.done
- ret
-
-ViridianCityText_f19b6:
- text_far _OldManAgainText1
- text_end
-
-ViridianCityText_f19bb:
- text_far _OldManAgainText2
- text_end
-
-ViridianCityText_f19c0:
- text_far _OldManAgainText3
- text_end
-
-Func_f19c5::
- ld hl, ViridianCityText_f19cc
- call PrintText
- ret
-
-ViridianCityText_f19cc:
- text_far _ViridianCityText8
- text_end
-
-Func_f19d1::
- ld hl, ViridianCityText_f19d8
- call PrintText
- ret
-
-ViridianCityText_f19d8:
- text_far _ViridianCityText9
- text_end
-
-Func_f19dd::
- ld hl, ViridianCityText_f19e4
- call PrintText
- ret
-
-ViridianCityText_f19e4:
- text_far _ViridianCityText10
- text_end
-
-Func_f19e9::
- ld hl, ViridianCityText_f19f0
- call PrintText
- ret
-
-ViridianCityText_f19f0:
- text_far _ViridianCityText13
- text_end
-
-Func_f19f5::
- ld hl, ViridianCityText_f19fc
- call PrintText
- ret
-
-ViridianCityText_f19fc:
- text_far _ViridianCityText14
- text_end
-
-
-Func_f1a01::
- ld hl, Data_f1a0a
- ld b, SPRITE_FACING_RIGHT
- call TryApplyPikachuMovementData
- ret
-
-Data_f1a0a:
- db $00
- db $1d
- db $1f
- db $38
- db $3f
diff --git a/scripts/ViridianCity_2.asm b/scripts/ViridianCity_2.asm
new file mode 100644
index 00000000..e81055b2
--- /dev/null
+++ b/scripts/ViridianCity_2.asm
@@ -0,0 +1,215 @@
+ViridianCityPrintYoungster1Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCityYoungster1Text
+ text_end
+
+ViridianCityPrintGambler1Text::
+ ld hl, .GymLeaderReturnedText
+ ld a, [wObtainedBadges]
+ cp ~(1 << BIT_EARTHBADGE)
+ jr z, .print_text
+ CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
+ jr nz, .print_text
+ ld hl, .GymAlwaysClosedText
+.print_text
+ call PrintText
+ ret
+
+.GymAlwaysClosedText:
+ text_far _ViridianCityGambler1GymAlwaysClosedText
+ text_end
+
+.GymLeaderReturnedText:
+ text_far _ViridianCityGambler1GymLeaderReturnedText
+ text_end
+
+ViridianCityPrintYoungster2Text::
+ ld hl, .YouWantToKnowAboutText
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ ld hl, .OkThenText
+ jr nz, .no
+ ld hl, .CaterpieAndWeedleDescriptionText
+.no
+ call PrintText
+ ret
+
+.YouWantToKnowAboutText:
+ text_far _ViridianCityYoungster2YouWantToKnowAboutText
+ text_end
+
+.OkThenText:
+ text_far ViridianCityYoungster2OkThenText
+ text_end
+
+.CaterpieAndWeedleDescriptionText:
+ text_far ViridianCityYoungster2CaterpieAndWeedleDescriptionText
+ text_end
+
+ViridianCityPrintGirlText::
+ ld hl, .WhenIGoShopText
+ CheckEvent EVENT_GOT_POKEDEX
+ jr nz, .got_pokedex
+ ld hl, .HasntHadHisCoffeeYetText
+.got_pokedex
+ call PrintText
+ ret
+
+.HasntHadHisCoffeeYetText:
+ text_far _ViridianCityGirlHasntHadHisCoffeeYetText
+ text_end
+
+.WhenIGoShopText:
+ text_far _ViridianCityGirlWhenIGoShopText
+ text_end
+
+ViridianCityPrintOldManSleepyText::
+ ld hl, .PrivatePropertyText
+ call PrintText
+ call StartSimulatingJoypadStates
+ ld a, $1
+ ld [wSimulatedJoypadStatesIndex], a
+ ld a, D_DOWN
+ ld [wSimulatedJoypadStatesEnd], a
+ ld a, SCRIPT_VIRIDIANCITY_PLAYER_MOVING_DOWN
+ ld [wViridianCityCurScript], a
+ ret
+
+.PrivatePropertyText:
+ text_far _ViridianCityOldManSleepyPrivatePropertyText
+ text_end
+
+ViridianCityPrintFisherText::
+ CheckEvent EVENT_GOT_TM42
+ jr nz, .got_item
+ ld hl, .YouCanHaveThisText
+ call PrintText
+ lb bc, TM_DREAM_EATER, 1
+ call GiveItem
+ jr nc, .bag_full
+ ld hl, .ReceivedTM42Text
+ call PrintText
+ SetEvent EVENT_GOT_TM42
+ ret
+.bag_full
+ ld hl, .TM42NoRoomText
+ call PrintText
+ ret
+.got_item
+ ld hl, .TM42ExplanationText
+ call PrintText
+ ret
+
+.YouCanHaveThisText:
+ text_far ViridianCityFisherYouCanHaveThisText
+ text_end
+
+.ReceivedTM42Text:
+ text_far _ViridianCityFisherReceivedTM42Text
+ sound_get_item_2
+ text_end
+
+.TM42ExplanationText:
+ text_far _ViridianCityFisherTM42ExplanationText
+ text_end
+
+.TM42NoRoomText:
+ text_far _ViridianCityFisherTM42NoRoomText
+ text_end
+
+ViridianCityPrintOldManText::
+ ld hl, .WantMeToShowYouAgainText
+ call PrintText
+ ld c, 2
+ call DelayFrames
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .refused
+ ld hl, .WatchCloselyText
+ call PrintText
+ ld a, SCRIPT_VIRIDIANCITY_OLD_MAN_START_CATCH_TRAINING
+ ld [wViridianCityCurScript], a
+ jr .done
+.refused
+ ld hl, .NotGoodEnoughForYouText
+ call PrintText
+.done
+ ret
+
+.WantMeToShowYouAgainText:
+ text_far _ViridianCityOldManWantMeToShowYouAgainText
+ text_end
+
+.WatchCloselyText:
+ text_far _ViridianCityOldManWatchCloselyText
+ text_end
+
+.NotGoodEnoughForYouText:
+ text_far _ViridianCityOldManNotGoodEnoughForYouText
+ text_end
+
+ViridianCityPrintSignText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCitySignText
+ text_end
+
+ViridianCityPrintTrainerTips1Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCityTrainerTips1Text
+ text_end
+
+ViridianCityPrintTrainerTips2Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCityTrainerTips2Text
+ text_end
+
+ViridianCityPrintGymSignText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCityGymSignText
+ text_end
+
+ViridianCityPrintGymLockedText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianCityGymLockedText
+ text_end
+
+
+ViridianCityMovePikachu::
+ ld hl, ViridianCityPikachuMovementData
+ ld b, SPRITE_FACING_RIGHT
+ call TryApplyPikachuMovementData
+ ret
+
+ViridianCityPikachuMovementData:
+ db $00
+ db $1d
+ db $1f
+ db $38
+ db $3f
diff --git a/scripts/ViridianForest.asm b/scripts/ViridianForest.asm
index e9790a37..d8a570cd 100644
--- a/scripts/ViridianForest.asm
+++ b/scripts/ViridianForest.asm
@@ -8,166 +8,168 @@ ViridianForest_Script:
ret
ViridianForest_ScriptPointers:
- dw CheckFightingMapTrainers
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
+ def_script_pointers
+ dw_const CheckFightingMapTrainers, SCRIPT_VIRIDIANFOREST_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VIRIDIANFOREST_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VIRIDIANFOREST_END_BATTLE
ViridianForest_TextPointers:
- dw ViridianForestText1
- dw ViridianForestText2
- dw ViridianForestText3
- dw ViridianForestText4
- dw ViridianForestText5
- dw ViridianForestText6
- dw PickUpItemText
- dw PickUpItemText
- dw PickUpItemText
- dw ViridianForestText10
- dw ViridianForestText11
- dw ViridianForestText12
- dw ViridianForestText13
- dw ViridianForestText14
- dw ViridianForestText15
- dw ViridianForestText16
+ def_text_pointers
+ dw_const ViridianForestYoungster1Text, TEXT_VIRIDIANFOREST_YOUNGSTER1
+ dw_const ViridianForestYoungster2Text, TEXT_VIRIDIANFOREST_YOUNGSTER2
+ dw_const ViridianForestYoungster3Text, TEXT_VIRIDIANFOREST_YOUNGSTER3
+ dw_const ViridianForestYoungster4Text, TEXT_VIRIDIANFOREST_YOUNGSTER4
+ dw_const ViridianForestCooltrainerFText, TEXT_VIRIDIANFOREST_COOLTRAINER_F
+ dw_const ViridianForestYoungster5Text, TEXT_VIRIDIANFOREST_YOUNGSTER5
+ dw_const PickUpItemText, TEXT_VIRIDIANFOREST_POTION1
+ dw_const PickUpItemText, TEXT_VIRIDIANFOREST_POTION2
+ dw_const PickUpItemText, TEXT_VIRIDIANFOREST_POKE_BALL
+ dw_const ViridianForestYoungster6Text, TEXT_VIRIDIANFOREST_YOUNGSTER6
+ dw_const ViridianForestTrainerTips1Text, TEXT_VIRIDIANFOREST_TRAINER_TIPS1
+ dw_const ViridianForestUseAntidoteSignText, TEXT_VIRIDIANFOREST_USE_ANTIDOTE_SIGN
+ dw_const ViridianForestTrainerTips2Text, TEXT_VIRIDIANFOREST_TRAINER_TIPS2
+ dw_const ViridianForestTrainerTips3Text, TEXT_VIRIDIANFOREST_TRAINER_TIPS3
+ dw_const ViridianForestTrainerTips4Text, TEXT_VIRIDIANFOREST_TRAINER_TIPS4
+ dw_const ViridianForestLeavingSignText, TEXT_VIRIDIANFOREST_LEAVING_SIGN
ViridianForestTrainerHeaders:
def_trainers 2
ViridianForestTrainerHeader0:
- trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0, 4, ViridianForestBattleText1, ViridianForestEndBattleText1, ViridianForestAfterBattleText1
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0, 4, ViridianForestYoungster2BattleText, ViridianForestYoungster2EndBattleText, ViridianForestYoungster2AfterBattleText
ViridianForestTrainerHeader1:
- trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1, 4, ViridianForestBattleText2, ViridianForestEndBattleText2, ViridianForestAfterBattleText2
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1, 4, ViridianForestYoungster3BattleText, ViridianForestYoungster3EndBattleText, ViridianForestYoungster3AfterBattleText
ViridianForestTrainerHeader2:
- trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2, 1, ViridianForestBattleText3, ViridianForestEndBattleText3, ViridianForestAfterBattleText3
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2, 1, ViridianForestYoungster4BattleText, ViridianForestYoungster4EndBattleText, ViridianForestYoungster4AfterBattleText
ViridianForestTrainerHeader3:
- trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3, 0, ViridianForestBattleText4, ViridianForestEndBattleText4, ViridianForestAfterBattleText4
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3, 0, ViridianForestCooltrainerFBattleText, ViridianForestCooltrainerFEndBattleText, ViridianForestCooltrainerFAfterBattleText
ViridianForestTrainerHeader4:
- trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4, 4, ViridianForestBattleText5, ViridianForestEndBattleText5, ViridianForestAfterBattleText5
+ trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4, 4, ViridianForestYoungster5BattleText, ViridianForestYoungster5EndBattleText, ViridianForestYoungster5AfterBattleText
db -1 ; end
-ViridianForestText1:
- text_far _ViridianForestText1
+ViridianForestYoungster1Text:
+ text_far _ViridianForestYoungster1Text
text_end
-ViridianForestText2:
+ViridianForestYoungster2Text:
text_asm
ld hl, ViridianForestTrainerHeader0
jr ViridianForestTalkToTrainer
-ViridianForestText3:
+ViridianForestYoungster3Text:
text_asm
ld hl, ViridianForestTrainerHeader1
jr ViridianForestTalkToTrainer
-ViridianForestText4:
+ViridianForestYoungster4Text:
text_asm
ld hl, ViridianForestTrainerHeader2
jr ViridianForestTalkToTrainer
-ViridianForestText5:
+ViridianForestCooltrainerFText:
text_asm
ld hl, ViridianForestTrainerHeader3
jr ViridianForestTalkToTrainer
-ViridianForestText6:
+ViridianForestYoungster5Text:
text_asm
ld hl, ViridianForestTrainerHeader4
ViridianForestTalkToTrainer:
call TalkToTrainer
jp TextScriptEnd
-ViridianForestBattleText1:
- text_far _ViridianForestBattleText1
+ViridianForestYoungster2BattleText:
+ text_far _ViridianForestYoungster2BattleText
text_end
-ViridianForestEndBattleText1:
- text_far _ViridianForestEndBattleText1
+ViridianForestYoungster2EndBattleText:
+ text_far _ViridianForestYoungster2EndBattleText
text_end
-ViridianForestAfterBattleText1:
- text_far _ViridianFrstAfterBattleText1
+ViridianForestYoungster2AfterBattleText:
+ text_far _ViridianForestYoungster2AfterBattleText
text_end
-ViridianForestBattleText2:
- text_far _ViridianForestBattleText2
+ViridianForestYoungster3BattleText:
+ text_far _ViridianForestYoungster3BattleText
text_end
-ViridianForestEndBattleText2:
- text_far _ViridianForestEndBattleText2
+ViridianForestYoungster3EndBattleText:
+ text_far _ViridianForestYoungster3EndBattleText
text_end
-ViridianForestAfterBattleText2:
- text_far _ViridianFrstAfterBattleText2
+ViridianForestYoungster3AfterBattleText:
+ text_far _ViridianForestYoungster3AfterBattleText
text_end
-ViridianForestBattleText3:
- text_far _ViridianForestBattleText3
+ViridianForestYoungster4BattleText:
+ text_far _ViridianForestYoungster4BattleText
text_end
-ViridianForestEndBattleText3:
- text_far _ViridianForestEndBattleText3
+ViridianForestYoungster4EndBattleText:
+ text_far _ViridianForestYoungster4EndBattleText
text_end
-ViridianForestAfterBattleText3:
- text_far _ViridianFrstAfterBattleText3
+ViridianForestYoungster4AfterBattleText:
+ text_far _ViridianForestYoungster4AfterBattleText
text_end
-ViridianForestBattleText4:
- text_far _ViridianForestBattleTextPikaGirl
+ViridianForestCooltrainerFBattleText:
+ text_far _ViridianForestCooltrainerFBattleText
text_end
-ViridianForestEndBattleText4:
- text_far _ViridianForestEndBattleTextPikaGirl
+ViridianForestCooltrainerFEndBattleText:
+ text_far _ViridianForestCooltrainerFEndBattleText
text_end
-ViridianForestAfterBattleText4:
- text_far _ViridianForestAfterBattleTextPikaGirl
+ViridianForestCooltrainerFAfterBattleText:
+ text_far _ViridianForestCooltrainerFAfterBattleText
text_end
-ViridianForestBattleText5:
- text_far _ViridianForestBattleTextSamurai
+ViridianForestYoungster5BattleText:
+ text_far _ViridianForestYoungster5BattleText
text_end
-ViridianForestEndBattleText5:
- text_far _ViridianForestEndBattleTextSamurai
+ViridianForestYoungster5EndBattleText:
+ text_far _ViridianForestYoungster5EndBattleText
text_end
-ViridianForestAfterBattleText5:
- text_far _ViridianForestAfterBattleTextSamurai
+ViridianForestYoungster5AfterBattleText:
+ text_far _ViridianForestYoungster5AfterBattleText
text_end
-ViridianForestText10:
- text_far _ViridianForestText8
+ViridianForestYoungster6Text:
+ text_far _ViridianForestYoungster6Text
text_end
-ViridianForestText11:
+ViridianForestTrainerTips1Text:
text_asm
- ld hl, Func_f2528
- jp ViridianForestScript_6120d
+ ld hl, ViridianForestPrintTrainerTips1Text
+ jp ViridianForestSign_Common
-ViridianForestText12:
+ViridianForestUseAntidoteSignText:
text_asm
- ld hl, Func_f2534
- jp ViridianForestScript_6120d
+ ld hl, ViridianForestPrintUseAntidoteSignText
+ jp ViridianForestSign_Common
-ViridianForestText13:
+ViridianForestTrainerTips2Text:
text_asm
- ld hl, Func_f2540
- jp ViridianForestScript_6120d
+ ld hl, ViridianForestPrintTrainerTips2Text
+ jp ViridianForestSign_Common
-ViridianForestText14:
+ViridianForestTrainerTips3Text:
text_asm
- ld hl, Func_f254c
- jp ViridianForestScript_6120d
+ ld hl, ViridianForestPrintTrainerTips3Text
+ jp ViridianForestSign_Common
-ViridianForestText15:
+ViridianForestTrainerTips4Text:
text_asm
- ld hl, Func_f2558
- jp ViridianForestScript_6120d
+ ld hl, ViridianForestPrintTrainerTips4Text
+ jp ViridianForestSign_Common
-ViridianForestText16:
+ViridianForestLeavingSignText:
text_asm
- ld hl, Func_f2528
-ViridianForestScript_6120d:
- ld b, BANK(Func_f2528)
+ ld hl, ViridianForestPrintTrainerTips1Text ; supposed to be ViridianForestPrintLeavingSignText
+ViridianForestSign_Common:
+ ld b, BANK(ViridianForestPrintTrainerTips1Text)
call Bankswitch
jp TextScriptEnd
diff --git a/scripts/ViridianForest2.asm b/scripts/ViridianForest2.asm
deleted file mode 100644
index e5f03ccb..00000000
--- a/scripts/ViridianForest2.asm
+++ /dev/null
@@ -1,53 +0,0 @@
-Func_f2528::
- ld hl, Text_f252f
- call PrintText
- ret
-
-Text_f252f:
- text_far _ViridianForestText9
- text_end
-
-Func_f2534::
- ld hl, Text_f253b
- call PrintText
- ret
-
-Text_f253b:
- text_far _ViridianForestText10
- text_end
-
-Func_f2540::
- ld hl, Text_f254a
- call PrintText
- ret
-
-Text_f254a:
- text_far _ViridianForestText11
- text_end
-
-Func_f254c::
- ld hl, Text_f2553
- call PrintText
- ret
-
-Text_f2553:
- text_far _ViridianForestText12
- text_end
-
-Func_f2558::
- ld hl, Text_f255f
- call PrintText
- ret
-
-Text_f255f:
- text_far _ViridianForestText13
- text_end
-
-Func_f2564:
- ld hl, ViridianForestText_f256b
- call PrintText
- ret
-
-ViridianForestText_f256b:
- text_far _ViridianForestText14
- text_end
diff --git a/scripts/ViridianForestNorthGate.asm b/scripts/ViridianForestNorthGate.asm
index 6aef26d3..9b027e99 100644
--- a/scripts/ViridianForestNorthGate.asm
+++ b/scripts/ViridianForestNorthGate.asm
@@ -2,13 +2,14 @@ ViridianForestNorthGate_Script:
jp EnableAutoTextBoxDrawing
ViridianForestNorthGate_TextPointers:
- dw ViridianForestExitText1
- dw ViridianForestExitText2
+ def_text_pointers
+ dw_const ViridianForestNorthGateSuperNerdText, TEXT_VIRIDIANFORESTNORTHGATE_SUPER_NERD
+ dw_const ViridianForestNorthGateGrampsText, TEXT_VIRIDIANFORESTNORTHGATE_GRAMPS
-ViridianForestExitText1:
- text_far _ViridianForestExitText1
+ViridianForestNorthGateSuperNerdText:
+ text_far _ViridianForestNorthGateSuperNerdText
text_end
-ViridianForestExitText2:
- text_far _ViridianForestExitText2
+ViridianForestNorthGateGrampsText:
+ text_far _ViridianForestNorthGateGrampsText
text_end
diff --git a/scripts/ViridianForestSouthGate.asm b/scripts/ViridianForestSouthGate.asm
index 7ef66b85..92cf0438 100644
--- a/scripts/ViridianForestSouthGate.asm
+++ b/scripts/ViridianForestSouthGate.asm
@@ -3,13 +3,14 @@ ViridianForestSouthGate_Script:
ret
ViridianForestSouthGate_TextPointers:
- dw ViridianForestEntranceText1
- dw ViridianForestEntranceText2
+ def_text_pointers
+ dw_const ViridianForestSouthGateGirlText, TEXT_VIRIDIANFORESTSOUTHGATE_GIRL
+ dw_const ViridianForestSouthGateLittleGirlText, TEXT_VIRIDIANFORESTSOUTHGATE_LITTLE_GIRL
-ViridianForestEntranceText1:
- text_far _ViridianForestEntranceText1
+ViridianForestSouthGateGirlText:
+ text_far _ViridianForestSouthGateGirlText
text_end
-ViridianForestEntranceText2:
- text_far _ViridianForestEntranceText2
+ViridianForestSouthGateLittleGirlText:
+ text_far _ViridianForestSouthGateLittleGirlText
text_end
diff --git a/scripts/ViridianForest_2.asm b/scripts/ViridianForest_2.asm
new file mode 100644
index 00000000..a9b157d5
--- /dev/null
+++ b/scripts/ViridianForest_2.asm
@@ -0,0 +1,53 @@
+ViridianForestPrintTrainerTips1Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestTrainerTips1Text
+ text_end
+
+ViridianForestPrintUseAntidoteSignText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestUseAntidoteSignText
+ text_end
+
+ViridianForestPrintTrainerTips2Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestTrainerTips2Text
+ text_end
+
+ViridianForestPrintTrainerTips3Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestTrainerTips3Text
+ text_end
+
+ViridianForestPrintTrainerTips4Text::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestTrainerTips4Text
+ text_end
+
+ViridianForestPrintLeavingSignText:
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianForestLeavingSignText
+ text_end
diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm
index 0b90383c..5162d3bc 100644
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -24,13 +24,14 @@ ViridianGymResetScripts:
ret
ViridianGym_ScriptPointers:
- dw ViridianGymScript0
- dw DisplayEnemyTrainerTextAndStartBattle
- dw EndTrainerBattle
- dw ViridianGymGiovanniPostBattle
- dw ViridianGymScript4
+ def_script_pointers
+ dw_const ViridianGymDefaultScript, SCRIPT_VIRIDIANGYM_DEFAULT
+ dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_VIRIDIANGYM_START_BATTLE
+ dw_const EndTrainerBattle, SCRIPT_VIRIDIANGYM_END_BATTLE
+ dw_const ViridianGymGiovanniPostBattle, SCRIPT_VIRIDIANGYM_GIOVANNI_POST_BATTLE
+ dw_const ViridianGymPlayerSpinningScript, SCRIPT_VIRIDIANGYM_PLAYER_SPINNING
-ViridianGymScript0:
+ViridianGymDefaultScript:
ld a, [wYCoord]
ld b, a
ld a, [wXCoord]
@@ -44,9 +45,9 @@ ViridianGymScript0:
set 7, [hl]
ld a, SFX_ARROW_TILES
call PlaySound
- ld a, $ff
+ ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
- ld a, $4
+ ld a, SCRIPT_VIRIDIANGYM_PLAYER_SPINNING
ld [wCurMapScript], a
ret
@@ -113,7 +114,7 @@ ViridianGymArrowMovement12:
db D_LEFT, 12
db -1 ; end
-ViridianGymScript4:
+ViridianGymPlayerSpinningScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
jr nz, .ViridianGymLoadSpinnerArrow
@@ -121,7 +122,7 @@ ViridianGymScript4:
ld [wJoyIgnore], a
ld hl, wd736
res 7, [hl]
- ld a, $0
+ ld a, SCRIPT_VIRIDIANGYM_DEFAULT
ld [wCurMapScript], a
ret
.ViridianGymLoadSpinnerArrow
@@ -131,27 +132,27 @@ ViridianGymGiovanniPostBattle:
ld a, [wIsInBattle]
cp $ff
jp z, ViridianGymResetScripts
- ld a, $f0
+ ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
; fallthrough
ViridianGymReceiveTM27:
- ld a, $c
+ ld a, TEXT_VIRIDIANGYM_GIOVANNI_EARTH_BADGE_INFO
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
lb bc, TM_FISSURE, 1
call GiveItem
- jr nc, .BagFull
- ld a, $d
+ jr nc, .bag_full
+ ld a, TEXT_VIRIDIANGYM_GIOVANNI_RECEIVED_TM27
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
SetEvent EVENT_GOT_TM27
- jr .gymVictory
-.BagFull
- ld a, $e
+ jr .gym_victory
+.bag_full
+ ld a, TEXT_VIRIDIANGYM_GIOVANNI_TM27_NO_ROOM
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
-.gymVictory
+.gym_victory
ld hl, wObtainedBadges
set BIT_EARTHBADGE, [hl]
ld hl, wBeatGymFlags
@@ -167,42 +168,43 @@ ViridianGymReceiveTM27:
jp ViridianGymResetScripts
ViridianGym_TextPointers:
- dw GiovanniText
- dw ViridianGymTrainerText1
- dw ViridianGymTrainerText2
- dw ViridianGymTrainerText3
- dw ViridianGymTrainerText4
- dw ViridianGymTrainerText5
- dw ViridianGymTrainerText6
- dw ViridianGymTrainerText7
- dw ViridianGymTrainerText8
- dw ViridianGymGuideText
- dw PickUpItemText
- dw GiovanniEarthBadgeInfoText
- dw ReceivedTM27Text
- dw TM27NoRoomText
+ def_text_pointers
+ dw_const ViridianGymGiovanniText, TEXT_VIRIDIANGYM_GIOVANNI
+ dw_const ViridianGymCooltrainerM1Text, TEXT_VIRIDIANGYM_COOLTRAINER_M1
+ dw_const ViridianGymHiker1Text, TEXT_VIRIDIANGYM_HIKER1
+ dw_const ViridianGymRocker1Text, TEXT_VIRIDIANGYM_ROCKER1
+ dw_const ViridianGymHiker2Text, TEXT_VIRIDIANGYM_HIKER2
+ dw_const ViridianGymCooltrainerM2Text, TEXT_VIRIDIANGYM_COOLTRAINER_M2
+ dw_const ViridianGymHiker3Text, TEXT_VIRIDIANGYM_HIKER3
+ dw_const ViridianGymRocker2Text, TEXT_VIRIDIANGYM_ROCKER2
+ dw_const ViridianGymCooltrainerM3Text, TEXT_VIRIDIANGYM_COOLTRAINER_M3
+ dw_const ViridianGymGymGuideText, TEXT_VIRIDIANGYM_GYM_GUIDE
+ dw_const PickUpItemText, TEXT_VIRIDIANGYM_REVIVE
+ dw_const ViridianGymGiovanniEarthBadgeInfoText, TEXT_VIRIDIANGYM_GIOVANNI_EARTH_BADGE_INFO
+ dw_const ViridianGymGiovanniReceivedTM27Text, TEXT_VIRIDIANGYM_GIOVANNI_RECEIVED_TM27
+ dw_const ViridianGymGiovanniTM27NoRoomText, TEXT_VIRIDIANGYM_GIOVANNI_TM27_NO_ROOM
ViridianGymTrainerHeaders:
def_trainers 2
ViridianGymTrainerHeader0:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, 4, ViridianGymBattleText1, ViridianGymEndBattleText1, ViridianGymAfterBattleText1
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, 4, ViridianGymCooltrainerM1BattleText, ViridianGymCooltrainerM1EndBattleText, ViridianGymCooltrainerM1AfterBattleText
ViridianGymTrainerHeader1:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1, 4, ViridianGymBattleText2, ViridianGymEndBattleText2, ViridianGymAfterBattleText2
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1, 4, ViridianGymHiker1BattleText, ViridianGymHiker1EndBattleText, ViridianGymHiker1AfterBattleText
ViridianGymTrainerHeader2:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2, 4, ViridianGymBattleText3, ViridianGymEndBattleText3, ViridianGymAfterBattleText3
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2, 4, ViridianGymRocker1BattleText, ViridianGymRocker1EndBattleText, ViridianGymRocker1AfterBattleText
ViridianGymTrainerHeader3:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3, 2, ViridianGymBattleText4, ViridianGymEndBattleText4, ViridianGymAfterBattleText4
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3, 2, ViridianGymHiker2BattleText, ViridianGymHiker2EndBattleText, ViridianGymHiker2AfterBattleText
ViridianGymTrainerHeader4:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4, 3, ViridianGymBattleText5, ViridianGymEndBattleText5, ViridianGymAfterBattleText5
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4, 3, ViridianGymCooltrainerM2BattleText, ViridianGymCooltrainerM2EndBattleText, ViridianGymCooltrainerM2AfterBattleText
ViridianGymTrainerHeader5:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5, 4, ViridianGymBattleText6, ViridianGymEndBattleText6, ViridianGymAfterBattleText6
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5, 4, ViridianGymHiker3BattleText, ViridianGymHiker3EndBattleText, ViridianGymHiker3AfterBattleText
ViridianGymTrainerHeader6:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 3, ViridianGymBattleText7, ViridianGymEndBattleText7, ViridianGymAfterBattleText7
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 3, ViridianGymRocker2BattleText, ViridianGymRocker2EndBattleText, ViridianGymRocker2AfterBattleText
ViridianGymTrainerHeader7:
- trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 4, ViridianGymBattleText8, ViridianGymEndBattleText8, ViridianGymAfterBattleText8
+ trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 4, ViridianGymCooltrainerM3BattleText, ViridianGymCooltrainerM3EndBattleText, ViridianGymCooltrainerM3AfterBattleText
db -1 ; end
-GiovanniText:
+ViridianGymGiovanniText:
text_asm
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr z, .beforeBeat
@@ -210,11 +212,11 @@ GiovanniText:
jr nz, .afterBeat
call z, ViridianGymReceiveTM27
call DisableWaitingAfterTextDisplay
- jr .done
+ jr .text_script_end
.afterBeat
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, GiovanniPostBattleAdviceText
+ ld hl, .PostBattleAdviceText
call PrintText
call GBFadeOutToBlack
ld a, HS_VIRIDIAN_GYM_GIOVANNI
@@ -223,15 +225,15 @@ GiovanniText:
call UpdateSprites
call Delay3
call GBFadeInFromBlack
- jr .done
+ jr .text_script_end
.beforeBeat
- ld hl, GiovanniPreBattleText
+ ld hl, .PreBattleText
call PrintText
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, ReceivedEarthBadgeText
- ld de, ReceivedEarthBadgeText
+ ld hl, .ReceivedEarthBadgeText
+ ld de, .ReceivedEarthBadgeText
call SaveEndBattleTextPointers
ldh a, [hSpriteIndex]
ld [wSpriteIndex], a
@@ -239,186 +241,186 @@ GiovanniText:
call InitBattleEnemyParameters
ld a, $8
ld [wGymLeaderNo], a
- ld a, $3
+ ld a, SCRIPT_VIRIDIANGYM_GIOVANNI_POST_BATTLE
ld [wViridianGymCurScript], a
-.done
+.text_script_end
jp TextScriptEnd
-GiovanniPreBattleText:
- text_far _GiovanniPreBattleText
+.PreBattleText:
+ text_far _ViridianGymGiovanniPreBattleText
text_end
-ReceivedEarthBadgeText:
- text_far _ReceivedEarthBadgeText
+.ReceivedEarthBadgeText:
+ text_far _ViridianGymGiovanniReceivedEarthBadgeText
sound_level_up ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded
text_end
-GiovanniPostBattleAdviceText:
- text_far _GiovanniPostBattleAdviceText
+.PostBattleAdviceText:
+ text_far _ViridianGymGiovanniPostBattleAdviceText
text_waitbutton
text_end
-GiovanniEarthBadgeInfoText:
- text_far _GiovanniEarthBadgeInfoText
+ViridianGymGiovanniEarthBadgeInfoText:
+ text_far _ViridianGymGiovanniEarthBadgeInfoText
text_end
-ReceivedTM27Text:
- text_far _ReceivedTM27Text
+ViridianGymGiovanniReceivedTM27Text:
+ text_far _ViridianGymGiovanniReceivedTM27Text
sound_get_item_1
-TM27ExplanationText:
- text_far _TM27ExplanationText
+ViridianGymGiovanniTM27ExplanationText:
+ text_far _ViridianGymGiovanniTM27ExplanationText
text_end
-TM27NoRoomText:
- text_far _TM27NoRoomText
+ViridianGymGiovanniTM27NoRoomText:
+ text_far _ViridianGymGiovanniTM27NoRoomText
text_end
-ViridianGymTrainerText1:
+ViridianGymCooltrainerM1Text:
text_asm
ld hl, ViridianGymTrainerHeader0
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText1:
- text_far _ViridianGymBattleText1
+ViridianGymCooltrainerM1BattleText:
+ text_far _ViridianGymCooltrainerM1BattleText
text_end
-ViridianGymEndBattleText1:
- text_far _ViridianGymEndBattleText1
+ViridianGymCooltrainerM1EndBattleText:
+ text_far _ViridianGymCooltrainerM1EndBattleText
text_end
-ViridianGymAfterBattleText1:
- text_far _ViridianGymAfterBattleText1
+ViridianGymCooltrainerM1AfterBattleText:
+ text_far _ViridianGymCooltrainerM1AfterBattleText
text_end
-ViridianGymTrainerText2:
+ViridianGymHiker1Text:
text_asm
ld hl, ViridianGymTrainerHeader1
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText2:
- text_far _ViridianGymBattleText2
+ViridianGymHiker1BattleText:
+ text_far _ViridianGymHiker1BattleText
text_end
-ViridianGymEndBattleText2:
- text_far _ViridianGymEndBattleText2
+ViridianGymHiker1EndBattleText:
+ text_far _ViridianGymHiker1EndBattleText
text_end
-ViridianGymAfterBattleText2:
- text_far _ViridianGymAfterBattleText2
+ViridianGymHiker1AfterBattleText:
+ text_far _ViridianGymHiker1AfterBattleText
text_end
-ViridianGymTrainerText3:
+ViridianGymRocker1Text:
text_asm
ld hl, ViridianGymTrainerHeader2
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText3:
- text_far _ViridianGymBattleText3
+ViridianGymRocker1BattleText:
+ text_far _ViridianGymRocker1BattleText
text_end
-ViridianGymEndBattleText3:
- text_far _ViridianGymEndBattleText3
+ViridianGymRocker1EndBattleText:
+ text_far _ViridianGymRocker1EndBattleText
text_end
-ViridianGymAfterBattleText3:
- text_far _ViridianGymAfterBattleText3
+ViridianGymRocker1AfterBattleText:
+ text_far _ViridianGymRocker1AfterBattleText
text_end
-ViridianGymTrainerText4:
+ViridianGymHiker2Text:
text_asm
ld hl, ViridianGymTrainerHeader3
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText4:
- text_far _ViridianGymBattleText4
+ViridianGymHiker2BattleText:
+ text_far _ViridianGymHiker2BattleText
text_end
-ViridianGymEndBattleText4:
- text_far _ViridianGymEndBattleText4
+ViridianGymHiker2EndBattleText:
+ text_far _ViridianGymHiker2EndBattleText
text_end
-ViridianGymAfterBattleText4:
- text_far _ViridianGymAfterBattleText4
+ViridianGymHiker2AfterBattleText:
+ text_far _ViridianGymHiker2AfterBattleText
text_end
-ViridianGymTrainerText5:
+ViridianGymCooltrainerM2Text:
text_asm
ld hl, ViridianGymTrainerHeader4
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText5:
- text_far _ViridianGymBattleText5
+ViridianGymCooltrainerM2BattleText:
+ text_far _ViridianGymCooltrainerM2BattleText
text_end
-ViridianGymEndBattleText5:
- text_far _ViridianGymEndBattleText5
+ViridianGymCooltrainerM2EndBattleText:
+ text_far _ViridianGymCooltrainerM2EndBattleText
text_end
-ViridianGymAfterBattleText5:
- text_far _ViridianGymAfterBattleText5
+ViridianGymCooltrainerM2AfterBattleText:
+ text_far _ViridianGymCooltrainerM2AfterBattleText
text_end
-ViridianGymTrainerText6:
+ViridianGymHiker3Text:
text_asm
ld hl, ViridianGymTrainerHeader5
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText6:
- text_far _ViridianGymBattleText6
+ViridianGymHiker3BattleText:
+ text_far _ViridianGymHiker3BattleText
text_end
-ViridianGymEndBattleText6:
- text_far _ViridianGymEndBattleText6
+ViridianGymHiker3EndBattleText:
+ text_far _ViridianGymHiker3EndBattleText
text_end
-ViridianGymAfterBattleText6:
- text_far _ViridianGymAfterBattleText6
+ViridianGymHiker3AfterBattleText:
+ text_far _ViridianGymHiker3AfterBattleText
text_end
-ViridianGymTrainerText7:
+ViridianGymRocker2Text:
text_asm
ld hl, ViridianGymTrainerHeader6
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText7:
- text_far _ViridianGymBattleText7
+ViridianGymRocker2BattleText:
+ text_far _ViridianGymRocker2BattleText
text_end
-ViridianGymEndBattleText7:
- text_far _ViridianGymEndBattleText7
+ViridianGymRocker2EndBattleText:
+ text_far _ViridianGymRocker2EndBattleText
text_end
-ViridianGymAfterBattleText7:
- text_far _ViridianGymAfterBattleText7
+ViridianGymRocker2AfterBattleText:
+ text_far _ViridianGymRocker2AfterBattleText
text_end
-ViridianGymTrainerText8:
+ViridianGymCooltrainerM3Text:
text_asm
ld hl, ViridianGymTrainerHeader7
call TalkToTrainer
jp TextScriptEnd
-ViridianGymBattleText8:
- text_far _ViridianGymBattleText8
+ViridianGymCooltrainerM3BattleText:
+ text_far _ViridianGymCooltrainerM3BattleText
text_end
-ViridianGymEndBattleText8:
- text_far _ViridianGymEndBattleText8
+ViridianGymCooltrainerM3EndBattleText:
+ text_far _ViridianGymCooltrainerM3EndBattleText
text_end
-ViridianGymAfterBattleText8:
- text_far _ViridianGymAfterBattleText8
+ViridianGymCooltrainerM3AfterBattleText:
+ text_far _ViridianGymCooltrainerM3AfterBattleText
text_end
-ViridianGymGuideText:
+ViridianGymGymGuideText:
text_asm
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr nz, .afterBeat
diff --git a/scripts/ViridianMart.asm b/scripts/ViridianMart.asm
index 2d837018..c180d149 100644
--- a/scripts/ViridianMart.asm
+++ b/scripts/ViridianMart.asm
@@ -1,12 +1,12 @@
ViridianMart_Script:
- call ViridianMartScript_1d47d
+ call ViridianMartCheckParcelDeliveredScript
call EnableAutoTextBoxDrawing
ld hl, ViridianMart_ScriptPointers
ld a, [wViridianMartCurScript]
call CallFunctionInTable
ret
-ViridianMartScript_1d47d:
+ViridianMartCheckParcelDeliveredScript:
CheckEvent EVENT_OAK_GOT_PARCEL
jr nz, .delivered_parcel
ld hl, ViridianMart_TextPointers
@@ -15,57 +15,58 @@ ViridianMartScript_1d47d:
ld hl, ViridianMart_TextPointers2
.done
ld a, l
- ld [wMapTextPtr], a
+ ld [wCurMapTextPtr], a
ld a, h
- ld [wMapTextPtr+1], a
+ ld [wCurMapTextPtr+1], a
ret
ViridianMart_ScriptPointers:
- dw ViridianMartScript0
- dw ViridianMartScript1
- dw ViridianMartScript2
+ def_script_pointers
+ dw_const ViridianMartDefaultScript, SCRIPT_VIRIDIANMART_DEFAULT
+ dw_const ViridianMartOaksParcelScript, SCRIPT_VIRIDIANMART_OAKS_PARCEL
+ dw_const ViridianMartScript2, SCRIPT_VIRIDIANMART_SCRIPT2
-ViridianMartScript0:
+ViridianMartDefaultScript:
call UpdateSprites
- ld a, $4
+ ld a, TEXT_VIRIDIANMART_CLERK_YOU_CAME_FROM_PALLET_TOWN
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEMovement1d4bb
+ ld de, .PlayerMovement
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld a, $1
+ ld a, SCRIPT_VIRIDIANMART_OAKS_PARCEL
ld [wViridianMartCurScript], a
ret
-RLEMovement1d4bb:
+.PlayerMovement:
db D_LEFT, 1
db D_UP, 2
db -1 ; end
-ViridianMartScript1:
+ViridianMartOaksParcelScript:
ld a, [wSimulatedJoypadStatesIndex]
and a
ret nz
call Delay3
- ld a, $5
+ ld a, TEXT_VIRIDIANMART_CLERK_PARCEL_QUEST
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
lb bc, OAKS_PARCEL, 1
call GiveItem
SetEvent EVENT_GOT_OAKS_PARCEL
- ld a, $2
+ ld a, SCRIPT_VIRIDIANMART_SCRIPT2
ld [wViridianMartCurScript], a
ret
ViridianMartScript2:
- CheckEventHL EVENT_02D
+ CheckEventHL EVENT_COMPLETED_CATCH_TRAINING
ret z
- CheckAndSetEventReuseHL EVENT_02C
+ CheckAndSetEventReuseHL EVENT_SPAWNED_OLD_MAN_1
ret nz
- ld a, HS_OLD_MAN
+ ld a, HS_OLD_MAN_2
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_OLD_MAN_1
@@ -74,34 +75,37 @@ ViridianMartScript2:
ret
ViridianMart_TextPointers:
- dw ViridianMartText1
- dw ViridianMartText2
- dw ViridianMartText3
- dw ViridianMartText4
- dw ViridianMartText5
+ dw ViridianMartClerkSayHiToOakText
+ dw ViridianMartYoungsterText
+ dw ViridianMartCooltrainerMText
+ const_def 4
+ dw_const ViridianMartClerkYouCameFromPalletTownText, TEXT_VIRIDIANMART_CLERK_YOU_CAME_FROM_PALLET_TOWN
+ dw_const ViridianMartClerkParcelQuestText, TEXT_VIRIDIANMART_CLERK_PARCEL_QUEST
ViridianMart_TextPointers2:
- dw ViridianCashierText
- dw ViridianMartText2
- dw ViridianMartText3
+ ; This becomes the primary text pointers table when Oak's parcel has been delivered.
+ def_text_pointers
+ dw_const ViridianMartClerkText, TEXT_VIRIDIANMART_CLERK
+ dw_const ViridianMartYoungsterText, TEXT_VIRIDIANMART_YOUNGSTER
+ dw_const ViridianMartCooltrainerMText, TEXT_VIRIDIANMART_COOLTRAINER_M
-ViridianMartText1:
- text_far _ViridianMartText1
+ViridianMartClerkSayHiToOakText:
+ text_far _ViridianMartClerkSayHiToOakText
text_end
-ViridianMartText4:
- text_far _ViridianMartText4
+ViridianMartClerkYouCameFromPalletTownText:
+ text_far _ViridianMartClerkYouCameFromPalletTownText
text_end
-ViridianMartText5:
- text_far ViridianMartParcelQuestText
+ViridianMartClerkParcelQuestText:
+ text_far _ViridianMartClerkParcelQuestText
sound_get_key_item
text_end
-ViridianMartText2:
- text_far _ViridianMartText2
+ViridianMartYoungsterText:
+ text_far _ViridianMartYoungsterText
text_end
-ViridianMartText3:
- text_far _ViridianMartText3
+ViridianMartCooltrainerMText:
+ text_far _ViridianMartCooltrainerMText
text_end
diff --git a/scripts/ViridianNicknameHouse.asm b/scripts/ViridianNicknameHouse.asm
index df7482c2..7aba0b4a 100644
--- a/scripts/ViridianNicknameHouse.asm
+++ b/scripts/ViridianNicknameHouse.asm
@@ -2,32 +2,33 @@ ViridianNicknameHouse_Script:
jp EnableAutoTextBoxDrawing
ViridianNicknameHouse_TextPointers:
- dw ViridianHouseText1
- dw ViridianHouseText2
- dw ViridianHouseText3
- dw ViridianHouseText4
+ def_text_pointers
+ dw_const ViridianNicknameHouseBaldingGuyText, TEXT_VIRIDIANNICKNAMEHOUSE_BALDING_GUY
+ dw_const ViridianNicknameHouseLittleGirlText, TEXT_VIRIDIANNICKNAMEHOUSE_LITTLE_GIRL
+ dw_const ViridianNicknameHouseSpearowText, TEXT_VIRIDIANNICKNAMEHOUSE_SPEAROW
+ dw_const ViridianNicknameHouseSpearySignText, TEXT_VIRIDIANNICKNAMEHOUSE_SPEARY_SIGN
-ViridianHouseText1:
- text_far _ViridianHouseText1
+ViridianNicknameHouseBaldingGuyText:
+ text_far _ViridianNicknameHouseBaldingGuyText
text_end
-ViridianHouseText2:
- text_far _ViridianHouseText2
+ViridianNicknameHouseLittleGirlText:
+ text_far _ViridianNicknameHouseLittleGirlText
text_end
-ViridianHouseText3:
+ViridianNicknameHouseSpearowText:
text_asm
- ld hl, ViridianHouseText_1d5b1
+ ld hl, .Text
call PrintText
ld a, SPEAROW
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
-ViridianHouseText_1d5b1:
- text_far _ViridianHouseText_1d5b1
+.Text:
+ text_far _ViridianNicknameHouseSpearowText
text_end
-ViridianHouseText4:
- text_far _ViridianHouseText4
+ViridianNicknameHouseSpearySignText:
+ text_far _ViridianNicknameHouseSpearySignText
text_end
diff --git a/scripts/ViridianPokecenter.asm b/scripts/ViridianPokecenter.asm
index 25f4d637..5e6135ac 100644
--- a/scripts/ViridianPokecenter.asm
+++ b/scripts/ViridianPokecenter.asm
@@ -3,27 +3,28 @@ ViridianPokecenter_Script:
jp EnableAutoTextBoxDrawing
ViridianPokecenter_TextPointers:
- dw ViridianHealNurseText
- dw ViridianPokeCenterText2
- dw ViridianPokeCenterText3
- dw ViridianTradeNurseText
- dw ViridianPokeCenterText5
+ def_text_pointers
+ dw_const ViridianPokecenterNurseText, TEXT_VIRIDIANPOKECENTER_NURSE
+ dw_const ViridianPokecenterGentlemanText, TEXT_VIRIDIANPOKECENTER_GENTLEMAN
+ dw_const ViridianPokecenterCooltrainerMText, TEXT_VIRIDIANPOKECENTER_COOLTRAINER_M
+ dw_const ViridianPokecenterLinkReceptionistText, TEXT_VIRIDIANPOKECENTER_LINK_RECEPTIONIST
+ dw_const ViridianPokeCenterChanseyText, TEXT_VIRIDIANPOKECENTER_CHANSEY
-ViridianHealNurseText:
+ViridianPokecenterNurseText:
script_pokecenter_nurse
-ViridianPokeCenterText2:
- text_far _ViridianPokeCenterText2
+ViridianPokecenterGentlemanText:
+ text_far _ViridianPokecenterGentlemanText
text_end
-ViridianPokeCenterText3:
- text_far _ViridianPokeCenterText3
+ViridianPokecenterCooltrainerMText:
+ text_far _ViridianPokecenterCooltrainerMText
text_end
-ViridianTradeNurseText:
+ViridianPokecenterLinkReceptionistText:
script_cable_club_receptionist
-ViridianPokeCenterText5:
+ViridianPokeCenterChanseyText:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
diff --git a/scripts/ViridianSchoolHouse.asm b/scripts/ViridianSchoolHouse.asm
index 77dffa38..771e970e 100644
--- a/scripts/ViridianSchoolHouse.asm
+++ b/scripts/ViridianSchoolHouse.asm
@@ -3,20 +3,21 @@ ViridianSchoolHouse_Script:
ret
ViridianSchoolHouse_TextPointers:
- dw SchoolText1
- dw SchoolText2
- dw SchoolText3
+ def_text_pointers
+ dw_const ViridianSchoolHouseBrunetteGirlText, TEXT_VIRIDIANSCHOOLHOUSE_BRUNETTE_GIRL
+ dw_const ViridianSchoolHouseCooltrainerFText, TEXT_VIRIDIANSCHOOLHOUSE_COOLTRAINER_F
+ dw_const ViridianSchoolHouseLittleGirlText, TEXT_VIRIDIANSCHOOLHOUSE_LITTLE_GIRL
-SchoolText1:
- text_far _SchoolText1
+ViridianSchoolHouseBrunetteGirlText:
+ text_far _ViridianSchoolHouseBrunetteGirlText
text_end
-SchoolText2:
+ViridianSchoolHouseCooltrainerFText:
text_asm
- farcall Func_f1c0f
+ farcall ViridianSchoolHousePrintCooltrainerFText
jp TextScriptEnd
-SchoolText3:
+ViridianSchoolHouseLittleGirlText:
text_asm
- farcall Func_f1c03
+ farcall ViridianSchoolHousePrintLittleGirlText
jp TextScriptEnd
diff --git a/scripts/ViridianSchoolHouse2.asm b/scripts/ViridianSchoolHouse2.asm
deleted file mode 100644
index e5644830..00000000
--- a/scripts/ViridianSchoolHouse2.asm
+++ /dev/null
@@ -1,17 +0,0 @@
-Func_f1c03::
- ld hl, SchoolText_f1c0a
- call PrintText
- ret
-
-SchoolText_f1c0a:
- text_far _SchoolText3
- text_end
-
-Func_f1c0f::
- ld hl, SchoolText_f1c16
- call PrintText
- ret
-
-SchoolText_f1c16:
- text_far _SchoolText2
- text_end
diff --git a/scripts/ViridianSchoolHouse_2.asm b/scripts/ViridianSchoolHouse_2.asm
new file mode 100644
index 00000000..057b2640
--- /dev/null
+++ b/scripts/ViridianSchoolHouse_2.asm
@@ -0,0 +1,17 @@
+ViridianSchoolHousePrintLittleGirlText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianSchoolHouseLittleGirlText
+ text_end
+
+ViridianSchoolHousePrintCooltrainerFText::
+ ld hl, .text
+ call PrintText
+ ret
+
+.text
+ text_far _ViridianSchoolHouseCooltrainerFText
+ text_end
diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm
index 2dd0410c..1851e341 100644
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -2,13 +2,14 @@ WardensHouse_Script:
jp EnableAutoTextBoxDrawing
WardensHouse_TextPointers:
- dw FuchsiaHouse2Text1
- dw PickUpItemText
- dw BoulderText
- dw FuchsiaHouse2Text4
- dw FuchsiaHouse2Text5
+ def_text_pointers
+ dw_const WardensHouseWardenText, TEXT_WARDENSHOUSE_WARDEN
+ dw_const PickUpItemText, TEXT_WARDENSHOUSE_RARE_CANDY
+ dw_const BoulderText, TEXT_WARDENSHOUSE_BOULDER
+ dw_const WardensHouseDisplayText, TEXT_WARDENSHOUSE_DISPLAY_LEFT
+ dw_const WardensHouseDisplayText, TEXT_WARDENSHOUSE_DISPLAY_RIGHT
-FuchsiaHouse2Text1:
+WardensHouseWardenText:
text_asm
CheckEvent EVENT_GOT_HM04
jr nz, .got_item
@@ -17,97 +18,96 @@ FuchsiaHouse2Text1:
jr nz, .have_gold_teeth
CheckEvent EVENT_GAVE_GOLD_TEETH
jr nz, .gave_gold_teeth
- ld hl, WardenGibberishText1
+ ld hl, .Gibberish1Text
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- ld hl, WardenGibberishText3
+ ld hl, .Gibberish3Text
jr nz, .refused
- ld hl, WardenGibberishText2
+ ld hl, .Gibberish2Text
.refused
call PrintText
jr .done
.have_gold_teeth
- ld hl, WardenTeethText1
+ ld hl, .GaveTheGoldTeethText
call PrintText
ld a, GOLD_TEETH
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
.gave_gold_teeth
- ld hl, WardenThankYouText
+ ld hl, .ThanksText
call PrintText
lb bc, HM_STRENGTH, 1
call GiveItem
jr nc, .bag_full
- ld hl, ReceivedHM04Text
+ ld hl, .ReceivedHM04Text
call PrintText
SetEvent EVENT_GOT_HM04
jr .done
.got_item
- ld hl, HM04ExplanationText
+ ld hl, .HM04ExplanationText
call PrintText
jr .done
.bag_full
- ld hl, HM04NoRoomText
+ ld hl, .HM04NoRoomText
call PrintText
.done
jp TextScriptEnd
-WardenGibberishText1:
- text_far _WardenGibberishText1
+.Gibberish1Text:
+ text_far _WardensHouseWardenGibberish1Text
text_end
-WardenGibberishText2:
- text_far _WardenGibberishText2
+.Gibberish2Text:
+ text_far _WardensHouseWardenGibberish2Text
text_end
-WardenGibberishText3:
- text_far _WardenGibberishText3
+.Gibberish3Text:
+ text_far _WardensHouseWardenGibberish3Text
text_end
-WardenTeethText1:
- text_far _WardenTeethText1
+.GaveTheGoldTeethText:
+ text_far _WardensHouseWardenGaveTheGoldTeethText
sound_get_item_1
-WardenTeethText2:
- text_far _WardenTeethText2
+.PoppedInHisTeethText: ; unreferenced
+ text_far _WardensHouseWardenTeethPoppedInHisTeethText
text_end
-WardenThankYouText:
- text_far _WardenThankYouText
+.ThanksText:
+ text_far _WardensHouseWardenThanksText
text_end
-ReceivedHM04Text:
- text_far _ReceivedHM04Text
+.ReceivedHM04Text:
+ text_far _WardensHouseWardenReceivedHM04Text
sound_get_item_1
text_end
-HM04ExplanationText:
- text_far _HM04ExplanationText
+.HM04ExplanationText:
+ text_far _WardensHouseWardenHM04ExplanationText
text_end
-HM04NoRoomText:
- text_far _HM04NoRoomText
+.HM04NoRoomText:
+ text_far _WardensHouseWardenHM04NoRoomText
text_end
-FuchsiaHouse2Text5:
-FuchsiaHouse2Text4:
+WardensHouseDisplayText:
text_asm
- ldh a, [hSpriteIndex]
- cp $4
- ld hl, FuchsiaHouse2Text_7517b
- jr nz, .asm_4c9a2
- ld hl, FuchsiaHouse2Text_75176
-.asm_4c9a2
+ ldh a, [hSpriteIndexOrTextID]
+ cp TEXT_WARDENSHOUSE_DISPLAY_LEFT
+ ld hl, .MerchandiseText
+ jr nz, .print_text
+ ld hl, .PhotosAndFossilsText
+.print_text
call PrintText
jp TextScriptEnd
-FuchsiaHouse2Text_75176:
- text_far _FuchsiaHouse2Text_75176
+.PhotosAndFossilsText:
+ text_far _WardensHouseDisplayPhotosAndFossilsText
text_end
-FuchsiaHouse2Text_7517b:
- text_far _FuchsiaHouse2Text_7517b
+.MerchandiseText:
+ text_far _WardensHouseDisplayMerchandiseText
text_end