struct SSystemGlobalEnvironment { IDialogSystem* pDialogSystem; I3DEngine* p3DEngine; INetwork* pNetwork; ICryLobby* pLobby; IScriptSystem* pScriptSystem; IPhysicalWorld* pPhysicalWorld; IFlowSystem* pFlowSystem; IInput* pInput; IMusicSystem* pMusicSystem; IStatoscope* pStatoscope; ICryPak* pCryPak; IFileChangeMonitor* pFileChangeMonitor; IProfileLogSystem* pProfileLogSystem; IParticleManager* pParticleManager; IOpticsManager* pOpticsManager; IFrameProfileSystem* pFrameProfileSystem; ITimer* pTimer; ICryFont* pCryFont; IGame* pGame; ILocalMemoryUsage* pLocalMemoryUsage; IEntitySystem* pEntitySystem; IConsole* pConsole; Telemetry::ITelemetrySystem* pTelemetrySystem; IAudioSystem* pAudioSystem; ISystem* pSystem; ICharacterManager* pCharacterManager; IAISystem* pAISystem; ILog* pLog; ICodeCheckpointMgr* pCodeCheckpointMgr; IMovieSystem* pMovieSystem; INameTable* pNameTable; IVisualLog* pVisualLog; IRenderer* pRenderer; IHardwareMouse* pHardwareMouse; IMaterialEffects* pMaterialEffects; JobManager::IJobManager* pJobManager; ISoftCodeMgr* pSoftCodeMgr; IOverloadSceneManager* pOverloadSceneManager; IFlashUI* pFlashUI; IServiceNetwork* pServiceNetwork; IRemoteCommandManager* pRemoteCommandManager; LiveCreate::IManager* pLiveCreateManager; LiveCreate::IHost* pLiveCreateHost; threadID mMainThreadId; uint32 nMainFrameID; const char* szCmdLine; enum { MAX_DEBUG_STRING_LENGTH = 128 }; char szDebugStatus[MAX_DEBUG_STRING_LENGTH]; bool bServer; bool bMultiplayer; bool bHostMigrating; bool bProfilerEnabled; FrameProfilerSectionCallback callbackStartSection; FrameProfilerSectionCallback callbackEndSection; bool bIgnoreAllAsserts; bool bNoAssertDialog; bool bTesting; bool bNoRandomSeed; SPlatformInfo pi; SSystemInitParams::ProtectedFunction pProtectedFunctions[eProtectedFuncsLast]; bool bIsOutOfMemory; bool bIsOutOfVideoMemory; bool m_isFMVPlaying; bool m_isCutscenePlaying; };
ISystem.h
Global environment. Contains pointers to all global often needed interfaces. This is a faster way to get interface pointer then calling ISystem interface to retrieve one. Notes: Some pointers can be NULL, use with care.
bool bHostMigrating;
bool bIgnoreAllAsserts;
Used by CRY_ASSERT
bool bIsOutOfMemory;
Flag to able to print out of memory conditon
bool bIsOutOfVideoMemory;
bool bMultiplayer;
bool bNoAssertDialog;
bool bNoRandomSeed;
bool bProfilerEnabled;
Used by frame profiler.
bool bServer;
Used to tell if this is a server/multiplayer instance
bool bTesting;
FrameProfilerSectionCallback callbackEndSection;
FrameProfilerSectionCallback callbackStartSection;
bool m_isCutscenePlaying;
bool m_isFMVPlaying;
threadID mMainThreadId;
The main thread ID is used in multiple systems so should be stored globally
uint32 nMainFrameID;
I3DEngine* p3DEngine;
IAISystem* pAISystem;
IAudioSystem* pAudioSystem;
ICharacterManager* pCharacterManager;
ICodeCheckpointMgr* pCodeCheckpointMgr;
IConsole* pConsole;
ICryFont* pCryFont;
ICryPak* pCryPak;
IDialogSystem* pDialogSystem;
IEntitySystem* pEntitySystem;
IFileChangeMonitor* pFileChangeMonitor;
IFlashUI* pFlashUI;
IFlowSystem* pFlowSystem;
IFrameProfileSystem* pFrameProfileSystem;
IGame* pGame;
IHardwareMouse* pHardwareMouse;
SPlatformInfo pi;
IInput* pInput;
JobManager::IJobManager* pJobManager;
LiveCreate::IHost* pLiveCreateHost;
LiveCreate::IManager* pLiveCreateManager;
ICryLobby* pLobby;
ILocalMemoryUsage* pLocalMemoryUsage;
ILog* pLog;
IMaterialEffects* pMaterialEffects;
IMovieSystem* pMovieSystem;
IMusicSystem* pMusicSystem;
INameTable* pNameTable;
INetwork* pNetwork;
IOpticsManager* pOpticsManager;
IOverloadSceneManager* pOverloadSceneManager;
IParticleManager* pParticleManager;
IPhysicalWorld* pPhysicalWorld;
IProfileLogSystem* pProfileLogSystem;
SSystemInitParams::ProtectedFunction pProtectedFunctions[eProtectedFuncsLast];
Protected functions.
IRemoteCommandManager* pRemoteCommandManager;
IRenderer* pRenderer;
IScriptSystem* pScriptSystem;
IServiceNetwork* pServiceNetwork;
ISoftCodeMgr* pSoftCodeMgr;
IStatoscope* pStatoscope;
ISystem* pSystem;
Telemetry::ITelemetrySystem* pTelemetrySystem;
ITimer* pTimer;
IVisualLog* pVisualLog;
const char* szCmdLine;
Startup command line.
char szDebugStatus[MAX_DEBUG_STRING_LENGTH];
_MS_ALIGN(64);
JobManager::IJobManager* GetJobManager();
Getter function for jobmanager
const bool IsClient() const;
const bool IsCutscenePlaying() const;
const bool IsDedicated() const;
const bool IsEditing() const;
const bool IsEditor() const;
this way the compiler can strip out code for consoles
const bool IsEditorGameMode() const;
const bool IsFMVPlaying() const;
void SetCutsceneIsPlaying(const bool isPlaying);
void SetFMVIsPlaying(const bool isPlaying);
SSystemGlobalEnvironment();