mirror of
https://github.com/pret/pokeyellow.git
synced 2026-09-26 13:23:04 -04:00
d150f7f4f4
- 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
29 lines
474 B
NASM
29 lines
474 B
NASM
MtMoonB2FScript_ApplyPikachuMovementData:
|
|
ld a, [wPikachuSpawnStateFlags]
|
|
bit BIT_PIKACHU_SPAWN_STARTER, a
|
|
ret z
|
|
ld a, [wWalkBikeSurfState]
|
|
and a
|
|
ret nz
|
|
|
|
push hl
|
|
push bc
|
|
callfar GetPikachuFacingDirectionAndReturnToE
|
|
pop bc
|
|
pop hl
|
|
ld a, b
|
|
cp e
|
|
ret nz
|
|
|
|
push hl
|
|
ld a, [wUpdateSpritesEnabled]
|
|
push af
|
|
ld a, $ff
|
|
ld [wUpdateSpritesEnabled], a
|
|
callfar LoadPikachuShadowIntoVRAM
|
|
pop af
|
|
ld [wUpdateSpritesEnabled], a
|
|
pop hl
|
|
call ApplyPikachuMovementData
|
|
ret
|