aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/BillsHouse.asm110
-rw-r--r--scripts/BillsHouse_2.asm60
-rw-r--r--scripts/CinnabarGym.asm4
-rw-r--r--scripts/MtMoonB2F_2.asm4
-rw-r--r--scripts/Museum2F.asm4
-rw-r--r--scripts/PewterCity.asm4
-rw-r--r--scripts/PewterGym.asm4
-rw-r--r--scripts/PewterPokecenter.asm4
-rw-r--r--scripts/PewterPokecenter_2.asm4
-rw-r--r--scripts/PokemonFanClub.asm20
-rw-r--r--scripts/Route25.asm10
-rw-r--r--scripts/SummerBeachHouse.asm42
-rw-r--r--scripts/VermilionCity.asm4
13 files changed, 137 insertions, 137 deletions
diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm
index 8582e397..53a2a333 100644
--- a/scripts/BillsHouse.asm
+++ b/scripts/BillsHouse.asm
@@ -1,5 +1,5 @@
BillsHouse_Script:
- call BillsHouseScript_1e09e
+ call BillsHouse_CheckMetBill
call EnableAutoTextBoxDrawing
ld a, [wBillsHouseCurScript]
ld hl, BillsHouse_ScriptPointers
@@ -19,33 +19,33 @@ BillsHouse_ScriptPointers:
dw_const BillsHouseScript8, SCRIPT_BILLSHOUSE_SCRIPT8
dw_const BillsHouseScript9, SCRIPT_BILLSHOUSE_SCRIPT9
-BillsHouseScript_1e09e:
- ld hl, wd492
- bit 7, [hl]
- set 7, [hl]
+BillsHouse_CheckMetBill:
+ ld hl, wPikachuMapScriptFlags
+ bit BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
+ set BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
ret nz
CheckEventHL EVENT_MET_BILL_2
- jr z, .asm_1e0af
- jr .asm_1e0b3
+ jr z, .notMetBill
+ jr .metBill
-.asm_1e0af
+.notMetBill
ld a, SCRIPT_BILLSHOUSE_SCRIPT0
- jr .asm_1e0b5
+ jr .setScript
-.asm_1e0b3
+.metBill
ld a, SCRIPT_BILLSHOUSE_SCRIPT9
-.asm_1e0b5
+.setScript
ld [wBillsHouseCurScript], a
ret
BillsHouseScript0:
- ld a, [wd471]
- bit 7, a
- jr z, .asm_1e0d2
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
+ jr z, .done
callfar CheckPikachuStatusCondition
- jr c, .asm_1e0d2
- callfar Func_f24d5
-.asm_1e0d2
+ jr c, .done
+ callfar BillsHousePikachuConfused
+.done
xor a
ld [wJoyIgnore], a
ld a, SCRIPT_BILLSHOUSE_SCRIPT1
@@ -60,13 +60,13 @@ BillsHouseScript2:
ld [wJoyIgnore], a
ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
- ld de, MovementData_1e79c
+ ld de, BillMovement_WalkToCellSeparator
jr nz, .notDown
call CheckPikachuFollowingPlayer
- jr nz, .asm_1e0f8
- callfar Func_f250b
-.asm_1e0f8
- ld de, MovementData_1e7a0
+ jr nz, .pikachuNotFollowing
+ callfar BillsHousePikachuWatchPlayer
+.pikachuNotFollowing
+ ld de, BillMovement_WalkAroundPlayer
.notDown
ld a, BILLSHOUSE_BILL_POKEMON
ldh [hSpriteIndex], a
@@ -75,14 +75,14 @@ BillsHouseScript2:
ld [wBillsHouseCurScript], a
ret
-MovementData_1e79c:
+BillMovement_WalkToCellSeparator:
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db -1 ; end
; make Bill walk around the player
-MovementData_1e7a0:
+BillMovement_WalkAroundPlayer:
db NPC_MOVEMENT_RIGHT
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
@@ -98,16 +98,16 @@ BillsHouseScript3:
ld [wToggleableObjectIndex], a
predef HideObject
call CheckPikachuFollowingPlayer
- jr z, .asm_1e13e
- ld hl, PikachuMovementData_1e14d
+ jr z, .pikachuNotFollowing
+ ld hl, PikachuMovement_EnterCellSeparatorDown
ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
- jr nz, .asm_1e133
- ld hl, PikachuMovementData_1e152
-.asm_1e133
+ jr nz, .applyPikachuMovement
+ ld hl, PikachuMovement_EnterCellSeparatorNotDown
+.applyPikachuMovement
call ApplyPikachuMovementData
callfar InitializePikachuTextID
-.asm_1e13e
+.pikachuNotFollowing
xor a
ld [wJoyIgnore], a
SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR
@@ -115,22 +115,22 @@ BillsHouseScript3:
ld [wBillsHouseCurScript], a
ret
-PikachuMovementData_1e14d:
- db $00
- db $1e
- db $1e
- db $1e
- db $3f
+PikachuMovement_EnterCellSeparatorDown:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_END
-PikachuMovementData_1e152:
- db $00
- db $1e
- db $1f
- db $1e
- db $1e
- db $20
- db $36
- db $3f
+PikachuMovement_EnterCellSeparatorNotDown:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_LEFT
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_RIGHT
+ db PIKAMOVEMENT_LOOK_UP
+ db PIKAMOVEMENT_END
BillsHouseScript4:
CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
@@ -158,17 +158,17 @@ BillsHouseScript5:
predef ShowObject
ld c, 8
call DelayFrames
- ld hl, wd471
- bit 7, [hl]
- jr z, .asm_1e1c6
+ ld hl, wPikachuSpawnStateFlags
+ bit BIT_PIKACHU_SPAWN_STARTER, [hl]
+ jr z, .pikachuNotFollowing
call CheckPikachuFollowingPlayer
- jr z, .asm_1e1c6
+ jr z, .pikachuNotFollowing
ld a, BILLSHOUSE_BILL1
ldh [hSpriteIndex], a
ld a, SPRITE_FACING_DOWN
ldh [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
- ld hl, PikachuMovementData_1e1a9
+ ld hl, PikachuMovement_ExitCellSeparator
call ApplyPikachuMovementData
ld a, $f
ld [wEmotionBubbleSpriteIndex], a
@@ -176,7 +176,7 @@ BillsHouseScript5:
ld [wWhichEmotionBubble], a
predef EmotionBubble
callfar InitializePikachuTextID
-.asm_1e1c6
+.pikachuNotFollowing
ld a, BILLSHOUSE_BILL1
ldh [hSpriteIndex], a
ld de, .BillExitMachineMovement
@@ -193,10 +193,10 @@ BillsHouseScript5:
db NPC_MOVEMENT_DOWN
db -1 ; end
-PikachuMovementData_1e1a9:
- db $00
- db $37
- db $3f
+PikachuMovement_ExitCellSeparator:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_LOOK_LEFT
+ db PIKAMOVEMENT_END
BillsHouseScript6:
ld a, [wStatusFlags5]
diff --git a/scripts/BillsHouse_2.asm b/scripts/BillsHouse_2.asm
index 4a897d87..b8c7997d 100644
--- a/scripts/BillsHouse_2.asm
+++ b/scripts/BillsHouse_2.asm
@@ -81,12 +81,12 @@ BillsHousePrintBillCheckOutMyRarePokemonText::
text_far _BillsHouseBillCheckOutMyRarePokemonText
text_end
-Func_f24ae::
+BillsHouse_CheckPikachuEmotion::
ld a, [wCurMap]
cp BILLS_HOUSE
- jr nz, .asm_f24d2
+ jr nz, .noEmotion
call CheckPikachuFollowingPlayer
- jr z, .asm_f24d2
+ jr z, .noEmotion
ld a, [wBillsHouseCurScript]
cp SCRIPT_BILLSHOUSE_SCRIPT5
ldpikaemotion e, PikachuEmotion27
@@ -100,18 +100,18 @@ Func_f24ae::
ldpikaemotion e, PikachuEmotion31
ret
-.asm_f24d2
+.noEmotion
ld e, $ff
ret
-Func_f24d5::
+BillsHousePikachuConfused::
ld a, PAD_BUTTONS | PAD_CTRL_PAD
ld [wJoyIgnore], a
xor a
ld [wPlayerMovingDirection], a
call UpdateSprites
call UpdateSprites
- ld hl, Data_f2505
+ ld hl, PikachuMovement_Confused
call ApplyPikachuMovementData
ld a, $f ; pikachu
ld [wEmotionBubbleSpriteIndex], a
@@ -122,35 +122,35 @@ Func_f24d5::
callfar InitializePikachuTextID
ret
-Data_f2505:
- db $00
- db $20
- db $20
- db $20
- db $1e
- db $3f
+PikachuMovement_Confused:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_STEP_RIGHT
+ db PIKAMOVEMENT_STEP_RIGHT
+ db PIKAMOVEMENT_STEP_RIGHT
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_END
-Func_f250b::
- ld hl, Data_f251c
+BillsHousePikachuWatchPlayer::
+ ld hl, PikachuMovement_WatchPlayer1
ld b, SPRITE_FACING_UP
call TryApplyPikachuMovementData
- ld hl, Data_f2521
+ ld hl, PikachuMovement_WatchPlayer2
ld b, SPRITE_FACING_RIGHT
call TryApplyPikachuMovementData
ret
-Data_f251c:
- db $00
- db $1f
- db $1d
- db $38
- db $3f
+PikachuMovement_WatchPlayer1:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_STEP_LEFT
+ db PIKAMOVEMENT_STEP_DOWN
+ db PIKAMOVEMENT_LOOK_RIGHT
+ db PIKAMOVEMENT_END
-Data_f2521:
- db $00
- db $1e
- db $1f
- db $1f
- db $1d
- db $38
- db $3f
+PikachuMovement_WatchPlayer2:
+ db PIKAMOVEMENT_DELAY
+ db PIKAMOVEMENT_STEP_UP
+ db PIKAMOVEMENT_STEP_LEFT
+ db PIKAMOVEMENT_STEP_LEFT
+ db PIKAMOVEMENT_STEP_DOWN
+ db PIKAMOVEMENT_LOOK_RIGHT
+ db PIKAMOVEMENT_END
diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm
index fd3ceda1..3cce302c 100644
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -104,8 +104,8 @@ PikachuMovementData_74f9e:
db $3f
CinnabarGymScript_74fa3:
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ret z
push hl
push bc
diff --git a/scripts/MtMoonB2F_2.asm b/scripts/MtMoonB2F_2.asm
index c2515abd..22cd0df5 100644
--- a/scripts/MtMoonB2F_2.asm
+++ b/scripts/MtMoonB2F_2.asm
@@ -1,6 +1,6 @@
MtMoonB2FScript_ApplyPikachuMovementData:
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ret z
ld a, [wWalkBikeSurfState]
and a
diff --git a/scripts/Museum2F.asm b/scripts/Museum2F.asm
index 6a0a15a4..e0c45483 100644
--- a/scripts/Museum2F.asm
+++ b/scripts/Museum2F.asm
@@ -30,8 +30,8 @@ Museum2FBrunetteGirlText:
Museum2FHikerText:
text_asm
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
jr nz, .asm_5c1f6
ld hl, Museum2FText_5c20e
call PrintText
diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm
index 4d4cdb1a..9533f79e 100644
--- a/scripts/PewterCity.asm
+++ b/scripts/PewterCity.asm
@@ -1,7 +1,7 @@
PewterCity_Script:
call EnableAutoTextBoxDrawing
- ld hl, wd492
- res 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ res BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
ld hl, PewterCity_ScriptPointers
ld a, [wPewterCityCurScript]
call CallFunctionInTable
diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm
index dcda6e16..4d4a4a0e 100644
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -189,8 +189,8 @@ PewterGymGuideText:
ld a, [wCurrentMenuItem]
and a
jr nz, .PewterGymGuideBeginAdviceText
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
jp nz, .asm_5c3fa
ld hl, PewterGymGuideBeginAdviceText
call PrintText
diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm
index ae5c6349..877a9383 100644
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -1,6 +1,6 @@
PewterPokecenter_Script:
- ld hl, wd492
- set 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ set BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
call Serial_TryEstablishingExternallyClockedConnection
call EnableAutoTextBoxDrawing
ret
diff --git a/scripts/PewterPokecenter_2.asm b/scripts/PewterPokecenter_2.asm
index 2aeb23f7..4495f1ab 100644
--- a/scripts/PewterPokecenter_2.asm
+++ b/scripts/PewterPokecenter_2.asm
@@ -59,8 +59,8 @@ PewterJigglypuff::
ld c, 48
call DelayFrames
call PlayDefaultMusic
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ret z
callfar CheckPikachuStatusCondition
ret c
diff --git a/scripts/PokemonFanClub.asm b/scripts/PokemonFanClub.asm
index 4c8acd39..5bd881af 100644
--- a/scripts/PokemonFanClub.asm
+++ b/scripts/PokemonFanClub.asm
@@ -11,19 +11,19 @@ PokemonFanClub_ScriptPointers:
dw_const PokemonFanClubScript1, SCRIPT_POKEMONFANCLUB_SCRIPT1
PokemonFanClubScript0:
- ld hl, wd492
- bit 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ bit BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
call z, PokemonFanClubScript_59a44
- ld hl, wd492
- set 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ set BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
ret
PokemonFanClubScript1:
- ld hl, wd492
- bit 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ bit BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
call z, PokemonFanClubScript_59a39
- ld hl, wd492
- set 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ set BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
ret
PokemonFanClubScript_59a39:
@@ -34,8 +34,8 @@ PokemonFanClubScript_59a39:
ret
PokemonFanClubScript_59a44:
- ld a, [wd471]
- bit 7, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ret z
callfar CheckPikachuStatusCondition
ret c
diff --git a/scripts/Route25.asm b/scripts/Route25.asm
index 23faa396..41134ee8 100644
--- a/scripts/Route25.asm
+++ b/scripts/Route25.asm
@@ -9,11 +9,11 @@ Route25_Script:
ret
Route25ToggleBillsScript:
- ld hl, wd492
- res 2, [hl]
- res 3, [hl]
- res 4, [hl]
- res 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ res BIT_PIKACHU_MAP_2, [hl]
+ res BIT_PIKACHU_MAP_3, [hl]
+ res BIT_PIKACHU_MAP_4, [hl]
+ res BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
xor a
ld [wBillsHouseCurScript], a
ld hl, wCurrentMapScriptFlags
diff --git a/scripts/SummerBeachHouse.asm b/scripts/SummerBeachHouse.asm
index 3842b45c..3cac9fba 100644
--- a/scripts/SummerBeachHouse.asm
+++ b/scripts/SummerBeachHouse.asm
@@ -13,12 +13,12 @@ SummerBeachHouse_TextPointers:
SummerBeachHouseSurfinDudeText:
text_asm
- ld a, [wd471]
+ ld a, [wPikachuSpawnStateFlags]
vc_patch Bypass_need_Pikachu_with_Surf_for_minigame
IF DEF (_YELLOW_VC)
- bit 7, a
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ELSE
- bit 6, a
+ bit BIT_PIKACHU_SPAWN_SURFING, a
ENDC
vc_patch_end
jr nz, .next
@@ -26,9 +26,9 @@ ENDC
call PrintText
jr .done
.next
- ld hl, wd492
- bit 0, [hl]
- set 0, [hl]
+ ld hl, wPikachuMapScriptFlags
+ bit BIT_PIKACHU_MAP_PAUSE_IGT, [hl]
+ set BIT_PIKACHU_MAP_PAUSE_IGT, [hl]
jr nz, .next2
ld hl, .SurfinDudeText1
jr .next3
@@ -43,8 +43,8 @@ ENDC
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
farcall SurfingPikachuMinigame
- ld hl, wd492
- set 1, [hl]
+ ld hl, wPikachuMapScriptFlags
+ set BIT_PIKACHU_MAP_SURF_SELECT, [hl]
jr .done
.asm_f226b
ld hl, .SurfinDudeText2
@@ -81,8 +81,8 @@ SummerBeachHousePikachuText:
SummerBeachHousePoster1Text:
text_asm
ld hl, .SummerBeachHousePoster1Text2
- ld a, [wd471]
- bit 6, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_SURFING, a
jr z, .next
ld hl, .SummerBeachHousePoster1Text1
.next
@@ -99,8 +99,8 @@ SummerBeachHousePoster1Text:
SummerBeachHousePoster2Text:
text_asm
ld hl, .SummerBeachHousePoster2Text2
- ld a, [wd471]
- bit 6, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_SURFING, a
jr z, .next
ld hl, .SummerBeachHousePoster2Text1
.next
@@ -117,8 +117,8 @@ SummerBeachHousePoster2Text:
SummerBeachHousePoster3Text:
text_asm
ld hl, .SummerBeachHousePoster3Text2
- ld a, [wd471]
- bit 6, a
+ ld a, [wPikachuSpawnStateFlags]
+ bit BIT_PIKACHU_SPAWN_SURFING, a
jr z, .next
ld hl, .SummerBeachHousePoster3Text1
.next
@@ -136,26 +136,26 @@ SummerBeachHousePrinterText:
text_asm
ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wd471]
+ ld a, [wPikachuSpawnStateFlags]
vc_patch Bypass_need_Pikachu_with_Surf_for_high_score
IF DEF(_YELLOW_VC)
- bit 7, a
+ bit BIT_PIKACHU_SPAWN_STARTER, a
ELSE
- bit 6, a
+ bit BIT_PIKACHU_SPAWN_SURFING, a
ENDC
vc_patch_end
jr z, .asm_f2369
- ld hl, wd492
- bit 1, [hl]
+ ld hl, wPikachuMapScriptFlags
+ bit BIT_PIKACHU_MAP_SURF_SELECT, [hl]
jr z, .next2
ld a, 0
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
.next2
ld hl, .SummerBeachHousePrinterText2
call PrintText
- ld a, [wd492]
- bit 1, a
+ ld a, [wPikachuMapScriptFlags]
+ bit BIT_PIKACHU_MAP_SURF_SELECT, a
jr z, .asm_f236f
ld a, 1
diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm
index 1d9d790d..68dfd617 100644
--- a/scripts/VermilionCity.asm
+++ b/scripts/VermilionCity.asm
@@ -1,7 +1,7 @@
VermilionCity_Script:
call EnableAutoTextBoxDrawing
- ld hl, wd492
- res 7, [hl]
+ ld hl, wPikachuMapScriptFlags
+ res BIT_PIKACHU_MAP_SCRIPT_ACTIVE, [hl]
ld hl, wCurrentMapScriptFlags
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]