aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.h')
-rw-r--r--src/ui.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ui.h b/src/ui.h
index eee1d4f..14845d4 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -8,7 +8,10 @@
#define INTERACTION_COLUMN_MAX 80
#define INVENTORY_MAX 10
-#define INVENTORY_SPRITE_SIZE 42
+#define INVENTORY_SPRITE_SIZE 32
+#define INVENTORY_ROWS 8
+#define INVENTORY_COLUMNS 8
+#define INVENTORY_SCALE 2.0
typedef char InteractionItems[INTERACTION_MENU_MAX][INTERACTION_LABEL_MAX];
@@ -32,9 +35,15 @@ typedef struct {
} InteractionMenu;
typedef struct {
+ EntityId id;
+ AssetId textureId;
+ int count;
+} InventoryItem;
+
+typedef struct {
Rectangle rect;
bool visable;
- EntityItem items[INVENTORY_MAX];
+ InventoryItem items[INVENTORY_MAX];
int itemCount;
} Inventory;
@@ -60,10 +69,10 @@ void hideInteractionMenu(InteractionMenu* menu);
void updateInteractionMenu(InteractionMenu* menu, Game* game);
// Inventory
-void initInventory(Inventory* inventory);
+void initInventory(Inventory* inventory, const Settings* settings);
void showInventory(Inventory* inventory);
void hideInventory(Inventory* inventory);
-void addItemToInventory(Inventory* inventory, EntityItem item);
-void updateInventory(Inventory* inventory);
+void addItemToInventory(Inventory* inventory, InventoryItem item);
+void updateInventory(Inventory* inventory, Game* game);
#endif