summaryrefslogtreecommitdiff
path: root/src/gui/inventory.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-04 18:24:40 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-04 18:24:40 +0000
commita8d207e6889cd353dd11736b5690aa54ac6de993 (patch)
tree1979e3fbfcafebc4426ea72ed055e2db072800e8 /src/gui/inventory.cpp
parentae4e9076051a736e2bbbce91e7fd58cb27448f24 (diff)
downloadmana-a8d207e6889cd353dd11736b5690aa54ac6de993.tar.gz
mana-a8d207e6889cd353dd11736b5690aa54ac6de993.tar.bz2
mana-a8d207e6889cd353dd11736b5690aa54ac6de993.tar.xz
mana-a8d207e6889cd353dd11736b5690aa54ac6de993.zip
Got rid of last 5 Allegro datafiles.
Diffstat (limited to 'src/gui/inventory.cpp')
-rw-r--r--src/gui/inventory.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp
index 1a8f59d7..8d75f34e 100644
--- a/src/gui/inventory.cpp
+++ b/src/gui/inventory.cpp
@@ -29,7 +29,9 @@ InventoryWindow::InventoryWindow(gcn::Container *parent):
{
setSize(322, 60);
- itemset = load_datafile("./data/graphic/items.dat");
+ 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);
for (int i = 0; i < INVENTORY_SIZE; i++) {
items[i].id = -1;
@@ -55,15 +57,10 @@ void InventoryWindow::draw(gcn::Graphics *graphics)
for (int i = 0; i < INVENTORY_SIZE; i++) {
if (items[i].quantity > 0) {
if (items[i].id >= 501 && items[i].id <= 511) {
- draw_rle_sprite(target,
- (RLE_SPRITE *)itemset[items[i].id - 501].dat,
+ itemset->spriteset[items[i].id - 501]->draw(target,
x + 24 * i,
y + 26);
}
- //else {
- // masked_blit((BITMAP *)itemset[0].dat, gui_bitmap, 0, 0,
- // x + 24 * i, y + 26, 22, 22);
- //}
std::stringstream ss;
ss << items[i].quantity;