diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-03-30 08:41:16 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-03-30 08:41:16 -0400 |
commit | c35571e37bdd6d2fe9b95e4265c150265585f3a9 (patch) | |
tree | 31478f777e27f345cc20f2eaf796a176b55cb4fe /include/inventory.h | |
parent | 82c178d797b9a23c31d7dad1cc8cac29d27c6eb1 (diff) |
Inv and textures
Diffstat (limited to 'include/inventory.h')
-rw-r--r-- | include/inventory.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/include/inventory.h b/include/inventory.h deleted file mode 100644 index 7369642..0000000 --- a/include/inventory.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef INVENTORY_H -#define INVENTORY_H - -#include <common.h> -#include <string.h> - -#include <Texture.h> - -#define DEBUG - -class Item{ -public: - std::string name,type; - - float width; - float height; - int maxStackSize; - - std::string texloc; - Texturec *tex; - - GLuint rtex(){ - return tex->image[0]; - } -}; - -struct item_t{ - uint count; - uint id; -} __attribute__((packed)); - -class Inventory { -private: - unsigned int size; - int os = 0; -public: - std::vector<item_t> items; - unsigned int sel; - bool invOpen = false; - bool invOpening = false; - bool invHover = false; - bool selected = false; - bool mouseSel = false; - bool usingi = false; - - Inventory(unsigned int s); // Creates an inventory of size 's' - ~Inventory(void); // Free's allocated memory - - int addItem(std::string name,uint count); - int takeItem(std::string name,uint count); - int hasItem(std::string name); - - int useItem(void); - bool detectCollision(vec2,vec2); - - void setSelection(unsigned int s); - void setSelectionUp(); - void setSelectionDown(); - - void draw(void); // Draws a text list of items in this inventory (should only be called for the player for now) -}; - -void initInventorySprites(void); -void destroyInventory(void); - -const char *getItemTexturePath(std::string name); -GLuint getItemTexture(std::string name); -float getItemWidth(std::string name); -float getItemHeight(std::string name); - -#endif // INVENTORY_H |