From: Lukas Krickl Date: Thu, 1 Jan 2026 16:32:11 +0000 (+0100) Subject: update: actors now do not render anymore when the path is blocked. X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=cdf06d6b0e98316d5200d60d7817692e7a07caf4;p=gbrg%2F.git update: actors now do not render anymore when the path is blocked. --- 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