diff options
Diffstat (limited to 'scripts')
29 files changed, 53 insertions, 53 deletions
diff --git a/scripts/beach_house.asm b/scripts/beach_house.asm index fb0d78f2..d43e0977 100644 --- a/scripts/beach_house.asm +++ b/scripts/beach_house.asm @@ -19,7 +19,7 @@ SurfinDudeText: call PrintText jr .done .next - ld hl, wPreventBlackout + ld hl, wd492 bit 0, [hl] set 0, [hl] jr nz, .next2 @@ -36,7 +36,7 @@ SurfinDudeText: ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a callba SurfingPikachuMinigame - ld hl, wPreventBlackout + ld hl, wd492 set 1, [hl] jr .done .asm_f226b @@ -133,7 +133,7 @@ BeachHouseSign4Text: bit 6, a jr z, .asm_f2369 - ld hl, wPreventBlackout + ld hl, wd492 bit 1, [hl] jr z, .next2 ld a, 0 @@ -141,7 +141,7 @@ BeachHouseSign4Text: .next2 ld hl, .BeachHousePrinterText2 call PrintText - ld a, [wPreventBlackout] + ld a, [wd492] bit 1, a jr z, .asm_f236f diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm index 5d6d668f..c93d86df 100755 --- a/scripts/billshouse.asm +++ b/scripts/billshouse.asm @@ -19,7 +19,7 @@ BillsHouseScriptPointers: ; 1e776 (7:6776) dw BillsHouseScript9 BillsHouseScript_1e09e: - ld hl, wPreventBlackout + ld hl, wd492 bit 7, [hl] set 7, [hl] ret nz @@ -58,7 +58,7 @@ BillsHouseScript1: ; 1e783 (7:6783) BillsHouseScript2: ld a, $ff ld [wJoyIgnore], a - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] and a ; cp SPRITE_FACING_DOWN ld de, MovementData_1e79c jr nz, .notDown @@ -100,12 +100,12 @@ BillsHouseScript3: ; 1e7a6 (7:67a6) call CheckPikachuFollowingPlayer jr z, .asm_1e13e ld hl, PikachuMovementData_1e14d - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] and a ; cp SPRITE_FACING_DOWN jr nz, .asm_1e133 ld hl, PikachuMovementData_1e152 .asm_1e133 - call Func_159b + call ApplyPikachuMovementData callab InitializePikachuTextID .asm_1e13e xor a @@ -169,7 +169,7 @@ BillsHouseScript5: ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld hl, PikachuMovementData_1e1a9 - call Func_159b + call ApplyPikachuMovementData ld a, $f ld [wEmotionBubbleSpriteIndex], a ld a, $0 @@ -212,7 +212,7 @@ BillsHouseScript7: xor a ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_UP - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld de, RLE_1e219 @@ -236,7 +236,7 @@ BillsHouseScript8: xor a ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_UP - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, $2 ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_DOWN diff --git a/scripts/billshouse2.asm b/scripts/billshouse2.asm index 87a39969..2ae17ae6 100755 --- a/scripts/billshouse2.asm +++ b/scripts/billshouse2.asm @@ -114,7 +114,7 @@ Func_f24d5: call UpdateSprites call UpdateSprites ld hl, Data_f2505 - call Func_159b + call ApplyPikachuMovementData ld a, $f ; pikachu ld [wEmotionBubbleSpriteIndex], a ld a, $1 @@ -135,10 +135,10 @@ Data_f2505: Func_f250b: ld hl, Data_f251c ld b, SPRITE_FACING_UP - call Func_f0a82 + call TryApplyPikachuMovementData ld hl, Data_f2521 ld b, SPRITE_FACING_RIGHT - call Func_f0a82 + call TryApplyPikachuMovementData ret Data_f251c: diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm index 8ae77507..4ad26a42 100755 --- a/scripts/cinnabargym.asm +++ b/scripts/cinnabargym.asm @@ -112,7 +112,7 @@ CinnabarGymScript_74fa3: ld a, b cp e ret nz - call Func_159b + call ApplyPikachuMovementData ret CinnabarGymScript1: ; 757dc (1d:57dc) diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm index 3a2e9a2b..a6fa3af7 100755 --- a/scripts/cinnabarisland.asm +++ b/scripts/cinnabarisland.asm @@ -35,7 +35,7 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38) ld [wSimulatedJoypadStatesEnd], a call StartSimulatingJoypadStates xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld [wJoyIgnore], a ld a, $1 ld [W_CINNABARISLANDCURSCRIPT], a diff --git a/scripts/copycatshouse2f.asm b/scripts/copycatshouse2f.asm index 74dbb1c5..6d896ce7 100755 --- a/scripts/copycatshouse2f.asm +++ b/scripts/copycatshouse2f.asm @@ -82,7 +82,7 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe) CopycatsHouse2FText7: ; 5cd03 (17:4d03) TX_ASM - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP ld hl, CopycatsHouse2FText_5cd1c jr nz, .notUp diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index b80b3dac..82622285 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -218,7 +218,7 @@ DayCareMText1: ; 56254 (15:6254) .withdrewPikachuFromDayCare ld a, $6 - ld [wd431], a + ld [wPikachuSpawnState], a ; GameFreak... TriHard ld hl, Func_fc4fa diff --git a/scripts/fanclub.asm b/scripts/fanclub.asm index a03fd2d7..fbc6d959 100755 --- a/scripts/fanclub.asm +++ b/scripts/fanclub.asm @@ -10,18 +10,18 @@ FanClubScriptPointers: dw FanClubScript2 FanClubScript1: - ld hl, wPreventBlackout + ld hl, wd492 bit 7, [hl] call z, FanClubScript_59a44 - ld hl, wPreventBlackout + ld hl, wd492 set 7, [hl] ret FanClubScript2: - ld hl, wPreventBlackout + ld hl, wd492 bit 7, [hl] call z, FanClubScript_59a39 - ld hl, wPreventBlackout + ld hl, wd492 set 7, [hl] ret @@ -50,7 +50,7 @@ FanClubScript_59a44: ld [wEmotionBubbleSpriteIndex], a predef EmotionBubble ld hl, PikachuMovementScript_59a8c - call Func_159b + call ApplyPikachuMovementData ld a, $2 ld [wSpriteStateData1 + 3 * $10 + 1], a ; Seel xor a ; SPRITE_FACING_DOWN diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm index bbfb0a0b..c6381678 100755 --- a/scripts/mansion1.asm +++ b/scripts/mansion1.asm @@ -46,7 +46,7 @@ Mansion1ReplaceBlock: ; 44310 (11:4310) ret Mansion1Script_Switches: ; 44316 (11:4316) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP ret nz xor a diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm index 22bc2b12..2162b3fc 100755 --- a/scripts/mansion2.asm +++ b/scripts/mansion2.asm @@ -42,7 +42,7 @@ Mansion2Script_5202f: ; 5202f (14:602f) predef_jump ReplaceTileBlock Mansion2Script_Switches: ; 52037 (14:6037) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP ret nz xor a diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm index e49667ef..9333912d 100755 --- a/scripts/mansion3.asm +++ b/scripts/mansion3.asm @@ -73,7 +73,7 @@ Mansion3Script_5225b: ; 5225b (14:625b) ret Mansion3Script_Switches: ; 5227a (14:627a) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP ret nz xor a diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm index 59ee3704..d3a1ded6 100755 --- a/scripts/mansion4.asm +++ b/scripts/mansion4.asm @@ -44,7 +44,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf) ret Mansion4Script_Switches: ; 52420 (14:6420) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP ret nz xor a diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 43464d77..585d0ae4 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -466,15 +466,15 @@ OaksLabScript16: ret nz xor a .asm_1c707 - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ret OaksLabScript17: ; Pikachu comes out ld a, SPRITE_FACING_UP - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, $2 - ld [wd431], a + ld [wPikachuSpawnState], a callba Func_fc4fa call Func_1525 ld a, $1a diff --git a/scripts/oakslab2.asm b/scripts/oakslab2.asm index fef72470..5e4e98a4 100755 --- a/scripts/oakslab2.asm +++ b/scripts/oakslab2.asm @@ -4,13 +4,13 @@ Func_f1be0: jr z, .asm_f1bf0 ld b, SPRITE_FACING_DOWN ld hl, Data_f1bf9 - call Func_f0a82 + call TryApplyPikachuMovementData ret .asm_f1bf0 ld b, SPRITE_FACING_LEFT ld hl, Data_f1bfe - call Func_f0a82 + call TryApplyPikachuMovementData ret Data_f1bf9: diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 73f50e3e..f29eacd1 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -174,7 +174,7 @@ PalletTownScript5: ; 18f56 (6:4f56) PalletTownScript6: ; 18f87 (6:4f87) xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, $1 ld [wSpriteIndex], a xor a diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index 1e9a922a..93806878 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -1,6 +1,6 @@ PewterCityScript: ; 192f5 (6:52f5) call EnableAutoTextBoxDrawing - ld hl, wPreventBlackout + ld hl, wd492 res 7, [hl] ld hl, PewterCityScriptPointers ld a, [W_PEWTERCITYCURSCRIPT] diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 70cf17f6..3835c0c9 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -1,5 +1,5 @@ PewterPokecenterScript: ; 5c587 (17:4587) - ld hl, wPreventBlackout + ld hl, wd492 set 7, [hl] call Serial_TryEstablishingExternallyClockedConnection call EnableAutoTextBoxDrawing diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm index abf6104d..77394447 100755 --- a/scripts/pokemontower7.asm +++ b/scripts/pokemontower7.asm @@ -235,7 +235,7 @@ PokemonTower7Script11: ld [wMissableObjectIndex], a predef HideObject ld a, SPRITE_FACING_UP - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, LAVENDER_HOUSE_1 ld [hWarpDestinationMap], a ld a, $1 diff --git a/scripts/redshouse1f2.asm b/scripts/redshouse1f2.asm index 0ddd22d6..7fd98d41 100755 --- a/scripts/redshouse1f2.asm +++ b/scripts/redshouse1f2.asm @@ -40,7 +40,7 @@ MomHealText2: ; 481c1 (12:41c1) Func_f1bc4: ld hl, TVWrongSideText - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP jp nz, .notUp ld hl, StandByMeText diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm index e41e46e5..320f8606 100755 --- a/scripts/route11gateupstairs.asm +++ b/scripts/route11gateupstairs.asm @@ -47,7 +47,7 @@ Route11GateUpstairsText_494a3: ; 494a3 (12:54a3) Route11GateUpstairsText3: ; 494a8 (12:54a8) TX_ASM - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP jp nz, GateUpstairsScript_PrintIfFacingUp CheckEvent EVENT_BEAT_ROUTE12_SNORLAX diff --git a/scripts/route12gateupstairs.asm b/scripts/route12gateupstairs.asm index e7ad5cbf..12b7b242 100755 --- a/scripts/route12gateupstairs.asm +++ b/scripts/route12gateupstairs.asm @@ -64,7 +64,7 @@ Route12GateUpstairsText_495c4: ; 495c4 (12:55c4) db "@" GateUpstairsScript_PrintIfFacingUp: ; 495c9 (12:55c9) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_UP jr z, .up ld a, $1 diff --git a/scripts/route22.asm b/scripts/route22.asm index 5ea8178f..db46efa1 100755 --- a/scripts/route22.asm +++ b/scripts/route22.asm @@ -153,7 +153,7 @@ Route22Script2: ; 50fb5 (14:4fb5) ld a, $1 ld [W_RIVALSTARTER], a .asm_50fc9 - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] and a ; cp SPRITE_FACING_DOWN jr nz, .notDown ld a, SPRITE_FACING_UP diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm index c957e4a6..7f38db70 100755 --- a/scripts/route22gate.asm +++ b/scripts/route22gate.asm @@ -40,7 +40,7 @@ Route22GateScript_1e6ba: ; 1e6ba (7:66ba) ld [wSimulatedJoypadStatesIndex], a ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld [wJoyIgnore], a jp StartSimulatingJoypadStates diff --git a/scripts/route23.asm b/scripts/route23.asm index f324963b..d26edb2e 100755 --- a/scripts/route23.asm +++ b/scripts/route23.asm @@ -118,7 +118,7 @@ Route23Script_512d8: ; 512d8 (14:52d8) ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld [wJoyIgnore], a jp StartSimulatingJoypadStates diff --git a/scripts/route25.asm b/scripts/route25.asm index 20dcc890..9883f056 100755 --- a/scripts/route25.asm +++ b/scripts/route25.asm @@ -9,7 +9,7 @@ Route25Script: ; 515cb (14:55cb) ret Route25Script_515e1: ; 515e1 (14:55e1) - ld hl, wPreventBlackout + ld hl, wd492 res 2, [hl] res 3, [hl] res 4, [hl] diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index df80f4e1..a83944fc 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -26,7 +26,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9) xor a ld [hJoyHeld], a ld a, SPRITE_FACING_RIGHT - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, [wCoordIndex] cp $1 jr z, .asm_7520f @@ -160,7 +160,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) ld hl, .SafariZoneEntranceText_753bb call PrintText xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, D_DOWN ld c, $3 call SafariZoneEntranceAutoWalk @@ -172,7 +172,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9) ld hl, .SafariZoneEntranceText_753c0 call PrintText ld a, SPRITE_FACING_UP - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, D_UP ld c, $1 call SafariZoneEntranceAutoWalk diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm index a8fc8ce7..4e4a4959 100755 --- a/scripts/vermilioncity.asm +++ b/scripts/vermilioncity.asm @@ -1,6 +1,6 @@ VermilionCityScript: ; 197a1 (6:57a1) call EnableAutoTextBoxDrawing - ld hl, wPreventBlackout + ld hl, wd492 res 7, [hl] ld hl, wd126 bit 6, [hl] @@ -53,7 +53,7 @@ VermilionCityScriptPointers: ; 197dc (6:57dc) dw VermilionCityScript4 VermilionCityScript0: ; 197e6 (6:57e6) - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] and a ; cp SPRITE_FACING_DOWN jr nz, .asm_198de ld hl, CoordsData_19823 @@ -176,7 +176,7 @@ VermilionCityText3: ; 198b1 (6:58b1) TX_ASM CheckEvent EVENT_SS_ANNE_LEFT jr nz, .asm_198f6 - ld a, [wSpriteStateData1 + 9] + ld a, [wPlayerFacingDirection] cp SPRITE_FACING_RIGHT jr z, .asm_198c8 ld hl, VermilionCityCoords1 diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm index c20285bc..319e0106 100755 --- a/scripts/viridiancity.asm +++ b/scripts/viridiancity.asm @@ -54,7 +54,7 @@ ViridianCityScript_1905b: ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld [wJoyIgnore], a ld [hJoyHeld], a ld a, $6 @@ -161,7 +161,7 @@ ViridianCityScript_1914d: ld a, D_DOWN ld [wSimulatedJoypadStatesEnd], a xor a - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld [wJoyIgnore], a ret @@ -180,7 +180,7 @@ ViridianCityScript_19162: ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $8 - ld [wSpriteStateData1 + 9], a + ld [wPlayerFacingDirection], a ld a, $8 ld [hSpriteIndexOrTextID], a call DisplayTextID diff --git a/scripts/viridiancity2.asm b/scripts/viridiancity2.asm index 80ae3924..8e8b51db 100755 --- a/scripts/viridiancity2.asm +++ b/scripts/viridiancity2.asm @@ -207,7 +207,7 @@ ViridianCityText_f19fc: Func_f1a01: ld hl, Data_f1a0a ld b, SPRITE_FACING_RIGHT - call Func_f0a82 + call TryApplyPikachuMovementData ret Data_f1a0a: |