Added atk and def icons
authorLukas Krickl <lukas@krickl.dev>
Sat, 5 Oct 2024 05:51:51 +0000 (07:51 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 5 Oct 2024 05:51:51 +0000 (07:51 +0200)
src/ui.s
src/wram.s
tiles/tileset1.inc

index 76b28d49f143210a9bfb7127a5c6d3748e173bf2..18917c932fb21f56bab7c4a444e30dfeca6cce34 100644 (file)
--- a/src/ui.s
+++ b/src/ui.s
@@ -1,32 +1,34 @@
 #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
 
@@ -53,7 +55,7 @@ ui_draw_bar:
 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
@@ -61,7 +63,7 @@ ui_draw_hp_bar:
 
   ; 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
index 19895956757535065eab6f4ff902df67bd68d5d8..ce2ba56eae76f686f55c7852d9b67968fc17fa46 100644 (file)
@@ -76,6 +76,8 @@ curr_room: .adv 2
 .se 1
 .de UI_REDRAW_HP, 1
 .de UI_REDRAW_MP, 2
+.de UI_REDRAW_ATK, 4
+.de UI_REDRAW_DEF, 8
 
 ui_flags: .adv 1
 draw_flags: .adv 1
index 1ed4d69d08711640ad2b66a4d825f6801748ad0c..0cd1a37a5fb291a7b67b755fabf27676462e8658 100644 (file)
 .chr 00000000
 ; tile 187
 .chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
+.chr 00000011
+.chr 00000112
+.chr 00001120
+.chr 00311200
+.chr 00332000
+.chr 03333000
+.chr 03300000
 ; tile 188
 .chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
-.chr 00000000
+.chr 03333330
+.chr 03122230
+.chr 03212230
+.chr 03211230
+.chr 03222130
+.chr 00322300
+.chr 00033000
 ; tile 189
 .chr 00000000
 .chr 00000000