#define THP_ICON 0x33
#define TMP_ICON 0x37
-#define TATK_ICON 0x3B
+#define TATK_ICON 0x3D
#define TDEF_ICON 0x3C
#define THP_BAR_START 0x34
-#define THP_BAR_SINGLE_EMPTY 0x3E
-#define THP_BAR_SINGLE_FULL 0x3D
+#define THP_BAR_SINGLE_EMPTY 0x3F
+#define THP_BAR_SINGLE_FULL 0x3B
; difference between start and empty bar
#define THP_BAR_EMPTY_DIFF 4
ret
- ; draw a single item only
- ; inputs:
- ; b: current bar value (either 1 or 0)
- ; hl: screen location
-ui_draw_bar_single:
- ld a, b ; b = current
-
- cp a, 0
- jp z, @draw_empty
-@draw_full:
- ld a, THP_BAR_SINGLE_FULL
- ld [hl+], a
- ret
-@draw_empty:
- ld a, THP_BAR_SINGLE_EMPTY
- ld [hl+], a
- ret
-
; decides if a bar should be empty or filled
; inputs:
; b: current
; check if we only need a single obj
ld a, [de] ; a = max value
-
- ; <= 1 -> jp to special case code
- cp a, 1
- jr c, ui_draw_bar_single REL
- jr z, ui_draw_bar_single REL
-
; now c = max
; and b = current
ld c, a
-
ld e, 0 ; e = total drawn
+
+ ; <= 1 -> jp to special case code
+ cp a, 1 ; a = max
+ ; load single tile for the possible jumps
+ ld a, THP_BAR_SINGLE_FULL
+ jr c, ui_draw_bar_empty_or_filled REL
+ jr z, ui_draw_bar_empty_or_filled REL
+
; draw left most bar tile
ld a, THP_BAR_START