diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-01 07:29:47 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-12-01 07:29:47 -0500 |
commit | 813f30f8d7e4db971fbb9aab429b489e884ad2e9 (patch) | |
tree | 706a0dc14485acfb7cb711f20c98f821465f8fe3 /src/inventory.cpp | |
parent | af22d85f9a417a94ea75db1878219f8baeba8b73 (diff) | |
parent | 80bc1b24bcf6862a7fbd3223a3d6988ce4e389e0 (diff) |
Merge branch 'master' of http://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 3b2663b..ff180b0 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -21,8 +21,8 @@ Item::Item(ITEM_ID i, const char *n, ITEM_TYPE t, float w, float h, int m, const maxStackSize = m; count = 0; - name = new char[strlen(n)+1]; //(char*)calloc(strlen(n ),sizeof(char)); - textureLoc = new char[strlen(tl)+1]; //(char*)calloc(strlen(tl),sizeof(char)); + name = new char[strlen(n)+1]; + textureLoc = new char[strlen(tl)+1]; strcpy(name,n); strcpy(textureLoc,tl); @@ -33,14 +33,13 @@ Item::Item(ITEM_ID i, const char *n, ITEM_TYPE t, float w, float h, int m, const Inventory::Inventory(unsigned int s){ sel=0; size=s; - inv = new struct item_t[size]; //(struct item_t *)calloc(size,sizeof(struct item_t)); + inv = new struct item_t[size]; memset(inv,0,size*sizeof(struct item_t)); tossd=false; } Inventory::~Inventory(void){ delete[] inv; - //free(item); } void Inventory::setSelection(unsigned int s){ |