diff options
Diffstat (limited to 'engine/events/try_pikachu_movement.asm')
-rw-r--r-- | engine/events/try_pikachu_movement.asm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engine/events/try_pikachu_movement.asm b/engine/events/try_pikachu_movement.asm new file mode 100644 index 00000000..70cf65b4 --- /dev/null +++ b/engine/events/try_pikachu_movement.asm @@ -0,0 +1,27 @@ +TryApplyPikachuMovementData:: + ld a, [wd472] + bit 7, 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 + callfar RefreshPikachuFollow + ret |