]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
items.h include moved
authorClyne Sullivan <tullivan99@gmail.com>
Tue, 24 Nov 2015 12:43:05 +0000 (07:43 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Tue, 24 Nov 2015 12:43:05 +0000 (07:43 -0500)
config/items.h
include/inventory.h
src/inventory.cpp

index a3ec683716dc67540c1b9ca00359b896b5e2210e..c2e7c95b5839143fda5380184f2edfcc92810752 100644 (file)
@@ -1,4 +1,4 @@
-ID DEBUG_ITEM
+ID DEBUG_ITEM          
        NAME "Debug"
        TYPE TOOL 
        WIDTH 1 
@@ -41,4 +41,4 @@ ID SWORD_WOOD
        HEIGHT HLINE*10 
        STACKSIZE 1 
        TEX "assets/items/ITEM_SWORD.png" 
-       STOP
\ No newline at end of file
+       STOP
index dc5c04e34b348b2098413fbb4d474678213091fb..46053f631c9920a1f1baeb11cec1ba0eb65e725a 100644 (file)
@@ -60,18 +60,9 @@ public:
 
 };
 
-static Item item[5]= {
-       #include "../config/items.h"
-};
-
 struct item_t{
        int count;
        ITEM_ID itmid;
-       void addC(int c, ITEM_ID i){
-               count = c;
-               itmid = i;
-               item[itmid].addCount(count);
-       }
 } __attribute__((packed));
 
 
index edc88ff59b6ebbfe0a7cd1590346170635f61e4b..192a3a42cab48c9b3ac0b7818f39ce4b87dfe3af 100644 (file)
@@ -7,6 +7,10 @@
 extern Player *player;
 extern GLuint invUI;
 
+static Item item[5]= {
+       #include "../config/items.h"
+};
+
 GLuint *ITEM_TEX;
 
 void itemDraw(Player *p,ITEM_ID id);