You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Generals/Code/GameEngine/Include/Common/GameEngine.h
+21-5Lines changed: 21 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,6 @@
34
34
#include"Common/SubsystemInterface.h"
35
35
#include"Common/GameType.h"
36
36
37
-
#defineDEFAULT_MAX_FPS45
38
-
39
37
// forward declarations
40
38
classAudioManager;
41
39
classGameLogic;
@@ -72,8 +70,20 @@ class GameEngine : public SubsystemInterface
72
70
73
71
virtualvoidexecute( void ); /**< The "main loop" of the game engine.
74
72
It will not return until the game exits. */
75
-
virtualvoidsetFramesPerSecondLimit( Int fps ); ///< Set the maximum rate engine updates are allowed to occur
76
-
virtual Int getFramesPerSecondLimit( void ); ///< Get maxFPS. Not inline since it is called from another lib.
73
+
74
+
virtualvoidsetFramesPerSecondLimit( Int fps ); ///< Set the max render and engine update fps.
75
+
virtual Int getFramesPerSecondLimit( void ); ///< Get the max render and engine update fps.
76
+
Real getUpdateTime(); ///< Get the last engine update delta time.
77
+
Real getUpdateFps(); ///< Get the last engine update fps.
78
+
79
+
virtualvoidsetLogicTimeScaleFps( Int fps ); ///< Set the logic time scale fps and therefore scale the simulation time. Is capped by the max render fps and does not apply to network matches.
80
+
virtual Int getLogicTimeScaleFps(); ///< Get the raw logic time scale fps value.
81
+
virtualvoidenableLogicTimeScale( Bool enable ); ///< Enable the logic time scale setup. If disabled, the simulation time scale is bound to the render frame time or network update time.
82
+
virtual Bool isLogicTimeScaleEnabled(); ///< Check whether the logic time scale setup is enabled.
83
+
Int getActualLogicTimeScaleFps(); ///< Get the real logic time scale fps, depending on the max render fps, network state and enabled state.
84
+
Real getActualLogicTimeScaleRatio(); ///< Get the real logic time scale ratio, depending on the max render fps, network state and enabled state.
85
+
Real getActualLogicTimeScaleOverFpsRatio(); ///< Get the real logic time scale over render fps ratio, used to scale down steps in render updates to match logic updates.
86
+
77
87
virtualvoidsetQuitting( Bool quitting ); ///< set quitting status
78
88
virtual Bool getQuitting(void); ///< is app getting ready to quit.
79
89
@@ -101,9 +111,15 @@ class GameEngine : public SubsystemInterface
0 commit comments