aboutsummaryrefslogtreecommitdiffstats
path: root/include/inventory.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-11-30 08:47:07 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-11-30 08:47:07 -0500
commit45bca98b792f8ced1a57ef8c5beed2a90a79d47f (patch)
tree0ac3026c2a9bac4037cfe9003f532eca02db92f0 /include/inventory.h
parentfbe1b6c3a0a3427111577e6b77600f5669012583 (diff)
switched to 100% new/delete
Diffstat (limited to 'include/inventory.h')
-rw-r--r--include/inventory.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/inventory.h b/include/inventory.h
index 2793ad7..a9a4bcb 100644
--- a/include/inventory.h
+++ b/include/inventory.h
@@ -50,18 +50,7 @@ public:
char* textureLoc;
Texturec *tex;
int count;
- Item(ITEM_ID i, char* n, ITEM_TYPE t, float w, float h, int m, char* tl):
- id(i), type(t), width(w), height(h), maxStackSize(m){
- count = 0;
-
- name = (char*)calloc(strlen(n ),sizeof(char));
- textureLoc = (char*)calloc(strlen(tl),sizeof(char));
-
- strcpy(name,n);
- strcpy(textureLoc,tl);
-
- tex= new Texturec(1,textureLoc);
- }
+ 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];
}
@@ -101,5 +90,6 @@ public:
};
void itemUse(void *p);
+char *getItemTexturePath(ITEM_ID id);
#endif // INVENTORY_H