From cdf06d6b0e98316d5200d60d7817692e7a07caf4 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Thu, 1 Jan 2026 17:32:11 +0100 Subject: [PATCH] update: actors now do not render anymore when the path is blocked. --- src/player.s | 2 ++ src/update.s | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/player.s b/src/player.s index 6972297..18b8e19 100644 --- a/src/player.s +++ b/src/player.s @@ -84,6 +84,8 @@ player_attack: ; TODO: implement correctly ; for now just remove an actor if ; they are near + + ; TODO: check if player can reach tile ld de, player map_load_march_vec dir_vector_forward diff --git a/src/update.s b/src/update.s index 3dc92ec..d763be2 100644 --- a/src/update.s +++ b/src/update.s @@ -26,6 +26,7 @@ update_game_over: or a, e ; check if it is null call nz, act_draw_$2 pop hl + push hl ; load t_prop ld de, t_prop @@ -35,6 +36,15 @@ update_game_over: ld d, a or a, e ; check if it is null call nz, act_draw_$2 + + pop hl + ; check if we can go forward one more time + ; if not jump to @done_act_draw + ld de, t_flags0 + ld b, [hl] + ld a, [dir_tf_forward] + and a, b + jp nz, @done_act_draw #endmacro update_game: @@ -56,10 +66,11 @@ update_game: ; for the current frame update_game_draw_act_and_prop: ; TODO: update map routine + _update_game_draw_act 0, near _update_game_draw_act 1, far _update_game_draw_act 2, furthest - +@done_act_draw: ret -- 2.30.2