1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

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

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

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();

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;

View File

@@ -9,7 +9,7 @@
#include "Wait.h"
#include "../../../Context.h"
#include "../../../Game.h"
namespace OpenRCT2::Title
{