actor: Added center collision point
authorLukas Krickl <lukas@krickl.dev>
Sat, 6 Dec 2025 04:53:06 +0000 (05:53 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sat, 6 Dec 2025 04:53:06 +0000 (05:53 +0100)
src/player.s
src/wram.s

index 875700137f6550d58161ed99ece0c96287d9c50a..0dc8702e3982c85675b80fce04e8e8b2f4fa7e93 100644 (file)
@@ -51,6 +51,14 @@ player_col_write_points:
        add a, 16
        ld [col_point_br+1], a
 
+       ; center point
+       ld a, b
+       add a, 8
+       ld [col_point_ct], a
+       ld a, c
+       add a, 4
+       ld [col_point_ct+1], a
+
        ret
 
        ; updates the special player actor
index bc45e76ead16c5c22e7ecbc4b9aa11871f949563..aa5b2210eecc9a783c229e8c71ea3f98f999816e 100644 (file)
@@ -96,6 +96,9 @@ col_point_tl: .adv 2
 col_point_tr: .adv 2
 col_point_bl: .adv 2
 col_point_br: .adv 2
+       ; center point of the actor
+       ; this is used to check for actor -> actor collision
+col_point_ct: .adv 2
        ; direction the movement is happening 
        ; in. this is required so that the collision code
        ; can handle pushbacks in case of wall collision