From 1c874e83d671fa0910ae4b666c0b58438b6dde1c Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 6 Dec 2025 05:53:06 +0100 Subject: [PATCH] actor: Added center collision point --- src/player.s | 8 ++++++++ src/wram.s | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/player.s b/src/player.s index 8757001..0dc8702 100644 --- a/src/player.s +++ b/src/player.s @@ -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 diff --git a/src/wram.s b/src/wram.s index bc45e76..aa5b221 100644 --- a/src/wram.s +++ b/src/wram.s @@ -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 -- 2.30.2