State Class Reference

#include <state.hpp>

List of all members.


Detailed Description

State class contains all information/procedures associated with the game world's state.

Definition at line 51 of file state.hpp.

Public Member Functions

 ~State ()
void update ()
 Updates game state (contains core server logic).
MapCompositegetMap (int map)
 Gets a composite map.
void insert (Thing *)
 Inserts an object on the map.
void remove (Thing *)
 Removes an object from the map.
void enqueueEvent (Object *, DelayedEvent const &)
 Enqueues an event.
void sayAround (Object *, std::string text)
 Says something around an object.

Private Types

typedef std::map< int, MapComposite * > Maps
typedef std::map< Object *,
DelayedEvent
DelayedEvents

Private Member Functions

void updateMap (MapComposite *)
 Updates object states on the map.
void informPlayer (MapComposite *, Character *)
 Informs a player of what happened around the character.
MapCompositeloadMap (int mapId)
 Loads map into game world.

Private Attributes

Maps maps
 List of maps.
DelayedEvents delayedEvents
 List of delayed events.


Member Typedef Documentation

typedef std::map< Object *, DelayedEvent > State::DelayedEvents [private]
 

Definition at line 54 of file state.hpp.

typedef std::map< int, MapComposite * > State::Maps [private]
 

Definition at line 53 of file state.hpp.


Constructor & Destructor Documentation

State::~State  ) 
 

Definition at line 38 of file state.cpp.


Member Function Documentation

void State::enqueueEvent Object ,
DelayedEvent const & 
 

Enqueues an event.

It will be executed at end of update.

Definition at line 429 of file state.cpp.

MapComposite * State::getMap int  map  ) 
 

Gets a composite map.

Definition at line 440 of file state.cpp.

void State::informPlayer MapComposite ,
Character
[private]
 

Informs a player of what happened around the character.

Definition at line 85 of file state.cpp.

void State::insert Thing  ) 
 

Inserts an object on the map.

Definition at line 359 of file state.cpp.

MapComposite * State::loadMap int  mapId  )  [private]
 

Loads map into game world.

Definition at line 447 of file state.cpp.

void State::remove Thing  ) 
 

Removes an object from the map.

Definition at line 386 of file state.cpp.

void State::sayAround Object ,
std::string  text
 

Says something around an object.

Definition at line 463 of file state.cpp.

void State::update  ) 
 

Updates game state (contains core server logic).

Definition at line 279 of file state.cpp.

void State::updateMap MapComposite  )  [private]
 

Updates object states on the map.

Definition at line 46 of file state.cpp.


Member Data Documentation

DelayedEvents State::delayedEvents [private]
 

List of delayed events.

Definition at line 64 of file state.hpp.

Maps State::maps [private]
 

List of maps.

Definition at line 59 of file state.hpp.


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 15:39:18 2007 for TMW Server by  doxygen 1.3.9.1