diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-16 20:18:50 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-16 20:18:50 +0000 |
commit | 7489419558c12ba19eb7d0f26bf5a29149330eb0 (patch) | |
tree | 769035b8e79b95a2767aa04daa5cb567492e1254 /src/gui/itemcontainer.cpp | |
parent | 4453a80a2f43c5ebf20dce881586a89c484d4830 (diff) | |
download | mana-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/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 3f00f9eb..0cdb8864 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -42,10 +42,8 @@ ItemContainer::ItemContainer(Inventory *inventory): mInventory(inventory) { 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 = resman->createSpriteset("graphics/sprites/items.png", 32, 32); + if (!itemset) logger->error("Unable to load items.png"); selImg = resman->getImage("graphics/gui/selection.png"); if (!selImg) logger->error("Unable to load selection.png"); |