wip: stats bars
authorLukas Krickl <lukas@krickl.dev>
Sat, 5 Oct 2024 17:19:22 +0000 (19:19 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 5 Oct 2024 17:19:22 +0000 (19:19 +0200)
src/ui.s

index 67d35df30a64a1529eabadc8f10b79da8f640c18..2f898a4a87a4b4451b561b3715c17affc45ef11e 100644 (file)
--- 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