diff options
Diffstat (limited to 'include/inventory.hpp')
-rw-r--r-- | include/inventory.hpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/include/inventory.hpp b/include/inventory.hpp index fa24de4..15877e9 100644 --- a/include/inventory.hpp +++ b/include/inventory.hpp @@ -6,30 +6,36 @@ #include <components.hpp> #include <events.hpp> -struct Item { - GLuint icon; +struct InventoryEntry { + GLuint icon; + std::string name; + std::string type; + + int count; + int max; + vec2 loc; }; -using InventoryEntry = std::pair<Item, unsigned int>; - class InventorySystem : public entityx::System<InventorySystem>, public entityx::Receiver<InventorySystem> { private: entityx::Entity currentItemEntity; std::vector<InventoryEntry> items; - unsigned int maxItemCount; public: - InventorySystem(unsigned int mic = 1) - : maxItemCount(mic) {} + InventorySystem(int size = 4) { + items.resize(size); + loadItems(); + } void configure(entityx::EventManager &ev); - void loadIcons(void); + void loadItems(void); void update(entityx::EntityManager &en, entityx::EventManager &ev, entityx::TimeDelta dt) override; void receive(const KeyDownEvent &kde); + void render(void); }; #endif // INVENTORY_HPP_ |