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:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "Wait.h"
|
||||
|
||||
#include "../../../Context.h"
|
||||
#include "../../../Game.h"
|
||||
|
||||
namespace OpenRCT2::Title
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user