From 0a47b2fb30c83f8b021c2015891fe8c936ca6bf0 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Tue, 2 Jan 2007 13:26:47 +0000 Subject: Removed obsolete files. Added a generic trigger system. --- src/game-server/mapcomposite.hpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/game-server/mapcomposite.hpp') diff --git a/src/game-server/mapcomposite.hpp b/src/game-server/mapcomposite.hpp index 84599d39..0623f602 100644 --- a/src/game-server/mapcomposite.hpp +++ b/src/game-server/mapcomposite.hpp @@ -152,14 +152,14 @@ class MapComposite { { return map; } /** - * Inserts an object on the map and sets its public ID. + * Inserts an object on the map. Sets its public ID if relevant. */ - bool insert(Object *); + bool insert(Thing *); /** * Removes an object from the map. */ - void remove(Object *); + void remove(Thing *); /** * Updates zones of every moving beings. @@ -177,6 +177,11 @@ class MapComposite { ZoneIterator getWholeMapIterator() const { return ZoneIterator(MapRegion(), this); } + /** + * Gets an iterator on the objects inside a given rectangle. + */ + ZoneIterator getInsideRectangleIterator(Rectangle const &) const; + /** * Gets an iterator on the objects around a given object. */ @@ -189,10 +194,10 @@ class MapComposite { ZoneIterator getAroundPlayerIterator(Player *, int radius) const; /** - * Gets all the objects on the map. + * Gets everything related to the map. */ - Objects const &getObjects() const - { return objects; } + std::vector< Thing * > const &getEverything() const + { return things; } private: MapComposite(MapComposite const &); @@ -212,12 +217,17 @@ class MapComposite { */ void fillRegion(MapRegion &, Point const &, int) const; + /** + * Fills a region of zones inside a rectangle. + */ + void fillRegion(MapRegion &, Rectangle const &) const; + Map *map; /**< Actual map. */ /** - * Objects (items, players, monsters, etc) located on the map. + * Things (items, players, monsters, etc) located on the map. */ - Objects objects; + std::vector< Thing * > things; /** * Buckets of MovingObjects located on the map, referenced by ID. -- cgit v1.2.3-60-g2f50