Pyrogenesis trunk
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CMapReader Class Reference

#include <MapReader.h>

Inheritance diagram for CMapReader:
Inheritance graph
[legend]
Collaboration diagram for CMapReader:
Collaboration graph
[legend]

Classes

struct  GeneratorState
 

Public Member Functions

 CMapReader ()
 
 ~CMapReader ()
 
void LoadMap (const VfsPath &pathname, const ScriptContext &cx, JS::HandleValue settings, CTerrain *, WaterManager *, SkyManager *, CLightEnv *, CGameView *, CCinemaManager *, CTriggerManager *, CPostprocManager *pPostproc, CSimulation2 *, const CSimContext *, 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)
 

Private Member Functions

int LoadScriptSettings ()
 
int LoadPlayerSettings ()
 
int LoadMapSettings ()
 
int UnpackTerrain ()
 
int UnpackCinema ()
 
int ApplyData ()
 
int ApplyTerrainData ()
 
int ReadXML ()
 
int ReadXMLEntities ()
 
int LoadRMSettings ()
 
int StartMapGeneration (const CStrW &scriptFile)
 
int PollMapGeneration ()
 
int ParseTerrain ()
 
int ParseEntities ()
 
int ParseEnvironment ()
 
int ParseCamera ()
 

Private Attributes

ssize_t m_PatchesPerSide {0}
 
std::vector< u16m_Heightmap
 
std::vector< CTerrainTextureEntry * > m_TerrainTextures
 
std::vector< STileDescm_Tiles
 
CLightEnv m_LightEnv
 
CStrW m_Script
 
JS::PersistentRootedValue m_ScriptSettings
 
JS::PersistentRootedValue m_MapData
 
std::unique_ptr< GeneratorStatem_GeneratorState
 
CFileUnpacker unpacker
 
CTerrainpTerrain
 
WaterManagerpWaterMan
 
SkyManagerpSkyMan
 
CPostprocManagerpPostproc
 
CLightEnvpLightEnv
 
CGameViewpGameView
 
CCinemaManagerpCinema
 
CTriggerManager * pTrigMan
 
CSimulation2pSimulation2
 
const CSimContextpSimContext
 
int m_PlayerID
 
bool m_SkipEntities
 
VfsPath filename_xml
 
bool only_xml
 
u32 file_format_version
 
entity_id_t m_StartingCameraTarget
 
CVector3D m_StartingCamera
 
size_t cur_terrain_tex {0}
 
size_t num_terrain_tex
 
CXMLReaderxml_reader {nullptr}
 

Friends

class CXMLReader
 

Additional Inherited Members

- Public Types inherited from CMapIO
enum  { FILE_VERSION = 7 }
 
enum  { FILE_READ_VERSION = 7 }
 

Constructor & Destructor Documentation

◆ CMapReader()

CMapReader::CMapReader ( )
default

◆ ~CMapReader()

CMapReader::~CMapReader ( )

Member Function Documentation

◆ ApplyData()

int CMapReader::ApplyData ( )
private

◆ ApplyTerrainData()

int CMapReader::ApplyTerrainData ( )
private

◆ LoadMap()

void CMapReader::LoadMap ( const VfsPath pathname,
const ScriptContext cx,
JS::HandleValue  settings,
CTerrain pTerrain_,
WaterManager pWaterMan_,
SkyManager pSkyMan_,
CLightEnv pLightEnv_,
CGameView pGameView_,
CCinemaManager pCinema_,
CTriggerManager *  pTrigMan_,
CPostprocManager pPostproc,
CSimulation2 pSimulation2_,
const CSimContext pSimContext_,
int  playerID,
bool  skipEntities 
)

◆ LoadMapSettings()

int CMapReader::LoadMapSettings ( )
private

◆ LoadPlayerSettings()

int CMapReader::LoadPlayerSettings ( )
private

◆ LoadRandomMap()

void CMapReader::LoadRandomMap ( const CStrW &  scriptFile,
const ScriptContext cx,
JS::HandleValue  settings,
CTerrain pTerrain_,
WaterManager pWaterMan_,
SkyManager pSkyMan_,
CLightEnv pLightEnv_,
CGameView pGameView_,
CCinemaManager pCinema_,
CTriggerManager *  pTrigMan_,
CPostprocManager pPostproc_,
CSimulation2 pSimulation2_,
int  playerID 
)

◆ LoadRMSettings()

int CMapReader::LoadRMSettings ( )
private

◆ LoadScriptSettings()

int CMapReader::LoadScriptSettings ( )
private

◆ ParseCamera()

int CMapReader::ParseCamera ( )
private

◆ ParseEntities()

int CMapReader::ParseEntities ( )
private

◆ ParseEnvironment()

int CMapReader::ParseEnvironment ( )
private

◆ ParseTerrain()

int CMapReader::ParseTerrain ( )
private

◆ PollMapGeneration()

int CMapReader::PollMapGeneration ( )
private

◆ ReadXML()

int CMapReader::ReadXML ( )
private

◆ ReadXMLEntities()

int CMapReader::ReadXMLEntities ( )
private

◆ StartMapGeneration()

int CMapReader::StartMapGeneration ( const CStrW &  scriptFile)
private

◆ UnpackCinema()

int CMapReader::UnpackCinema ( )
private

◆ UnpackTerrain()

int CMapReader::UnpackTerrain ( )
private

Friends And Related Function Documentation

◆ CXMLReader

friend class CXMLReader
friend

Member Data Documentation

◆ cur_terrain_tex

size_t CMapReader::cur_terrain_tex {0}
private

◆ file_format_version

u32 CMapReader::file_format_version
private

◆ filename_xml

VfsPath CMapReader::filename_xml
private

◆ m_GeneratorState

std::unique_ptr<GeneratorState> CMapReader::m_GeneratorState
private

◆ m_Heightmap

std::vector<u16> CMapReader::m_Heightmap
private

◆ m_LightEnv

CLightEnv CMapReader::m_LightEnv
private

◆ m_MapData

JS::PersistentRootedValue CMapReader::m_MapData
private

◆ m_PatchesPerSide

ssize_t CMapReader::m_PatchesPerSide {0}
private

◆ m_PlayerID

int CMapReader::m_PlayerID
private

◆ m_Script

CStrW CMapReader::m_Script
private

◆ m_ScriptSettings

JS::PersistentRootedValue CMapReader::m_ScriptSettings
private

◆ m_SkipEntities

bool CMapReader::m_SkipEntities
private

◆ m_StartingCamera

CVector3D CMapReader::m_StartingCamera
private

◆ m_StartingCameraTarget

entity_id_t CMapReader::m_StartingCameraTarget
private

◆ m_TerrainTextures

std::vector<CTerrainTextureEntry*> CMapReader::m_TerrainTextures
private

◆ m_Tiles

std::vector<STileDesc> CMapReader::m_Tiles
private

◆ num_terrain_tex

size_t CMapReader::num_terrain_tex
private

◆ only_xml

bool CMapReader::only_xml
private

◆ pCinema

CCinemaManager* CMapReader::pCinema
private

◆ pGameView

CGameView* CMapReader::pGameView
private

◆ pLightEnv

CLightEnv* CMapReader::pLightEnv
private

◆ pPostproc

CPostprocManager* CMapReader::pPostproc
private

◆ pSimContext

const CSimContext* CMapReader::pSimContext
private

◆ pSimulation2

CSimulation2* CMapReader::pSimulation2
private

◆ pSkyMan

SkyManager* CMapReader::pSkyMan
private

◆ pTerrain

CTerrain* CMapReader::pTerrain
private

◆ pTrigMan

CTriggerManager* CMapReader::pTrigMan
private

◆ pWaterMan

WaterManager* CMapReader::pWaterMan
private

◆ unpacker

CFileUnpacker CMapReader::unpacker
private

◆ xml_reader

CXMLReader* CMapReader::xml_reader {nullptr}
private

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