diff options
| author | nathan <nathansmith@disroot.org> | 2026-01-11 13:13:36 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2026-01-11 13:13:36 +0000 |
| commit | e853966be38ae6c5319df137c3b04a86e52b562b (patch) | |
| tree | 76a7b271ac1795098ebb8d797a523fbcbfc54080 /src/ui.h | |
| parent | 013ac4a2f4ae24d71f425f31edd77a8e29ed1da8 (diff) | |
| download | FindThings-e853966be38ae6c5319df137c3b04a86e52b562b.tar.gz FindThings-e853966be38ae6c5319df137c3b04a86e52b562b.tar.bz2 FindThings-e853966be38ae6c5319df137c3b04a86e52b562b.zip | |
Diffstat (limited to 'src/ui.h')
| -rw-r--r-- | src/ui.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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 |
