// This file must only be included from SettingsList.hpp

#ifndef SETTINGS_SECTION
#   define SETTINGS_SECTION(...)
#endif

SETTINGS_SECTION
(
    Material::graphicsSettings, "Graphics",

    DECL_COMMON_SETTING
    (
        int, horizontalViewDistance, 16,
        "Horizontal viewing distance",

        "The horizontal viewing distance, in chunks.",

        {ofs << horizontalViewDistance;},

        PARSE_INTEGER,

        new Slider(settings.horizontalViewDistance, 4, 32, "$+ chunks", []()
        {
            settings.save();
        })
    )

    DECL_COMMON_SETTING
    (
        int, verticalViewDistance, 16,
        "Vertical viewing distance",

        "The vertical viewing distance, in chunks.",

        {ofs << verticalViewDistance;},

        PARSE_INTEGER,

        new Slider(settings.verticalViewDistance, 4, 32, "$+ chunks", []()
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        int, fov, 70,
        "Field of view",

        "The vertical field of view, in degrees.",

        {ofs << fov;},

        PARSE_INTEGER,

        new Slider(settings.fov, 30, 120, "$+", []()
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        int, cameraSensitivity, 10,
        "Camera sensitivity",

        "Controls how fast the camera moves when the mouse is moved.",

        {ofs << cameraSensitivity;},

        PARSE_INTEGER,

        new Slider(settings.cameraSensitivity, 1, 30, "$+", []()
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        int, godRaySamples, 40,
        "God ray samples",

        "Higher values produce higher-quality god rays, but can hurt performance.",

        {ofs << godRaySamples;},

        PARSE_INTEGER,

        new Slider(settings.godRaySamples, 0, 100, "$+", []()
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        int, framebufferResolution, 100,
        "Game resolution",

        "The resolution of the game, as % of the screen size.",

        {ofs << framebufferResolution;},

        PARSE_INTEGER,

        new Slider(settings.framebufferResolution, 1, 100, "$+%", []()
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        bool, specularLighting, false,
        "Fancy reflections",

        "Controls whether a conemarching should be used for reflective materials.",

        {ofs << (specularLighting ? "on" : "off");},

        PARSE_BOOL("on", "off"),

        new Switch(settings.specularLighting, [](bool)
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        bool, particleEffects, true,
        "Particle effects",

        "Controls whether particle effects such as flames are on or off.",

        {ofs << (particleEffects ? "on" : "off");},

        PARSE_BOOL("on", "off"),

        new Switch(settings.particleEffects, [](bool)
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        bool, fxaa, true,
        "Anti-aliasing (FXAA)",

        "Controls whether anti-aliasing via FXAA should be enabled.",

        {ofs << (fxaa ? "on" : "off");},

        PARSE_BOOL("on", "off"),

        new Switch(settings.fxaa, [](bool)
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        bool, ambientOcclusion, true,
        "Ambient occlusion",

        "Controls whether ray-based ambient occlusion should be enabled.",

        {ofs << (ambientOcclusion ? "on" : "off");},

        PARSE_BOOL("on", "off"),

        new Switch(settings.ambientOcclusion, [](bool)
        {
            settings.save();
        })
    )

    DECL_CLIENT_ONLY_SETTING
    (
        bool, shadows, true,
        "Shadows",

        "Controls whether shadows are enabled.",

        {ofs << (shadows ? "on" : "off");},

        PARSE_BOOL("on", "off"),

        new Switch(settings.shadows, [](bool)
        {
            settings.save();
        })
    )
)