From 8fe0239f5a369b63c43345e5078a52dbbe98dd9d Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sat, 2 Sep 2006 18:29:30 +0000 Subject: Implemented unique public IDs. --- src/state.h | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'src/state.h') diff --git a/src/state.h b/src/state.h index 955b37da..07d466a1 100644 --- a/src/state.h +++ b/src/state.h @@ -26,34 +26,9 @@ #include -#include "player.h" +#include "object.h" -class Map; - -/** - * Combined map/entity structure. - */ -struct MapComposite { - /** - * Default constructor. - */ - MapComposite() : map(NULL) { } - - /** - * Actual map. - */ - Map *map; - - /** - * Objects (items, players, monsters, etc) located on the map. - */ - Objects objects; - - /** - * Players located on the map. - */ - Players players; -}; +class MapComposite; /** * State class contains all information/procedures associated with the game @@ -64,7 +39,7 @@ class State /** * List of maps. */ - std::map maps; + std::map maps; public: State(); @@ -75,15 +50,10 @@ class State */ void update(); - /** - * Send game state to given player. - */ - void informPlayer(PlayerPtr playerPtr); - /** * Load map into game world. */ - bool loadMap(unsigned mapId); + MapComposite *loadMap(unsigned mapId); /** * Add object to the map. -- cgit v1.2.3-60-g2f50