/******************************************************************************
*	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 Renderer
    {
        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;
            
            Renderer RenderFramework;
            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);
    };
}

#endif  // STATE_H_