From 8ee0dd4592a698f994f4e975970cbc3fab1e90b6 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 5 Oct 2024 19:19:22 +0200 Subject: [PATCH] wip: stats bars --- src/ui.s | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ui.s b/src/ui.s index 67d35df..2f898a4 100644 --- a/src/ui.s +++ b/src/ui.s @@ -69,10 +69,15 @@ ui_draw_bar: ; check if we only need a single obj ld a, [de] ; a = max value - + + ; <= 1 -> jp to special case code cp a, 1 - jp c, ui_draw_bar_single - jp z, ui_draw_bar_single + jr c, ui_draw_bar_single REL + jr z, ui_draw_bar_single REL + + ; now c = max + ; and b = current + ld c, a ; first we draw the filled bar ld a, THP_BAR_START -- 2.30.2