summaryrefslogtreecommitdiff
path: root/src/floor_item.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-06 02:56:48 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-06 02:56:48 +0000
commite2c61ef8ec4f8685c0eafa2284c7485cec489021 (patch)
treecf2805221603b14e679205845fa0734702a8aae2 /src/floor_item.cpp
parent2a7690e2687a43fdc0004684b7de97b2d84cb8b0 (diff)
downloadmana-e2c61ef8ec4f8685c0eafa2284c7485cec489021.tar.gz
mana-e2c61ef8ec4f8685c0eafa2284c7485cec489021.tar.bz2
mana-e2c61ef8ec4f8685c0eafa2284c7485cec489021.tar.xz
mana-e2c61ef8ec4f8685c0eafa2284c7485cec489021.zip
Added a FloorItemManager class.
Diffstat (limited to 'src/floor_item.cpp')
-rwxr-xr-xsrc/floor_item.cpp68
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;
-}