8#include <entt/locator/locator.hpp>
15#ifdef GALAXY_WIN_PLATFORM
24 auto& config = entt::locator<Config>::value();
47 config.restore<std::string>(
"assets_dir",
"assets/",
"fs");
48 config.restore<std::string>(
"editor_dir",
"editor/",
"fs");
49 config.restore<std::string>(
"asset_pack",
"assets.galaxy",
"fs");
50 config.restore<
bool>(
"use_loose_assets",
true,
"fs");
51 config.restore<std::string>(
"assets_music",
"music/",
"fs");
52 config.restore<std::string>(
"assets_sfx",
"sfx/",
"fs");
53 config.restore<std::string>(
"assets_voice",
"voice/",
"fs");
54 config.restore<std::string>(
"assets_font",
"fonts/",
"fs");
55 config.restore<std::string>(
"assets_script",
"scripts/",
"fs");
56 config.restore<std::string>(
"assets_shaders",
"shaders/",
"fs");
57 config.restore<std::string>(
"assets_animation",
"animations/",
"fs");
58 config.restore<std::string>(
"assets_texture",
"textures/",
"fs");
59 config.restore<std::string>(
"assets_prefabs",
"prefabs/",
"fs");
60 config.restore<std::string>(
"assets_maps",
"maps/",
"fs");
61 config.restore<std::string>(
"assets_video",
"video/",
"fs");
62 config.restore<std::string>(
"assets_ui",
"ui/",
"fs");
69 auto& config = entt::locator<Config>::value();
92 s_assets_dir = config.get<std::string>(
"assets_dir",
"fs").value();
93 s_editor_dir = config.get<std::string>(
"editor_dir",
"fs").value();
94 s_asset_pack = config.get<std::string>(
"asset_pack",
"fs").value();
95 s_use_loose_assets = config.get<
bool>(
"use_loose_assets",
"fs").value();
96 s_assets_music = config.get<std::string>(
"assets_music",
"fs").value();
97 s_assets_sfx = config.get<std::string>(
"assets_sfx",
"fs").value();
98 s_assets_voice = config.get<std::string>(
"assets_voice",
"fs").value();
99 s_assets_font = config.get<std::string>(
"assets_font",
"fs").value();
100 s_assets_script = config.get<std::string>(
"assets_script",
"fs").value();
101 s_assets_shaders = config.get<std::string>(
"assets_shaders",
"fs").value();
102 s_assets_animation = config.get<std::string>(
"assets_animation",
"fs").value();
103 s_assets_texture = config.get<std::string>(
"assets_texture",
"fs").value();
104 s_assets_prefabs = config.get<std::string>(
"assets_prefabs",
"fs").value();
105 s_assets_maps = config.get<std::string>(
"assets_maps",
"fs").value();
106 s_assets_video = config.get<std::string>(
"assets_video",
"fs").value();
107 s_assets_ui = config.get<std::string>(
"assets_ui",
"fs").value();
202 return std::filesystem::current_path();
286#ifdef GALAXY_WIN_PLATFORM
#define GALAXY_DISABLE_WARNING_POP
#define GALAXY_DISABLE_WARNING(x)
#define GALAXY_DISABLE_WARNING_PUSH
Macro for windows platform detection.
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