aboutsummaryrefslogtreecommitdiffstats
path: root/include/inventory.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-02-03 08:45:55 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-02-03 08:45:55 -0500
commit523ef5835f16ece38600b91f84936b7b0d2845a1 (patch)
treec89d50276c494f5885b3d0e913f1dd4809958402 /include/inventory.h
parent7ab072caaaec09720ad79cfed5738e89bc60c44f (diff)
bug fixess
Diffstat (limited to 'include/inventory.h')
-rw-r--r--include/inventory.h49
1 files changed, 4 insertions, 45 deletions
diff --git a/include/inventory.h b/include/inventory.h
index d3bdd4d..e5209de 100644
--- a/include/inventory.h
+++ b/include/inventory.h
@@ -4,49 +4,12 @@
#include <common.h>
#include <string.h>
-#define DEBUG
-
-/*#define ID Item(
-#define NAME ,
-#define TYPE ,
-#define WIDTH ,
-#define HEIGHT ,
-#define STACKSIZE ,
-#define TEX ,
-#define ENI ),
-#define STOP )*/
-
-/*
- * A list of all item IDs.
-*/
-
-/*#define ITEM_COUNT 5
-
-enum ITEM_ID {
- DEBUG_ITEM = 0,
- TEST_ITEM,
- PLAYER_BAG,
- FLASHLIGHT,
- SWORD_WOOD
-};
+#include <Texture.h>
-enum ITEM_TYPE {
- TOOL = 1,
- SWORD,
- RANGED,
- EQUIP,
- FOOD
-};*/
+#define DEBUG
class Item{
-protected:
public:
- //ITEM_ID id; // ID of the item
- //ITEM_TYPE type; // What category the item falls under
-
- //char *name;
- //char *type;
-
std::string name,type;
float width;
@@ -56,7 +19,6 @@ public:
std::string texloc;
Texturec *tex;
- //Item(ITEM_ID i, const char *n, ITEM_TYPE t, float w, float h, int m, const char *tl);
GLuint rtex(){
return tex->image[0];
}
@@ -64,16 +26,13 @@ public:
struct item_t{
uint count;
- uint/*ITEM_ID*/ id;
+ uint id;
} __attribute__((packed));
class Inventory {
private:
-
std::vector<item_t> items;
-
- unsigned int size; // Size of 'item' array
- //item_t *inv;
+ unsigned int size;
int os = 0;
public:
unsigned int sel;