Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CSimulation2Impl Class Reference
Collaboration diagram for CSimulation2Impl:

Classes

struct  SerializationTestState
 

Public Member Functions

 CSimulation2Impl (CUnitManager *unitManager, ScriptContext &cx, CTerrain *terrain)
 
 ~CSimulation2Impl ()
 
void ResetState (bool skipScriptedComponents, bool skipAI)
 
Status ReloadChangedFile (const VfsPath &path)
 
int ProgressiveLoad ()
 
void Update (int turnLength, const std::vector< SimulationCommand > &commands)
 
void Interpolate (float simFrameLength, float frameOffset, float realFrameLength)
 
void DumpState ()
 
void DumpSerializationTestState (SerializationTestState &state, const OsPath &path, const OsPath::String &suffix)
 
void ReportSerializationFailure (SerializationTestState *primaryStateBefore, SerializationTestState *primaryStateAfter, SerializationTestState *secondaryStateBefore, SerializationTestState *secondaryStateAfter)
 
void InitRNGSeedSimulation ()
 
void InitRNGSeedAI ()
 

Static Public Member Functions

static void ResetComponentState (CComponentManager &componentManager, bool skipScriptedComponents, bool skipAI)
 
static bool LoadDefaultScripts (CComponentManager &componentManager, std::set< VfsPath > *loadedScripts)
 
static bool LoadScripts (CComponentManager &componentManager, std::set< VfsPath > *loadedScripts, const VfsPath &path)
 
static bool LoadTriggerScripts (CComponentManager &componentManager, JS::HandleValue mapSettings, std::set< VfsPath > *loadedScripts)
 
static Status ReloadChangedFileCB (void *param, const VfsPath &path)
 
static void UpdateComponents (CSimContext &simContext, fixed turnLengthFixed, const std::vector< SimulationCommand > &commands)
 
static std::vector< SimulationCommandCloneCommandsFromOtherCompartment (const ScriptInterface &newScript, const ScriptInterface &oldScript, const std::vector< SimulationCommand > &commands)
 

Public Attributes

CSimContext m_SimContext
 
CComponentManager m_ComponentManager
 
double m_DeltaTime
 
float m_LastFrameOffset
 
std::string m_StartupScript
 
JS::PersistentRootedValue m_InitAttributes
 
JS::PersistentRootedValue m_MapSettings
 
std::set< VfsPathm_LoadedScripts
 
uint32_t m_TurnNumber
 
bool m_EnableOOSLog {false}
 
OsPath m_OOSLogPath
 
bool m_EnableSerializationTest {false}
 
int m_RejoinTestTurn {-1}
 
bool m_TestingRejoin {false}
 
std::unique_ptr< CComponentManagerm_SecondaryComponentManager
 
std::unique_ptr< CTerrainm_SecondaryTerrain
 
std::unique_ptr< CSimContextm_SecondaryContext
 
std::unique_ptr< std::set< VfsPath > > m_SecondaryLoadedScripts
 

Constructor & Destructor Documentation

◆ CSimulation2Impl()

CSimulation2Impl::CSimulation2Impl ( CUnitManager unitManager,
ScriptContext cx,
CTerrain terrain 
)
inline

◆ ~CSimulation2Impl()

CSimulation2Impl::~CSimulation2Impl ( )
inline

Member Function Documentation

◆ CloneCommandsFromOtherCompartment()

static std::vector< SimulationCommand > CSimulation2Impl::CloneCommandsFromOtherCompartment ( const ScriptInterface newScript,
const ScriptInterface oldScript,
const std::vector< SimulationCommand > &  commands 
)
inlinestatic

◆ DumpSerializationTestState()

void CSimulation2Impl::DumpSerializationTestState ( SerializationTestState state,
const OsPath path,
const OsPath::String suffix 
)

◆ DumpState()

void CSimulation2Impl::DumpState ( )

◆ InitRNGSeedAI()

void CSimulation2Impl::InitRNGSeedAI ( )

◆ InitRNGSeedSimulation()

void CSimulation2Impl::InitRNGSeedSimulation ( )

◆ Interpolate()

void CSimulation2Impl::Interpolate ( float  simFrameLength,
float  frameOffset,
float  realFrameLength 
)

◆ LoadDefaultScripts()

bool CSimulation2Impl::LoadDefaultScripts ( CComponentManager componentManager,
std::set< VfsPath > *  loadedScripts 
)
static

◆ LoadScripts()

bool CSimulation2Impl::LoadScripts ( CComponentManager componentManager,
std::set< VfsPath > *  loadedScripts,
const VfsPath path 
)
static

◆ LoadTriggerScripts()

bool CSimulation2Impl::LoadTriggerScripts ( CComponentManager componentManager,
JS::HandleValue  mapSettings,
std::set< VfsPath > *  loadedScripts 
)
static

◆ ProgressiveLoad()

int CSimulation2Impl::ProgressiveLoad ( )

◆ ReloadChangedFile()

Status CSimulation2Impl::ReloadChangedFile ( const VfsPath path)

◆ ReloadChangedFileCB()

static Status CSimulation2Impl::ReloadChangedFileCB ( void *  param,
const VfsPath path 
)
inlinestatic

◆ ReportSerializationFailure()

void CSimulation2Impl::ReportSerializationFailure ( SerializationTestState primaryStateBefore,
SerializationTestState primaryStateAfter,
SerializationTestState secondaryStateBefore,
SerializationTestState secondaryStateAfter 
)

◆ ResetComponentState()

static void CSimulation2Impl::ResetComponentState ( CComponentManager componentManager,
bool  skipScriptedComponents,
bool  skipAI 
)
inlinestatic

◆ ResetState()

void CSimulation2Impl::ResetState ( bool  skipScriptedComponents,
bool  skipAI 
)
inline

◆ Update()

void CSimulation2Impl::Update ( int  turnLength,
const std::vector< SimulationCommand > &  commands 
)

◆ UpdateComponents()

void CSimulation2Impl::UpdateComponents ( CSimContext simContext,
fixed  turnLengthFixed,
const std::vector< SimulationCommand > &  commands 
)
static

Member Data Documentation

◆ m_ComponentManager

CComponentManager CSimulation2Impl::m_ComponentManager

◆ m_DeltaTime

double CSimulation2Impl::m_DeltaTime

◆ m_EnableOOSLog

bool CSimulation2Impl::m_EnableOOSLog {false}

◆ m_EnableSerializationTest

bool CSimulation2Impl::m_EnableSerializationTest {false}

◆ m_InitAttributes

JS::PersistentRootedValue CSimulation2Impl::m_InitAttributes

◆ m_LastFrameOffset

float CSimulation2Impl::m_LastFrameOffset

◆ m_LoadedScripts

std::set<VfsPath> CSimulation2Impl::m_LoadedScripts

◆ m_MapSettings

JS::PersistentRootedValue CSimulation2Impl::m_MapSettings

◆ m_OOSLogPath

OsPath CSimulation2Impl::m_OOSLogPath

◆ m_RejoinTestTurn

int CSimulation2Impl::m_RejoinTestTurn {-1}

◆ m_SecondaryComponentManager

std::unique_ptr<CComponentManager> CSimulation2Impl::m_SecondaryComponentManager

◆ m_SecondaryContext

std::unique_ptr<CSimContext> CSimulation2Impl::m_SecondaryContext

◆ m_SecondaryLoadedScripts

std::unique_ptr<std::set<VfsPath> > CSimulation2Impl::m_SecondaryLoadedScripts

◆ m_SecondaryTerrain

std::unique_ptr<CTerrain> CSimulation2Impl::m_SecondaryTerrain

◆ m_SimContext

CSimContext CSimulation2Impl::m_SimContext

◆ m_StartupScript

std::string CSimulation2Impl::m_StartupScript

◆ m_TestingRejoin

bool CSimulation2Impl::m_TestingRejoin {false}

◆ m_TurnNumber

uint32_t CSimulation2Impl::m_TurnNumber

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