summaryrefslogtreecommitdiff
path: root/scripts/PalletTown.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
commit772fcc7588a4e1fbe146a02b429cf64282c81dcb (patch)
treef491fa1d38e37ab10534b3f18422e0149ad0deca /scripts/PalletTown.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
Specify the ldh instruction, don't turn ld into ldh
Diffstat (limited to 'scripts/PalletTown.asm')
-rwxr-xr-xscripts/PalletTown.asm18
1 files changed, 9 insertions, 9 deletions
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