summaryrefslogtreecommitdiffstats
path: root/src/game-server/state.hpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-12-30 13:29:03 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-12-30 13:29:03 +0000
commit7d23129b8f16dfa73e3842ac8e91c61e5a3393aa (patch)
tree49132223612cd4286fbf265b9b61bcc8d756f1ea /src/game-server/state.hpp
parent6134c13fbbaf2e5516dd924425352416f66ece9b (diff)
downloadmanaserv-7d23129b8f16dfa73e3842ac8e91c61e5a3393aa.tar.gz
manaserv-7d23129b8f16dfa73e3842ac8e91c61e5a3393aa.tar.xz
manaserv-7d23129b8f16dfa73e3842ac8e91c61e5a3393aa.zip
Made attack code pixel-based and faster. Split State::update. Improved
interface of MapComposite iterators.
Diffstat (limited to 'src/game-server/state.hpp')
-rw-r--r--src/game-server/state.hpp64
1 files changed, 37 insertions, 27 deletions
diff --git a/src/game-server/state.hpp b/src/game-server/state.hpp
index 36bd87d..7fcfcf2 100644
--- a/src/game-server/state.hpp
+++ b/src/game-server/state.hpp
@@ -37,39 +37,49 @@ class MapComposite;
*/
class State
{
- /**
- * List of maps.
- */
- std::map<unsigned int, MapComposite *> maps;
+ /**
+ * List of maps.
+ */
+ std::map<unsigned int, MapComposite *> maps;
- public:
- State();
- ~State();
+ /**
+ * Updates object states on the map.
+ */
+ void updateMap(MapComposite *);
- /**
- * Update game state (contains core server logic).
- */
- void update();
+ /**
+ * Informs a player of what happened around.
+ */
+ void informPlayer(MapComposite *, Player *);
- /**
- * Load map into game world.
- */
- MapComposite *loadMap(unsigned mapId);
+ public:
+ State();
+ ~State();
- /**
- * Add object to the map.
- */
- void addObject(ObjectPtr objectPtr);
+ /**
+ * Updates game state (contains core server logic).
+ */
+ void update();
- /**
- * Remove an object from the map.
- */
- void removeObject(ObjectPtr objectPtr);
+ /**
+ * Loads map into game world.
+ */
+ MapComposite *loadMap(unsigned mapId);
- /**
- * Say around an object.
- */
- void sayAround(Object *, std::string text);
+ /**
+ * Adds object to the map.
+ */
+ void addObject(ObjectPtr objectPtr);
+
+ /**
+ * Removes an object from the map.
+ */
+ void removeObject(ObjectPtr objectPtr);
+
+ /**
+ * Says something around an object.
+ */
+ void sayAround(Object *, std::string text);
};
extern State *gameState;