diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/itemcontainer.cpp | 14 | ||||
-rw-r--r-- | src/gui/playerbox.cpp | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index f1b9b4ba..9904af02 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -69,7 +69,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) continue; } - image = itemset->spriteset[item->getInfo()->getImage() - 1]; + image = itemset->get(item->getInfo()->getImage() - 1); dynamic_cast<Graphics*>(graphics)->drawImage( image, 36 * (i % 4) + 10, 36 * (i / 4) + 25); } @@ -81,7 +81,7 @@ void EquipmentWindow::draw(gcn::Graphics *graphics) return; } - image = itemset->spriteset[item->getInfo()->getImage() - 1]; + image = itemset->get(item->getInfo()->getImage() - 1); dynamic_cast<Graphics*>(graphics)->drawImage(image, 160, 25); std::stringstream n; diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 67cb5251..cc42066a 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -74,8 +74,8 @@ void ItemContainer::logic() void ItemContainer::draw(gcn::Graphics* graphics) { - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 10; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 10; int w = getWidth(); int columns = w / gridWidth; @@ -119,7 +119,7 @@ void ItemContainer::draw(gcn::Graphics* graphics) if ((idx = item->getInfo()->getImage()) > 0) { dynamic_cast<Graphics*>(graphics)->drawImage( - itemset->spriteset[idx - 1], itemX, itemY); + itemset->get(idx - 1), itemX, itemY); } // Draw item caption @@ -143,8 +143,8 @@ void ItemContainer::setWidth(int width) { gcn::Widget::setWidth(width); - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 14; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 14; int columns = getWidth() / gridWidth; if (columns < 1) @@ -168,8 +168,8 @@ void ItemContainer::selectNone() void ItemContainer::mousePress(int mx, int my, int button) { - int gridWidth = itemset->spriteset[0]->getWidth() + 4; - int gridHeight = itemset->spriteset[0]->getHeight() + 10; + int gridWidth = itemset->get(0)->getWidth() + 4; + int gridHeight = itemset->get(0)->getHeight() + 10; int w = getWidth(); int columns = w / gridWidth; diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp index e61cabde..34283b4c 100644 --- a/src/gui/playerbox.cpp +++ b/src/gui/playerbox.cpp @@ -90,16 +90,16 @@ void PlayerBox::draw(gcn::Graphics *graphics) // Draw character dynamic_cast<Graphics*>(graphics)->drawImage( - playerset->spriteset[0], 23, 12); + playerset->get(0), 23, 12); // Draw his hair if (hairColor >= 0 && hairStyle >= 0 && hairColor < NR_HAIR_COLORS && hairStyle < NR_HAIR_STYLES) { int hf = 9 * hairColor; - if (hf >= 0 && hf < (int)hairset[hairStyle]->spriteset.size()) { + if (hf >= 0 && hf < (int)hairset[hairStyle]->size()) { dynamic_cast<Graphics*>(graphics)->drawImage( - hairset[hairStyle]->spriteset[hf], 35, 7); + hairset[hairStyle]->get(hf), 35, 7); } } } |