#define THP_ICON 0x33
#define TMP_ICON 0x37
+#define TATK_ICON 0x3B
+#define TDEF_ICON 0x3C
#define THP_BAR_START 0x34
; sets up static parts of the UI
; all other parts are drawin by ui_draw
; only call during blanking
ui_init:
- ; draw hp string
- ld hl, STR_HP
- ld de, SCRN0_UI
- call puts
-
- ; draw mp string
- ld hl, STR_MP
- ld de, SCRN0_UI+10
- call puts
-
; darw mp and hp on first frame
ld a, UI_REDRAW_HP | UI_REDRAW_MP
ld [ui_flags], a
; hp icon
- ld hl, SCRN0_UI+SCRN_W
+ ld hl, SCRN0_UI
ld a, THP_ICON
ld [hl], a
; mp icon
ld a, TMP_ICON
+ ld hl, SCRN0_UI+10
+ ld [hl], a
+
+ ; atk icon
+ ld hl, SCRN0_UI+SCRN_W
+ ld a, TATK_ICON
+ ld [hl], a
+
+ ; def icon
+ ld a, TDEF_ICON
ld hl, SCRN0_UI+SCRN_W+10
ld [hl], a
ui_draw_hp_bar:
; set up ptrs
; draw hp UI
- ld hl, SCRN0_UI+SCRN_W+1
+ ld hl, SCRN0_UI+1
; player hp ptr
ld de, player + player_hp
; directly jump without a return
; sets up for darwing mp bar
ui_draw_mp_bar:
- ld hl, SCRN0_UI+SCRN_W+11
+ ld hl, SCRN0_UI+11
ld de, player + player_mp
; directly jump without a return