summaryrefslogtreecommitdiff
path: root/src/gui
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
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')
-rw-r--r--src/gui/inventory.cpp11
-rw-r--r--src/gui/inventory.h3
2 files changed, 6 insertions, 8 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;
diff --git a/src/gui/inventory.h b/src/gui/inventory.h
index a89578a3..21ffe6bc 100644
--- a/src/gui/inventory.h
+++ b/src/gui/inventory.h
@@ -33,6 +33,7 @@
#include "../game.h"
#include "../log.h"
#include "../net/network.h"
+#include "../graphic/image.h"
#include "gui.h"
#include "window.h"
@@ -86,7 +87,7 @@ class InventoryWindow : public Window {
int useItem(int index, int id);
int dropItem(int index, int amunt);
- DATAFILE *itemset;
+ Spriteset *itemset;
int itemMeny, itemMeny_x, itemMeny_y, itemMeny_i;
};