some Code/Legacy fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -159,7 +159,7 @@ class CWatchdogThread;
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
typedef void* WIN_HMODULE;
|
||||
using WIN_HMODULE = void*;
|
||||
#else
|
||||
typedef void* WIN_HMODULE;
|
||||
#endif
|
||||
@@ -174,7 +174,7 @@ struct IDataProbe;
|
||||
|
||||
#define PHSYICS_OBJECT_ENTITY 0
|
||||
|
||||
typedef void (__cdecl * VTuneFunction)(void);
|
||||
using VTuneFunction = void (__cdecl *)(void);
|
||||
extern VTuneFunction VTResume;
|
||||
extern VTuneFunction VTPause;
|
||||
|
||||
@@ -246,10 +246,10 @@ struct CProfilingSystem
|
||||
|
||||
// Summary:
|
||||
// Resumes vtune data collection.
|
||||
virtual void VTuneResume();
|
||||
void VTuneResume() override;
|
||||
// Summary:
|
||||
// Pauses vtune data collection.
|
||||
virtual void VTunePause();
|
||||
void VTunePause() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
@@ -286,105 +286,105 @@ public:
|
||||
|
||||
// interface ILoadConfigurationEntrySink ----------------------------------
|
||||
|
||||
virtual void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup);
|
||||
void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) override;
|
||||
|
||||
// ISystemEventListener
|
||||
virtual void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam);
|
||||
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//! @name ISystem implementation
|
||||
//@{
|
||||
virtual bool Init(const SSystemInitParams& startupParams);
|
||||
virtual void Release();
|
||||
void Release() override;
|
||||
|
||||
virtual SSystemGlobalEnvironment* GetGlobalEnvironment() { return &m_env; }
|
||||
SSystemGlobalEnvironment* GetGlobalEnvironment() override { return &m_env; }
|
||||
|
||||
virtual bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0);
|
||||
virtual bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0);
|
||||
virtual bool UpdateLoadtime();
|
||||
bool UpdatePreTickBus(int updateFlags = 0, int nPauseMode = 0) override;
|
||||
bool UpdatePostTickBus(int updateFlags = 0, int nPauseMode = 0) override;
|
||||
bool UpdateLoadtime() override;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// CrySystemRequestBus interface implementation
|
||||
ISystem* GetCrySystem() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Relaunch(bool bRelaunch);
|
||||
bool IsRelaunch() const { return m_bRelaunch; };
|
||||
void Relaunch(bool bRelaunch) override;
|
||||
bool IsRelaunch() const override { return m_bRelaunch; };
|
||||
|
||||
void SerializingFile(int mode) { m_iLoadingMode = mode; }
|
||||
int IsSerializingFile() const { return m_iLoadingMode; }
|
||||
void Quit();
|
||||
bool IsQuitting() const;
|
||||
void SerializingFile(int mode) override { m_iLoadingMode = mode; }
|
||||
int IsSerializingFile() const override { return m_iLoadingMode; }
|
||||
void Quit() override;
|
||||
bool IsQuitting() const override;
|
||||
void ShutdownFileSystem(); // used to cleanup any file resources, such as cache handle.
|
||||
void SetAffinity();
|
||||
virtual const char* GetUserName();
|
||||
virtual int GetApplicationInstance();
|
||||
const char* GetUserName() override;
|
||||
int GetApplicationInstance() override;
|
||||
int GetApplicationLogInstance(const char* logFilePath) override;
|
||||
|
||||
ITimer* GetITimer(){ return m_env.pTimer; }
|
||||
AZ::IO::IArchive* GetIPak() { return m_env.pCryPak; };
|
||||
IConsole* GetIConsole() { return m_env.pConsole; };
|
||||
IRemoteConsole* GetIRemoteConsole();
|
||||
IMovieSystem* GetIMovieSystem() { return m_env.pMovieSystem; };
|
||||
ICryFont* GetICryFont(){ return m_env.pCryFont; }
|
||||
ILog* GetILog(){ return m_env.pLog; }
|
||||
ICmdLine* GetICmdLine(){ return m_pCmdLine; }
|
||||
IViewSystem* GetIViewSystem();
|
||||
ILevelSystem* GetILevelSystem();
|
||||
ISystemEventDispatcher* GetISystemEventDispatcher() { return m_pSystemEventDispatcher; }
|
||||
IProfilingSystem* GetIProfilingSystem() { return &m_ProfilingSystem; }
|
||||
ITimer* GetITimer() override{ return m_env.pTimer; }
|
||||
AZ::IO::IArchive* GetIPak() override { return m_env.pCryPak; };
|
||||
IConsole* GetIConsole() override { return m_env.pConsole; };
|
||||
IRemoteConsole* GetIRemoteConsole() override;
|
||||
IMovieSystem* GetIMovieSystem() override { return m_env.pMovieSystem; };
|
||||
ICryFont* GetICryFont() override{ return m_env.pCryFont; }
|
||||
ILog* GetILog() override{ return m_env.pLog; }
|
||||
ICmdLine* GetICmdLine() override{ return m_pCmdLine; }
|
||||
IViewSystem* GetIViewSystem() override;
|
||||
ILevelSystem* GetILevelSystem() override;
|
||||
ISystemEventDispatcher* GetISystemEventDispatcher() override { return m_pSystemEventDispatcher; }
|
||||
IProfilingSystem* GetIProfilingSystem() override { return &m_ProfilingSystem; }
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// retrieves the perlin noise singleton instance
|
||||
CPNoise3* GetNoiseGen();
|
||||
virtual uint64 GetUpdateCounter() { return m_nUpdateCounter; };
|
||||
CPNoise3* GetNoiseGen() override;
|
||||
uint64 GetUpdateCounter() override { return m_nUpdateCounter; };
|
||||
|
||||
void DetectGameFolderAccessRights();
|
||||
|
||||
virtual void ExecuteCommandLine(bool deferred=true);
|
||||
void ExecuteCommandLine(bool deferred=true) override;
|
||||
|
||||
virtual void GetUpdateStats(SSystemUpdateStats& stats);
|
||||
void GetUpdateStats(SSystemUpdateStats& stats) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false);
|
||||
virtual XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false);
|
||||
virtual XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false);
|
||||
virtual IXmlUtils* GetXmlUtils();
|
||||
XmlNodeRef CreateXmlNode(const char* sNodeName = "", bool bReuseStrings = false, bool bIsProcessingInstruction = false) override;
|
||||
XmlNodeRef LoadXmlFromFile(const char* sFilename, bool bReuseStrings = false) override;
|
||||
XmlNodeRef LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings = false, bool bSuppressWarnings = false) override;
|
||||
IXmlUtils* GetXmlUtils() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void IgnoreUpdates(bool bIgnore) { m_bIgnoreUpdates = bIgnore; };
|
||||
void IgnoreUpdates(bool bIgnore) override { m_bIgnoreUpdates = bIgnore; };
|
||||
|
||||
void SetIProcess(IProcess* process);
|
||||
IProcess* GetIProcess(){ return m_pProcess; }
|
||||
void SetIProcess(IProcess* process) override;
|
||||
IProcess* GetIProcess() override{ return m_pProcess; }
|
||||
|
||||
bool IsTestMode() const { return m_bTestMode; }
|
||||
bool IsTestMode() const override { return m_bTestMode; }
|
||||
//@}
|
||||
|
||||
void SleepIfNeeded();
|
||||
|
||||
virtual void FatalError(const char* format, ...) PRINTF_PARAMS(2, 3);
|
||||
virtual void ReportBug(const char* format, ...) PRINTF_PARAMS(2, 3);
|
||||
void FatalError(const char* format, ...) override PRINTF_PARAMS(2, 3);
|
||||
void ReportBug(const char* format, ...) override PRINTF_PARAMS(2, 3);
|
||||
// Validator Warning.
|
||||
void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args);
|
||||
void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...);
|
||||
virtual int ShowMessage(const char* text, const char* caption, unsigned int uType);
|
||||
bool CheckLogVerbosity(int verbosity);
|
||||
void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args) override;
|
||||
void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...) override;
|
||||
int ShowMessage(const char* text, const char* caption, unsigned int uType) override;
|
||||
bool CheckLogVerbosity(int verbosity) override;
|
||||
|
||||
//! Return pointer to user defined callback.
|
||||
ISystemUserCallback* GetUserCallback() const { return m_pUserCallback; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual void SaveConfiguration();
|
||||
virtual void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = 0, bool warnIfMissing = true);
|
||||
virtual ESystemConfigSpec GetMaxConfigSpec() const;
|
||||
virtual ESystemConfigPlatform GetConfigPlatform() const;
|
||||
virtual void SetConfigPlatform(ESystemConfigPlatform platform);
|
||||
void SaveConfiguration() override;
|
||||
void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = nullptr, bool warnIfMissing = true) override;
|
||||
ESystemConfigSpec GetMaxConfigSpec() const override;
|
||||
ESystemConfigPlatform GetConfigPlatform() const override;
|
||||
void SetConfigPlatform(ESystemConfigPlatform platform) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual bool IsPaused() const { return m_bPaused; };
|
||||
bool IsPaused() const override { return m_bPaused; };
|
||||
|
||||
virtual ILocalizationManager* GetLocalizationManager();
|
||||
virtual void debug_GetCallStack(const char** pFunctions, int& nCount);
|
||||
virtual void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0);
|
||||
ILocalizationManager* GetLocalizationManager() override;
|
||||
void debug_GetCallStack(const char** pFunctions, int& nCount) override;
|
||||
void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0) override;
|
||||
// Get the current callstack in raw address form (more lightweight than the above functions)
|
||||
// static as memReplay needs it before CSystem has been setup - expose a ISystem interface to this function if you need it outside CrySystem
|
||||
static void debug_GetCallStackRaw(void** callstack, uint32& callstackLength);
|
||||
@@ -399,13 +399,13 @@ public:
|
||||
#if defined(WIN32)
|
||||
friend LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
virtual void* GetRootWindowMessageHandler();
|
||||
virtual void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler);
|
||||
virtual void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler);
|
||||
void* GetRootWindowMessageHandler() override;
|
||||
void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler) override;
|
||||
void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler) override;
|
||||
|
||||
// IWindowMessageHandler
|
||||
#if defined(WIN32)
|
||||
virtual bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
|
||||
bool HandleMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult) override;
|
||||
#endif
|
||||
// ~IWindowMessageHandler
|
||||
|
||||
@@ -448,7 +448,7 @@ private:
|
||||
bool ReLaunchMediaCenter();
|
||||
void UpdateAudioSystems();
|
||||
|
||||
void AddCVarGroupDirectory(const AZStd::string& sPath);
|
||||
void AddCVarGroupDirectory(const AZStd::string& sPath) override;
|
||||
|
||||
AZStd::unique_ptr<AZ::DynamicModuleHandle> LoadDynamiclibrary(const char* dllName) const;
|
||||
|
||||
@@ -464,13 +464,13 @@ public:
|
||||
|
||||
// interface ISystem -------------------------------------------
|
||||
virtual IDataProbe* GetIDataProbe() { return m_pDataProbe; };
|
||||
virtual void SetForceNonDevMode(bool bValue);
|
||||
virtual bool GetForceNonDevMode() const;
|
||||
virtual bool WasInDevMode() const { return m_bWasInDevMode; };
|
||||
virtual bool IsDevMode() const { return m_bInDevMode && !GetForceNonDevMode(); }
|
||||
void SetForceNonDevMode(bool bValue) override;
|
||||
bool GetForceNonDevMode() const override;
|
||||
bool WasInDevMode() const override { return m_bWasInDevMode; };
|
||||
bool IsDevMode() const override { return m_bInDevMode && !GetForceNonDevMode(); }
|
||||
|
||||
virtual void SetConsoleDrawEnabled(bool enabled) { m_bDrawConsole = enabled; }
|
||||
virtual void SetUIDrawEnabled(bool enabled) { m_bDrawUI = enabled; }
|
||||
void SetConsoleDrawEnabled(bool enabled) override { m_bDrawConsole = enabled; }
|
||||
void SetUIDrawEnabled(bool enabled) override { m_bDrawUI = enabled; }
|
||||
|
||||
// -------------------------------------------------------------
|
||||
|
||||
@@ -478,10 +478,10 @@ public:
|
||||
//! recreates the variable if necessary
|
||||
ICVar* attachVariable (const char* szVarName, int* pContainer, const char* szComment, int dwFlags = 0);
|
||||
|
||||
const CTimeValue& GetLastTickTime(void) const { return m_lastTickTime; }
|
||||
const ICVar* GetDedicatedMaxRate(void) const { return m_svDedicatedMaxRate; }
|
||||
const CTimeValue& GetLastTickTime() const { return m_lastTickTime; }
|
||||
const ICVar* GetDedicatedMaxRate() const { return m_svDedicatedMaxRate; }
|
||||
|
||||
std::shared_ptr<AZ::IO::FileIOBase> CreateLocalFileIO();
|
||||
std::shared_ptr<AZ::IO::FileIOBase> CreateLocalFileIO() override;
|
||||
|
||||
private: // ------------------------------------------------------
|
||||
|
||||
@@ -654,9 +654,9 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// File version.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual const SFileVersion& GetFileVersion();
|
||||
virtual const SFileVersion& GetProductVersion();
|
||||
virtual const SFileVersion& GetBuildVersion();
|
||||
const SFileVersion& GetFileVersion() override;
|
||||
const SFileVersion& GetProductVersion() override;
|
||||
const SFileVersion& GetBuildVersion() override;
|
||||
|
||||
bool InitVTuneProfiler();
|
||||
|
||||
@@ -671,16 +671,16 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// CryAssert and error related.
|
||||
virtual bool RegisterErrorObserver(IErrorObserver* errorObserver);
|
||||
bool UnregisterErrorObserver(IErrorObserver* errorObserver);
|
||||
virtual void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber);
|
||||
bool RegisterErrorObserver(IErrorObserver* errorObserver) override;
|
||||
bool UnregisterErrorObserver(IErrorObserver* errorObserver) override;
|
||||
void OnAssert(const char* condition, const char* message, const char* fileName, unsigned int fileLineNumber) override;
|
||||
void OnFatalError(const char* message);
|
||||
|
||||
bool IsAssertDialogVisible() const;
|
||||
void SetAssertVisible(bool bAssertVisble);
|
||||
bool IsAssertDialogVisible() const override;
|
||||
void SetAssertVisible(bool bAssertVisble) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual void ClearErrorMessages()
|
||||
void ClearErrorMessages() override
|
||||
{
|
||||
m_ErrorMessages.clear();
|
||||
}
|
||||
@@ -690,11 +690,11 @@ public:
|
||||
return m_eRuntimeState == ESYSTEM_EVENT_LEVEL_LOAD_START_LOADINGSCREEN;
|
||||
}
|
||||
|
||||
virtual ESystemGlobalState GetSystemGlobalState(void);
|
||||
virtual void SetSystemGlobalState(ESystemGlobalState systemGlobalState);
|
||||
ESystemGlobalState GetSystemGlobalState() override;
|
||||
void SetSystemGlobalState(ESystemGlobalState systemGlobalState) override;
|
||||
|
||||
#if !defined(_RELEASE)
|
||||
virtual bool IsSavingResourceList() const { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); }
|
||||
bool IsSavingResourceList() const override { return (g_cvars.archiveVars.nSaveLevelResourceList != 0); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -721,7 +721,7 @@ protected: // -------------------------------------------------------------
|
||||
float m_Color[4];
|
||||
bool m_HardFailure;
|
||||
};
|
||||
typedef std::list<SErrorMessage> TErrorMessages;
|
||||
using TErrorMessages = std::list<SErrorMessage>;
|
||||
TErrorMessages m_ErrorMessages;
|
||||
bool m_bHasRenderedErrorMessage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user