summaryrefslogtreecommitdiff
path: root/src/gui/inventory.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-14 15:43:26 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-14 15:43:26 +0000
commitb7170d13fd71fb624c06c4536974a7cd3f77591b (patch)
tree7f7583407e79423b08f98a50d897f6e30ac886dd /src/gui/inventory.cpp
parenta120ea5cb0a57c9d3bd8677269bd65cf79dad933 (diff)
downloadmana-client-b7170d13fd71fb624c06c4536974a7cd3f77591b.tar.gz
mana-client-b7170d13fd71fb624c06c4536974a7cd3f77591b.tar.bz2
mana-client-b7170d13fd71fb624c06c4536974a7cd3f77591b.tar.xz
mana-client-b7170d13fd71fb624c06c4536974a7cd3f77591b.zip
Rewrote Spriteset to work with Image* instead of BITMAP*
Diffstat (limited to 'src/gui/inventory.cpp')
-rw-r--r--src/gui/inventory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp
index 8662841e..c77dcfdd 100644
--- a/src/gui/inventory.cpp
+++ b/src/gui/inventory.cpp
@@ -22,6 +22,8 @@
*/
#include "inventory.h"
+#include "../resources/resourcemanager.h"
+#include "../resources/image.h"
#include <sstream>
InventoryWindow::InventoryWindow():
@@ -29,9 +31,10 @@ InventoryWindow::InventoryWindow():
{
setSize(322, 60);
- BITMAP *itembmp = load_bitmap("data/graphic/items.bmp", NULL);
- if (!itembmp) error("Unable to load items.bmp");
- itemset = new Spriteset(itembmp, 20, 20, 0, 0);
+ ResourceManager *resman = ResourceManager::getInstance();
+ Image *itemImg = resman->getImage("graphic/items.bmp");
+ if (!itemImg) error("Unable to load items.bmp");
+ itemset = new Spriteset(itemImg, 20, 20);
for (int i = 0; i < INVENTORY_SIZE; i++) {
items[i].id = -1;