8#ifndef GALAXY_CORE_SETTINGS_HPP_
9#define GALAXY_CORE_SETTINGS_HPP_
37 static auto log_dir()
noexcept ->
const std::string&;
61 static auto title()
noexcept ->
const std::string&;
69 static auto vsync()
noexcept -> bool;
103 static auto maximized()
noexcept -> bool;
113 static auto minimized()
noexcept -> bool;
129 static auto window_icon()
noexcept ->
const std::string&;
137 static auto ontop()
noexcept -> bool;
145 static auto root_dir()
noexcept -> std::filesystem::path;
153 static auto assets_dir()
noexcept -> std::filesystem::path;
160 static auto asset_pack()
noexcept ->
const std::string&;
325 static auto cursor_icon() noexcept -> const std::string&;
333 static auto cursor_hotspot() noexcept -> const glm::ivec2&;
341 static auto audio_freq() noexcept -> int;
349 static auto ansiotrophy() noexcept -> int;
357 static auto mipmap() noexcept -> bool;
365 static auto texture_filter() noexcept -> GLTextureFilter;
373 static auto max_quads() noexcept -> int;
383 static auto version() noexcept -> const std::string&;
391 static auto identifier() noexcept -> const std::string&;
399 static auto creator() noexcept -> const std::string&;
407 static auto copyright() noexcept -> const std::string&;
415 static auto website() noexcept -> const std::string&;
427 static auto editor_dir() noexcept -> std::filesystem::path;
487// static auto flag_bitset_count() noexcept -> int;
493// static auto world_to_box2d() noexcept -> float;
499// static auto box2d_to_world() noexcept -> float;
507// static auto highdpi() noexcept -> bool;
509// inline static int s_flag_bitset_count;
511// inline static float s_world_to_box2d;
512// inline static float s_box2d_to_world;
514// inline static bool s_highdpi;
516config.restore<float>("ui_font_size", 14.0f);
517config.restore<std::string>("default_lang", "en_au");
519config.restore<float>("sfx_volume", 1.0f, "audio");
520config.restore<float>("music_volume", 1.0f, "audio");
521config.restore<float>("dialogue_volume", 1.0f, "audio");
522config.restore<int>("listener_count", 1, "audio");
525config.restore<bool>("smaa", false, "graphics.effects");
526config.restore<bool>("sharpen", false, "graphics.effects");
527config.restore<bool>("gamma_correction", false, "graphics.effects");
528config.restore<bool>("chromatic_abberation", false, "graphics.effects");
529config.restore<bool>("gaussian_blur", false, "graphics.effects");
530config.restore<bool>("film_grain", false, "graphics.effects");
532config.restore<int>("camera_foward", input::key_to_int(input::Keys::KEY_W), "input");
533config.restore<int>("camera_backward", input::key_to_int(input::Keys::KEY_S), "input");
534config.restore<int>("camera_left", input::key_to_int(input::Keys::KEY_A), "input");
535config.restore<int>("camera_right", input::key_to_int(input::Keys::KEY_D), "input");
536config.restore<int>("camera_rotate_left", input::key_to_int(input::Keys::KEY_Q), "input");
537config.restore<int>("camera_rotate_right", input::key_to_int(input::Keys::KEY_E), "input");
542// #define GALAXY_ENTITY_SIZE std::uint64_t
Helper class to encapsulate our global settings we want to quickly access across app.
static auto window_icon() noexcept -> const std::string &
Window icon file in vfs.
static std::string s_asset_pack
static auto root_dir() noexcept -> std::filesystem::path
Current root directory of application, unless it has been changed.
static std::string s_title
static std::string s_assets_video
static std::string s_assets_prefabs
static std::string s_assets_music
static auto window_height() noexcept -> int
Window creation height.
static auto log_dir() noexcept -> const std::string &
Current root directory of application, unless it has been changed.
static auto fullscreen() noexcept -> bool
Is window started fullscreen.
static auto assets_dir_prefabs() noexcept -> const std::string &
Prefab asset location.
static auto assets_dir_texture() noexcept -> const std::string &
Textures asset location.
static auto vsync() noexcept -> bool
Vsync control.
static auto minimized() noexcept -> bool
Is window started minimized?
static auto assets_dir_voice() noexcept -> const std::string &
Voice asset location.
static auto cursor_locked() noexcept -> bool
Is the cursor grabbed.
static int s_window_height
static auto window_width() noexcept -> int
Window creation width.
static bool s_use_loose_assets
static auto assets_dir_shaders() noexcept -> const std::string &
Shaders asset location.
static std::string s_assets_sfx
static bool s_cursor_locked
static std::string s_assets_script
static auto assets_dir_ui() noexcept -> const std::string &
UI asset location.
static auto set_settings_from_config() -> void
Set all our settings using the provided config file.
static auto use_loose_assets() noexcept -> bool
Should asset data be read from pack or assets dir.
static std::string s_assets_texture
static auto assets_dir_animation() noexcept -> const std::string &
Animation data location.
static auto assets_dir_script() noexcept -> const std::string &
Scripts asset location.
static auto assets_dir_music() noexcept -> const std::string &
Music asset location.
static int s_window_width
static auto window_resizable() noexcept -> bool
Is the window resizable.
static auto maximized() noexcept -> bool
Is window started maximized?
static auto title() noexcept -> const std::string &
Game title.
static std::string s_assets_voice
static auto cursor_show() noexcept -> bool
Is the mouse cursor visible or not.
static auto assets_dir() noexcept -> std::filesystem::path
Main data directory.
static auto ontop() noexcept -> bool
Should the window always be on top.
static auto asset_pack() noexcept -> const std::string &
Name of packed assets file.
static std::filesystem::path s_assets_dir
static auto borderless_fullscreen() noexcept -> bool
Is window in borderless fullscreen?
static std::string s_assets_maps
static auto assets_dir_sfx() noexcept -> const std::string &
SFX asset location.
static auto assets_dir_maps() noexcept -> const std::string &
Maps asset location.
static std::string s_assets_shaders
static bool s_cursor_show
static std::string s_assets_animation
static auto set_config_to_default() -> void
Restore all config settings to default.
static std::string s_assets_font
static std::string s_assets_ui
static auto assets_dir_video() noexcept -> const std::string &
Video asset location.
static auto assets_dir_font() noexcept -> const std::string &
Font asset location.
static auto decoration() noexcept -> bool
Controls if a window has a border around it (including titlebar).
static std::string s_window_icon