; check if the player is currently
; on a convered tile or not
push de
+
+ ; first read the current tile
call unit_get_pos
call map_get_tile
+ push af ; store for later use
+
; a = tile flags
and a, CF_COVERED
ld b, a
and a, (~CF_COVERED) & 0xFF
or a, b
ld [player_rt_special_flags], a
+ pop af ; get back a for next check
pop de
+
+ ; check if player is on a door tile
+ ; if so, remove door and queue a map redraw
+ and a, CF_DOOR
+ call nz, unit_player_remove_door
; check for exit flags
push de
ret
+
+ ; removes the door tile the player is currently
+ ; standing on
+ ; inputs:
+ ; de: actor
+unit_player_remove_door:
+ ; TODO: remove door tile, door flag
+ ; and redraw map
+ ret
; checks the current tile
; and checks for exit flags