; either draws a wall or an open space
; depending on the door state
map_full_draw_far_center:
+ ld de, player
map_load_march_vec dir_vector_forward
ld a, 1
- ld de, player
call map_get_tile_march
; hl = tile ahead
ld de, t_flags0
add hl, de
+
+ ; load forward direction bit
ld b, [hl]
ld a, [dir_tf_forward]
and a, b ; mask out forward door bit
ld a, 3
jp tiles_block_copy
@no_door:
-
ld hl, render_buffer + RENDER_BUF_W * 5 + 8
ld de, far_center_wall
ld bc, RENDER_BUF_W - 4
ld a, 3
jp tiles_block_copy
+
+
+ ; draws a near wall or doo
+map_full_draw_near_center:
+ ; near is just the current tile, no need for march load
+ ld a, [player+act_pos_y]
+ ld b, a
+ ld a, [player+act_pos_x]
+ ld c, a
+ call map_get_tile
+ ; hl = tile
+ ld de, t_flags0
+
+ ; get forward direction flag
+ add hl, de
+ ld b, [hl]
+ ld a, [dir_tf_forward]
+
+ ret z ; do nothing if there is an opening
+
+@no_door:
+ ret
+
; draws a full map copy into the current map view buffer
; based on the current location the player is facing
; either draw a wall or a door ahead
call map_full_draw_far_center
+ ; draw near wall or door
+ call map_full_draw_near_center
+
@done:
call minimap_full_draw