blob: 80c971f458396efa8dd46bbc71766c765195b882 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 */
|