Simulator::cSimulatorSystem class

Base classes

class App::IMessageListener
An interface that can receive messages sent through the app.
class IVirtual
A default interface that provides a virtual destructor, it should only be used internally.

Public static functions

static auto Get() -> cSimulatorSystem*
static auto Create() -> cSimulatorSystem*
Creates the Simulator System class.

Public functions

auto Initialize() -> bool virtual
auto Dispose() -> bool virtual
auto InitializeSubSystems() -> bool virtual
auto DisposeSubSystems() -> bool virtual
auto func20h(uint32_t) -> int virtual
void InitializeGameModes() virtual
void func28h(int) virtual
void Update(int milliseconds) virtual
void PostUpdate(int milliseconds) virtual
Calls UpdateUIGraphics(), updates all the UI updatable elements.
void UpdateUIGraphics(int milliseconds) virtual
Calls update on all the updatable UI elements registered in the system.
void AddUpdatableUIGraphic(ISimulatorUIGraphic*, bool = true) virtual
auto ContainsUpdatableUIGraphic(ISimulatorUIGraphic*) -> bool virtual
auto RemoveUpdatableUIGraphic(ISimulatorUIGraphic*) -> bool virtual
void ClearUpdatableUIGraphics() virtual
auto Write(ISerializerStream*) -> bool virtual
auto Read(ISerializerStream*) -> bool virtual
auto func50h() -> bool virtual
auto func54h() -> bool virtual
auto func58h() -> bool virtual
void AddStrategy(ISimulatorStrategy* strategy, uint32_t id)
Adds the given strategy to the SimulatorySystem and sends it to the ModAPI DLLs.

Protected variables

int mnRefCount
bool field_0C
bool field_0D
bool field_0E
float field_10
float field_14
int field_18
int field_1C
list<intrusive_ptr<ISimulatorUIGraphic>> field_20
bool field_2C
int field_30
int field_34
int field_38
int field_3C
int field_40
int field_44
App::MessageListenerData mMessageData
vector<ISimulatorStrategyPtr> mSubSystems

Function documentation

static cSimulatorSystem* Simulator::cSimulatorSystem::Create()

Creates the Simulator System class.

This shouldn't be called directly, but it can be detoured to override the simulator system.

void Simulator::cSimulatorSystem::PostUpdate(int milliseconds) virtual

Calls UpdateUIGraphics(), updates all the UI updatable elements.

Also calls Update() on all the system strategies.

void Simulator::cSimulatorSystem::UpdateUIGraphics(int milliseconds) virtual

Calls update on all the updatable UI elements registered in the system.

Also updates the game terrain cursor.

void Simulator::cSimulatorSystem::AddStrategy(ISimulatorStrategy* strategy, uint32_t id)

Adds the given strategy to the SimulatorySystem and sends it to the ModAPI DLLs.

This means that the Update() and PostUpdate() methods will be called for the strategy when the game is in a Simulator game mode, and it also means that its data will be saved/loaded in player games.

The given ID will be used to identify this strategy in saved games.

The Initialize() method of the strategy will be called. Dispose() will be called when the game exits.