diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-08-12 21:35:47 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-08-12 21:35:47 -0400 |
| commit | b8e2c6ccbc75e39ccc08b84f90102d4a9a3d884b (patch) | |
| tree | 90ecad1e1c864c31b5b33b0f7f4b1dcca2efc420 /src/game.hpp | |
| parent | 6f53c63454657d076221ad4228215e7812f1e4db (diff) | |
added pkeSettings
Diffstat (limited to 'src/game.hpp')
| -rw-r--r-- | src/game.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game.hpp b/src/game.hpp new file mode 100644 index 0000000..80c971f --- /dev/null +++ b/src/game.hpp @@ -0,0 +1,20 @@ +#ifndef PKE_GAME_HPP +#define PKE_GAME_HPP + +#include <chrono> +#include <cstdint> + +using GameTimeDuration = std::chrono::duration<int64_t, std::nano>; +using GameTimePoint = std::chrono::steady_clock::time_point; + +struct GameSettings { + bool isGameRunning = true; + bool isGamePaused = false; + bool isFramerateUnlocked = true; + int64_t targetFPS = 144; + GameTimeDuration nanosecondsPerFrame = GameTimeDuration(std::chrono::nanoseconds::period::den / targetFPS); +}; + +extern GameSettings pkeSettings; + +#endif /* PKE_GAME_HPP */ |
