From cfd36cc6a11923c8863b699e70b90149ad1c731a Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 14 Nov 2024 19:05:56 +0900 Subject: [WIP] Adding hop attack (still need to enable back the normal map loading, there seem to be an off by one error on the entity while hopping in a positive direction, still need to split the loading in multiple frame to not go out of VBlank) --- entity/display.gbasm | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'entity/display.gbasm') diff --git a/entity/display.gbasm b/entity/display.gbasm index 8a0daf1..ada77e2 100644 --- a/entity/display.gbasm +++ b/entity/display.gbasm @@ -77,7 +77,7 @@ Display_Entity: SUB C AND $0f SWAP A - ADD $02 + ADD $06 LD C, A LD A, $mem_map_loading_flags @@ -183,18 +183,45 @@ Display_Entity: .ADD_A_TO_DIRECTION_BC Display_Entity.Action_Animation.end: + Display_Entity.SuperJump_Animation: + LD A, D + AND $f0 + CP $30 + JR NZ, =Display_Entity.SuperJump_Animation.end + + LD A, $mem_moving_animation_step + CP $00 + JR Z, =Display_Entity.SuperJump_Animation.end + .ADD_A_TO_DIRECTION_BC + LD A, $mem_moving_animation_step + SUB $08 + .ABS + SLA A + CPL + INC A + ADD $16 + CPL + INC A + ADD C + LD C, A + Display_Entity.SuperJump_Animation.end: + Display_Entity.Moving_Hops: LD A, D - BIT 3, A - LD A, $00 - JR Z, =Display_Entity.Moving_Hops.not_moving + AND $f8 + CP $08 + JR NZ, =Display_Entity.Moving_Hops.end LD A, $mem_moving_animation_step - Display_Entity.Moving_Hops.not_moving: SUB $08 .ABS SUB $04 .ABS + CPL + INC A + ADD $04 + CPL + INC A ADD C LD C, A Display_Entity.Moving_Hops.end: -- cgit v1.2.3-70-g09d2