summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-21 15:36:49 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-21 15:36:49 +0000
commit56fef6eed9e3145b5e7d33e066069f642873d7a1 (patch)
tree10ee9c20bfa294abbbb2b96901bc0b2830007288 /src/gui
parent9db3ea6a43d78bc959eef9fd594141d3a4063c0b (diff)
downloadmana-client-56fef6eed9e3145b5e7d33e066069f642873d7a1.tar.gz
mana-client-56fef6eed9e3145b5e7d33e066069f642873d7a1.tar.bz2
mana-client-56fef6eed9e3145b5e7d33e066069f642873d7a1.tar.xz
mana-client-56fef6eed9e3145b5e7d33e066069f642873d7a1.zip
trying to follow Hammerbear suggestions
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buy.cpp3
-rw-r--r--src/gui/equipment.cpp3
-rw-r--r--src/gui/itemcontainer.cpp5
-rw-r--r--src/gui/sell.cpp3
4 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index c26be5d3..6876fb02 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -102,7 +102,8 @@ void BuyDialog::addItem(short id, int price)
{
ITEM_SHOP item_shop;
- sprintf(item_shop.name, "%s %i gp", itemDb.getName(id).c_str(), price);
+ sprintf(item_shop.name, "%s %i gp",
+ itemDb.getItemInfo(id)->getName().c_str(), price);
item_shop.price = price;
item_shop.id = id;
diff --git a/src/gui/equipment.cpp b/src/gui/equipment.cpp
index 1c559263..95e9998c 100644
--- a/src/gui/equipment.cpp
+++ b/src/gui/equipment.cpp
@@ -58,7 +58,8 @@ void EquipmentWindow::draw(gcn::Graphics *graphics)
for (int i = 0; i < 8; i++) {
if (equipments[i].id > 0) {
- itemset->spriteset[itemDb.getImage(equipments[i].id) - 1]->draw(
+ itemset->spriteset[itemDb.getItemInfo(
+ equipments[i].id)->getImage() - 1]->draw(
screen, x + 22, y + 24 * i + 20);
}
graphics->setColor(gcn::Color(0, 0, 0));
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 61dad053..bb10c5a9 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -75,8 +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 (itemDb.getImage(items[i].id) > 0) {
- itemset->spriteset[itemDb.getImage(items[i].id) - 1]->draw(
+ if (itemDb.getItemInfo(items[i].id)->getImage() > 0) {
+ itemset->spriteset[itemDb.getItemInfo(
+ items[i].id)->getImage() - 1]->draw(
screen, x + itemX, y + itemY);
}
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 2c9e8745..711a417e 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -93,7 +93,8 @@ void SellDialog::addItem(short index, int price)
int id = inventoryWindow->items->getId(index);
ITEM_SHOP item_shop;
- sprintf(item_shop.name, "%s %i gp", itemDb.getName(id).c_str(), price);
+ sprintf(item_shop.name, "%s %i gp",
+ itemDb.getItemInfo(id)->getName().c_str(), price);
item_shop.price = price;
item_shop.index = index;
item_shop.id = id;