diff options
| author | Yoann Fievez <yoann.fievez@gmail.com> | 2026-06-24 20:43:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-24 14:43:48 -0400 |
| commit | d150f7f4f49e9dda08c52199159b30ae9b4f00e8 (patch) | |
| tree | e0c81ae315ccdf2952c10713312427f2c55e1fea /home | |
| parent | Use OAM constants and decimal coordinates in surfing_pikachu_oam.asm (#157) (diff) | |
| download | pokeyellow-d150f7f4f49e9dda08c52199159b30ae9b4f00e8.tar.gz pokeyellow-d150f7f4f49e9dda08c52199159b30ae9b4f00e8.tar.xz pokeyellow-d150f7f4f49e9dda08c52199159b30ae9b4f00e8.zip | |
Identify `wPikachuSpawnStateFlags` and `wPikachuMapScriptFlags` bits, and `PIKAMOVEMENT_*` constants (#158)
- Rename `wd471` to` wPikachuSpawnStateFlags`, with `BIT_PIKACHU_SPAWN_*` bits
- Rename `wd492` to `wPikachuMapScriptFlags`, with `BIT_PIKACHU_MAP_*` bits
- Introduce `PIKAMOVEMENT_*` constants for `ApplyPikachuMovementData`
- Refactor `BillsHouse` scripts and Pikachu/Bill movement data
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) |
