From 30dd8efe8d71648bea7604ebee5afc4d55b25a6b Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Fri, 4 Mar 2016 08:42:00 -0500 Subject: You can buy sausages from meme --- src/inventory.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/inventory.cpp') diff --git a/src/inventory.cpp b/src/inventory.cpp index cd8bb71..d75a1bf 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -66,7 +66,7 @@ int Inventory::takeItem(std::string name,uint count){ } if(id == 999999) - return -1; + return -1; //if no such item exists /* * Inventory lookup @@ -142,12 +142,13 @@ const char *getItemTexturePath(std::string name){ return NULL; } -Texturec *getItemTexture(std::string name){ +GLuint getItemTexture(std::string name){ for(auto &i : itemMap){ if(i->name == name) - return i->tex; + return Texture::loadTexture(i->texloc); } - return NULL; + + return Texture::loadTexture("assets/items/ITEM_TEST.png"); } float getItemWidth(std::string name){ -- cgit v1.2.3