ref: 594c58a289cbad3954899d76ed000f483389472f
parent: 58f10893707004fe353422e19f3d1f2b89e60a6c
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Thu Jul 16 07:19:05 EDT 2020
Revise some map scripts, mostly for getting items
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -43,3 +43,9 @@
const BIT_VOLCANOBADGE ; 6
const BIT_EARTHBADGE ; 7
NUM_BADGES EQU const_value
+
+; OaksAideScript results
+OAKS_AIDE_BAG_FULL EQU $00
+OAKS_AIDE_GOT_ITEM EQU $01
+OAKS_AIDE_NOT_ENOUGH_MONS EQU $80
+OAKS_AIDE_REFUSED EQU $ff
--- a/engine/events/hidden_objects/pokecenter_pc.asm
+++ b/engine/events/hidden_objects/pokecenter_pc.asm
@@ -3,7 +3,7 @@
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
tx_pre_jump PokemonCenterPCText
--- a/engine/events/oaks_aide.asm
+++ b/engine/events/oaks_aide.asm
@@ -25,22 +25,22 @@
jr nc, .bagFull
ld hl, OaksAideGotItemText
call PrintText
- ld a, $1
+ ld a, OAKS_AIDE_GOT_ITEM
jr .done
.bagFull
ld hl, OaksAideNoRoomText
call PrintText
- xor a
+ xor a ; OAKS_AIDE_BAG_FULL
jr .done
.notEnoughOwnedMons
ld hl, OaksAideUhOhText
call PrintText
- ld a, $80
+ ld a, OAKS_AIDE_NOT_ENOUGH_MONS
jr .done
.choseNo
ld hl, OaksAideComeBackText
call PrintText
- ld a, $ff
+ ld a, OAKS_AIDE_REFUSED
.done
ldh [hOaksAideResult], a
ret
--- a/engine/slots/slot_machine.asm
+++ b/engine/slots/slot_machine.asm
@@ -1,6 +1,6 @@
PromptUserToPlaySlots:
call SaveScreenTilesToBuffer2
- ld a, BANK(DisplayTextIDInit)
+ ld a, BANK(DisplayTextIDInit) ; TRUE
ld [wAutoTextBoxDrawingControl], a
ld b, a
ld hl, DisplayTextIDInit
--- a/home/window.asm
+++ b/home/window.asm
@@ -272,7 +272,7 @@
jr AutoTextBoxDrawingCommon
DisableAutoTextBoxDrawing::
- ld a, $01
+ ld a, TRUE
AutoTextBoxDrawingCommon::
ld [wAutoTextBoxDrawingControl], a
--- a/scripts/BluesHouse.asm
+++ b/scripts/BluesHouse.asm
@@ -10,9 +10,7 @@
BluesHouseScript0:
SetEvent EVENT_ENTERED_BLUES_HOUSE
-
- ; trigger the next script
- ld a, 1
+ ld a, $1
ld [wBluesHouseCurScript], a
ret
@@ -20,40 +18,40 @@
ret
BluesHouse_TextPointers:
- dw BluesHouseText1
- dw BluesHouseText2
- dw BluesHouseText3
+ dw BluesHouseDaisySittingText
+ dw BluesHouseDaisyWalkingText
+ dw BluesHouseTownMapText
-BluesHouseText1:
+BluesHouseDaisySittingText:
text_asm
CheckEvent EVENT_GOT_TOWN_MAP
- jr nz, .GotMap
+ jr nz, .got_town_map
CheckEvent EVENT_GOT_POKEDEX
- jr nz, .GiveMap
+ jr nz, .give_town_map
ld hl, DaisyInitialText
call PrintText
jr .done
-.GiveMap
+.give_town_map
ld hl, DaisyOfferMapText
call PrintText
lb bc, TOWN_MAP, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld a, HS_TOWN_MAP
ld [wMissableObjectIndex], a
- predef HideObject ; hide table map object
+ predef HideObject
ld hl, GotMapText
call PrintText
SetEvent EVENT_GOT_TOWN_MAP
jr .done
-.GotMap
+.got_town_map
ld hl, DaisyUseMapText
call PrintText
jr .done
-.BagFull
+.bag_full
ld hl, DaisyBagFullText
call PrintText
.done
@@ -80,10 +78,10 @@
text_far _DaisyUseMapText
text_end
-BluesHouseText2: ; Daisy, walking around
- text_far _BluesHouseText2
+BluesHouseDaisyWalkingText:
+ text_far _BluesHouseDaisyWalkingText
text_end
-BluesHouseText3: ; map on table
- text_far _BluesHouseText3
+BluesHouseTownMapText:
+ text_far _BluesHouseTownMapText
text_end
--- a/scripts/CeladonDiner.asm
+++ b/scripts/CeladonDiner.asm
@@ -28,24 +28,24 @@
CeladonDinerText5:
text_asm
CheckEvent EVENT_GOT_COIN_CASE
- jr nz, .asm_eb14d
+ jr nz, .got_item
ld hl, CeladonDinerText_491a7
call PrintText
lb bc, COIN_CASE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_COIN_CASE
ld hl, ReceivedCoinCaseText
call PrintText
- jr .asm_68b61
-.BagFull
+ jr .done
+.bag_full
ld hl, CoinCaseNoRoomText
call PrintText
- jr .asm_68b61
-.asm_eb14d
+ jr .done
+.got_item
ld hl, CeladonDinerText_491b7
call PrintText
-.asm_68b61
+.done
jp TextScriptEnd
CeladonDinerText_491a7:
--- a/scripts/CeladonMansion1F.asm
+++ b/scripts/CeladonMansion1F.asm
@@ -8,7 +8,7 @@
dw CeladonMansion1Text4
dw CeladonMansion1Text5
-CeladonMansion1_486a1:
+CeladonMansion1_PlayCryScript:
call PlayCry
jp TextScriptEnd
@@ -16,7 +16,7 @@
text_far _CeladonMansion1Text1
text_asm
ld a, MEOWTH
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text2:
text_far _CeladonMansion1Text2
@@ -26,13 +26,13 @@
text_far _CeladonMansion1Text3
text_asm
ld a, CLEFAIRY
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text4:
text_far _CeladonMansion1Text4
text_asm
ld a, NIDORAN_F
- jp CeladonMansion1_486a1
+ jp CeladonMansion1_PlayCryScript
CeladonMansion1Text5:
text_far _CeladonMansion1Text5
--- a/scripts/CeladonMansion3F.asm
+++ b/scripts/CeladonMansion3F.asm
@@ -25,32 +25,30 @@
DirectorText:
text_asm
-
- ; check pokédex
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
- cp 150
- jr nc, .CompletedDex
- ld hl, .GameDesigner
+ cp NUM_POKEMON - 1 ; discount Mew
+ jr nc, .completed_dex
+ ld hl, .GameDesignerText
jr .done
-.CompletedDex
+.completed_dex
ld hl, .CompletedDexText
.done
call PrintText
jp TextScriptEnd
-.GameDesigner
+.GameDesignerText:
text_far _GameDesignerText
text_end
-.CompletedDexText
+.CompletedDexText:
text_far _CompletedDexText
text_promptbutton
text_asm
callfar DisplayDiploma
- ld a, $1
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
--- a/scripts/CeladonMansionRoofHouse.asm
+++ b/scripts/CeladonMansionRoofHouse.asm
@@ -13,9 +13,9 @@
text_asm
lb bc, EEVEE, 25
call GivePokemon
- jr nc, .asm_24365
+ jr nc, .party_full
ld a, HS_CELADON_MANSION_EEVEE_GIFT
ld [wMissableObjectIndex], a
predef HideObject
-.asm_24365
+.party_full
jp TextScriptEnd
--- a/scripts/CeladonMart3F.asm
+++ b/scripts/CeladonMart3F.asm
@@ -23,21 +23,21 @@
CeladonMart3Text1:
text_asm
CheckEvent EVENT_GOT_TM18
- jr nz, .asm_a5463
+ jr nz, .got_item
ld hl, TM18PreReceiveText
call PrintText
lb bc, TM_COUNTER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_TM18
ld hl, ReceivedTM18Text
- jr .asm_81359
-.BagFull
+ jr .done
+.bag_full
ld hl, TM18NoRoomText
- jr .asm_81359
-.asm_a5463
+ jr .done
+.got_item
ld hl, TM18ExplanationText
-.asm_81359
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/CeladonMartElevator.asm
+++ b/scripts/CeladonMartElevator.asm
@@ -40,23 +40,22 @@
jp CopyData
CeladonMartElevatorFloors:
- db 5 ; number of elements in list
+ db 5 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
db FLOOR_4F
db FLOOR_5F
- db $FF
+ db -1 ; end
-CeladonMartElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $05, CELADON_MART_1F
- db $02, CELADON_MART_2F
- db $02, CELADON_MART_3F
- db $02, CELADON_MART_4F
- db $02, CELADON_MART_5F
+CeladonMartElevatorWarpMaps:
+ ; warp number, map id
+ db 5, CELADON_MART_1F
+ db 2, CELADON_MART_2F
+ db 2, CELADON_MART_3F
+ db 2, CELADON_MART_4F
+ db 2, CELADON_MART_5F
CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654:
--- a/scripts/CeruleanBadgeHouse.asm
+++ b/scripts/CeruleanBadgeHouse.asm
@@ -1,5 +1,5 @@
CeruleanBadgeHouse_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
dec a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -34,7 +34,7 @@
jr c, .asm_74e60
ld hl, TextPointers_74e86
ld a, [wcf91]
- sub $15
+ sub BOULDERBADGE
add a
ld d, $0
ld e, a
@@ -52,7 +52,16 @@
jp TextScriptEnd
BadgeItemList:
- db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF
+ db 8 ; #
+ db BOULDERBADGE
+ db CASCADEBADGE
+ db THUNDERBADGE
+ db RAINBOWBADGE
+ db SOULBADGE
+ db MARSHBADGE
+ db VOLCANOBADGE
+ db EARTHBADGE
+ db -1 ; end
CeruleanHouse2Text_74e77:
text_far _CeruleanHouse2Text_74e77
--- a/scripts/CeruleanTrashedHouse.asm
+++ b/scripts/CeruleanTrashedHouse.asm
@@ -9,17 +9,17 @@
CeruleanHouseTrashedText1:
text_asm
- ld b, $e4
+ ld b, TM_DIG
predef GetQuantityOfItemInBag
and b
- jr z, .asm_f8734
+ jr z, .no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6b0
call PrintText
- jr .asm_8dfe9
-.asm_f8734
+ jr .done
+.no_dig_tm
ld hl, CeruleanHouseTrashedText_1d6ab
call PrintText
-.asm_8dfe9
+.done
jp TextScriptEnd
CeruleanHouseTrashedText_1d6ab:
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -44,7 +44,7 @@
db DOME_FOSSIL
db HELIX_FOSSIL
db OLD_AMBER
- db $00
+ db 0 ; end
Lab4Text1:
text_asm
--- a/scripts/CinnabarLabMetronomeRoom.asm
+++ b/scripts/CinnabarLabMetronomeRoom.asm
@@ -11,24 +11,24 @@
Lab3Text1:
text_asm
CheckEvent EVENT_GOT_TM35
- jr nz, .asm_e551a
+ jr nz, .got_item
ld hl, TM35PreReceiveText
call PrintText
lb bc, TM_METRONOME, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM35Text
call PrintText
SetEvent EVENT_GOT_TM35
- jr .asm_eb896
-.BagFull
+ jr .done
+.bag_full
ld hl, TM35NoRoomText
call PrintText
- jr .asm_eb896
-.asm_e551a
+ jr .done
+.got_item
ld hl, TM35ExplanationText
call PrintText
-.asm_eb896
+.done
jp TextScriptEnd
TM35PreReceiveText:
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -13,19 +13,19 @@
CopycatsHouse2FText1:
text_asm
CheckEvent EVENT_GOT_TM31
- jr nz, .asm_7ccf3
- ld a, $1
+ jr nz, .got_item
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CopycatsHouse2FText_5ccd4
call PrintText
ld b, POKE_DOLL
call IsItemInBag
- jr z, .asm_62ecd
+ jr z, .done
ld hl, TM31PreReceiveText
call PrintText
lb bc, TM_MIMIC, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM31Text
call PrintText
ld a, POKE_DOLL
@@ -32,15 +32,15 @@
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GOT_TM31
- jr .asm_62ecd
-.BagFull
+ jr .done
+.bag_full
ld hl, TM31NoRoomText
call PrintText
- jr .asm_62ecd
-.asm_7ccf3
+ jr .done
+.got_item
ld hl, TM31ExplanationText2
call PrintText
-.asm_62ecd
+.done
jp TextScriptEnd
CopycatsHouse2FText_5ccd4:
--- a/scripts/DiglettsCave.asm
+++ b/scripts/DiglettsCave.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
DiglettsCave_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/FuchsiaGoodRodHouse.asm
+++ b/scripts/FuchsiaGoodRodHouse.asm
@@ -7,39 +7,30 @@
FuchsiaHouse3Text1:
text_asm
ld a, [wd728]
- bit 4, a
- jr nz, .after
-
+ bit 4, a ; got good rod?
+ jr nz, .got_item
ld hl, FuchsiaHouse3Text_561bd
call PrintText
-
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jr nz, .refused
-
lb bc, GOOD_ROD, 1
call GiveItem
- jr nc, .full
-
+ jr nc, .bag_full
ld hl, wd728
- set 4, [hl]
-
+ set 4, [hl] ; got good rod
ld hl, FuchsiaHouse3Text_561c2
- jr .talk
-
-.full
+ jr .done
+.bag_full
ld hl, FuchsiaHouse3Text_5621c
- jr .talk
-
+ jr .done
.refused
ld hl, FuchsiaHouse3Text_56212
- jr .talk
-
-.after
+ jr .done
+.got_item
ld hl, FuchsiaHouse3Text_56217
-
-.talk
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/LavenderCuboneHouse.asm
+++ b/scripts/LavenderCuboneHouse.asm
@@ -16,14 +16,14 @@
LavenderHouse2Text2:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_65711
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9dc
call PrintText
- jr .asm_64be1
-.asm_65711
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse2Text_1d9e1
call PrintText
-.asm_64be1
+.done
jp TextScriptEnd
LavenderHouse2Text_1d9dc:
--- a/scripts/LavenderTown.asm
+++ b/scripts/LavenderTown.asm
@@ -20,9 +20,9 @@
ld a, [wCurrentMenuItem]
and a
ld hl, LavenderTownText_44146
- jr nz, .asm_40831
+ jr nz, .got_text
ld hl, LavenderTownText_44141
-.asm_40831
+.got_text
call PrintText
jp TextScriptEnd
--- a/scripts/MrFujisHouse.asm
+++ b/scripts/MrFujisHouse.asm
@@ -13,14 +13,14 @@
LavenderHouse1Text1:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_72e5d
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d1
call PrintText
- jr .asm_6957f
-.asm_72e5d
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8d6
call PrintText
-.asm_6957f
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8d1:
@@ -34,14 +34,14 @@
LavenderHouse1Text2:
text_asm
CheckEvent EVENT_RESCUED_MR_FUJI
- jr nz, .asm_06470
+ jr nz, .rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f4
call PrintText
- jr .asm_3d208
-.asm_06470
+ jr .done
+.rescued_mr_fuji
ld hl, LavenderHouse1Text_1d8f9
call PrintText
-.asm_3d208
+.done
jp TextScriptEnd
LavenderHouse1Text_1d8f4:
@@ -69,24 +69,24 @@
LavenderHouse1Text5:
text_asm
CheckEvent EVENT_GOT_POKE_FLUTE
- jr nz, .asm_15ac2
+ jr nz, .got_item
ld hl, LavenderHouse1Text_1d94c
call PrintText
lb bc, POKE_FLUTE, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedFluteText
call PrintText
SetEvent EVENT_GOT_POKE_FLUTE
- jr .asm_da749
-.BagFull
+ jr .done
+.bag_full
ld hl, FluteNoRoomText
call PrintText
- jr .asm_da749
-.asm_15ac2
+ jr .done
+.got_item
ld hl, MrFujiAfterFluteText
call PrintText
-.asm_da749
+.done
jp TextScriptEnd
LavenderHouse1Text_1d94c:
--- a/scripts/MrPsychicsHouse.asm
+++ b/scripts/MrPsychicsHouse.asm
@@ -7,24 +7,24 @@
SaffronHouse2Text1:
text_asm
CheckEvent EVENT_GOT_TM29
- jr nz, .asm_9e72b
+ jr nz, .got_item
ld hl, TM29PreReceiveText
call PrintText
lb bc, TM_PSYCHIC_M, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM29Text
call PrintText
SetEvent EVENT_GOT_TM29
- jr .asm_fe4e1
-.BagFull
+ jr .done
+.bag_full
ld hl, TM29NoRoomText
call PrintText
- jr .asm_fe4e1
-.asm_9e72b
+ jr .done
+.got_item
ld hl, TM29ExplanationText
call PrintText
-.asm_fe4e1
+.done
jp TextScriptEnd
TM29PreReceiveText:
--- a/scripts/MtMoonB2F.asm
+++ b/scripts/MtMoonB2F.asm
@@ -123,9 +123,9 @@
MovementData_49df8:
db NPC_MOVEMENT_RIGHT
-
MovementData_49df9:
- db NPC_MOVEMENT_UP,$FF
+ db NPC_MOVEMENT_UP
+ db $FF
MtMoon3Script5:
ld a, [wd730]
--- a/scripts/Museum1F.asm
+++ b/scripts/Museum1F.asm
@@ -1,5 +1,5 @@
Museum1F_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
@@ -188,24 +188,24 @@
Museum1FText3:
text_asm
CheckEvent EVENT_GOT_OLD_AMBER
- jr nz, .asm_5c285
+ jr nz, .got_item
ld hl, Museum1FText_5c28e
call PrintText
lb bc, OLD_AMBER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_OLD_AMBER
ld a, HS_OLD_AMBER
ld [wMissableObjectIndex], a
predef HideObject
ld hl, ReceivedOldAmberText
- jr .asm_5c288
-.BagFull
+ jr .done
+.bag_full
ld hl, Museum1FText_5c29e
- jr .asm_5c288
-.asm_5c285
+ jr .done
+.got_item
ld hl, Museum1FText_5c299
-.asm_5c288
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -1,7 +1,7 @@
OaksLab_Script:
CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2
call nz, OaksLabScript_1d076
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
--- a/scripts/PewterMart.asm
+++ b/scripts/PewterMart.asm
@@ -1,6 +1,6 @@
PewterMart_Script:
call EnableAutoTextBoxDrawing
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
ret
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -17,14 +17,16 @@
PewterJigglypuffText:
text_asm
- ld a, $1
+ ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, .Text
+ ld hl, .JigglypuffText
call PrintText
+
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld c, 32
call DelayFrames
+
ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
@@ -37,15 +39,16 @@
inc hl
jr nz, .findMatchingFacingDirectionLoop
dec hl
+
push hl
ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic
pop hl
-.loop
+
+.spinMovementLoop
ld a, [hl]
ld [wSprite03StateData1ImageIndex], a
-
; rotate the array
push hl
ld hl, wJigglypuffFacingDirections
@@ -55,15 +58,13 @@
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
pop hl
-
ld c, 24
call DelayFrames
-
ld a, [wChannelSoundIDs]
ld b, a
ld a, [wChannelSoundIDs + Ch2]
or b
- jr nz, .loop
+ jr nz, .spinMovementLoop
ld c, 48
call DelayFrames
@@ -70,7 +71,7 @@
call PlayDefaultMusic
jp TextScriptEnd
-.Text
+.JigglypuffText:
text_far _PewterJigglypuffText
text_end
--- a/scripts/PokemonFanClub.asm
+++ b/scripts/PokemonFanClub.asm
@@ -115,12 +115,12 @@
call PrintText
lb bc, BIKE_VOUCHER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, .receivedvouchertext
call PrintText
SetEvent EVENT_GOT_BIKE_VOUCHER
jr .done
-.BagFull
+.bag_full
ld hl, .bagfulltext
call PrintText
jr .done
--- a/scripts/PokemonTower6F.asm
+++ b/scripts/PokemonTower6F.asm
@@ -42,7 +42,8 @@
ret
CoordsData_60b45:
- db $10,$0A,$FF
+ db $10,$0A
+ db $FF
PokemonTower6Script4:
ld a, [wIsInBattle]
--- a/scripts/RedsHouse1F.asm
+++ b/scripts/RedsHouse1F.asm
@@ -2,14 +2,14 @@
jp EnableAutoTextBoxDrawing
RedsHouse1F_TextPointers:
- dw RedsHouse1FText1
- dw RedsHouse1FText2
+ dw RedsHouse1FMomText
+ dw RedsHouse1FTVText
-RedsHouse1FText1: ; Mom
+RedsHouse1FMomText:
text_asm
ld a, [wd72e]
- bit 3, a
- jr nz, .heal ; if player has received a Pokémon from Oak, heal team
+ bit 3, a ; received a Pokémon from Oak?
+ jr nz, .heal
ld hl, MomWakeUpText
call PrintText
jr .done
@@ -49,14 +49,14 @@
text_far _MomHealText2
text_end
-RedsHouse1FText2: ; TV
+RedsHouse1FTVText:
text_asm
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ld hl, TVWrongSideText
- jr nz, .notUp
+ jr nz, .got_text
ld hl, StandByMeText
-.notUp
+.got_text
call PrintText
jp TextScriptEnd
--- a/scripts/RedsHouse2F.asm
+++ b/scripts/RedsHouse2F.asm
@@ -21,4 +21,5 @@
ret
RedsHouse2F_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/RockTunnelPokecenter.asm
+++ b/scripts/RockTunnelPokecenter.asm
@@ -9,7 +9,7 @@
dw RockTunnelTradeNurseText
RockTunnelHealNurseText:
- db $ff
+ script_pokecenter_nurse
RockTunnelPokecenterText2:
text_far _RockTunnelPokecenterText2
@@ -20,4 +20,4 @@
text_end
RockTunnelTradeNurseText:
- db $f6
+ script_cable_club_receptionist
--- a/scripts/RocketHideoutElevator.asm
+++ b/scripts/RocketHideoutElevator.asm
@@ -41,19 +41,18 @@
ret
RocketHideoutElavatorFloors:
- db $03 ; num elements in list
+ db 3 ; #
db FLOOR_B1F
db FLOOR_B2F
db FLOOR_B4F
- db $FF ; terminator
+ db -1 ; end
-RocketHideoutElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $04, ROCKET_HIDEOUT_B1F
- db $04, ROCKET_HIDEOUT_B2F
- db $02, ROCKET_HIDEOUT_B4F
+RocketHideoutElevatorWarpMaps:
+ ; warp number, map id
+ db 4, ROCKET_HIDEOUT_B1F
+ db 4, ROCKET_HIDEOUT_B2F
+ db 2, ROCKET_HIDEOUT_B4F
RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f:
--- a/scripts/Route1.asm
+++ b/scripts/Route1.asm
@@ -9,20 +9,20 @@
Route1Text1:
text_asm
CheckAndSetEvent EVENT_GOT_POTION_SAMPLE
- jr nz, .asm_1cada
+ jr nz, .got_item
ld hl, Route1ViridianMartSampleText
call PrintText
lb bc, POTION, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, Route1Text_1cae8
- jr .asm_1cadd
-.BagFull
+ jr .done
+.bag_full
ld hl, Route1Text_1caf3
- jr .asm_1cadd
-.asm_1cada
+ jr .done
+.got_item
ld hl, Route1Text_1caee
-.asm_1cadd
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/Route11Gate2F.asm
+++ b/scripts/Route11Gate2F.asm
@@ -18,10 +18,10 @@
Route11GateUpstairsText2:
text_asm
CheckEvent EVENT_GOT_ITEMFINDER, 1
- jr c, .asm_4949b
- ld a, 30 ; pokemon needed
+ jr c, .got_item
+ ld a, 30
ldh [hOaksAideRequirement], a
- ld a, ITEMFINDER ; oak's aide reward
+ ld a, ITEMFINDER
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -32,13 +32,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- dec a
- jr nz, .asm_494a1
+ dec a ; OAKS_AIDE_GOT_ITEM?
+ jr nz, .no_item
SetEvent EVENT_GOT_ITEMFINDER
-.asm_4949b
+.got_item
ld hl, Route11GateUpstairsText_494a3
call PrintText
-.asm_494a1
+.no_item
jr Route11GateUpstairsScriptEnd
Route11GateUpstairsText_494a3:
--- a/scripts/Route12Gate2F.asm
+++ b/scripts/Route12Gate2F.asm
@@ -9,24 +9,24 @@
Route12GateUpstairsText1:
text_asm
CheckEvent EVENT_GOT_TM39, 1
- jr c, .asm_0ad3c
+ jr c, .got_item
ld hl, TM39PreReceiveText
call PrintText
lb bc, TM_SWIFT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM39Text
call PrintText
SetEvent EVENT_GOT_TM39
- jr .asm_4ba56
-.BagFull
+ jr .done
+.bag_full
ld hl, TM39NoRoomText
call PrintText
- jr .asm_4ba56
-.asm_0ad3c
+ jr .done
+.got_item
ld hl, TM39ExplanationText
call PrintText
-.asm_4ba56
+.done
jp TextScriptEnd
TM39PreReceiveText:
@@ -68,7 +68,7 @@
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
jr z, .up
- ld a, $1
+ ld a, TRUE
jr .done
.up
call PrintText
--- a/scripts/Route12SuperRodHouse.asm
+++ b/scripts/Route12SuperRodHouse.asm
@@ -7,30 +7,30 @@
Route12HouseText1:
text_asm
ld a, [wd728]
- bit 5, a
- jr nz, .asm_b4cad
+ bit 5, a ; received super rod?
+ jr nz, .got_item
ld hl, Route12HouseText_564c0
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_a2d76
+ jr nz, .refused
lb bc, SUPER_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 5, [hl]
+ set 5, [hl] ; received super rod
ld hl, Route12HouseText_564c5
- jr .asm_df984
-.BagFull
+ jr .done
+.bag_full
ld hl, Route12HouseText_564d9
- jr .asm_df984
-.asm_a2d76
+ jr .done
+.refused
ld hl, Route12HouseText_564cf
- jr .asm_df984
-.asm_b4cad
+ jr .done
+.got_item
ld hl, Route12HouseText_564d4
-.asm_df984
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/Route15Gate2F.asm
+++ b/scripts/Route15Gate2F.asm
@@ -8,10 +8,10 @@
Route15GateUpstairsText1:
text_asm
CheckEvent EVENT_GOT_EXP_ALL
- jr nz, .asm_49683
- ld a, 50 ; pokemon needed
+ jr nz, .got_item
+ ld a, 50
ldh [hOaksAideRequirement], a
- ld a, EXP_ALL ; oak's aide reward
+ ld a, EXP_ALL
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -21,13 +21,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- cp $1
- jr nz, .asm_49689
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_EXP_ALL
-.asm_49683
+.got_item
ld hl, Route15GateUpstairsText_4968c
call PrintText
-.asm_49689
+.no_item
jp TextScriptEnd
Route15GateUpstairsText_4968c:
--- a/scripts/Route16FlyHouse.asm
+++ b/scripts/Route16FlyHouse.asm
@@ -9,18 +9,18 @@
text_asm
CheckEvent EVENT_GOT_HM02
ld hl, HM02ExplanationText
- jr nz, .asm_13616
+ jr nz, .got_item
ld hl, Route16HouseText3
call PrintText
lb bc, HM_FLY, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_HM02
ld hl, ReceivedHM02Text
- jr .asm_13616
-.BagFull
+ jr .got_item
+.bag_full
ld hl, HM02NoRoomText
-.asm_13616
+.got_item
call PrintText
jp TextScriptEnd
--- a/scripts/Route23.asm
+++ b/scripts/Route23.asm
@@ -61,7 +61,8 @@
ret
YCoordsData_51255:
- db $23,$38,$55,$60,$69,$77,$88,$FF
+ db $23,$38,$55,$60,$69,$77,$88
+ db $FF
Route23Script_5125d:
ld hl, BadgeTextPointers
--- a/scripts/Route24.asm
+++ b/scripts/Route24.asm
@@ -45,7 +45,8 @@
ret
CoordsData_5140e:
- db $0F,$0A,$FF
+ db $0F,$0A
+ db $FF
Route24Script4:
ld a, [wSimulatedJoypadStatesIndex]
@@ -103,12 +104,12 @@
text_asm
ResetEvent EVENT_NUGGET_REWARD_AVAILABLE
CheckEvent EVENT_GOT_NUGGET
- jr nz, .asm_514f9
+ jr nz, .got_item
ld hl, Route24Text_51510
call PrintText
lb bc, NUGGET, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
SetEvent EVENT_GOT_NUGGET
ld hl, Route24Text_5151a
call PrintText
@@ -130,11 +131,11 @@
ld [wRoute24CurScript], a
ld [wCurMapScript], a
jp TextScriptEnd
-.asm_514f9
+.got_item
ld hl, Route24Text_51530
call PrintText
jp TextScriptEnd
-.BagFull
+.bag_full
ld hl, Route24Text_51521
call PrintText
SetEvent EVENT_NUGGET_REWARD_AVAILABLE
--- a/scripts/Route2Gate.asm
+++ b/scripts/Route2Gate.asm
@@ -8,10 +8,10 @@
Route2GateText1:
text_asm
CheckEvent EVENT_GOT_HM05
- jr nz, .asm_5d60d
- ld a, 10 ; pokemon needed
+ jr nz, .got_item
+ ld a, 10
ldh [hOaksAideRequirement], a
- ld a, HM_FLASH ; oak's aide reward
+ ld a, HM_FLASH
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
@@ -21,13 +21,13 @@
call CopyData
predef OaksAideScript
ldh a, [hOaksAideResult]
- cp $1
- jr nz, .asm_5d613
+ cp OAKS_AIDE_GOT_ITEM
+ jr nz, .no_item
SetEvent EVENT_GOT_HM05
-.asm_5d60d
+.got_item
ld hl, Route2GateText_5d616
call PrintText
-.asm_5d613
+.no_item
jp TextScriptEnd
Route2GateText_5d616:
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -40,7 +40,8 @@
CoordsData_1e08c:
db $02,$03
- db $02,$04,$FF
+ db $02,$04
+ db $FF
Route6GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/SSAnne2FRooms.asm
+++ b/scripts/SSAnne2FRooms.asm
@@ -1,5 +1,5 @@
SSAnne2FRooms_Script:
- ld a, $1
+ ld a, TRUE
ld [wAutoTextBoxDrawingControl], a
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
--- a/scripts/SSAnneB1F.asm
+++ b/scripts/SSAnneB1F.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
SSAnneB1F_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -17,7 +17,7 @@
SSAnne7Text1:
text_asm
CheckEvent EVENT_GOT_HM01
- jr nz, .asm_797c4
+ jr nz, .got_item
ld hl, SSAnne7RubText
call PrintText
ld hl, ReceivingHM01Text
@@ -24,21 +24,21 @@
call PrintText
lb bc, HM_CUT, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM01Text
call PrintText
SetEvent EVENT_GOT_HM01
- jr .asm_0faf5
-.BagFull
+ jr .done
+.bag_full
ld hl, HM01NoRoomText
call PrintText
ld hl, wd72d
set 5, [hl]
- jr .asm_0faf5
-.asm_797c4
+ jr .done
+.got_item
ld hl, SSAnne7Text_61932
call PrintText
-.asm_0faf5
+.done
jp TextScriptEnd
SSAnne7RubText:
--- a/scripts/SSAnneKitchen.asm
+++ b/scripts/SSAnneKitchen.asm
@@ -41,17 +41,17 @@
call PrintText
ldh a, [hRandomAdd]
bit 7, a
- jr z, .asm_93eb1
+ jr z, .not_dialog_1
ld hl, SSAnne6Text_6180c
- jr .asm_63292
-.asm_93eb1
+ jr .done
+.not_dialog_1
bit 4, a
- jr z, .asm_7436c
+ jr z, .not_dialog_2
ld hl, SSAnne6Text_61811
- jr .asm_63292
-.asm_7436c
+ jr .done
+.not_dialog_2
ld hl, SSAnne6Text_61816
-.asm_63292
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/SafariZoneSecretHouse.asm
+++ b/scripts/SafariZoneSecretHouse.asm
@@ -7,24 +7,24 @@
SafariZoneSecretHouseText1:
text_asm
CheckEvent EVENT_GOT_HM03
- jr nz, .asm_20a9b
+ jr nz, .got_item
ld hl, SafariZoneSecretHouseText_4a350
call PrintText
lb bc, HM_SURF, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM03Text
call PrintText
SetEvent EVENT_GOT_HM03
- jr .asm_8f1fc
-.BagFull
+ jr .done
+.bag_full
ld hl, HM03NoRoomText
call PrintText
- jr .asm_8f1fc
-.asm_20a9b
+ jr .done
+.got_item
ld hl, HM03ExplanationText
call PrintText
-.asm_8f1fc
+.done
jp TextScriptEnd
SafariZoneSecretHouseText_4a350:
--- a/scripts/SilphCo11F.asm
+++ b/scripts/SilphCo11F.asm
@@ -289,24 +289,24 @@
SilphCo11Text1:
text_asm
CheckEvent EVENT_GOT_MASTER_BALL
- jp nz, .asm_62308
+ jp nz, .got_item
ld hl, SilphCoPresidentText
call PrintText
lb bc, MASTER_BALL, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedSilphCoMasterBallText
call PrintText
SetEvent EVENT_GOT_MASTER_BALL
- jr .asm_6230e
-.BagFull
+ jr .done
+.bag_full
ld hl, SilphCoMasterBallNoRoomText
call PrintText
- jr .asm_6230e
-.asm_62308
+ jr .done
+.got_item
ld hl, SilphCo10Text_6231c
call PrintText
-.asm_6230e
+.done
jp TextScriptEnd
SilphCoPresidentText:
--- a/scripts/SilphCoElevator.asm
+++ b/scripts/SilphCoElevator.asm
@@ -41,7 +41,7 @@
ret
SilphCoElevatorFloors:
- db $0B ; num elements in list
+ db 11 ; #
db FLOOR_1F
db FLOOR_2F
db FLOOR_3F
@@ -53,23 +53,22 @@
db FLOOR_9F
db FLOOR_10F
db FLOOR_11F
- db $FF ; terminator
+ db -1 ; end
-SilphCoElevatorWarpMaps:
-; first byte is warp number
-; second byte is map number
; These specify where the player goes after getting out of the elevator.
- db $03, SILPH_CO_1F
- db $02, SILPH_CO_2F
- db $02, SILPH_CO_3F
- db $02, SILPH_CO_4F
- db $02, SILPH_CO_5F
- db $02, SILPH_CO_6F
- db $02, SILPH_CO_7F
- db $02, SILPH_CO_8F
- db $02, SILPH_CO_9F
- db $02, SILPH_CO_10F
- db $01, SILPH_CO_11F
+SilphCoElevatorWarpMaps:
+ ; warp number, map id
+ db 3, SILPH_CO_1F
+ db 2, SILPH_CO_2F
+ db 2, SILPH_CO_3F
+ db 2, SILPH_CO_4F
+ db 2, SILPH_CO_5F
+ db 2, SILPH_CO_6F
+ db 2, SILPH_CO_7F
+ db 2, SILPH_CO_8F
+ db 2, SILPH_CO_9F
+ db 2, SILPH_CO_10F
+ db 1, SILPH_CO_11F
SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827:
--- a/scripts/TradeCenter.asm
+++ b/scripts/TradeCenter.asm
@@ -15,9 +15,9 @@
set 0, [hl]
ret nz
ld hl, wSprite01StateData2MapY
- ld a, $8
+ ld a, 8 ; y
ld [hli], a
- ld a, $a
+ ld a, 10 ; x
ld [hl], a
ld a, SPRITE_FACING_LEFT
ld [wSprite01StateData1FacingDirection], a
@@ -24,7 +24,7 @@
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
- ld a, $7
+ ld a, 7 ; x
ld [wSprite01StateData2MapX], a
ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a
--- a/scripts/UndergroundPathNorthSouth.asm
+++ b/scripts/UndergroundPathNorthSouth.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
UndergroundPathNorthSouth_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/UndergroundPathWestEast.asm
+++ b/scripts/UndergroundPathWestEast.asm
@@ -2,4 +2,5 @@
jp EnableAutoTextBoxDrawing
UndergroundPathWestEast_TextPointers:
- text_end
+
+ text_end ; unused
--- a/scripts/VermilionOldRodHouse.asm
+++ b/scripts/VermilionOldRodHouse.asm
@@ -7,30 +7,30 @@
VermilionHouse2Text1:
text_asm
ld a, [wd728]
- bit 3, a
- jr nz, .asm_03ef5
+ bit 3, a ; got old rod?
+ jr nz, .got_item
ld hl, VermilionHouse2Text_560b1
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_eb1b7
+ jr nz, .refused
lb bc, OLD_ROD, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, wd728
- set 3, [hl]
+ set 3, [hl] ; got old rod
ld hl, VermilionHouse2Text_560b6
- jr .asm_5dd95
-.BagFull
+ jr .done
+.bag_full
ld hl, VermilionHouse2Text_560ca
- jr .asm_5dd95
-.asm_eb1b7
+ jr .done
+.refused
ld hl, VermilionHouse2Text_560c0
- jr .asm_5dd95
-.asm_03ef5
+ jr .done
+.got_item
ld hl, VermilionHouse2Text_560c5
-.asm_5dd95
+.done
call PrintText
jp TextScriptEnd
--- a/scripts/VictoryRoad1F.asm
+++ b/scripts/VictoryRoad1F.asm
@@ -35,7 +35,8 @@
ret
CoordsData_5da5c:
- db $0D,$11,$FF
+ db $0D,$11
+ db $FF
VictoryRoad1F_TextPointers:
dw VictoryRoad1Text1
--- a/scripts/ViridianCity.asm
+++ b/scripts/ViridianCity.asm
@@ -18,11 +18,11 @@
CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz
ld a, [wObtainedBadges]
- cp %01111111
- jr nz, .gymClosed
+ cp $ff ^ (1 << BIT_EARTHBADGE)
+ jr nz, .gym_closed
SetEvent EVENT_VIRIDIAN_GYM_OPEN
ret
-.gymClosed
+.gym_closed
ld a, [wYCoord]
cp $8
ret nz
@@ -148,13 +148,13 @@
ViridianCityText2:
text_asm
ld a, [wObtainedBadges]
- cp %01111111
+ cp $ff ^ (1 << BIT_EARTHBADGE)
ld hl, ViridianCityText_19127
- jr z, .printAndDone
+ jr z, .done
CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
- jr nz, .printAndDone
+ jr nz, .done
ld hl, ViridianCityText_19122
-.printAndDone
+.done
call PrintText
jp TextScriptEnd
@@ -232,21 +232,21 @@
ViridianCityText6:
text_asm
CheckEvent EVENT_GOT_TM42
- jr nz, .gotTm42
+ jr nz, .got_item
ld hl, ViridianCityText_191ca
call PrintText
lb bc, TM_DREAM_EATER, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedTM42Text
call PrintText
SetEvent EVENT_GOT_TM42
jr .done
-.BagFull
+.bag_full
ld hl, TM42NoRoomText
call PrintText
jr .done
-.gotTm42
+.got_item
ld hl, TM42Explanation
call PrintText
.done
@@ -278,13 +278,13 @@
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr z, .hurry
+ jr z, .refused
ld hl, ViridianCityText_1920f
call PrintText
ld a, $1
ld [wViridianCityCurScript], a
jr .done
-.hurry
+.refused
ld hl, ViridianCityText_19214
call PrintText
.done
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -81,40 +81,52 @@
;format: direction, count
ViridianGymArrowMovement1:
- db D_UP,$09,$FF
+ db D_UP,$09
+ db $FF
ViridianGymArrowMovement2:
- db D_LEFT,$08,$FF
+ db D_LEFT,$08
+ db $FF
ViridianGymArrowMovement3:
- db D_DOWN,$09,$FF
+ db D_DOWN,$09
+ db $FF
ViridianGymArrowMovement4:
- db D_RIGHT,$06,$FF
+ db D_RIGHT,$06
+ db $FF
ViridianGymArrowMovement5:
- db D_DOWN,$02,$FF
+ db D_DOWN,$02
+ db $FF
ViridianGymArrowMovement6:
- db D_DOWN,$07,$FF
+ db D_DOWN,$07
+ db $FF
ViridianGymArrowMovement7:
- db D_RIGHT,$08,$FF
+ db D_RIGHT,$08
+ db $FF
ViridianGymArrowMovement8:
- db D_RIGHT,$09,$FF
+ db D_RIGHT,$09
+ db $FF
ViridianGymArrowMovement9:
- db D_UP,$08,$FF
+ db D_UP,$08
+ db $FF
ViridianGymArrowMovement10:
- db D_UP,$06,$FF
+ db D_UP,$06
+ db $FF
ViridianGymArrowMovement11:
- db D_LEFT,$06,$FF
+ db D_LEFT,$06
+ db $FF
ViridianGymArrowMovement12:
- db D_LEFT,$0C,$FF
+ db D_LEFT,$0C
+ db $FF
ViridianGymScript4:
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/ViridianMart.asm
+++ b/scripts/ViridianMart.asm
@@ -7,12 +7,12 @@
ViridianMartScript_1d47d:
CheckEvent EVENT_OAK_GOT_PARCEL
- jr nz, .asm_1d489
+ jr nz, .delivered_parcel
ld hl, ViridianMart_TextPointers
- jr .asm_1d48c
-.asm_1d489
+ jr .done
+.delivered_parcel
ld hl, ViridianMart_TextPointers2
-.asm_1d48c
+.done
ld a, l
ld [wMapTextPtr], a
ld a, h
@@ -67,6 +67,7 @@
dw ViridianMartText3
dw ViridianMartText4
dw ViridianMartText5
+
ViridianMart_TextPointers2:
dw ViridianCashierText
dw ViridianMartText2
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -11,12 +11,12 @@
FuchsiaHouse2Text1:
text_asm
CheckEvent EVENT_GOT_HM04
- jr nz, .subtract
+ jr nz, .got_item
ld b, GOLD_TEETH
call IsItemInBag
- jr nz, .asm_3f30f
+ jr nz, .have_gold_teeth
CheckEvent EVENT_GAVE_GOLD_TEETH
- jr nz, .asm_60cba
+ jr nz, .gave_gold_teeth
ld hl, WardenGibberishText1
call PrintText
call YesNoChoice
@@ -23,12 +23,12 @@
ld a, [wCurrentMenuItem]
and a
ld hl, WardenGibberishText3
- jr nz, .asm_61238
+ jr nz, .refused
ld hl, WardenGibberishText2
-.asm_61238
+.refused
call PrintText
- jr .asm_52039
-.asm_3f30f
+ jr .done
+.have_gold_teeth
ld hl, WardenTeethText1
call PrintText
ld a, GOLD_TEETH
@@ -35,24 +35,24 @@
ldh [hItemToRemoveID], a
farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
-.asm_60cba
+.gave_gold_teeth
ld hl, WardenThankYouText
call PrintText
lb bc, HM_STRENGTH, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bag_full
ld hl, ReceivedHM04Text
call PrintText
SetEvent EVENT_GOT_HM04
- jr .asm_52039
-.subtract
+ jr .done
+.got_item
ld hl, HM04ExplanationText
call PrintText
- jr .asm_52039
-.BagFull
+ jr .done
+.bag_full
ld hl, HM04NoRoomText
call PrintText
-.asm_52039
+.done
jp TextScriptEnd
WardenGibberishText1:
--- a/text/BluesHouse.asm
+++ b/text/BluesHouse.asm
@@ -29,7 +29,7 @@
cont "you are."
done
-_BluesHouseText2::
+_BluesHouseDaisyWalkingText::
text "#MON are living"
line "things! If they"
cont "get tired, give"
@@ -36,7 +36,7 @@
cont "them a rest!"
done
-_BluesHouseText3::
+_BluesHouseTownMapText::
text "It's a big map!"
line "This is useful!"
done