Removed unused collision code
authorLukas Krickl <lukas@krickl.dev>
Sun, 17 Nov 2024 07:39:29 +0000 (08:39 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 17 Nov 2024 07:39:29 +0000 (08:39 +0100)
TODO.md
src/collision.s

diff --git a/TODO.md b/TODO.md
index ff2e778b12583af6ec12d2c67d25789ebd459cf0..befbea1ec236461f1015f4d4734169a4735afcde 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -6,6 +6,10 @@
 - PLayer moves from one tile to another 
 - Let animations play and then update AI actors after player move 
 - Collision can then only use a single coordinate to check 
+- Animation system:
+    - while an animation is playing the game is stopped
+    - animations are queued in an animation queue with some simple parameters 
+
 
 ## dungeon generator 
 
index 32abae45b48fdf4758bd5d103ece4d46809a82d5..56f18692a951587b42ff74bdef0f42c7598b3ae4 100644 (file)
@@ -178,50 +178,3 @@ collision_tile:
 
   ret
 
-  ; this macro executes the copy-pasted code for each point of the rectangle 
-  ; inputs:
-  ;   $1: c/nc -> indicate greater or less than for y 
-  ;   $2: c/nc -> indicate greater or less than for x 
-  ;   $3: jump target if no collision occured (relative label) 
-#macro collision_pt_rec_check
-  ; -> y pos 
-  ld a, [hl+]
-  add a, b ; a = rec y + y offset 
-  cp a, d ; cp tl  py?
-  jr $1, $3 REL 
-
-  ; -> x pos
-  ld a, [hl+]
-  add a, c ; a = rec x + x offset 
-  cp a, e ; cp t1  px?
-  jr $2, $3 REL
-#endmacro 
-
-  ; check collision between
-  ; a point and a provided rectangle 
-  ; inputs:
-  ;   d: point y
-  ;   e: point x
-  ;   b: rec y
-  ;   c: rec x
-  ;  hl: ptr to point 0-3 in the rectangle 
-  ;      in this order:
-  ;       top left, top right
-  ;       bottom left, bottom right
-  ;  returns:
-  ;    a = 0 -> no collision
-  ;    a = 1 -> collision
-collision_pt_rec:
-@top_left:
-  collision_pt_rec_check nc, nc, @no_collision
-@top_right:
-  collision_pt_rec_check nc, c, @no_collision
-@bottom_left:
-  collision_pt_rec_check c, nc, @no_collision
-@bottom_right:
-  collision_pt_rec_check c, c, @no_collision
-@collision:
-  ld a, 1
-@no_collision:
-  xor a, a
-  ret