aboutsummaryrefslogtreecommitdiff
path: root/entity/init.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-05-07 17:01:22 +0200
committerAstatin <[email protected]>2025-05-07 17:01:22 +0200
commit4b02238d88af30c98b2f8d44e5200fb80b04bcad (patch)
treed69861ff5fe1ebed41f9697335948bde512f10f4 /entity/init.gbasm
parent7284cc51dedb4f77fe6c1fa1da735b52609b1d4d (diff)
I was adding the frog and then broke everything to fix the viewport thingy
Diffstat (limited to 'entity/init.gbasm')
-rw-r--r--entity/init.gbasm16
1 files changed, 16 insertions, 0 deletions
diff --git a/entity/init.gbasm b/entity/init.gbasm
index afbd9f3..1e39456 100644
--- a/entity/init.gbasm
+++ b/entity/init.gbasm
@@ -129,6 +129,22 @@ Fix_Bunny_screen:
OR $08
LD $mem_prepared_viewport_y, A
+ LD A, $mem_bunny_direction
+ BIT 3, A
+ RET Z
+
+ LD A, $mem_bunny_direction
+ DEC A
+ XOR $01
+ INC A
+ LD D, A
+ LD A, $mem_viewport_x
+ LD B, A
+ LD A, $mem_viewport_y
+ LD C, A
+ LD A, $mem_moving_animation_step
+ .ADD_A_TO_DIRECTION_BC
+
RET
Initialize_Enemy: ; HL => pointer to entity struct