diff options
Diffstat (limited to 'home')
| -rw-r--r-- | home/map_objects.asm | 22 | ||||
| -rw-r--r-- | home/overworld.asm | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/home/map_objects.asm b/home/map_objects.asm index 3b1a1f08..2c275465 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -69,12 +69,12 @@ IsItemInBag:: ret IsSurfingPikachuInParty:: -; set bit 6 of wd471 if any Pikachu with Surf is in party -; set bit 7 of wd471 if starter Pikachu is in party (with or without Surf) +; set bit 6 of wPikachuSpawnStateFlags if any Pikachu with Surf is in party +; set bit 7 of wPikachuSpawnStateFlags if starter Pikachu is in party (with or without Surf) ; also performs a bankswitch to IsStarterPikachuAliveInOurParty - ld a, [wd471] - and $3f - ld [wd471], a + ld a, [wPikachuSpawnStateFlags] + and ~((1 << BIT_PIKACHU_SPAWN_STARTER) | (1 << BIT_PIKACHU_SPAWN_SURFING)) + ld [wPikachuSpawnStateFlags], a ld hl, wPartyMon1 ld c, PARTY_LENGTH ld b, SURF @@ -98,9 +98,9 @@ IsSurfingPikachuInParty:: cp b jr nz, .noSurf .hasSurf - ld a, [wd471] - set 6, a - ld [wd471], a + ld a, [wPikachuSpawnStateFlags] + set BIT_PIKACHU_SPAWN_SURFING, a + ld [wPikachuSpawnStateFlags], a .noSurf pop hl .notPikachu @@ -118,9 +118,9 @@ IsSurfingPikachuInParty:: pop bc pop hl ret nc - ld a, [wd471] - set 7, a - ld [wd471], a + ld a, [wPikachuSpawnStateFlags] + set BIT_PIKACHU_SPAWN_STARTER, a + ld [wPikachuSpawnStateFlags], a ret DisplayPokedex:: diff --git a/home/overworld.asm b/home/overworld.asm index 6fafe717..4586e5c0 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1752,8 +1752,8 @@ LoadSurfingPlayerSpriteGraphics2:: dec a jr z, .asm_0d7c .asm_0d75 - ld a, [wd471] - bit 6, a + ld a, [wPikachuSpawnStateFlags] + bit BIT_PIKACHU_SPAWN_SURFING, a jr z, LoadSurfingPlayerSpriteGraphics .asm_0d7c ld b, BANK(SurfingPikachuSprite) |
