projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14eb007
)
actor: Added center collision point
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 6 Dec 2025 04:53:06 +0000
(
05:53
+0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 6 Dec 2025 04:53:06 +0000
(
05:53
+0100)
src/player.s
patch
|
blob
|
history
src/wram.s
patch
|
blob
|
history
diff --git
a/src/player.s
b/src/player.s
index 875700137f6550d58161ed99ece0c96287d9c50a..0dc8702e3982c85675b80fce04e8e8b2f4fa7e93 100644
(file)
--- 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 bc45e76ead16c5c22e7ecbc4b9aa11871f949563..aa5b2210eecc9a783c229e8c71ea3f98f999816e 100644
(file)
--- 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