summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/item.cpp b/src/item.cpp
index b434387e..6b13dd1b 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -21,12 +21,12 @@
#include "item.h"
-#include "gui/theme.h"
+#include "configuration.h"
#include "resources/image.h"
#include "resources/iteminfo.h"
#include "resources/resourcemanager.h"
-#include "configuration.h"
+#include "resources/theme.h"
Item::Item(int id, int quantity, bool equipment, bool equipped):
mImage(0),
@@ -58,8 +58,9 @@ void Item::setId(int id)
mDrawImage->decRef();
ResourceManager *resman = ResourceManager::getInstance();
- std::string imagePath = paths.getValue("itemIcons", "graphics/items/")
- + getInfo().getImageName();
+ SpriteDisplay display = getInfo().getDisplay();
+ std::string imagePath = paths.getStringValue("itemIcons")
+ + display.image;
mImage = resman->getImage(imagePath);
mDrawImage = resman->getImage(imagePath);