Added stub for point/rectangle collision
authorLukas Krickl <lukas@krickl.dev>
Mon, 28 Oct 2024 04:50:22 +0000 (05:50 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 28 Oct 2024 04:50:22 +0000 (05:50 +0100)
src/collision.s

index 875a9cf34f9964c82ac76e6ebc05e43ca9789044..232f69d9019e9d2455d41add78a0fcaeb9b31d75 100644 (file)
@@ -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