diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-14 15:43:26 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-14 15:43:26 +0000 |
commit | b7170d13fd71fb624c06c4536974a7cd3f77591b (patch) | |
tree | 7f7583407e79423b08f98a50d897f6e30ac886dd /src/gui/inventory.cpp | |
parent | a120ea5cb0a57c9d3bd8677269bd65cf79dad933 (diff) | |
download | mana-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.cpp | 9 |
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; |