map: removed map_set and map_unset_flag
authorLukas Krickl <lukas@krickl.dev>
Tue, 14 Jan 2025 05:07:50 +0000 (06:07 +0100)
committerLukas Krickl <lukas@krickl.dev>
Tue, 14 Jan 2025 05:07:50 +0000 (06:07 +0100)
src/map.s
src/player.s
src/wram.s

index 9f2be4dad629b341d302999cab9ada6da4f3bb22..9b96ef96513b0915855edf91f34faf4d3aa83bce 100644 (file)
--- a/src/map.s
+++ b/src/map.s
@@ -429,35 +429,6 @@ room_get_flag_ptr:
   add hl, de ; hl + de 
   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:
-  ld b, a
-  call room_get_flag_ptr
-  ld a, [hl]
-  or a, b
-  ld [hl], a
-
-  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:
-  ld b, a
-  call room_get_flag_ptr
-  ld a, [hl]
-  xor a, b
-  ld [hl], a
-  ret
-
   ; gets flags at a certain position
   ; applies a mask
   ; inputs:
index 3c6ac56982334808f2f4a1fc83aa56b5fef4a089..fd75f7be85c449fcc420ca0ea2dc3c239a84bb31 100644 (file)
@@ -101,7 +101,7 @@ player_update:
 @no_anim:
 
   ; set collision mask
-  ld a, RF_WALL | RF_DOOR 
+  ld a, RF_WALL | RF_DOOR | RF_ACTOR
   ld [ct_mask], a
   
   ; anim_target_y = y movement target 
index d85cdf23d061554ba702c7b199acd4a8b42802ce..58e3e264148ca20127c88fac567bfc6a65f3a734 100644 (file)
@@ -125,7 +125,8 @@ damage_anim: .adv 1
   ; need to look up the actor in question by
   ; iterating over the actor table + player 
   ; and checking each position
-  ; TODO: maybe add an actor lookup table for each tile
+  ; note: if RF_ACTOR is set the highest 4 bits of RF flags will
+  ;       be set to the actor's id
 .de RF_ACTOR, 4
 
   ; current room struct