From 7489419558c12ba19eb7d0f26bf5a29149330eb0 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sun, 16 Oct 2005 20:18:50 +0000 Subject: Use the ResourceManager to get spritesets. --- src/gui/equipmentwindow.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui/equipmentwindow.cpp') 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() -- cgit v1.2.3-70-g09d2