diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 12:47:10 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 23:39:47 +0200 |
commit | 14c71f39ff97684e6c6933cf18781e8d162d1be6 (patch) | |
tree | 15c68cd95c46d09c879e9753d397f12c28281d51 /src/core/Timer.h | |
parent | Don't restart OAL device when switching EAX (diff) | |
download | re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.gz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.bz2 re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.lz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.xz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.zst re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.zip |
Diffstat (limited to 'src/core/Timer.h')
-rw-r--r-- | src/core/Timer.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/core/Timer.h b/src/core/Timer.h index 53591c4f..819bd30c 100644 --- a/src/core/Timer.h +++ b/src/core/Timer.h @@ -1,22 +1,20 @@ #pragma once -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND -#define PauseModeTime double -#else -#define PauseModeTime uint32 -#endif - class CTimer { static uint32 m_snTimeInMilliseconds; - static PauseModeTime m_snTimeInMillisecondsPauseMode; + static uint32 m_snTimeInMillisecondsPauseMode; static uint32 m_snTimeInMillisecondsNonClipped; static uint32 m_snPreviousTimeInMilliseconds; static uint32 m_FrameCounter; static float ms_fTimeScale; static float ms_fTimeStep; static float ms_fTimeStepNonClipped; +#ifdef FIX_BUGS + static uint32 m_LogicalFrameCounter; + static uint32 m_LogicalFramesPassed; +#endif public: static bool m_UserPause; static bool m_CodePause; @@ -35,7 +33,7 @@ public: static void SetTimeInMilliseconds(uint32 t) { m_snTimeInMilliseconds = t; } static uint32 GetTimeInMillisecondsNonClipped(void) { return m_snTimeInMillisecondsNonClipped; } static void SetTimeInMillisecondsNonClipped(uint32 t) { m_snTimeInMillisecondsNonClipped = t; } - static PauseModeTime GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; } + static uint32 GetTimeInMillisecondsPauseMode(void) { return m_snTimeInMillisecondsPauseMode; } static void SetTimeInMillisecondsPauseMode(uint32 t) { m_snTimeInMillisecondsPauseMode = t; } static uint32 GetPreviousTimeInMilliseconds(void) { return m_snPreviousTimeInMilliseconds; } static void SetPreviousTimeInMilliseconds(uint32 t) { m_snPreviousTimeInMilliseconds = t; } @@ -67,9 +65,7 @@ public: #ifdef FIX_BUGS static float GetDefaultTimeStep(void) { return 50.0f / 30.0f; } static float GetTimeStepFix(void) { return GetTimeStep() / GetDefaultTimeStep(); } + static uint32 GetLogicalFrameCounter(void) { return m_LogicalFrameCounter; } + static uint32 GetLogicalFramesPassed(void) { return m_LogicalFramesPassed; } #endif }; - -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND -extern double frameTime; -#endif |