Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapReader.h
/* Copyright (C) 2016 Wildfire Games. | /* Copyright (C) 2017 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 18 Lines | |||||
class CObjectEntry; | class CObjectEntry; | ||||
class CTerrain; | class CTerrain; | ||||
class WaterManager; | class WaterManager; | ||||
class SkyManager; | class SkyManager; | ||||
class CLightEnv; | class CLightEnv; | ||||
class CCinemaManager; | class CCinemaManager; | ||||
class CPostprocManager; | class CPostprocManager; | ||||
class CTriggerManager; | |||||
class CSimulation2; | class CSimulation2; | ||||
class CSimContext; | class CSimContext; | ||||
class CTerrainTextureEntry; | class CTerrainTextureEntry; | ||||
class ScriptInterface; | class ScriptInterface; | ||||
class CGameView; | class CGameView; | ||||
class CXMLReader; | class CXMLReader; | ||||
class CMapGenerator; | class CMapGenerator; | ||||
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, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, | void LoadMap(const VfsPath& pathname, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, | ||||
CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, | CCinemaManager*, CPostprocManager* pPostproc, CSimulation2*, const CSimContext*, | ||||
int playerID, bool skipEntities); | int playerID, bool skipEntities); | ||||
void LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, CCinemaManager*, CTriggerManager*, CPostprocManager* pPostproc_, CSimulation2*, int playerID); | void LoadRandomMap(const CStrW& scriptFile, JSRuntime* rt, JS::HandleValue settings, CTerrain*, WaterManager*, SkyManager*, CLightEnv*, CGameView*, | ||||
CCinemaManager*, 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 64 Lines • ▼ Show 20 Lines | private: | ||||
CFileUnpacker unpacker; | CFileUnpacker unpacker; | ||||
CTerrain* pTerrain; | CTerrain* pTerrain; | ||||
WaterManager* pWaterMan; | WaterManager* pWaterMan; | ||||
SkyManager* pSkyMan; | SkyManager* pSkyMan; | ||||
CPostprocManager* pPostproc; | CPostprocManager* pPostproc; | ||||
CLightEnv* pLightEnv; | CLightEnv* pLightEnv; | ||||
CGameView* pGameView; | CGameView* pGameView; | ||||
CCinemaManager* pCinema; | CCinemaManager* pCinema; | ||||
CTriggerManager* pTrigMan; | |||||
CSimulation2* pSimulation2; | CSimulation2* pSimulation2; | ||||
const CSimContext* pSimContext; | const CSimContext* pSimContext; | ||||
int m_PlayerID; | int m_PlayerID; | ||||
bool m_SkipEntities; | bool m_SkipEntities; | ||||
VfsPath filename_xml; | VfsPath filename_xml; | ||||
bool only_xml; | bool only_xml; | ||||
u32 file_format_version; | u32 file_format_version; | ||||
entity_id_t m_StartingCameraTarget; | entity_id_t m_StartingCameraTarget; | ||||
Show All 37 Lines |
Wildfire Games · Phabricator