aboutsummaryrefslogtreecommitdiff
path: root/entity/display.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-11-14 19:05:56 +0900
committerAstatin <[email protected]>2024-11-14 19:05:56 +0900
commitcfd36cc6a11923c8863b699e70b90149ad1c731a (patch)
tree1adb07333cb0bba92812cda105a4b2db2fc89fd8 /entity/display.gbasm
parent8a9209f59366c70da07c87e31d21ea0d4754bc84 (diff)
[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)
Diffstat (limited to 'entity/display.gbasm')
-rw-r--r--entity/display.gbasm37
1 files changed, 32 insertions, 5 deletions
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: