aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-11-30 07:33:26 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-11-30 07:33:26 -0500
commitfbe1b6c3a0a3427111577e6b77600f5669012583 (patch)
tree47e730acbcc03d9f0116d49b29410bfe83cfbb4a
parente21db32169966b983e09b53801ee1a6d3101e57e (diff)
parentda95ece60c808ca04dd5c61068d8016a92c6c9b5 (diff)
Look at my fancy inventory
-rw-r--r--config/items.h3
-rw-r--r--include/inventory.h4
-rw-r--r--src/entities.cpp4
-rw-r--r--src/inventory.cpp4
4 files changed, 8 insertions, 7 deletions
diff --git a/config/items.h b/config/items.h
index 3189a29..62db071 100644
--- a/config/items.h
+++ b/config/items.h
@@ -1,3 +1,4 @@
+
ID DEBUG_ITEM
NAME "Debug\0"
TYPE TOOL
@@ -41,4 +42,4 @@ ID SWORD_WOOD
HEIGHT HLINE*10
STACKSIZE 1
TEX "assets/items/ITEM_SWORD.png"
- STOP \ No newline at end of file
+ STOP
diff --git a/include/inventory.h b/include/inventory.h
index 3fdbf52..2793ad7 100644
--- a/include/inventory.h
+++ b/include/inventory.h
@@ -67,10 +67,6 @@ public:
}
};
-static Item item[5]= {
- #include "../config/items.h"
-};
-
struct item_t{
int count;
ITEM_ID id;
diff --git a/src/entities.cpp b/src/entities.cpp
index c2c560a..97b4d35 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -108,7 +108,7 @@ Object::Object(int id):identifier(id){
height = HLINE * 8;
maxHealth = health = 1;
- tex = new Texturec(1, item[id].textureLoc);
+ //tex = new Texturec(1, item[id].textureLoc);
questObject = false;
pickupDialog="\0";
@@ -122,7 +122,7 @@ Object::Object(int id, bool qo, char *pd):identifier(id),questObject(qo),pickupD
height = HLINE * 8;
maxHealth = health = 1;
- tex = new Texturec(1, item[id].textureLoc);
+ //tex = new Texturec(1, item[id].textureLoc);
}
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 2547760..45d5bce 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -7,6 +7,10 @@
extern Player *player;
extern GLuint invUI;
+static Item item[5]= {
+ #include "../config/items.h"
+};
+
void itemDraw(Player *p,ITEM_ID id);
Inventory::Inventory(unsigned int s){