blob: c5c6f941e9f14a47be17c6750f93f49d75b42776 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef PKE_GAME_HPP
#define PKE_GAME_HPP
#include <chrono>
#include <cstdint>
#include <fstream>
#include "asset-manager.hpp"
#include "ecs.hpp"
#include "entities.hpp"
#include "event.hpp"
#include "imgui.h"
#include "window.hpp"
using GameTimeDuration = std::chrono::duration<int64_t, std::nano>;
using GameTimePoint = std::chrono::steady_clock::time_point;
#define NANO_DENOM std::chrono::nanoseconds::period::den
#define NANO_DENOM_DOUBLE double(std::chrono::nanoseconds::period::den)
struct GameSettings {
bool isGameRunning = true;
bool isGamePaused = false;
bool isFramerateUnlocked = true;
bool isShowingEditor = true;
int64_t targetFPS = 144;
int64_t minFPS = 20;
double deltaPerFrame = 1 / double(targetFPS);
double minimumDeltaPerFrame = 1 / double(minFPS);
struct {
bool isShowingConsole = true;
bool isShowingEntityList = true;
bool isShowingSceneEditor = true;
} editorSettings;
};
extern GameSettings pkeSettings;
void Game_Init();
void Game_Tick(double delta);
#endif /* PKE_GAME_HPP */
|