32#ifndef ERROR_GROUP_GAME_DEFINED
33#define ERROR_GROUP_GAME_DEFINED
ERROR_TYPE(Game_World, MapLoadFailed)
ERROR_SUBGROUP(Game, World)
CLightEnv g_LightEnv
Global light settings.
Definition: World.cpp:43
The container that holds the rules, resources and attributes of the game.
Definition: Game.h:43
Class CLightEnv: description of a lighting environment - contains all the necessary parameters for re...
Definition: LightEnv.h:37
Definition: MapReader.h:47
Definition: UnitManager.h:38
CWorld is a general data class containing whatever is needed to accurately represent the world.
Definition: World.h:50
std::unique_ptr< CMapReader > m_MapReader
The map reader gets deleted just after the map is read.
Definition: World.h:109
CTerrain & GetTerrain()
Get a reference to the terrain object.
Definition: World.h:75
void RegisterInitRMS(const CStrW &scriptFile, const ScriptContext &cx, JS::HandleValue settings, int playerID)
Definition: World.cpp:98
CGame & m_Game
Reference to the CGame object representing the game.
Definition: World.h:94
const std::unique_ptr< CTerrain > m_Terrain
The CTerrain object represents the height map.
Definition: World.h:99
CWorld(CGame &game)
Constructor.
Definition: World.cpp:51
int DeleteMapReader()
Explicitly delete m_MapReader once the map has finished loading.
Definition: World.cpp:115
const std::unique_ptr< CUnitManager > m_UnitManager
The CUnitManager that holds all the units in the world.
Definition: World.h:104
void RegisterInit(const CStrW &mapFile, const ScriptContext &cx, JS::HandleValue settings, int playerID)
Initializes the game world with the attributes provided.
Definition: World.cpp:64
CUnitManager & GetUnitManager()
Get a reference to the unit manager object.
Definition: World.h:85
Abstraction around a SpiderMonkey JSContext.
Definition: ScriptContext.h:46