Detailed Description

This is the zone manager.

In this property class you can define zones. A zone is a collection of regions that are either all together in memory or not at all. A region is made from a set of maps and represents the actual geometry that is in memory. A region is loaded or unloaded as one unit. A region can be in multiple zones. In that case if you are in some region then all zones that contain that region will be in memory, The representation of a region.

This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):

Member Function Documentation

This will load all zones that contain the given region and unload all other zones. It is safe to call this too many times as it will check if a region or zone is already loaded or not and avoid doing unneeded work.

The XML file should contain a 'level' or 'world' node. In case it is a 'world' file then the zone manager will automatically create a region called 'main' and a zone called 'main' with a default start location. This is a convenience.

Parameters:

path

is a VFS path. Current VFS dir will be set to that path. Can be 0 if no path is desired.

file

is a VFS file.

Returns:

true on success. On failure the error will be reported to the reporter and false will be returned.

virtual bool iPcZoneManager::Load

(

iDocumentNode *

node

)

[pure virtual]

Load a zone definition from an XML node.

Parameters:

node

is the node containing region and zone definitions.

Returns:

true on success. On failure the error will be reported to the reporter and false will be returned.

virtual int iPcZoneManager::PointCamera

(

const char *

entity,

const char *

regionname,

const char *

startname = 0

)

[pure virtual]

Take the specified region (by name), load all zones associated with that region and then setup the given pccamera so that it points to the specified starting posision in this region.

If 0 is given then the default position will be used. Returns one of:

CEL_ZONEERROR_OK: no error

CEL_ZONEERROR_BADREGION: can't find region

CEL_ZONEERROR_BADSTART: can't find start

CEL_ZONEERROR_LOAD: error loading zone

Parameters:

entity

is the name of the entity that contains the pccamera property class.

regionname

the name of the region to load.

startname

the name of the starting position.

virtual int iPcZoneManager::PointMesh

(

const char *

entity,

const char *

regionname,

const char *

startname = 0

)

[pure virtual]

Take the specified region (by name), load all zones associated with that region and then place the given pcmesh so that it is positioned at the specified starting posision in this region.