8#ifndef GALAXY_CORE_SETTINGS_HPP_
9#define GALAXY_CORE_SETTINGS_HPP_
13#include <glm/vec2.hpp>
57 static auto window_icon()
noexcept ->
const std::string&;
83 static auto vsync()
noexcept -> bool;
123 static auto cursor_icon()
noexcept ->
const std::string&;
155 static auto mipmap()
noexcept -> bool;
171 static auto title()
noexcept ->
const std::string&;
179 static auto version()
noexcept ->
const std::string&;
187 static auto identifier()
noexcept ->
const std::string&;
195 static auto creator()
noexcept ->
const std::string&;
203 static auto copyright()
noexcept ->
const std::string&;
211 static auto website()
noexcept ->
const std::string&;
219 static auto log_dir()
noexcept ->
const std::string&;
227 static auto root_dir()
noexcept -> std::filesystem::path;
235 static auto assets_dir()
noexcept -> std::filesystem::path;
243 static auto editor_dir()
noexcept -> std::filesystem::path;
251 static auto asset_pack()
noexcept ->
const std::string&;
426// static auto flag_bitset_count() noexcept -> int;
432// static auto world_to_box2d() noexcept -> float;
438// static auto box2d_to_world() noexcept -> float;
446// static auto highdpi() noexcept -> bool;
448// inline static int s_flag_bitset_count;
450// inline static float s_world_to_box2d;
451// inline static float s_box2d_to_world;
453// inline static bool s_highdpi;
455config.restore<float>("ui_font_size", 14.0f);
456config.restore<std::string>("default_lang", "en_au");
458config.restore<float>("sfx_volume", 1.0f, "audio");
459config.restore<float>("music_volume", 1.0f, "audio");
460config.restore<float>("dialogue_volume", 1.0f, "audio");
461config.restore<int>("listener_count", 1, "audio");
464config.restore<bool>("smaa", false, "graphics.effects");
465config.restore<bool>("sharpen", false, "graphics.effects");
466config.restore<bool>("gamma_correction", false, "graphics.effects");
467config.restore<bool>("chromatic_abberation", false, "graphics.effects");
468config.restore<bool>("gaussian_blur", false, "graphics.effects");
469config.restore<bool>("film_grain", false, "graphics.effects");
471config.restore<int>("camera_foward", input::key_to_int(input::Keys::KEY_W), "input");
472config.restore<int>("camera_backward", input::key_to_int(input::Keys::KEY_S), "input");
473config.restore<int>("camera_left", input::key_to_int(input::Keys::KEY_A), "input");
474config.restore<int>("camera_right", input::key_to_int(input::Keys::KEY_D), "input");
475config.restore<int>("camera_rotate_left", input::key_to_int(input::Keys::KEY_Q), "input");
476config.restore<int>("camera_rotate_right", input::key_to_int(input::Keys::KEY_E), "input");
481// #define GALAXY_ENTITY_SIZE std::uint64_t
GLTextureFilter
Mipmap filtering.
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 ansiotrophy() noexcept -> int
Ansiotropic filtering level.
static auto fullscreen() noexcept -> bool
Is window started fullscreen.
static auto assets_dir_prefabs() noexcept -> const std::string &
Prefab asset location.
static auto copyright() noexcept -> const std::string &
Copyright message.
static auto assets_dir_texture() noexcept -> const std::string &
Textures asset location.
static auto vsync() noexcept -> bool
Vsync control.
static auto assets_dir_voice() noexcept -> const std::string &
Voice asset location.
static std::string s_cursor_icon
static int s_window_height
static auto mipmap() noexcept -> bool
Mipmapping.
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 std::string s_copyright
static auto window_border() noexcept -> bool
Controls if a window has a border around it (including titlebar).
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 identifier() noexcept -> const std::string &
Game identifier i.e. com.galaxy.app.
static auto maximized() noexcept -> bool
Is window started maximized?
static auto texture_filter() noexcept -> GLTextureFilter
Texture filtering type.
static auto title() noexcept -> const std::string &
Game title.
static std::string s_creator
static std::string s_assets_voice
static auto cursor_show() noexcept -> bool
Is the mouse cursor visible or not.
static bool s_mouse_grabbed
static auto assets_dir() noexcept -> std::filesystem::path
Main data directory.
static auto cursor_hotspot() noexcept -> const glm::ivec2 &
Cursor selector point (hotspot).
static auto asset_pack() noexcept -> const std::string &
Name of packed assets file.
static std::filesystem::path s_assets_dir
static auto version() noexcept -> const std::string &
Game semver.
static auto audio_freq() noexcept -> int
Set audio frequency to use with SDL.
static auto mouse_grabbed() noexcept -> bool
Is the cursor grabbed.
static std::string s_assets_maps
static auto website() noexcept -> const std::string &
Website URL.
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 GLTextureFilter s_filtering
static std::string s_assets_animation
static std::filesystem::path s_editor_dir
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 editor_dir() noexcept -> std::filesystem::path
Directory for editor specific stuff.
static std::string s_website
static auto assets_dir_video() noexcept -> const std::string &
Video asset location.
static std::string s_version
static auto cursor_icon() noexcept -> const std::string &
Cursor texture file in vfs.
static glm::ivec2 s_cursor_hotspot
static auto assets_dir_font() noexcept -> const std::string &
Font asset location.
static auto creator() noexcept -> const std::string &
Owner.
static std::string s_window_icon
static std::string s_identifier