Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapReader.h
Show All 21 Lines | |||||
#include "graphics/LightEnv.h" | #include "graphics/LightEnv.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "ps/FileIo.h" | #include "ps/FileIo.h" | ||||
#include "scriptinterface/ScriptTypes.h" | #include "scriptinterface/ScriptTypes.h" | ||||
#include "simulation2/system/Entity.h" | #include "simulation2/system/Entity.h" | ||||
class CTerrain; | class CTerrain; | ||||
class WaterManager; | class CWater; | ||||
class SkyManager; | class SkyManager; | ||||
class CLightEnv; | class CLightEnv; | ||||
class CCinemaManager; | class CCinemaManager; | ||||
class CPostprocManager; | class CPostprocManager; | ||||
class CTriggerManager; | class CTriggerManager; | ||||
class CSimulation2; | class CSimulation2; | ||||
class CSimContext; | class CSimContext; | ||||
class CTerrainTextureEntry; | class CTerrainTextureEntry; | ||||
class CGameView; | class CGameView; | ||||
class CXMLReader; | class CXMLReader; | ||||
class CMapGenerator; | class CMapGenerator; | ||||
class ScriptContext; | class ScriptContext; | ||||
class ScriptInterface; | class ScriptInterface; | ||||
class CMapReader : public CMapIO | class CMapReader : public CMapIO | ||||
{ | { | ||||
friend class CXMLReader; | friend class CXMLReader; | ||||
public: | public: | ||||
// constructor | // constructor | ||||
CMapReader(); | CMapReader(); | ||||
~CMapReader(); | ~CMapReader(); | ||||
// LoadMap: try to load the map from given file; reinitialise the scene to new data if successful | // LoadMap: try to load the map from given file; reinitialise the scene to new data if successful | ||||
void LoadMap(const VfsPath& pathname, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, | void LoadMap(const VfsPath& pathname, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, CWater*, SkyManager*, CLightEnv*, CGameView*, | ||||
CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, | CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, | ||||
int playerID, bool skipEntities); | int playerID, bool skipEntities); | ||||
void LoadRandomMap(const CStrW& scriptFile, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc_, CSimulation2*, int playerID); | void LoadRandomMap(const CStrW& scriptFile, const ScriptContext& cx, JS::HandleValue settings, CTerrain*, CWater*, SkyManager*, CLightEnv*, CGameView*, CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc_, CSimulation2*, int playerID); | ||||
private: | private: | ||||
// Load script settings for use by scripts | // Load script settings for use by scripts | ||||
int LoadScriptSettings(); | int LoadScriptSettings(); | ||||
// load player settings only | // load player settings only | ||||
int LoadPlayerSettings(); | int LoadPlayerSettings(); | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | private: | ||||
CStrW m_ScriptFile; | CStrW m_ScriptFile; | ||||
JS::PersistentRootedValue m_ScriptSettings; | JS::PersistentRootedValue m_ScriptSettings; | ||||
JS::PersistentRootedValue m_MapData; | JS::PersistentRootedValue m_MapData; | ||||
CMapGenerator* m_MapGen; | CMapGenerator* m_MapGen; | ||||
CFileUnpacker unpacker; | CFileUnpacker unpacker; | ||||
CTerrain* pTerrain; | CTerrain* pTerrain; | ||||
WaterManager* pWaterMan; | CWater* pWater; | ||||
SkyManager* pSkyMan; | SkyManager* pSkyMan; | ||||
CPostprocManager* pPostproc; | CPostprocManager* pPostproc; | ||||
CLightEnv* pLightEnv; | CLightEnv* pLightEnv; | ||||
CGameView* pGameView; | CGameView* pGameView; | ||||
CCinemaManager* pCinema; | CCinemaManager* pCinema; | ||||
CTriggerManager* pTrigMan; | CTriggerManager* pTrigMan; | ||||
CSimulation2* pSimulation2; | CSimulation2* pSimulation2; | ||||
const CSimContext* pSimContext; | const CSimContext* pSimContext; | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator