Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CWorld Class Reference

CWorld is a general data class containing whatever is needed to accurately represent the world. More...

#include <World.h>

Collaboration diagram for CWorld:
Collaboration graph
[legend]

Public Member Functions

 CWorld (CGame *pGame)
 Constructor. More...
 
 ~CWorld ()
 Destructor. More...
 
void RegisterInit (const CStrW &mapFile, const ScriptContext &cx, JS::HandleValue settings, int playerID)
 Initializes the game world with the attributes provided. More...
 
void RegisterInitRMS (const CStrW &scriptFile, const ScriptContext &cx, JS::HandleValue settings, int playerID)
 
int DeleteMapReader ()
 Explicitly delete m_MapReader once the map has finished loading. More...
 
CTerrainGetTerrain ()
 Get the pointer to the terrain object. More...
 
CUnitManagerGetUnitManager ()
 Get a reference to the unit manager object. More...
 

Private Member Functions

 NONCOPYABLE (CWorld)
 

Private Attributes

CGamem_pGame
 pointer to the CGame object representing the game. More...
 
CTerrainm_Terrain
 pointer to the CTerrain object representing the height map. More...
 
CUnitManagerm_UnitManager
 pointer to the CUnitManager that holds all the units in the world. More...
 
CMapReaderm_MapReader
 

Detailed Description

CWorld is a general data class containing whatever is needed to accurately represent the world.

This includes the map, entities, influence maps, tiles, heightmap, etc.

Constructor & Destructor Documentation

◆ CWorld()

CWorld::CWorld ( CGame pGame)

Constructor.

Parameters
pGameCGame * pGame pointer to the container game object.

◆ ~CWorld()

CWorld::~CWorld ( )

Destructor.

Member Function Documentation

◆ DeleteMapReader()

int CWorld::DeleteMapReader ( )

Explicitly delete m_MapReader once the map has finished loading.

◆ GetTerrain()

CTerrain* CWorld::GetTerrain ( )
inline

Get the pointer to the terrain object.

Returns
CTerrain * the value of m_Terrain.

◆ GetUnitManager()

CUnitManager& CWorld::GetUnitManager ( )
inline

Get a reference to the unit manager object.

Returns
CUnitManager & dereferenced m_UnitManager.

◆ NONCOPYABLE()

CWorld::NONCOPYABLE ( CWorld  )
private

◆ RegisterInit()

void CWorld::RegisterInit ( const CStrW &  mapFile,
const ScriptContext cx,
JS::HandleValue  settings,
int  playerID 
)

Initializes the game world with the attributes provided.

◆ RegisterInitRMS()

void CWorld::RegisterInitRMS ( const CStrW &  scriptFile,
const ScriptContext cx,
JS::HandleValue  settings,
int  playerID 
)

Member Data Documentation

◆ m_MapReader

CMapReader* CWorld::m_MapReader
private

◆ m_pGame

CGame* CWorld::m_pGame
private

pointer to the CGame object representing the game.

◆ m_Terrain

CTerrain* CWorld::m_Terrain
private

pointer to the CTerrain object representing the height map.

◆ m_UnitManager

CUnitManager* CWorld::m_UnitManager
private

pointer to the CUnitManager that holds all the units in the world.


The documentation for this class was generated from the following files: