diff options
| author | Rangi42 <remy.oukaour+rangi42@gmail.com> | 2023-11-20 18:53:23 -0500 |
|---|---|---|
| committer | Rangi42 <remy.oukaour+rangi42@gmail.com> | 2023-11-20 18:53:23 -0500 |
| commit | 77887be2512b4b8af688dc4552bdb4490d35e65b (patch) | |
| tree | 126dbe7e52876690b9970869c554de83ec093e9c /scripts/Route22.asm | |
| parent | Add `bigdw` and `dc` data macros (diff) | |
| download | pokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.tar.gz pokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.tar.xz pokeyellow-77887be2512b4b8af688dc4552bdb4490d35e65b.zip | |
Identify `wSavedCoordIndex` and its other usages
Diffstat (limited to 'scripts/Route22.asm')
| -rw-r--r-- | scripts/Route22.asm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scripts/Route22.asm b/scripts/Route22.asm index abf6c8e4..1e575e43 100644 --- a/scripts/Route22.asm +++ b/scripts/Route22.asm @@ -38,7 +38,7 @@ Route22GetRivalTrainerNoByStarterScript: Route22MoveRivalRightScript: ld de, Route22RivalMovementData - ld a, [wcf0d] + ld a, [wSavedCoordIndex] cp $1 jr z, .skip_first_right inc de @@ -62,7 +62,7 @@ Route22DefaultScript: call ArePlayerCoordsInArray ret nc ld a, [wCoordIndex] - ld [wcf0d], a + ld [wSavedCoordIndex], a xor a ldh [hJoyHeld], a ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN @@ -107,8 +107,8 @@ Route22Rival1StartBattleScript: ld a, [wd730] bit 0, a ret nz - ld a, [wcf0d] - cp $1 + ld a, [wSavedCoordIndex] + cp 1 ; index of second, lower entry in Route22DefaultScript.Route22RivalBattleCoords jr nz, .set_rival_facing_right ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a @@ -172,8 +172,8 @@ Route22Rival1AfterBattleScript: ld [wNewSoundID], a call PlaySound farcall Music_RivalAlternateStart - ld a, [wcf0d] - cp $1 + ld a, [wSavedCoordIndex] + cp 1 ; index of second, lower entry in Route22DefaultScript.Route22RivalBattleCoords jr nz, .exit_movement_2 call .RivalExit1Script jr .next_script @@ -263,8 +263,8 @@ Route22Rival2StartBattleScript: ret nz ld a, ROUTE22_RIVAL2 ldh [hSpriteIndex], a - ld a, [wcf0d] - cp $1 + ld a, [wSavedCoordIndex] + cp 1 ; index of second, lower entry in Route22DefaultScript.Route22RivalBattleCoords jr nz, .set_player_direction_left ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a @@ -307,8 +307,8 @@ Route22Rival2AfterBattleScript: jp z, Route22SetDefaultScript ld a, ROUTE22_RIVAL2 ldh [hSpriteIndex], a - ld a, [wcf0d] - cp $1 + ld a, [wSavedCoordIndex] + cp 1 ; index of second, lower entry in Route22DefaultScript.Route22RivalBattleCoords jr nz, .set_player_direction_left ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a @@ -331,8 +331,8 @@ Route22Rival2AfterBattleScript: ld [wNewSoundID], a call PlaySound farcall Music_RivalAlternateStartAndTempo - ld a, [wcf0d] - cp $1 + ld a, [wSavedCoordIndex] + cp 1 ; index of second, lower entry in Route22DefaultScript.Route22RivalBattleCoords jr nz, .exit_movement_2 call .RivalExit1Script jr .next_script |
