aboutsummaryrefslogtreecommitdiff
path: root/src/game_loop/shop.c
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2023-04-06 16:39:12 +0200
committerGitHub <noreply@github.com>2023-04-06 16:39:12 +0200
commit8be7919774250cca23151bf1505cbb48d1dd45ee (patch)
treec9876a5c0f1cfea1eb56a2c046bcb4d5813e2d78 /src/game_loop/shop.c
parentd1c00c98ca0f2ca498284e60fa057a610cc5c461 (diff)
parentd8e8e63bac3ef5a203106c09731ed2e55c87688a (diff)
Merge pull request #59 from UnavailableDev/dev
rendering hp + strings
Diffstat (limited to 'src/game_loop/shop.c')
-rw-r--r--src/game_loop/shop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game_loop/shop.c b/src/game_loop/shop.c
index da27524..60fc70b 100644
--- a/src/game_loop/shop.c
+++ b/src/game_loop/shop.c
@@ -2,6 +2,8 @@
#include "engine/maths.h"
#include "ppu/ppu.h"
+#include "game_loop/ui.h"
+
void hh_shop(hh_e_game_state* hh_game_state, hh_level_entity* level_shop){
static hh_e_shop_states hh_e_shop = hh_e_shop_show;
static hh_e_upgrades upgrades[HH_SHOP_UPG_DISPLAY] = {0};
@@ -19,6 +21,9 @@ void hh_shop(hh_e_game_state* hh_game_state, hh_level_entity* level_shop){
hh_shop_init(&upgrades);
selected = HH_SHOP_UPG_DISPLAY/2;
hh_shop_display(selected, &upgrades);
+ int idx = 16;
+ hh_ui_show_char(&idx,"aBYz09",(vec2){32,32});
+
hh_e_shop = hh_e_shop_main;
break;
case hh_e_shop_main:
@@ -65,7 +70,7 @@ void hh_shop_display(uint8_t selected, hh_e_upgrades* upgrades) {
space = 24+8;
for (int i = 0; i < HH_SHOP_UPG_DISPLAY; i++) {
- hh_ppu_update_foreground(i+16,
+ hh_ppu_update_foreground(i,
(hh_s_ppu_loc_fam_entry){
.horizontal_flip = false, .vertical_flip = false,
.position_x = i*space+start.x, .position_y = start.y + (i==selected?-up:0),