diff options
Diffstat (limited to 'src/floor_item.cpp')
-rwxr-xr-x | src/floor_item.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/floor_item.cpp b/src/floor_item.cpp index 66adcd9b..775a9cb8 100755 --- a/src/floor_item.cpp +++ b/src/floor_item.cpp @@ -23,8 +23,6 @@ #include "floor_item.h" -#include <list> - #include "map.h" #include "graphic/spriteset.h" @@ -34,9 +32,6 @@ extern Spriteset *itemset; -typedef std::list<FloorItem*> FloorItems; -FloorItems floorItems; - FloorItem::FloorItem(unsigned int id, unsigned int itemId, unsigned short x, @@ -60,66 +55,3 @@ FloorItem::~FloorItem() // Remove and delete the representative sprite mMap->removeSprite(mSpriteIterator); } - -void empty_floor_items() -{ - FloorItems::iterator i; - for (i = floorItems.begin(); i != floorItems.end(); i++) { - delete (*i); - } - floorItems.clear(); -} - -void add_floor_item(FloorItem *floorItem) -{ - floorItems.push_back(floorItem); -} - -void remove_floor_item(unsigned int id) -{ - FloorItems::iterator i; - - for (i = floorItems.begin(); i != floorItems.end(); i++) - { - if ((*i)->getId() == id) - { - delete (*i); - floorItems.erase(i); - return; - } - } -} - -FloorItem* find_floor_item_by_cor(unsigned short x, unsigned short y) -{ - FloorItems::iterator i; - - for (i = floorItems.begin(); i != floorItems.end(); i++) - { - FloorItem *floorItem = (*i); - - if (floorItem->getX() == x && floorItem->getY() == y) - { - return floorItem; - } - } - - return 0; -} - -FloorItem *find_floor_item_by_id(unsigned int int_id) -{ - FloorItems::iterator i; - - for (i = floorItems.begin(); i != floorItems.end(); i++) - { - FloorItem *floorItem = (*i); - - if (floorItem->getId() == int_id) - { - return floorItem; - } - } - - return NULL; -} |