WIP: flag setting for maps
authorLukas Krickl <lukas@krickl.dev>
Mon, 2 Dec 2024 05:01:25 +0000 (06:01 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 2 Dec 2024 05:01:25 +0000 (06:01 +0100)
src/map.s
src/wram.s

index 8d25df4ec102fcde343c30fd82df95c07ba7ba44..41acf8974c6f454ed3deb82f1d2530a9e06aa4ff 100644 (file)
--- a/src/map.s
+++ b/src/map.s
@@ -195,6 +195,24 @@ room_draw:
 
   ret
 
+  ; sets a tile position flag
+  ; as a flag  
+  ; for actor -> actor collision detection 
+  ; inputs:
+  ;   a: the flag to set (flags | a)
+  ;  de: y/x
+room_set_flag:
+  ret
+
+  ; unsets a tile position flag
+  ; as a flag  
+  ; for actor -> actor collision detection 
+  ; inputs:
+  ;   a: the flag to set (flags ^ a)
+  ;  de: y/x
+room_unset_flag:
+    ret
+
   ; base room 
   ; this can be copied and modified 
   ; by the map gen
index f7f36fe6de475918f423daf150330345ee4d6153..365095a4554273bc1335cec48cf0585315fe7544 100644 (file)
@@ -92,6 +92,8 @@ damage_anim: .adv 1
 ; room flags
 .se 1
 .de RF_WALL, 1
+.de RF_ACTOR, 2
+.de RF_DOOR, 4
 
   ; current room struct 
   ; same layout as room struct itself