Bat actors now use direction constants for movement
authorLukas Krickl <lukas@krickl.dev>
Fri, 20 Dec 2024 10:02:31 +0000 (11:02 +0100)
committerLukas Krickl <lukas@krickl.dev>
Fri, 20 Dec 2024 10:02:31 +0000 (11:02 +0100)
src/actor.s

index b98bad31b1a0f7a27402c687beb6c826792603e1..d4b032ff5d3b7a99fa1f60057e11726e42f71641 100644 (file)
@@ -222,13 +222,13 @@ actor_update_bat:
   and a, 0b11 ; rnadom direction 0-3
   
   ; call correct movement setup
-  cp a, 0
+  cp a, NORTH
   call z, actor_up
-  cp a, 1
+  cp a, SOUTH
   call z, actor_down
-  cp a, 2
+  cp a, WEST
   call z, actor_left
-  cp a, 3
+  cp a, EAST
   call z, actor_right
 
   ; check anim collision