Move game tick time constants from Context.h to Game.h

This commit is contained in:
Aaron van Geffen committed 2025-09-12 13:45:16 +02:00
1 parent 499af79831
commit ffa2c3ab6c
3 files changed
+14 -17

No files matched your search

-15
View File
@@ -187,21 +187,6 @@ namespace OpenRCT2
[[nodiscard]] IContext* GetContext();
} // namespace OpenRCT2
namespace
{
// The number of logical update / ticks per second.
constexpr uint32_t kGameUpdateFPS = 40;
// The maximum amount of updates in case rendering is slower
constexpr uint32_t kGameMaxUpdates = 4;
// The game update interval in milliseconds, (1000 / 40fps) = 25ms
constexpr float kGameUpdateTimeMS = 1.0f / kGameUpdateFPS;
// The maximum threshold to advance.
constexpr float kGameUpdateMaxThreshold = kGameUpdateTimeMS * kGameMaxUpdates;
}; // namespace
constexpr float kGameMinTimeScale = 0.1f;
constexpr float kGameMaxTimeScale = 5.0f;
void ContextInit();
void ContextSetCurrentCursor(CursorID cursor);
void ContextUpdateCursorScale();
+13 -1
View File
@@ -16,7 +16,19 @@
namespace OpenRCT2
{
class Intent;
}
// The number of logical update / ticks per second.
constexpr uint32_t kGameUpdateFPS = 40;
// The maximum amount of updates in case rendering is slower
constexpr uint32_t kGameMaxUpdates = 4;
// The game update interval in milliseconds, (1000 / 40fps) = 25ms
constexpr float kGameUpdateTimeMS = 1.0f / kGameUpdateFPS;
// The maximum threshold to advance.
constexpr float kGameUpdateMaxThreshold = kGameUpdateTimeMS * kGameMaxUpdates;
constexpr float kGameMinTimeScale = 0.1f;
constexpr float kGameMaxTimeScale = 5.0f;
} // namespace OpenRCT2
struct ParkLoadResult;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Wait.h"
#include "../../../Context.h"
#include "../../../Game.h"
namespace OpenRCT2::Title
{