aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/FightingDojo.asm
diff options
context:
space:
mode:
authorRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 18:53:23 -0500
committerRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 18:53:23 -0500
commit77887be2512b4b8af688dc4552bdb4490d35e65b (patch)
tree126dbe7e52876690b9970869c554de83ec093e9c /scripts/FightingDojo.asm
parentAdd `bigdw` and `dc` data macros (diff)
downloadpokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.tar.gz
pokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.tar.xz
pokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.zip
Identify `wSavedCoordIndex` and its other usages
Diffstat (limited to 'scripts/FightingDojo.asm')
-rw-r--r--scripts/FightingDojo.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm
index 298c2fcb..d434f681 100644
--- a/scripts/FightingDojo.asm
+++ b/scripts/FightingDojo.asm
@@ -32,15 +32,15 @@ FightingDojoDefaultScript:
ret nz
xor a
ldh [hJoyHeld], a
- ld [wcf0d], a
+ ld [wSavedCoordIndex], a
ld a, [wYCoord]
cp 3
ret nz
ld a, [wXCoord]
cp 4
ret nz
- ld a, $1
- ld [wcf0d], a
+ ld a, 1
+ ld [wSavedCoordIndex], a
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a
ld a, FIGHTINGDOJO_KARATE_MASTER
@@ -57,8 +57,8 @@ FightingDojoKarateMasterPostBattleScript:
ld a, [wIsInBattle]
cp $ff
jp z, FightingDojoResetScripts
- ld a, [wcf0d]
- and a
+ ld a, [wSavedCoordIndex]
+ and a ; nz if the player was at (4, 3), left of the Karate Master
jr z, .already_facing
ld a, PLAYER_DIR_RIGHT
ld [wPlayerMovingDirection], a