8#ifndef GALAXY_CORE_SETTINGS_HPP_
9#define GALAXY_CORE_SETTINGS_HPP_
36 static auto set_delta_time(const double dt) noexcept -> void;
44 static auto dt() noexcept -> double;
50 static auto ups() noexcept -> double;
56 static auto window_width() noexcept -> int;
62 static auto window_height() noexcept -> int;
68 static auto view_width() noexcept -> int;
74 static auto view_height() noexcept -> int;
80 static auto window_title() noexcept -> const std::string&;
86 static auto window_icon() noexcept -> const std::string&;
92 static auto fullscreen() noexcept -> bool;
98 static auto key_repeat() noexcept -> bool;
104 static auto vsync() noexcept -> bool;
110 static auto msaa() noexcept -> bool;
116 static auto cursor_visible() noexcept -> bool;
122 static auto cursor_grabbed() noexcept -> bool;
128 static auto cursor_icon() noexcept -> const std::string&;
134 static auto cursor_icon_size() noexcept -> const sf::Vector2u&;
140 static auto cursor_hotspot() noexcept -> const sf::Vector2u&;*/
146 static auto root_dir()
noexcept -> std::filesystem::path;
152 static auto assets_dir()
noexcept -> std::filesystem::path;
158 static auto editor_dir()
noexcept -> std::filesystem::path;
164 static auto asset_pack()
noexcept ->
const std::string&;
307 // static auto flag_bitset_count() noexcept -> int;
313 // static auto world_to_box2d() noexcept -> float;
319 // static auto box2d_to_world() noexcept -> float;
325 // static auto ansio_level() noexcept -> int;
331 // static auto highdpi() noexcept -> bool;
333// inline static int s_flag_bitset_count;
335 // inline static float s_world_to_box2d;
336 // inline static float s_box2d_to_world;
337 // inline static int s_ansio_filtering;
338 // inline static bool s_highdpi;
340config.restore<float>("ui_font_size", 14.0f);
341config.restore<std::string>("default_lang", "en_au");
343config.restore<float>("sfx_volume", 1.0f, "audio");
344config.restore<float>("music_volume", 1.0f, "audio");
345config.restore<float>("dialogue_volume", 1.0f, "audio");
346config.restore<int>("listener_count", 1, "audio");
348config.restore<bool>("trilinear_filtering", false, "graphics");
349config.restore<int>("ansiotrophic_filtering", 2, "graphics");
350config.restore<bool>("smaa", false, "graphics.effects");
351config.restore<bool>("sharpen", false, "graphics.effects");
352config.restore<bool>("gamma_correction", false, "graphics.effects");
353config.restore<bool>("chromatic_abberation", false, "graphics.effects");
354config.restore<bool>("gaussian_blur", false, "graphics.effects");
355config.restore<bool>("film_grain", false, "graphics.effects");
357config.restore<int>("camera_foward", input::key_to_int(input::Keys::KEY_W), "input");
358config.restore<int>("camera_backward", input::key_to_int(input::Keys::KEY_S), "input");
359config.restore<int>("camera_left", input::key_to_int(input::Keys::KEY_A), "input");
360config.restore<int>("camera_right", input::key_to_int(input::Keys::KEY_D), "input");
361config.restore<int>("camera_rotate_left", input::key_to_int(input::Keys::KEY_Q), "input");
362config.restore<int>("camera_rotate_right", input::key_to_int(input::Keys::KEY_E), "input");
367// #define GALAXY_ENTITY_SIZE std::uint64_t
Helper class to encapsulate our global settings we want to quickly access across app.
static std::filesystem::path s_assets_dir
static auto assets_dir_video() noexcept -> const std::string &
Video asset location.
static auto assets_dir_voice() noexcept -> const std::string &
Voice asset location.
static bool s_use_loose_assets
static auto set_settings_from_config() -> void
Set all our settings using the provided config file.
static auto assets_dir_script() noexcept -> const std::string &
Scripts asset location.
static std::string s_assets_animation
static std::string s_assets_voice
static std::filesystem::path s_editor_dir
static auto asset_pack() noexcept -> const std::string &
Name of packed assets file.
static auto root_dir() noexcept -> std::filesystem::path
Current root directory of application, unless it has been changed.
static auto assets_dir_prefabs() noexcept -> const std::string &
Prefab asset location.
static auto assets_dir_shaders() noexcept -> const std::string &
Shaders asset location.
static auto assets_dir_animation() noexcept -> const std::string &
Animation data location.
static std::string s_assets_prefabs
static std::string s_assets_texture
static auto editor_dir() noexcept -> std::filesystem::path
Directory for editor specific stuff.
static std::string s_assets_music
static std::string s_assets_sfx
static auto assets_dir_font() noexcept -> const std::string &
Font asset location.
static auto assets_dir_maps() noexcept -> const std::string &
Maps asset location.
static std::string s_assets_video
static std::string s_assets_ui
static auto assets_dir() noexcept -> std::filesystem::path
Main data directory.
static std::string s_asset_pack
static auto assets_dir_texture() noexcept -> const std::string &
Textures asset location.
static auto use_loose_assets() noexcept -> bool
Should asset data be read from pack or assets dir.
static auto assets_dir_music() noexcept -> const std::string &
Music asset location.
static auto set_config_to_default() -> void
Restore all config settings to default.
static auto assets_dir_sfx() noexcept -> const std::string &
SFX asset location.
static std::string s_assets_maps
static std::string s_assets_shaders
static auto assets_dir_ui() noexcept -> const std::string &
UI asset location.
static std::string s_assets_font
static std::string s_assets_script