diff options
Diffstat (limited to 'scripts')
73 files changed, 444 insertions, 444 deletions
diff --git a/scripts/AgathasRoom.asm b/scripts/AgathasRoom.asm index 6d304de8..b49b2a2b 100755 --- a/scripts/AgathasRoom.asm +++ b/scripts/AgathasRoom.asm @@ -63,8 +63,8 @@ AgathaScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -74,7 +74,7 @@ AgathaScript0: jr z, AgathaScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -110,7 +110,7 @@ AgathaScript2: cp $ff jp z, ResetAgathaScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wChampionsRoomCurScript], a diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm index 07e96c1b..338381e9 100755 --- a/scripts/BikeShop.asm +++ b/scripts/BikeShop.asm @@ -23,7 +23,7 @@ BikeShopText1: call GiveItem jr nc, .BagFull ld a, BIKE_VOUCHER - ld [hItemToRemoveID], a + ldh [hItemToRemoveID], a callba RemoveItemByID SetEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d824 diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm index 3601c0b6..3edfdf5b 100755 --- a/scripts/BillsHouse.asm +++ b/scripts/BillsHouse.asm @@ -23,7 +23,7 @@ BillsHouseScript1: ld de, MovementData_1e7a0 .notDown ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $2 ld [wBillsHouseCurScript], a @@ -66,13 +66,13 @@ BillsHouseScript3: ld a, $2 ld [wSpriteIndex], a ld a, $c - ld [hSpriteScreenYCoord], a + ldh [hSpriteScreenYCoord], a ld a, $40 - ld [hSpriteScreenXCoord], a + ldh [hSpriteScreenXCoord], a ld a, $6 - ld [hSpriteMapYCoord], a + ldh [hSpriteMapYCoord], a ld a, $5 - ld [hSpriteMapXCoord], a + ldh [hSpriteMapXCoord], a call SetSpritePosition1 ld a, HS_BILL_1 ld [wMissableObjectIndex], a @@ -80,7 +80,7 @@ BillsHouseScript3: ld c, 8 call DelayFrames ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, MovementData_1e807 call MoveSprite ld a, $4 @@ -109,7 +109,7 @@ BillsHouseScript4: BillsHouseScript5: ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $0 ld [wBillsHouseCurScript], a diff --git a/scripts/BrunosRoom.asm b/scripts/BrunosRoom.asm index 85cd86af..d7254c97 100755 --- a/scripts/BrunosRoom.asm +++ b/scripts/BrunosRoom.asm @@ -63,8 +63,8 @@ BrunoScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -74,7 +74,7 @@ BrunoScript0: jr z, BrunoScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -110,7 +110,7 @@ BrunoScript2: cp $ff jp z, ResetBrunoScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID BrunosRoom_TextPointers: diff --git a/scripts/CeladonGym.asm b/scripts/CeladonGym.asm index 4af9d146..21ba65d9 100755 --- a/scripts/CeladonGym.asm +++ b/scripts/CeladonGym.asm @@ -44,20 +44,20 @@ CeladonGymScript3: CeladonGymText_48963: ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_ERIKA lb bc, TM_MEGA_DRAIN, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM21 jr .gymVictory .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -170,7 +170,7 @@ CeladonGymText1: ld hl, CeladonGymText_48a63 ld de, CeladonGymText_48a63 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm index f38bb984..06a8390a 100755 --- a/scripts/CeladonMartRoof.asm +++ b/scripts/CeladonMartRoof.asm @@ -79,7 +79,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ld e, a add hl, de ld a, [hl] - ld [hItemToRemoveID], a + ldh [hItemToRemoveID], a cp FRESH_WATER jr z, .gaveFreshWater cp SODA_POP @@ -186,7 +186,7 @@ CeladonMartRoofText_4852c: CeladonMartRoofScript_PrintDrinksInBag: ld hl, wFilteredBagItems xor a - ld [hItemCounter], a + ldh [hItemCounter], a .loop ld a, [hli] cp $ff @@ -195,7 +195,7 @@ CeladonMartRoofScript_PrintDrinksInBag: ld [wd11e], a call GetItemName coord hl, 2, 2 - ld a, [hItemCounter] + ldh a, [hItemCounter] ld bc, SCREEN_WIDTH * 2 call AddNTimes ld de, wcd6d diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm index bda53667..656c3a4d 100755 --- a/scripts/CeruleanCity.asm +++ b/scripts/CeruleanCity.asm @@ -27,7 +27,7 @@ CeruleanCityScript4: ld [wJoyIgnore], a SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -53,7 +53,7 @@ CeruleanCityScript0: ld [wSprite02StateData1FacingDirection], a call Delay3 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID .asm_194f7 CheckEvent EVENT_BEAT_CERULEAN_RIVAL @@ -72,16 +72,16 @@ CeruleanCityScript0: ld a, MUSIC_MEET_RIVAL call PlayMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, [wXCoord] cp $14 jr z, .asm_19535 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, $5 - ld [hSpriteDataOffset], a + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData2 ld [hl], $19 .asm_19535 @@ -90,7 +90,7 @@ CeruleanCityScript0: predef ShowObject ld de, CeruleanCityMovement1 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $1 ld [wCeruleanCityCurScript], a @@ -114,9 +114,9 @@ CeruleanCityMovement1: CeruleanCityScript_1955d: ld a, 1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay ; face object CeruleanCityScript1: @@ -126,7 +126,7 @@ CeruleanCityScript1: xor a ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -154,7 +154,7 @@ CeruleanCityScript1: ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call CeruleanCityScript_1955d ld a, $2 ld [wCeruleanCityCurScript], a @@ -169,14 +169,14 @@ CeruleanCityScript2: ld [wJoyIgnore], a SetEvent EVENT_BEAT_CERULEAN_RIVAL ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wXCoord] cp $14 @@ -187,7 +187,7 @@ CeruleanCityScript2: ld de, CeruleanCityMovement3 .asm_195f3 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $3 ld [wCeruleanCityCurScript], a @@ -289,7 +289,7 @@ CeruleanCityText2: ld hl, CeruleanCityText_196ee ld de, CeruleanCityText_196ee call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -356,7 +356,7 @@ CeruleanCityText6: CeruleanCityText7: text_asm - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp 180 jr c, .asm_e9fc9 ld hl, CeruleanCityText_19730 @@ -388,7 +388,7 @@ CeruleanCityText_1973a: CeruleanCityText8: text_asm - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp 180 jr c, .asm_e28da ld hl, CeruleanCityText_1976f diff --git a/scripts/CeruleanGym.asm b/scripts/CeruleanGym.asm index 14363066..ef3c96f5 100755 --- a/scripts/CeruleanGym.asm +++ b/scripts/CeruleanGym.asm @@ -44,20 +44,20 @@ CeruleanGymScript3: CeruleanGymScript_5c70d: ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_MISTY lb bc, TM_BUBBLEBEAM, 1 call GiveItem jr nc, .BagFull ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM11 jr .gymVictory .BagFull ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -121,14 +121,14 @@ CeruleanGymText1: ld hl, CeruleanGymText_5c7d8 ld de, CeruleanGymText_5c7d8 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $2 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wCeruleanGymCurScript], a .done diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm index ef6ff8fb..53dd9d4e 100755 --- a/scripts/ChampionsRoom.asm +++ b/scripts/ChampionsRoom.asm @@ -55,7 +55,7 @@ GaryScript2: ld hl, wOptions res 7, [hl] ; Turn on battle animations to make the battle feel more epic. ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld hl, wd72d @@ -84,7 +84,7 @@ GaryScript2: ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wChampionsRoomCurScript], a ret @@ -98,10 +98,10 @@ GaryScript3: ld a, $f0 ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, $4 ld [wChampionsRoomCurScript], a @@ -110,14 +110,14 @@ GaryScript3: GaryScript4: callba Music_Cities1AlternateTempo ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, OakEntranceAfterVictoryMovement ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, HS_CHAMPIONS_ROOM_OAK ld [wMissableObjectIndex], a @@ -141,17 +141,17 @@ GaryScript5: ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $6 ld [wChampionsRoomCurScript], a @@ -159,12 +159,12 @@ GaryScript5: GaryScript6: ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $7 ld [wChampionsRoomCurScript], a @@ -172,16 +172,16 @@ GaryScript6: GaryScript7: ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld de, OakExitGaryRoomMovement ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $8 ld [wChampionsRoomCurScript], a diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm index 2aa61135..9318c775 100755 --- a/scripts/CinnabarGym.asm +++ b/scripts/CinnabarGym.asm @@ -36,7 +36,7 @@ CinnabarGymScript_75792: ret CinnabarGymScript_757a0: - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wTrainerHeaderFlagBit], a ret @@ -50,7 +50,7 @@ CinnabarGymScript0: ld a, [wOpponentAfterWrongAnswer] and a ret z - ld [hSpriteIndex], a + ldh [hSpriteIndex], a cp $4 jr nz, .asm_757c3 ld a, PLAYER_DIR_DOWN @@ -85,7 +85,7 @@ CinnabarGymScript1: ld [wJoyIgnore], a ld a, [wOpponentAfterWrongAnswer] ld [wTrainerHeaderFlagBit], a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CinnabarGymFlagAction: @@ -96,7 +96,7 @@ CinnabarGymScript2: cp $ff jp z, CinnabarGymScript_75792 ld a, [wTrainerHeaderFlagBit] - ld [hGymGateIndex], a + ldh [hGymGateIndex], a AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a ld b, FLAG_TEST @@ -111,7 +111,7 @@ CinnabarGymScript2: call WaitForSoundToFinish .asm_7581b ld a, [wTrainerHeaderFlagBit] - ld [hGymGateIndex], a + ldh [hGymGateIndex], a AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2 ld c, a ld b, FLAG_SET @@ -141,20 +141,20 @@ CinnabarGymScript3: ld [wJoyIgnore], a CinnabarGymScript3_75857: ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BLAINE lb bc, TM_FIRE_BLAST, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM38 jr .gymVictory .BagFull ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -185,7 +185,7 @@ CinnabarGym_TextPointers: dw TM38NoRoomText CinnabarGymScript_758b7: - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/CinnabarIsland.asm b/scripts/CinnabarIsland.asm index 54bbe1d8..f74890e8 100755 --- a/scripts/CinnabarIsland.asm +++ b/scripts/CinnabarIsland.asm @@ -25,10 +25,10 @@ CinnabarIslandScript0: ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a ld a, D_DOWN diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm index 580d9b11..b885baab 100755 --- a/scripts/CopycatsHouse2F.asm +++ b/scripts/CopycatsHouse2F.asm @@ -29,7 +29,7 @@ CopycatsHouse2FText1: ld hl, ReceivedTM31Text call PrintText ld a, POKE_DOLL - ld [hItemToRemoveID], a + ldh [hItemToRemoveID], a callba RemoveItemByID SetEvent EVENT_GOT_TM31 jr .asm_62ecd diff --git a/scripts/Daycare.asm b/scripts/Daycare.asm index 4c9e2a85..9fc8f3c4 100755 --- a/scripts/Daycare.asm +++ b/scripts/Daycare.asm @@ -73,11 +73,11 @@ DayCareMText1: ld d, MAX_LEVEL callab CalcExperience ld hl, wDayCareMonExp - ld a, [hExperience] + ldh a, [hExperience] ld [hli], a - ld a, [hExperience + 1] + ldh a, [hExperience + 1] ld [hli], a - ld a, [hExperience + 2] + ldh a, [hExperience + 2] ld [hl], a ld d, MAX_LEVEL @@ -138,11 +138,11 @@ DayCareMText1: and a jp nz, .leaveMonInDayCare ld hl, wDayCareTotalCost - ld [hMoney], a + ldh [hMoney], a ld a, [hli] - ld [hMoney + 1], a + ldh [hMoney + 1], a ld a, [hl] - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .enoughMoney ld hl, DayCareNotEnoughMoneyText diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm index eb1e3d55..a5844c14 100755 --- a/scripts/FightingDojo.asm +++ b/scripts/FightingDojo.asm @@ -30,7 +30,7 @@ FightingDojoScript1: CheckEvent EVENT_BEAT_KARATE_MASTER ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wcf0d], a ld a, [wYCoord] cp $3 @@ -43,12 +43,12 @@ FightingDojoScript1: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ret @@ -62,9 +62,9 @@ FightingDojoScript3: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay .asm_5cde4 @@ -72,7 +72,7 @@ FightingDojoScript3: ld [wJoyIgnore], a SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -142,7 +142,7 @@ FightingDojoText1: ld hl, FightingDojoText_5ce93 ld de, FightingDojoText_5ce93 call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/FuchsiaGym.asm b/scripts/FuchsiaGym.asm index 6fa569a0..ccde6106 100755 --- a/scripts/FuchsiaGym.asm +++ b/scripts/FuchsiaGym.asm @@ -44,20 +44,20 @@ FuchsiaGymScript3: ld [wJoyIgnore], a FuchsiaGymScript3_75497: ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_KOGA lb bc, TM_TOXIC, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM06 jr .gymVictory .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -161,14 +161,14 @@ FuchsiaGymText1: ld hl, KogaAfterBattleText ld de, KogaAfterBattleText call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $5 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wFuchsiaGymCurScript], a .done diff --git a/scripts/GameCorner.asm b/scripts/GameCorner.asm index 551caa78..d5f43e6b 100755 --- a/scripts/GameCorner.asm +++ b/scripts/GameCorner.asm @@ -12,7 +12,7 @@ CeladonGameCornerScript_48bcf: res 6, [hl] ret z call Random - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp $7 jr nc, .asm_48be2 ld a, $8 @@ -57,10 +57,10 @@ CeladonGameCornerScript1: ld a, $f0 ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $b - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_48c5a ld a, [wYCoord] @@ -75,7 +75,7 @@ CeladonGameCornerScript1: ld de, MovementData_48c63 .asm_48c4d ld a, $b - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $2 ld [wGameCornerCurScript], a @@ -150,29 +150,29 @@ CeladonGameCornerText2: call Has9990Coins jr nc, .asm_48d14 xor a - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $10 - ld [hMoney + 1], a + ldh [hMoney + 1], a call HasEnoughMoney jr nc, .asm_48cdb ld hl, CeladonGameCornerText_48d31 jr .asm_48d1c .asm_48cdb xor a - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $10 - ld [hMoney + 1], a + ldh [hMoney + 1], a ld hl, hMoney + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $50 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -236,10 +236,10 @@ CeladonGameCornerText5: call Has9990Coins jr nc, .asm_48d8e xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $10 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -316,10 +316,10 @@ CeladonGameCornerText9: call Has9990Coins jr nc, .asm_48e18 xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $20 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -368,10 +368,10 @@ CeladonGameCornerText10: call Has9990Coins jr z, .asm_48e7a xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $20 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -418,14 +418,14 @@ CeladonGameCornerText11: ld hl, CeladonGameCornerText_48ed3 ld de, CeladonGameCornerText_48ed3 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a - ld [hJoyPressed], a - ld [hJoyReleased], a + ldh [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyReleased], a ld a, $1 ld [wGameCornerCurScript], a jp TextScriptEnd @@ -521,7 +521,7 @@ GameCornerBlankText2: Has9990Coins: ld a, $99 - ld [hCoins], a + ldh [hCoins], a ld a, $90 - ld [hCoins + 1], a + ldh [hCoins + 1], a jp HasEnoughCoins diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index ef3ed128..cdfb2f17 100755 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -79,10 +79,10 @@ HallofFameRoomScript1: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 xor a @@ -90,7 +90,7 @@ HallofFameRoomScript1: inc a ; PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm index 712972e8..5087dda8 100755 --- a/scripts/LancesRoom.asm +++ b/scripts/LancesRoom.asm @@ -59,12 +59,12 @@ LanceScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $3 ; Is player standing next to Lance's sprite? jr nc, .notStandingNextToLance ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID .notStandingNextToLance cp $5 ; Is player standing on the entrance staircase? @@ -91,7 +91,7 @@ LanceScript2: cp $ff jp z, ResetLanceScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID WalkToLance: diff --git a/scripts/LoreleisRoom.asm b/scripts/LoreleisRoom.asm index c03d1161..f2cdfb45 100755 --- a/scripts/LoreleisRoom.asm +++ b/scripts/LoreleisRoom.asm @@ -65,8 +65,8 @@ LoreleiScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -76,7 +76,7 @@ LoreleiScript0: jr z, LoreleiScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -112,7 +112,7 @@ LoreleiScript2: cp $ff jp z, ResetLoreleiScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID LoreleisRoom_TextPointers: diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm index 50620f23..a70967e4 100755 --- a/scripts/MtMoonB2F.asm +++ b/scripts/MtMoonB2F.asm @@ -62,9 +62,9 @@ MtMoon3Script0: cp $d jp nz, MtMoon3Script_49d91 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID MtMoon3Script_49d91: @@ -88,7 +88,7 @@ MtMoon3Script3: MtMoon3Script4: ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld hl, CoordsData_49dea call ArePlayerCoordsInArray @@ -102,7 +102,7 @@ MtMoon3Script4: ld de, MovementData_49df8 .asm_49dda ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $5 ld [wMtMoonB2FCurScript], a @@ -136,7 +136,7 @@ MtMoon3Script5: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckEvent EVENT_GOT_DOME_FOSSIL jr z, .asm_49e1d @@ -222,7 +222,7 @@ MtMoon3Text1: ld hl, MtMoon3Text_49f8a ld de, MtMoon3Text_49f8a call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/MtMoonPokecenter.asm b/scripts/MtMoonPokecenter.asm index bcc540a3..3dafd780 100755 --- a/scripts/MtMoonPokecenter.asm +++ b/scripts/MtMoonPokecenter.asm @@ -34,10 +34,10 @@ MagikarpSalesmanText: ld a, [wCurrentMenuItem] and a jp nz, .choseNo - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $5 - ld [hMoney + 1], a + ldh [hMoney + 1], a call HasEnoughMoney jr nc, .enoughMoney ld hl, .NoMoneyText diff --git a/scripts/Museum1F.asm b/scripts/Museum1F.asm index a8a609ff..caec03be 100755 --- a/scripts/Museum1F.asm +++ b/scripts/Museum1F.asm @@ -23,9 +23,9 @@ Museum1FScript0: ret nz .asm_5c120 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID Museum1FScript1: @@ -71,7 +71,7 @@ Museum1FText1: ld [wTextBoxID], a call DisplayTextBoxID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld hl, Museum1FText_5c21f call PrintText call YesNoChoice @@ -79,10 +79,10 @@ Museum1FText1: and a jr nz, .asm_de133 xor a - ld [hMoney], a - ld [hMoney + 1], a + ldh [hMoney], a + ldh [hMoney + 1], a ld a, $50 - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .asm_0f3e3 ld hl, Museum1FText_5c229 diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm index 01196d7c..49017440 100755 --- a/scripts/OaksLab.asm +++ b/scripts/OaksLab.asm @@ -48,7 +48,7 @@ OaksLabScript0: OaksLabScript1: ld a, $8 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, OakEntryMovement call MoveSprite @@ -86,14 +86,14 @@ OaksLabScript3: ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $4 @@ -111,9 +111,9 @@ OaksLabScript4: SetEvent EVENT_FOLLOWED_OAK_INTO_LAB SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites ld hl, wFlags_D733 @@ -128,19 +128,19 @@ OaksLabScript5: ld a, $fc ld [wJoyIgnore], a ld a, $11 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $12 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $13 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $14 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_OAK_ASKED_TO_CHOOSE_MON xor a @@ -155,18 +155,18 @@ OaksLabScript6: cp $6 ret nz ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a @@ -254,9 +254,9 @@ OaksLabScript8: jr nz, .moveBlue push hl ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, $4 - ld [hSpriteDataOffset], a + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData1 push hl ld [hl], $4c @@ -281,7 +281,7 @@ OaksLabScript8: .moveBlue ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $9 @@ -295,12 +295,12 @@ OaksLabScript9: ld a, $fc ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, [wRivalStarterBallSpriteIndex] cp $2 @@ -324,12 +324,12 @@ OaksLabScript9: ld [wd11e], a call GetMonName ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_STARTER xor a @@ -344,9 +344,9 @@ OaksLabScript10: cp $6 ret nz ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a @@ -354,21 +354,21 @@ OaksLabScript10: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [hNPCPlayerRelativePosPerspective], a + ldh [hNPCPlayerRelativePosPerspective], a ld a, $1 swap a - ld [hNPCSpriteOffset], a + ldh [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC - ld a, [hNPCPlayerYDistance] + ldh a, [hNPCPlayerYDistance] dec a - ld [hNPCPlayerYDistance], a + ldh [hNPCPlayerYDistance], a predef FindPathToPlayer ld de, wNPCMovementDirections2 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $b @@ -424,9 +424,9 @@ OaksLabScript12: ld [wSpriteIndex], a call SetSpritePosition1 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay predef HealParty SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB @@ -439,11 +439,11 @@ OaksLabScript13: ld c, 20 call DelayFrames ld a, $10 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID callba Music_RivalAlternateStart ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, .RivalExitMovement call MoveSprite ld a, [wXCoord] @@ -508,14 +508,14 @@ OaksLabScript14: OaksLabScript15: xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call EnableAutoTextBoxDrawing ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound callba Music_RivalAlternateStart ld a, $15 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call OaksLabScript_1d02b ld a, HS_OAKS_LAB_RIVAL @@ -530,7 +530,7 @@ OaksLabScript15: call FillMemory ld [hl], $ff ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, wNPCMovementDirections2 call MoveSprite @@ -540,14 +540,14 @@ OaksLabScript15: OaksLabScript_1cefd: ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $8 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay OaksLabScript16: @@ -560,21 +560,21 @@ OaksLabScript16: ld [wJoyIgnore], a call OaksLabScript_1cefd ld a, $16 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1cefd ld a, $17 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1cefd ld a, $18 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame ld a, $19 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, HS_POKEDEX_1 @@ -585,16 +585,16 @@ OaksLabScript16: predef HideObject call OaksLabScript_1cefd ld a, $1a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 ld a, $1b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_POKEDEX SetEvent EVENT_OAK_GOT_PARCEL @@ -616,7 +616,7 @@ OaksLabScript16: call PlaySound callba Music_RivalAlternateStart ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, wNPCMovementDirections2 call MoveSprite @@ -672,9 +672,9 @@ OaksLabScript_RemoveParcel: OaksLabScript_1d02b: ld a, $7c - ld [hSpriteScreenYCoord], a + ldh [hSpriteScreenYCoord], a ld a, $8 - ld [hSpriteMapXCoord], a + ldh [hSpriteMapXCoord], a ld a, [wYCoord] cp $3 jr nz, .asm_1d045 @@ -703,9 +703,9 @@ OaksLabScript_1d02b: .asm_1d066 ld a, $20 .asm_1d068 - ld [hSpriteScreenXCoord], a + ldh [hSpriteScreenXCoord], a ld a, b - ld [hSpriteMapYCoord], a + ldh [hSpriteMapYCoord], a ld a, $1 ld [wSpriteIndex], a call SetSpritePosition1 @@ -840,15 +840,15 @@ OaksLabText39: OaksLabScript_1d157: ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, $9 - ld [hSpriteDataOffset], a + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData1 ld [hl], SPRITE_FACING_DOWN ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, $9 - ld [hSpriteDataOffset], a + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData1 ld [hl], SPRITE_FACING_RIGHT ld hl, wd730 @@ -947,9 +947,9 @@ OaksLabReceivedMonText: OaksLabScript_1d22d: ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, $9 - ld [hSpriteDataOffset], a + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData1 ld [hl], $0 ld hl, OaksLabLastMonText diff --git a/scripts/PalletTown.asm b/scripts/PalletTown.asm index e063e0c8..5c4c4de8 100755 --- a/scripts/PalletTown.asm +++ b/scripts/PalletTown.asm @@ -24,7 +24,7 @@ PalletTownScript0: cp 1 ; is player near north exit? ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a ld a, SFX_STOP_ALL_MUSIC @@ -46,7 +46,7 @@ PalletTownScript1: xor a ld [wcf0d], a ld a, 1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $FF ld [wJoyIgnore], a @@ -61,25 +61,25 @@ PalletTownScript1: PalletTownScript2: ld a, 1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 ld a, 1 ld [wYCoord], a ld a, 1 - ld [hNPCPlayerRelativePosPerspective], a + ldh [hNPCPlayerRelativePosPerspective], a ld a, 1 swap a - ld [hNPCSpriteOffset], a + ldh [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC ld hl, hNPCPlayerYDistance dec [hl] predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 ld de, wNPCMovementDirections2 ld a, 1 ; oak - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $FF ld [wJoyIgnore], a @@ -100,7 +100,7 @@ PalletTownScript3: ld a, $FC ld [wJoyIgnore], a ld a, 1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; set up movement script that causes the player to follow Oak to his lab ld a, $FF @@ -111,7 +111,7 @@ PalletTownScript3: ld [wNPCMovementScriptFunctionNum], a ld a, 1 ld [wNPCMovementScriptPointerTableNum], a - ld a, [hLoadedROMBank] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ; trigger the next script diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm index a082d5eb..e3d39dae 100755 --- a/scripts/PewterCity.asm +++ b/scripts/PewterCity.asm @@ -29,7 +29,7 @@ PewterCityScript_1925e: ld a, $f0 ld [wJoyIgnore], a ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_19277: @@ -44,32 +44,32 @@ PewterCityScript1: and a ret nz ld a, $3 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($3 << 4) | SPRITE_FACING_UP - ld [hSpriteImageIndex], a + ldh [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c - ld [hSpriteScreenYCoord], a + ldh [hSpriteScreenYCoord], a ld a, $30 - ld [hSpriteScreenXCoord], a + ldh [hSpriteScreenXCoord], a ld a, $c - ld [hSpriteMapYCoord], a + ldh [hSpriteMapYCoord], a ld a, $11 - ld [hSpriteMapXCoord], a + ldh [hSpriteMapXCoord], a ld a, $3 ld [wSpriteIndex], a call SetSpritePosition1 ld a, $3 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, MovementData_PewterMuseumGuyExit call MoveSprite ld a, $2 @@ -112,32 +112,32 @@ PewterCityScript4: and a ret nz ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($1 << 4) | SPRITE_FACING_LEFT - ld [hSpriteImageIndex], a + ldh [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c - ld [hSpriteScreenYCoord], a + ldh [hSpriteScreenYCoord], a ld a, $40 - ld [hSpriteScreenXCoord], a + ldh [hSpriteScreenXCoord], a ld a, $16 - ld [hSpriteMapYCoord], a + ldh [hSpriteMapYCoord], a ld a, $10 - ld [hSpriteMapXCoord], a + ldh [hSpriteMapXCoord], a ld a, $5 ld [wSpriteIndex], a call SetSpritePosition1 ld a, $5 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld de, MovementData_PewterGymGuyExit call MoveSprite ld a, $5 @@ -215,12 +215,12 @@ PewterCityText3: ld hl, PewterCityText_193fb call PrintText xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wNPCMovementScriptFunctionNum], a ld a, $2 ld [wNPCMovementScriptPointerTableNum], a - ld a, [hLoadedROMBank] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ld a, $3 ld [wSpriteIndex], a @@ -280,11 +280,11 @@ PewterCityText5: ld hl, PewterCityText_1945d call PrintText xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wNPCMovementScriptFunctionNum], a ld a, $3 ld [wNPCMovementScriptPointerTableNum], a - ld a, [hLoadedROMBank] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ld a, $5 ld [wSpriteIndex], a diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm index 7215e095..94364043 100755 --- a/scripts/PewterGym.asm +++ b/scripts/PewterGym.asm @@ -44,20 +44,20 @@ PewterGymScript3: PewterGymScript_5c3df: ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BROCK lb bc, TM_BIDE, 1 call GiveItem jr nc, .BagFull ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM34 jr .gymVictory .BagFull ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -120,14 +120,14 @@ PewterGymText1: ld hl, PewterGymText_5c4bc ld de, PewterGymText_5c4bc call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $1 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wPewterGymCurScript], a ld [wCurMapScript], a diff --git a/scripts/PokemonMansion1F.asm b/scripts/PokemonMansion1F.asm index d8f3728c..a68b8928 100755 --- a/scripts/PokemonMansion1F.asm +++ b/scripts/PokemonMansion1F.asm @@ -50,9 +50,9 @@ Mansion1Script_Switches:: cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion1F_ScriptPointers: diff --git a/scripts/PokemonMansion2F.asm b/scripts/PokemonMansion2F.asm index e560d6bd..16f0dff5 100755 --- a/scripts/PokemonMansion2F.asm +++ b/scripts/PokemonMansion2F.asm @@ -46,9 +46,9 @@ Mansion2Script_Switches:: cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion2F_ScriptPointers: diff --git a/scripts/PokemonMansion3F.asm b/scripts/PokemonMansion3F.asm index ad346702..f4612b0d 100755 --- a/scripts/PokemonMansion3F.asm +++ b/scripts/PokemonMansion3F.asm @@ -77,9 +77,9 @@ Mansion3Script_Switches:: cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion3F_TextPointers: diff --git a/scripts/PokemonMansionB1F.asm b/scripts/PokemonMansionB1F.asm index aa7123f0..7b295f7e 100755 --- a/scripts/PokemonMansionB1F.asm +++ b/scripts/PokemonMansionB1F.asm @@ -48,9 +48,9 @@ Mansion4Script_Switches:: cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansionB1F_ScriptPointers: diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm index 4cf308b5..86a60579 100755 --- a/scripts/PokemonTower2F.asm +++ b/scripts/PokemonTower2F.asm @@ -41,16 +41,16 @@ PokemonTower2Script0: .asm_60544 ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, b - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a - ld [hJoyPressed], a + ldh [hJoyHeld], a + ldh [hJoyPressed], a ret CoordsData_6055e: @@ -66,7 +66,7 @@ PokemonTower2Script1: ld [wJoyIgnore], a SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld de, MovementData_605b2 CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT @@ -74,7 +74,7 @@ PokemonTower2Script1: ld de, MovementData_605a9 .asm_60589 ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a diff --git a/scripts/PokemonTower5F.asm b/scripts/PokemonTower5F.asm index de09ec49..8cd9f5d1 100755 --- a/scripts/PokemonTower5F.asm +++ b/scripts/PokemonTower5F.asm @@ -24,7 +24,7 @@ PokemonTower5Script0: CheckAndSetEvent EVENT_IN_PURIFIED_ZONE ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld hl, wd72e @@ -35,7 +35,7 @@ PokemonTower5Script0: call Delay3 call GBFadeInFromWhite ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a diff --git a/scripts/PokemonTower6F.asm b/scripts/PokemonTower6F.asm index a6ae22ec..9ed36a7b 100755 --- a/scripts/PokemonTower6F.asm +++ b/scripts/PokemonTower6F.asm @@ -28,9 +28,9 @@ PokemonTower6Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, MAROWAK ld [wCurOpponent], a @@ -61,7 +61,7 @@ PokemonTower6Script4: jr nz, .asm_60b82 SetEvent EVENT_BEAT_GHOST_MAROWAK ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a diff --git a/scripts/PokemonTower7F.asm b/scripts/PokemonTower7F.asm index 3f16ca92..f32e1a7c 100755 --- a/scripts/PokemonTower7F.asm +++ b/scripts/PokemonTower7F.asm @@ -31,7 +31,7 @@ PokemonTower7Script2: ld a, $f0 ld [wJoyIgnore], a ld a, [wSpriteIndex] - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call PokemonTower7Script_60db6 ld a, $3 @@ -72,7 +72,7 @@ PokemonTower7Script4: ld a, SPRITE_FACING_UP ld [wSpritePlayerStateData1FacingDirection], a ld a, MR_FUJIS_HOUSE - ld [hWarpDestinationMap], a + ldh [hWarpDestinationMap], a ld a, $1 ld [wDestinationWarpID], a ld a, LAVENDER_TOWN @@ -107,7 +107,7 @@ PokemonTower7Script_60db6: ld d, [hl] ld e, a ld a, [wSpriteIndex] - ld [hSpriteIndex], a + ldh [hSpriteIndex], a jp MoveSprite .asm_60dde inc hl diff --git a/scripts/RedsHouse2F.asm b/scripts/RedsHouse2F.asm index 69a62f81..2e3463ee 100755 --- a/scripts/RedsHouse2F.asm +++ b/scripts/RedsHouse2F.asm @@ -10,7 +10,7 @@ RedsHouse2F_ScriptPointers: RedsHouse2FScript0: xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a ld a, 1 diff --git a/scripts/RocketHideoutB4F.asm b/scripts/RocketHideoutB4F.asm index 81762a8f..f33ef6e2 100755 --- a/scripts/RocketHideoutB4F.asm +++ b/scripts/RocketHideoutB4F.asm @@ -52,7 +52,7 @@ RocketHideout4Script3: ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack ld a, HS_ROCKET_HIDEOUT_B4F_GIOVANNI @@ -125,12 +125,12 @@ RocketHideout4Text1: ld hl, RocketHideout4Text_4557f ld de, RocketHideout4Text_4557f call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wRocketHideoutB4FCurScript], a ld [wCurMapScript], a diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm index 1fefc824..1797c540 100755 --- a/scripts/Route11Gate2F.asm +++ b/scripts/Route11Gate2F.asm @@ -20,9 +20,9 @@ Route11GateUpstairsText2: CheckEvent EVENT_GOT_ITEMFINDER, 1 jr c, .asm_4949b ld a, 30 ; pokemon needed - ld [hOaksAideRequirement], a + ldh [hOaksAideRequirement], a ld a, ITEMFINDER ; oak's aide reward - ld [hOaksAideRewardItem], a + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld h, d @@ -31,7 +31,7 @@ Route11GateUpstairsText2: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] + ldh a, [hOaksAideResult] dec a jr nz, .asm_494a1 SetEvent EVENT_GOT_ITEMFINDER diff --git a/scripts/Route12.asm b/scripts/Route12.asm index 1033e495..87052fd6 100755 --- a/scripts/Route12.asm +++ b/scripts/Route12.asm @@ -27,7 +27,7 @@ Route12Script0: ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX jp z, CheckFightingMapTrainers ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX ld [wCurOpponent], a @@ -50,7 +50,7 @@ Route12Script3: cp $2 jr z, .asm_59664 ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_59664 SetEvent EVENT_BEAT_ROUTE12_SNORLAX diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm index a0535949..9887fbc1 100755 --- a/scripts/Route15Gate2F.asm +++ b/scripts/Route15Gate2F.asm @@ -10,9 +10,9 @@ Route15GateUpstairsText1: CheckEvent EVENT_GOT_EXP_ALL jr nz, .asm_49683 ld a, 50 ; pokemon needed - ld [hOaksAideRequirement], a + ldh [hOaksAideRequirement], a ld a, EXP_ALL ; oak's aide reward - ld [hOaksAideRewardItem], a + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld hl, wcd6d @@ -20,7 +20,7 @@ Route15GateUpstairsText1: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] + ldh a, [hOaksAideResult] cp $1 jr nz, .asm_49689 SetEvent EVENT_GOT_EXP_ALL diff --git a/scripts/Route16.asm b/scripts/Route16.asm index f813b4e5..bd80a918 100755 --- a/scripts/Route16.asm +++ b/scripts/Route16.asm @@ -27,7 +27,7 @@ Route16Script0: ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX jp z, CheckFightingMapTrainers ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX ld [wCurOpponent], a @@ -51,7 +51,7 @@ Route16Script3: cp $2 jr z, .asm_599a8 ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_599a8 SetEvent EVENT_BEAT_ROUTE16_SNORLAX diff --git a/scripts/Route16Gate1F.asm b/scripts/Route16Gate1F.asm index af84bab0..5bb77075 100755 --- a/scripts/Route16Gate1F.asm +++ b/scripts/Route16Gate1F.asm @@ -19,10 +19,10 @@ Route16GateScript0: call ArePlayerCoordsInArray ret nc ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $1 jr z, .asm_4970e @@ -59,7 +59,7 @@ Route16GateScript1: Route16GateScript2: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a diff --git a/scripts/Route18Gate1F.asm b/scripts/Route18Gate1F.asm index ad876e15..ea8783df 100755 --- a/scripts/Route18Gate1F.asm +++ b/scripts/Route18Gate1F.asm @@ -19,10 +19,10 @@ Route18GateScript0: call ArePlayerCoordsInArray ret nc ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $1 jr z, .asm_498c6 @@ -59,7 +59,7 @@ Route18GateScript1: Route18GateScript2: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a diff --git a/scripts/Route22.asm b/scripts/Route22.asm index b6970ef0..fd566ff0 100755 --- a/scripts/Route22.asm +++ b/scripts/Route22.asm @@ -44,7 +44,7 @@ Route22MoveRivalSprite: .asm_50ef1 call MoveSprite ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay Route22RivalMovementData: @@ -63,7 +63,7 @@ Route22Script0: ld a, [wCoordIndex] ld [wcf0d], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, PLAYER_DIR_LEFT @@ -96,7 +96,7 @@ Route22Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call Route22MoveRivalSprite ld a, $1 ld [wRoute22CurScript], a @@ -116,14 +116,14 @@ Route22Script1: .asm_50f78 ld a, SPRITE_FACING_RIGHT .asm_50f7a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -157,15 +157,15 @@ Route22Script2: .notDown ld a, SPRITE_FACING_RIGHT .done - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a @@ -191,7 +191,7 @@ Route22Script_5100d: ld de, Route22RivalExitMovementData2 Route22MoveRival1: ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a jp MoveSprite Route22RivalExitMovementData1: @@ -250,7 +250,7 @@ Route22Script_5104e: call PlaySound callba Music_RivalAlternateTempo ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call Route22MoveRivalSprite ld a, $4 ld [wRoute22CurScript], a @@ -261,7 +261,7 @@ Route22Script4: bit 0, a ret nz ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, [wcf0d] cp $1 jr nz, .asm_510a1 @@ -274,12 +274,12 @@ Route22Script4: ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_RIGHT .asm_510a8 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -305,7 +305,7 @@ Route22Script5: cp $ff jp z, Route22Script_50ece ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, [wcf0d] cp $1 jr nz, .asm_510fb @@ -318,13 +318,13 @@ Route22Script5: ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_RIGHT .asm_51102 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a @@ -350,7 +350,7 @@ Route22Script_51142: ld de, MovementData_5114d Route22MoveRival2: ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a jp MoveSprite MovementData_5114c: diff --git a/scripts/Route22Gate.asm b/scripts/Route22Gate.asm index e2311b95..59b7d7a2 100755 --- a/scripts/Route22Gate.asm +++ b/scripts/Route22Gate.asm @@ -22,9 +22,9 @@ Route22GateScript0: call ArePlayerCoordsInArray ret nc xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID Route22GateScriptCoords: diff --git a/scripts/Route23.asm b/scripts/Route23.asm index b617992b..f4d65266 100755 --- a/scripts/Route23.asm +++ b/scripts/Route23.asm @@ -45,7 +45,7 @@ Route23Script0: ret nc .asm_51237 ld a, e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a ld a, c ld [wWhichBadge], a ld b, FLAG_TEST @@ -57,7 +57,7 @@ Route23Script0: call Route23Script_5125d call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ret YCoordsData_51255: diff --git a/scripts/Route24.asm b/scripts/Route24.asm index f04a43cf..22ef9aab 100755 --- a/scripts/Route24.asm +++ b/scripts/Route24.asm @@ -28,9 +28,9 @@ Route24Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE ret z @@ -66,7 +66,7 @@ Route24Script3: ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE24_ROCKET ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -162,12 +162,12 @@ Route24Text1: ld hl, Route24Text_5152b ld de, Route24Text_5152b call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wRoute24CurScript], a ld [wCurMapScript], a diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm index 27da0909..d9d30218 100755 --- a/scripts/Route2Gate.asm +++ b/scripts/Route2Gate.asm @@ -10,9 +10,9 @@ Route2GateText1: CheckEvent EVENT_GOT_HM05 jr nz, .asm_5d60d ld a, 10 ; pokemon needed - ld [hOaksAideRequirement], a + ldh [hOaksAideRequirement], a ld a, HM_FLASH ; oak's aide reward - ld [hOaksAideRewardItem], a + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld hl, wcd6d @@ -20,7 +20,7 @@ Route2GateText1: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] + ldh a, [hOaksAideResult] cp $1 jr nz, .asm_5d613 SetEvent EVENT_GOT_HM05 diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm index 0bd896f1..0b66efa6 100755 --- a/scripts/Route5Gate.asm +++ b/scripts/Route5Gate.asm @@ -25,13 +25,13 @@ Route5GateScript0: ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a callba RemoveGuardDrink - ld a, [hItemToRemoveID] + ldh a, [hItemToRemoveID] and a jr nz, .asm_1df82 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route5GateScript_1df43 ld a, $1 @@ -39,7 +39,7 @@ Route5GateScript0: ret .asm_1df82 ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] @@ -74,7 +74,7 @@ Route5GateText1: bit 6, a jr nz, .asm_88856 callba RemoveGuardDrink - ld a, [hItemToRemoveID] + ldh a, [hItemToRemoveID] and a jr nz, .asm_768a2 ld hl, Route5GateText2 diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm index 6e9dd4b3..7d135498 100755 --- a/scripts/Route6Gate.asm +++ b/scripts/Route6Gate.asm @@ -19,13 +19,13 @@ Route6GateScript0: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a callba RemoveGuardDrink - ld a, [hItemToRemoveID] + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e080 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route6GateScript_1e0a1 ld a, $1 @@ -35,7 +35,7 @@ Route6GateScript0: ld hl, wd728 set 6, [hl] ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_1e08c: diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm index 00d7472f..041d6c6a 100755 --- a/scripts/Route7Gate.asm +++ b/scripts/Route7Gate.asm @@ -31,13 +31,13 @@ Route7GateScript0: ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a callba RemoveGuardDrink - ld a, [hItemToRemoveID] + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e15a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route7GateScript_1e111 ld a, $1 @@ -45,7 +45,7 @@ Route7GateScript0: ret .asm_1e15a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm index d3003c4d..3bdd6070 100755 --- a/scripts/Route8Gate.asm +++ b/scripts/Route8Gate.asm @@ -30,13 +30,13 @@ Route8GateScript0: ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a callba RemoveGuardDrink - ld a, [hItemToRemoveID] + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e220 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route8GateScript_1e1d7 ld a, $1 @@ -46,7 +46,7 @@ Route8GateScript0: ld hl, wd728 set 6, [hl] ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_1e22c: diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm index 98d4f197..45e8f283 100755 --- a/scripts/SSAnne2F.asm +++ b/scripts/SSAnne2F.asm @@ -31,19 +31,19 @@ SSAnne2Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, [wCoordIndex] - ld [hSavedCoordIndex], a + ldh [hSavedCoordIndex], a ld a, HS_SS_ANNE_2F_RIVAL ld [wMissableObjectIndex], a predef ShowObject call Delay3 ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a - ld a, [hSavedCoordIndex] + ldh a, [hSavedCoordIndex] cp $2 jr nz, .asm_61400 ld de, MovementData_6140c @@ -81,9 +81,9 @@ SSAnne2Script_61416: .asm_61426 xor a ; SPRITE_FACING_DOWN .asm_61427 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a jp SetSpriteFacingDirectionAndDelay SSAnne2Script1: @@ -94,7 +94,7 @@ SSAnne2Script1: xor a ld [wJoyIgnore], a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, OPP_SONY2 @@ -129,10 +129,10 @@ SSAnne2Script2: ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wXCoord] cp $25 @@ -143,7 +143,7 @@ SSAnne2Script2: ld de, MovementData_614b7 .asm_6149a ld a, $2 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a diff --git a/scripts/SSAnneKitchen.asm b/scripts/SSAnneKitchen.asm index 7334cc69..969c6b7f 100755 --- a/scripts/SSAnneKitchen.asm +++ b/scripts/SSAnneKitchen.asm @@ -39,7 +39,7 @@ SSAnne6Text7: text_asm ld hl, SSAnne6Text_61807 call PrintText - ld a, [hRandomAdd] + ldh a, [hRandomAdd] bit 7, a jr z, .asm_93eb1 ld hl, SSAnne6Text_6180c diff --git a/scripts/SafariZoneGate.asm b/scripts/SafariZoneGate.asm index 76f4faa6..eb49ba8d 100755 --- a/scripts/SafariZoneGate.asm +++ b/scripts/SafariZoneGate.asm @@ -18,12 +18,12 @@ SafariZoneGate_ScriptPointers: call ArePlayerCoordsInArray ret nc ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, SPRITE_FACING_RIGHT ld [wSpritePlayerStateData1FacingDirection], a ld a, [wCoordIndex] @@ -52,11 +52,11 @@ SafariZoneGate_ScriptPointers: ret nz .SafariZoneEntranceScript2 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a call UpdateSprites ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -81,7 +81,7 @@ SafariZoneGate_ScriptPointers: ld a, $f0 ld [wJoyIgnore], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wNumSafariBalls], a @@ -93,7 +93,7 @@ SafariZoneGate_ScriptPointers: jr .asm_75286 .asm_7527f ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_75286 ret @@ -153,11 +153,11 @@ SafariZoneGate_TextPointers: and a jp nz, .PleaseComeAgain xor a - ld [hMoney], a + ldh [hMoney], a ld a, $05 - ld [hMoney + 1], a + ldh [hMoney + 1], a ld a, $00 - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .success ld hl, .NotEnoughMoneyText diff --git a/scripts/SaffronGym.asm b/scripts/SaffronGym.asm index 88a76253..5f4045ac 100755 --- a/scripts/SaffronGym.asm +++ b/scripts/SaffronGym.asm @@ -44,20 +44,20 @@ SaffronGymScript3: SaffronGymText_5d068: ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_SABRINA lb bc, TM_PSYWAVE, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM46 jr .gymVictory .BagFull ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -171,7 +171,7 @@ SaffronGymText1: ld hl, SaffronGymText_5d167 ld de, SaffronGymText_5d167 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/SilphCo10F.asm b/scripts/SilphCo10F.asm index 140584f1..8fa53319 100755 --- a/scripts/SilphCo10F.asm +++ b/scripts/SilphCo10F.asm @@ -28,7 +28,7 @@ SilphCo10GateCoords: db $FF SilphCo10Text_5a176: - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm index a2c540fe..4b54bf48 100755 --- a/scripts/SilphCo11F.asm +++ b/scripts/SilphCo11F.asm @@ -35,7 +35,7 @@ SilphCo11Script_62137: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_62143 ld a, [hli] @@ -60,11 +60,11 @@ SilphCo11Script_62137: ret .asm_6215f xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo11Script_62163: - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR @@ -171,14 +171,14 @@ SilphCo11Script0: ld a, [wCoordIndex] ld [wcf0d], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_62216 call MoveSprite @@ -199,9 +199,9 @@ MovementData_62216: SilphCo11Script_6221a: ld [wPlayerMovingDirection], a ld a, $3 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, b - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay SilphCo11Script5: @@ -222,7 +222,7 @@ SilphCo11Script5: ld a, $f0 ld [wJoyIgnore], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack call SilphCo11Script_6216d @@ -239,7 +239,7 @@ SilphCo11Script3: bit 0, a ret nz ld a, $3 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wcf0d] cp $1 @@ -263,7 +263,7 @@ SilphCo11Script4: ld hl, SilphCo10Text_62330 ld de, SilphCo10Text_62330 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/SilphCo2F.asm b/scripts/SilphCo2F.asm index 212d0b90..42e5a7e6 100755 --- a/scripts/SilphCo2F.asm +++ b/scripts/SilphCo2F.asm @@ -45,7 +45,7 @@ SilphCo2Script_59d43: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_59d4f ld a, [hli] @@ -70,12 +70,12 @@ SilphCo2Script_59d43: ret .asm_59d6b xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo2Script_59d6f: EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm index ddd40048..2a086708 100755 --- a/scripts/SilphCo3F.asm +++ b/scripts/SilphCo3F.asm @@ -39,7 +39,7 @@ SilphCo3GateCoords: SilphCo3Script_59fad: EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 diff --git a/scripts/SilphCo4F.asm b/scripts/SilphCo4F.asm index 523336c0..e148447b 100755 --- a/scripts/SilphCo4F.asm +++ b/scripts/SilphCo4F.asm @@ -45,7 +45,7 @@ SilphCo4Script_19d5d: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_19d69 ld a, [hli] @@ -70,12 +70,12 @@ SilphCo4Script_19d5d: ret .asm_19d85 xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo4Script_19d89: EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 diff --git a/scripts/SilphCo5F.asm b/scripts/SilphCo5F.asm index 653390c7..4d4f6ab6 100755 --- a/scripts/SilphCo5F.asm +++ b/scripts/SilphCo5F.asm @@ -49,7 +49,7 @@ SilphCo5GateCoords: SilphCo5Script_19f9e: EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 diff --git a/scripts/SilphCo6F.asm b/scripts/SilphCo6F.asm index 0d393b6e..30a0d83e 100755 --- a/scripts/SilphCo6F.asm +++ b/scripts/SilphCo6F.asm @@ -28,7 +28,7 @@ SilphCo6GateCoords: db $FF SilphCo6Script_1a1e6: - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm index 966a18d9..e7032760 100755 --- a/scripts/SilphCo7F.asm +++ b/scripts/SilphCo7F.asm @@ -55,7 +55,7 @@ SilphCo7Text_51bc8: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_51bd4 ld a, [hli] @@ -80,12 +80,12 @@ SilphCo7Text_51bc8: ret .asm_51bf0 xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo7Text_51bf4: EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -125,7 +125,7 @@ SilphCo7Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, PLAYER_DIR_DOWN @@ -137,10 +137,10 @@ SilphCo7Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $9 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_51c7d ld a, [wCoordIndex] @@ -150,7 +150,7 @@ SilphCo7Script0: inc de .asm_51c6c ld a, $9 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $3 jp SilphCo7Text_51c10 @@ -174,7 +174,7 @@ SilphCo7Script3: xor a ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld hl, wd72d @@ -212,12 +212,12 @@ SilphCo7Script4: ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a ld a, $9 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a @@ -230,7 +230,7 @@ SilphCo7Script4: ld de, MovementData_51d1a .asm_51d0e ld a, $9 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call MoveSprite ld a, $5 jp SilphCo7Text_51c10 diff --git a/scripts/SilphCo8F.asm b/scripts/SilphCo8F.asm index 71e529a6..0a10781e 100755 --- a/scripts/SilphCo8F.asm +++ b/scripts/SilphCo8F.asm @@ -35,7 +35,7 @@ SilphCo8Script_56541: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_5654d ld a, [hli] @@ -60,11 +60,11 @@ SilphCo8Script_56541: ret .asm_56569 xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo8Script_5656d: - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR diff --git a/scripts/SilphCo9F.asm b/scripts/SilphCo9F.asm index e1676bf2..7889e8f7 100755 --- a/scripts/SilphCo9F.asm +++ b/scripts/SilphCo9F.asm @@ -65,7 +65,7 @@ SilphCo9Script_5d837: ld a, [hl] ld c, a xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_5d843 ld a, [hli] @@ -90,12 +90,12 @@ SilphCo9Script_5d837: ret .asm_5d85f xor a - ld [hUnlockedSilphCoDoors], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo9Script_5d863: EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 - ld a, [hUnlockedSilphCoDoors] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 diff --git a/scripts/TradeCenter.asm b/scripts/TradeCenter.asm index e7fa8ac8..b91996e0 100755 --- a/scripts/TradeCenter.asm +++ b/scripts/TradeCenter.asm @@ -1,14 +1,14 @@ TradeCenter_Script: call EnableAutoTextBoxDrawing - ld a, [hSerialConnectionStatus] + ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ld a, SPRITE_FACING_LEFT jr z, .next ld a, SPRITE_FACING_RIGHT .next - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [hSpriteIndex], a + ldh [hSpriteIndex], a call SetSpriteFacingDirection ld hl, wd72d bit 0, [hl] @@ -21,7 +21,7 @@ TradeCenter_Script: ld [hl], a ld a, SPRITE_FACING_LEFT ld [wSprite01StateData1FacingDirection], a - ld a, [hSerialConnectionStatus] + ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z ld a, $7 diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm index 127ee16a..9178cd65 100755 --- a/scripts/VermilionCity.asm +++ b/scripts/VermilionCity.asm @@ -15,7 +15,7 @@ VermilionCity_Script: .setFirstLockTrashCanIndex call Random - ld a, [hRandomSub] + ldh a, [hRandomSub] and $e ld [wFirstLockTrashCanIndex], a ret @@ -45,10 +45,10 @@ VermilionCityScript0: call ArePlayerCoordsInArray ret nc xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wcf0d], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckEvent EVENT_SS_ANNE_LEFT jr nz, .shipHasDeparted @@ -98,7 +98,7 @@ VermilionCityScript3: ret nz xor a ld [wJoyIgnore], a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $0 ld [wVermilionCityCurScript], a ret diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index 2c39bdb8..d1a60988 100755 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -57,12 +57,12 @@ VermilionDock_1db9b: ld a, $14 ; water tile call FillMemory ld a, 1 - ld [hAutoBGTransferEnabled], a + ldh [hAutoBGTransferEnabled], a call Delay3 xor a - ld [hAutoBGTransferEnabled], a + ldh [hAutoBGTransferEnabled], a ld [wSSAnneSmokeDriftAmount], a - ld [rOBP1], a + ldh [rOBP1], a ld a, 88 ld [wSSAnneSmokeX], a ld hl, wMapViewVRAMPointer @@ -104,11 +104,11 @@ VermilionDock_1db9b: dec e jr nz, .asm_1dbfa xor a - ld [rWY], a - ld [hWY], a + ldh [rWY], a + ldh [hWY], a call VermilionDock_EraseSSAnne ld a, $90 - ld [hWY], a + ldh [hWY], a ld a, $1 ld [wUpdateSpritesEnabled], a pop hl @@ -167,13 +167,13 @@ VermilionDock_1dc7c: ld h, $0 ld l, $80 .asm_1dc86 - ld a, [rLY] + ldh a, [rLY] cp l jr nz, .asm_1dc86 ld a, h - ld [rSCX], a + ldh [rSCX], a .asm_1dc8e - ld a, [rLY] + ldh a, [rLY] cp h jr z, .asm_1dc8e ret diff --git a/scripts/VermilionGym.asm b/scripts/VermilionGym.asm index 10967cbe..45b200e2 100755 --- a/scripts/VermilionGym.asm +++ b/scripts/VermilionGym.asm @@ -63,20 +63,20 @@ VermilionGymLTSurgePostBattle: VermilionGymReceiveTM24: ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_LT_SURGE lb bc, TM_THUNDERBOLT, 1 call GiveItem jr nc, .BagFull ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM24 jr .gymVictory .BagFull ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -150,14 +150,14 @@ LTSurgeText: ld hl, ReceivedThunderbadgeText ld de, ReceivedThunderbadgeText call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ; set script index to LT Surge post-battle script ld [wVermilionGymCurScript], a ld [wCurMapScript], a diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm index 2a86374e..62d98c4c 100755 --- a/scripts/ViridianCity.asm +++ b/scripts/ViridianCity.asm @@ -30,10 +30,10 @@ ViridianCityScript_1900b: cp $20 ret nz ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call ViridianCityScript_190cf ld a, $3 ld [wViridianCityCurScript], a @@ -49,10 +49,10 @@ ViridianCityScript_1903d: cp $13 ret nz ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call ViridianCityScript_190cf ld a, $3 ld [wViridianCityCurScript], a @@ -60,13 +60,13 @@ ViridianCityScript_1903d: ViridianCityScript1: ld a, [wSprite03StateData1YPixels] - ld [hSpriteScreenYCoord], a + ldh [hSpriteScreenYCoord], a ld a, [wSprite03StateData1XPixels] - ld [hSpriteScreenXCoord], a + ldh [hSpriteScreenXCoord], a ld a, [wSprite03StateData2MapY] - ld [hSpriteMapYCoord], a + ldh [hSpriteMapYCoord], a ld a, [wSprite03StateData2MapX] - ld [hSpriteMapXCoord], a + ldh [hSpriteMapXCoord], a xor a ld [wListScrollOffset], a @@ -82,20 +82,20 @@ ViridianCityScript1: ret ViridianCityScript2: - ld a, [hSpriteScreenYCoord] + ldh a, [hSpriteScreenYCoord] ld [wSprite03StateData1YPixels], a - ld a, [hSpriteScreenXCoord] + ldh a, [hSpriteScreenXCoord] ld [wSprite03StateData1XPixels], a - ld a, [hSpriteMapYCoord] + ldh a, [hSpriteMapYCoord] ld [wSprite03StateData2MapY], a - ld a, [hSpriteMapXCoord] + ldh a, [hSpriteMapXCoord] ld [wSprite03StateData2MapX], a call UpdateSprites call Delay3 xor a ld [wJoyIgnore], a ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wBattleType], a diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm index 05430332..fafc6388 100755 --- a/scripts/ViridianGym.asm +++ b/scripts/ViridianGym.asm @@ -138,20 +138,20 @@ ViridianGymScript3: ld [wJoyIgnore], a ViridianGymScript3_74995: ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI lb bc, TM_FISSURE, 1 call GiveItem jr nc, .BagFull ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM27 jr .gymVictory .BagFull ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges @@ -289,7 +289,7 @@ ViridianGymText1: ld hl, ViridianGymText_74ad3 ld de, ViridianGymText_74ad3 call SaveEndBattleTextPointers - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters diff --git a/scripts/ViridianMart.asm b/scripts/ViridianMart.asm index 09ddfda9..ea1c373f 100755 --- a/scripts/ViridianMart.asm +++ b/scripts/ViridianMart.asm @@ -27,7 +27,7 @@ ViridianMart_ScriptPointers: ViridianMartScript0: call UpdateSprites ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement1d4bb @@ -50,7 +50,7 @@ ViridianMartScript1: ret nz call Delay3 ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID lb bc, OAKS_PARCEL, 1 call GiveItem diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm index 474ba320..1cb68cf9 100755 --- a/scripts/WardensHouse.asm +++ b/scripts/WardensHouse.asm @@ -32,7 +32,7 @@ FuchsiaHouse2Text1: ld hl, WardenTeethText1 call PrintText ld a, GOLD_TEETH - ld [hItemToRemoveID], a + ldh [hItemToRemoveID], a callba RemoveItemByID SetEvent EVENT_GAVE_GOLD_TEETH .asm_60cba @@ -95,7 +95,7 @@ HM04NoRoomText: FuchsiaHouse2Text5: FuchsiaHouse2Text4: text_asm - ld a, [hSpriteIndex] + ldh a, [hSpriteIndex] cp $4 ld hl, FuchsiaHouse2Text_7517b jr nz, .asm_4c9a2 |