aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 203e707..cd8bb71 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -142,6 +142,14 @@ const char *getItemTexturePath(std::string name){
return NULL;
}
+Texturec *getItemTexture(std::string name){
+ for(auto &i : itemMap){
+ if(i->name == name)
+ return i->tex;
+ }
+ return NULL;
+}
+
float getItemWidth(std::string name){
for(auto &i : itemMap){
if(i->name == name)