diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-21 13:36:17 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-21 13:36:17 +0000 |
commit | 9db3ea6a43d78bc959eef9fd594141d3a4063c0b (patch) | |
tree | f476b0ab26de1ce6748898ce0a7a293dac974a3e /src/gui/itemcontainer.cpp | |
parent | 8eb8602942d63661674d237d127c5f3ccfcf4ef4 (diff) | |
download | mana-9db3ea6a43d78bc959eef9fd594141d3a4063c0b.tar.gz mana-9db3ea6a43d78bc959eef9fd594141d3a4063c0b.tar.bz2 mana-9db3ea6a43d78bc959eef9fd594141d3a4063c0b.tar.xz mana-9db3ea6a43d78bc959eef9fd594141d3a4063c0b.zip |
Items are now displayed using database image field, this way I could also reduce a lot items.png size
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 51d093b7..61dad053 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -75,10 +75,9 @@ void ItemContainer::draw(gcn::Graphics* graphics) int itemY = (((i - 2) * 24) / (getWidth() - 24)) * 24; itemX -= itemX % 24; if (items[i].quantity > 0) { - if (items[i].id >= 501 && items[i].id <= 1202) { - itemset->spriteset[items[i].id - 501]->draw(screen, - x + itemX, - y + itemY); + if (itemDb.getImage(items[i].id) > 0) { + itemset->spriteset[itemDb.getImage(items[i].id) - 1]->draw( + screen, x + itemX, y + itemY); } std::stringstream ss; |