From 187fc7434d10add06d885c3a79920986f7f31165 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 26 Oct 2025 05:31:00 +0100 Subject: [PATCH] ui: Fixed player hp display when entering hard mode --- src/ui.s | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui.s b/src/ui.s index 7760062..3aee756 100644 --- a/src/ui.s +++ b/src/ui.s @@ -26,10 +26,20 @@ ui_init: ; draws the entire UI ; only call during blank ui_draw_all: + call ui_clear_player_hp call ui_draw_player_hp call ui_draw_enemy_hp ret + ; clears player hp +ui_clear_player_hp: + ld hl, UI_PLAYER_HP+7 + ld a, UI_WINDOW_BACKGROUND + +.rep i, 8, 1, ld [hl+], a + + ret + ; draws player hp ui_draw_player_hp: ld de, UI_PLAYER_HP @@ -69,6 +79,11 @@ ui_draw_hp: ld [hl+], a @done: + + ; clear the next index + ld a, UI_WINDOW_BACKGROUND + ld [hl+], a + ret ; draws boss hp -- 2.30.2