#ifndef PKE_GAME_SETTINGS_HPP #define PKE_GAME_SETTINGS_HPP #include "level-types.hpp" #include "pk.h" #include #include struct GameSettings { const char *executable_path; bool isGameRunning = true; bool isGamePaused = false; bool isShowingEditor = true; bool isRenderingDebug = false; bool isSimulationPaused = false; std::chrono::steady_clock steadyClock; int64_t targetFPS = 144; int64_t minFPS = 20; double deltaPerFrame = 1.0 / double(targetFPS); double minimumDeltaPerFrame = 1.0 / double(minFPS); struct editor { bool isUsingDebugCamera = false; bool isShowingConsole = true; bool isShowingEntityList = true; bool isShowingSceneEditor = true; bool isShowingUBO = true; } editorSettings; struct graphics { bool isFramerateUnlocked = false; bool isWaitingForVsync = true; } graphicsSettings; struct memory { struct pk_membucket *game = nullptr; struct pk_membucket *game_transient = nullptr; } mem_bkt; struct engineArgs { const char *levelName = nullptr; const char *pluginPath = nullptr; const char *projectPath = nullptr; const char *sceneName = nullptr; } args; struct runtime { // current level pke_level *activeLevel = nullptr; // level to start loading pke_level *nextLevel = nullptr; // level to unload pke_level *previousLevel = nullptr; bool was_framebuffer_resized = false; } rt; struct stats { double last_deltas[3] = {}; double tick_rate = 0; } stats; }; extern GameSettings pkeSettings; #endif /* PKE_GAME_SETTINGS_HPP */