/****************************************************************************** * File - state.h * Author - Joey Pollack * Date - 2021/08/30 (y/m/d) * Mod Date - 2021/08/30 (y/m/d) * Description - Stores all of the settings for the engine. ******************************************************************************/ #ifndef STATE_H_ #define STATE_H_ #include #include namespace lunarium { enum RunMode { MODE_GAME, MODE_EDITOR, MODE_TEST }; enum RenderSystem { OPENGL, VULKAN, UNKNOWN }; struct State { std::string DataDirectory; struct { struct { int X; int Y; } WindowStartPosition; struct { int Width; int Height; } WindowedSize; struct { int Width; int Height; } FullScreenResolution; RenderSystem Renderer; bool IsFullScreen; bool VSyncEnabled; } Display; struct { std::string MainFont; } Interface; RunMode Mode; // METHODS static State CreateEmpty(); static State CreateDefault(); static OpRes CreateFromFile(std::string filename, State& state); OpRes SaveToFile(std::string filename); OpRes SaveToFile(); private: std::string LoadedFile; }; } #endif // STATE_H_