You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lunarium_OLD/src/core/state.h

79 lines
1.6 KiB
C

/******************************************************************************
* 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 <string>
#include <utils/opRes.h>
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_