From: Lukas Krickl Date: Sat, 5 Oct 2024 17:19:22 +0000 (+0200) Subject: wip: stats bars X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=8ee0dd4592a698f994f4e975970cbc3fab1e90b6;p=gbrg%2F.git wip: stats bars --- 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