summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 03:34:45 +0000
commit8bde9095c5840b8d62ebafe11beaed98877d6ac2 (patch)
tree537f717a339d1247cae222eb7a354ea5dbe8babf /src/gui/itemcontainer.cpp
parenta246c08cef5e4d598fc07a681eb971bfbcf01519 (diff)
downloadmana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.gz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.bz2
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.tar.xz
mana-8bde9095c5840b8d62ebafe11beaed98877d6ac2.zip
* Made Sprite into an interface implemented by both FloorItem and Being, which
hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 81a85b8d..3f00f9eb 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -39,7 +39,7 @@
#include "../resources/resourcemanager.h"
ItemContainer::ItemContainer(Inventory *inventory):
- inventory(inventory)
+ mInventory(inventory)
{
ResourceManager *resman = ResourceManager::getInstance();
Image *itemImg = resman->getImage("graphics/sprites/items.png");
@@ -51,7 +51,7 @@ ItemContainer::ItemContainer(Inventory *inventory):
if (!selImg) logger->error("Unable to load selection.png");
selectedItem = 0; // No item selected
- maxItems = inventory->getLastUsedSlot();
+ maxItems = mInventory->getLastUsedSlot();
addMouseListener(this);
}
@@ -66,7 +66,7 @@ void ItemContainer::logic()
{
gcn::Widget::logic();
- int i = inventory->getLastUsedSlot();
+ int i = mInventory->getLastUsedSlot();
if (i != maxItems) {
maxItems = i;
@@ -100,7 +100,7 @@ void ItemContainer::draw(gcn::Graphics* graphics)
*/
for (int i = 2; i < INVENTORY_SIZE; i++)
{
- Item *item = inventory->getItem(i);
+ Item *item = mInventory->getItem(i);
if (item->getQuantity() <= 0) {
continue;
@@ -182,6 +182,6 @@ void ItemContainer::mousePress(int mx, int my, int button)
if (index > INVENTORY_SIZE) {
index = INVENTORY_SIZE - 1;
}
- selectedItem = inventory->getItem(index);
+ selectedItem = mInventory->getItem(index);
}
}