projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
099ff72
)
Added stub for point/rectangle collision
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 28 Oct 2024 04:50:22 +0000
(
05:50
+0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 28 Oct 2024 04:50:22 +0000
(
05:50
+0100)
src/collision.s
patch
|
blob
|
history
diff --git
a/src/collision.s
b/src/collision.s
index 875a9cf34f9964c82ac76e6ebc05e43ca9789044..232f69d9019e9d2455d41add78a0fcaeb9b31d75 100644
(file)
--- a/
src/collision.s
+++ b/
src/collision.s
@@
-163,3
+163,15
@@
collision_tile:
and a, d
ret
+
+ ; check collision between
+ ; a point and a provided rectangle
+ ; inputs:
+ ; d: py y
+ ; e: pt x
+ ; bc: ptr to point 0-3 in the rectangle
+ ; returns:
+ ; a = 0 -> no collision
+ ; a = 1 -> collision
+collision_pt_rec:
+ ret