summaryrefslogtreecommitdiff
path: root/src/floor_item.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 22:56:29 +0000
commit3dc311a652d1fda1252903a974920395e56e5668 (patch)
tree7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/floor_item.cpp
parent78771718bf7af14273d7bb0090dccff97b00b397 (diff)
downloadmana-3dc311a652d1fda1252903a974920395e56e5668.tar.gz
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2
mana-3dc311a652d1fda1252903a974920395e56e5668.tar.xz
mana-3dc311a652d1fda1252903a974920395e56e5668.zip
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/floor_item.cpp')
-rwxr-xr-xsrc/floor_item.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/floor_item.cpp b/src/floor_item.cpp
index d7c597fe..691c5acd 100755
--- a/src/floor_item.cpp
+++ b/src/floor_item.cpp
@@ -45,7 +45,7 @@ void remove_floor_item(unsigned int int_id)
{
std::list<FloorItem *>::iterator i;
for (i = floorItems.begin(); i != floorItems.end(); i++) {
- if ((*i)->int_id == int_id) {
+ if ((*i)->getId() == int_id) {
delete (*i);
floorItems.erase(i);
return;
@@ -58,9 +58,9 @@ unsigned int find_floor_item_by_cor(unsigned short x, unsigned short y)
std::list<FloorItem *>::iterator i;
for (i = floorItems.begin(); i != floorItems.end(); i++) {
FloorItem *floorItem = (*i);
- if (floorItem->x == x && floorItem->y == y)
+ if (floorItem->getX() == x && floorItem->getY() == y)
{
- return floorItem->int_id;
+ return floorItem->getId();
}
}
return 0;
@@ -71,18 +71,9 @@ FloorItem *find_floor_item_by_id(unsigned int int_id)
std::list<FloorItem*>::iterator i;
for (i = floorItems.begin(); i != floorItems.end(); i++) {
FloorItem *floorItem = (*i);
- if (floorItem->int_id == int_id) {
+ if (floorItem->getId() == int_id) {
return floorItem;
}
}
return NULL;
}
-
-FloorItem::FloorItem():
- id(0), int_id(0), x(0), y(0)
-{
-}
-
-FloorItem::~FloorItem()
-{
-}