summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-16 20:18:50 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-10-16 20:18:50 +0000
commit7489419558c12ba19eb7d0f26bf5a29149330eb0 (patch)
tree769035b8e79b95a2767aa04daa5cb567492e1254 /src/gui/equipmentwindow.cpp
parent4453a80a2f43c5ebf20dce881586a89c484d4830 (diff)
downloadmana-7489419558c12ba19eb7d0f26bf5a29149330eb0.tar.gz
mana-7489419558c12ba19eb7d0f26bf5a29149330eb0.tar.bz2
mana-7489419558c12ba19eb7d0f26bf5a29149330eb0.tar.xz
mana-7489419558c12ba19eb7d0f26bf5a29149330eb0.zip
Use the ResourceManager to get spritesets.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index d1d23ee1..d3b5fc6b 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -30,7 +30,6 @@
#include "../graphic/spriteset.h"
-#include "../resources/image.h"
#include "../resources/iteminfo.h"
#include "../resources/resourcemanager.h"
@@ -43,11 +42,9 @@ EquipmentWindow::EquipmentWindow():
setDefaultSize(5, 230, 200, 90);
loadWindowState();
- ResourceManager *resman = ResourceManager::getInstance();
- Image *itemImg = resman->getImage("graphics/sprites/items.png");
- if (!itemImg) logger->error("Unable to load items.png");
- itemset = new Spriteset(itemImg, 32, 32);
- itemImg->decRef();
+ itemset = ResourceManager::getInstance()->createSpriteset(
+ "graphics/sprites/items.png", 32, 32);
+ if (!itemset) logger->error("Unable to load items.png");
}
EquipmentWindow::~EquipmentWindow()