summaryrefslogtreecommitdiff
path: root/src/flooritemmanager.h
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/flooritemmanager.h
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/flooritemmanager.h')
-rw-r--r--src/flooritemmanager.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/flooritemmanager.h b/src/flooritemmanager.h
new file mode 100644
index 00000000..c12883a4
--- /dev/null
+++ b/src/flooritemmanager.h
@@ -0,0 +1,57 @@
+/*
+ * The Mana World
+ * Copyright 2004 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * The Mana World is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * The Mana World is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with The Mana World; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * $Id$
+ */
+
+#ifndef _TMW_FLOORITEMMANAGER_H
+#define _TMW_FLOORITEMMANAGER_H
+
+#include <list>
+
+class FloorItem;
+class Map;
+
+class FloorItemManager
+{
+ public:
+ ~FloorItemManager();
+
+ FloorItem* create(unsigned int id, unsigned int itemId,
+ unsigned short x, unsigned short y, Map *map);
+
+ void destroy(FloorItem *item);
+
+ void clear();
+
+ FloorItem* findById(unsigned int id);
+ FloorItem* findByCoordinates(unsigned short x, unsigned short y);
+
+ private:
+ typedef std::list<FloorItem*> FloorItems;
+ typedef FloorItems::iterator FloorItemIterator;
+ FloorItems mFloorItems;
+
+};
+
+// TODO Get rid of the global?
+extern FloorItemManager *floorItemManager;
+
+#endif