diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-07-27 17:20:22 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-07-27 17:20:22 +0000 |
commit | d0b6b3d1c96e437d12410703a8e530decd0b028f (patch) | |
tree | f3568279aa6c31594f525f061efc6eda08278635 /src/state.h | |
parent | 285b40d1cb768e235aed894f4704e1013cb054ea (diff) | |
download | manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.gz manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.bz2 manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.xz manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.zip |
First step toward a restructured class hierarchy for world actors: add
MovingObject and Player classes.
Diffstat (limited to 'src/state.h')
-rw-r--r-- | src/state.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/src/state.h b/src/state.h index 2ebf8b1e..b9654f92 100644 --- a/src/state.h +++ b/src/state.h @@ -28,9 +28,7 @@ #include "being.h" -namespace tmwserv -{ - class Map; +class Map; /** * Combined map/entity structure @@ -47,14 +45,14 @@ struct MapComposite { Map *map; /** - * Beings located on the map + * Objects (items, players, monsters, etc) located on the map */ - Beings beings; + Objects objects; /** - * Items located on the map + * Players located on the map */ - Objects objects; + Players players; }; /** @@ -78,19 +76,9 @@ class State void update(); /** - * Add being to game world at specified map - */ - void addBeing(BeingPtr beingPtr); - - /** - * Remove being from game world + * Send game state to given player */ - void removeBeing(BeingPtr beingPtr); - - /** - * Send game state to given being - */ - void informBeing(BeingPtr beingPtr); + void informPlayer(PlayerPtr playerPtr); /** * Load map into game world @@ -108,8 +96,6 @@ class State void removeObject(ObjectPtr objectPtr); }; -} // namespace tmwserv - -extern tmwserv::State * gameState; +extern State *gameState; #endif |