To load a map, you must first register a MapFormatReader with the MapLoader.
More...
Detailed Description
To load a map, you must first register a MapFormatReader with the MapLoader.
Then you can ask the MapLoader to load a map, and it will work with the registered MapFormatReaders to make that happen.
See Reference Map/Zone Implemenation for a reference implementation. But any MapFormatReader that supports the aesop-map interfaces should work with all other components (server, client, etc.).
Why all this indirection? Precisely so that other server code (physics engines, AI, ...) can be kept insulated from map formats. It remains to be seen if that is actually practical!
Registration of map format readers is static. That is, once you register a map format reader, the entire process knows about it. For all known use cases, that is acceptable.
Order of registration matters! The first reader to claim a map is asked to load it.
Function Documentation
void aesop::destination_t::clear |
( |
void |
|
) |
throw () [inline, inherited] |
Definition at line 64 of file map.h.
virtual const char* aesop::Map::getId |
( |
void |
|
) |
const throw () [pure virtual, inherited] |
virtual Zone* aesop::Map::getRootZone |
( |
void |
|
) |
throw () [pure virtual, inherited] |
virtual Zone* aesop::Map::getZone |
( |
IN const char * |
zone_id |
) |
[pure virtual, inherited] |
virtual void aesop::Map::iterateZones |
( |
IN |
zone_iteration_fn, |
|
|
IN void * |
context | |
|
) |
| | [pure virtual, inherited] |
virtual const char* aesop::Map::getDefaultStartingPointId |
( |
void |
|
) |
const throw () [pure virtual, inherited] |
virtual void aesop::Map::getStartingPointIds |
( |
OUT VecString & |
ids |
) |
const [pure virtual, inherited] |
virtual void aesop::Map::getStartingPoint |
( |
IN const char * |
id, |
|
|
OUT destination_t & |
start | |
|
) |
| | const [pure virtual, inherited] |
smart_ptr< Map > aesop::loadMap |
( |
IN const char * |
id, |
|
|
IN const char * |
path_to_map_file | |
|
) |
| | |
This is the map loading routine clients should use.
It routes to the correct registered MapFormatReader, and notifies the given notification interface of any type IDs encountered.
virtual const char* aesop::MapFormatReader::getDescription |
( |
void |
|
) |
[pure virtual, inherited] |
virtual bool aesop::MapFormatReader::isMyFormat |
( |
IN const char * |
mapId, |
|
|
IN const char * |
path_to_map_file | |
|
) |
| | [pure virtual, inherited] |
virtual smart_ptr<Map> aesop::MapFormatReader::loadMap |
( |
IN const char * |
mapId, |
|
|
IN const char * |
path_to_map_file | |
|
) |
| | [pure virtual, inherited] |
void aesop::registerMapFormatReader |
( |
IN smart_ptr< MapFormatReader > & |
reader |
) |
|
Variable Documentation
id of start point
Definition at line 70 of file map.h.
3D rect in zone
Definition at line 71 of file map.h.