diff options
author | Astatin <[email protected]> | 2024-11-18 16:58:13 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2024-11-18 16:58:13 +0900 |
commit | ea4a115b8e640d5d17014a50fd3199ba4cc6494f (patch) | |
tree | 39bfe1c418c46445951ba9854708928f0cc027a7 /entity/display.gbasm | |
parent | 0a979fabc9c770834ed90e02758aadea51c889a8 (diff) |
Check collisions on hop and cancel if collision
Diffstat (limited to 'entity/display.gbasm')
-rw-r--r-- | entity/display.gbasm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/entity/display.gbasm b/entity/display.gbasm index ce176a4..8b5f110 100644 --- a/entity/display.gbasm +++ b/entity/display.gbasm @@ -208,6 +208,29 @@ Display_Entity: LD C, A Display_Entity.SuperJump_Animation.end: + Display_Entity.Shaking_Animation: + LD A, D + AND $f0 + CP $40 + JR NZ, =Display_Entity.Shaking_Animation.end + + LD A, $mem_moving_animation_step + CP $00 + JR Z, =Display_Entity.Shaking_Animation.end + LD A, $mem_moving_animation_step + SRA A + AND $03 + BIT 1, A + RES 1, A + JR NZ, =Display_Entity.Shaking_Animation.skip_invert + CPL + INC A + Display_Entity.Shaking_Animation.skip_invert: + DBG + ADD B + LD B, A + Display_Entity.Shaking_Animation.end: + Display_Entity.Moving_Hops: LD A, D AND $f8 |