galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Settings Struct Reference

Helper class to encapsulate our global settings we want to quickly access across app. More...

#include <Settings.hpp>

Collaboration diagram for galaxy::Settings:

Static Public Member Functions

static auto set_config_to_default () -> void
 Restore all config settings to default.
static auto set_settings_from_config () -> void
 Set all our settings using the provided config file.
static auto vsync () noexcept -> bool
 Vsync control.
static auto audio_freq () noexcept -> int
 Set audio frequency to use with SDL.
static auto title () noexcept -> const std::string &
 Game title.
static auto version () noexcept -> const std::string &
 Game semver.
static auto identifier () noexcept -> const std::string &
 Game identifier i.e. com.galaxy.app.
static auto creator () noexcept -> const std::string &
 Owner.
static auto copyright () noexcept -> const std::string &
 Copyright message.
static auto website () noexcept -> const std::string &
 Website URL.
static auto logs_dir () noexcept -> const std::string &
 Current root directory of application, unless it has been changed.
static auto root_dir () noexcept -> std::filesystem::path
 Current root directory of application, unless it has been changed.
static auto assets_dir () noexcept -> std::filesystem::path
 Main data directory.
static auto editor_dir () noexcept -> std::filesystem::path
 Directory for editor specific stuff.
static auto asset_pack () noexcept -> const std::string &
 Name of packed assets file.
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 assets_dir_sfx () noexcept -> const std::string &
 SFX asset location.
static auto assets_dir_voice () noexcept -> const std::string &
 Voice asset location.
static auto assets_dir_font () noexcept -> const std::string &
 Font asset location.
static auto assets_dir_script () noexcept -> const std::string &
 Scripts 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 auto assets_dir_texture () noexcept -> const std::string &
 Textures asset location.
static auto assets_dir_prefabs () noexcept -> const std::string &
 Prefab asset location.
static auto assets_dir_maps () noexcept -> const std::string &
 Maps asset location.
static auto assets_dir_video () noexcept -> const std::string &
 Video asset location.
static auto assets_dir_ui () noexcept -> const std::string &
 UI asset location.

Static Private Attributes

static bool s_vsync
static int s_audio_freq
static std::string s_title
static std::string s_version
static std::string s_identifier
static std::string s_creator
static std::string s_copyright
static std::string s_website
static std::string s_logs_dir
static std::filesystem::path s_assets_dir
static std::filesystem::path s_editor_dir
static std::string s_asset_pack
static bool s_use_loose_assets
static std::string s_assets_music
static std::string s_assets_sfx
static std::string s_assets_voice
static std::string s_assets_font
static std::string s_assets_script
static std::string s_assets_shaders
static std::string s_assets_animation
static std::string s_assets_texture
static std::string s_assets_prefabs
static std::string s_assets_maps
static std::string s_assets_video
static std::string s_assets_ui

Detailed Description

Helper class to encapsulate our global settings we want to quickly access across app.

Definition at line 20 of file Settings.hpp.

Member Function Documentation

◆ set_config_to_default()

auto galaxy::Settings::set_config_to_default ( ) -> void
static

Restore all config settings to default.

Definition at line 23 of file Settings.cpp.

Here is the caller graph for this function:

◆ set_settings_from_config()

auto galaxy::Settings::set_settings_from_config ( ) -> void
static

Set all our settings using the provided config file.

Definition at line 77 of file Settings.cpp.

Here is the caller graph for this function:

◆ vsync()

auto galaxy::Settings::vsync ( ) -> bool
staticnodiscardnoexcept

Vsync control.

Returns
Boolean.

Definition at line 131 of file Settings.cpp.

Here is the caller graph for this function:

◆ audio_freq()

auto galaxy::Settings::audio_freq ( ) -> int
staticnodiscardnoexcept

Set audio frequency to use with SDL.

Returns
Int.

Definition at line 136 of file Settings.cpp.

Here is the caller graph for this function:

◆ title()

auto galaxy::Settings::title ( ) -> const std::string &
staticnodiscardnoexcept

Game title.

Returns
Const string.

Definition at line 141 of file Settings.cpp.

Here is the caller graph for this function:

◆ version()

auto galaxy::Settings::version ( ) -> const std::string &
staticnodiscardnoexcept

Game semver.

Returns
Const string.

Definition at line 146 of file Settings.cpp.

Here is the caller graph for this function:

◆ identifier()

auto galaxy::Settings::identifier ( ) -> const std::string &
staticnodiscardnoexcept

Game identifier i.e. com.galaxy.app.

Returns
Const string.

Definition at line 151 of file Settings.cpp.

Here is the caller graph for this function:

◆ creator()

auto galaxy::Settings::creator ( ) -> const std::string &
staticnodiscardnoexcept

Owner.

Returns
Const string.

Definition at line 156 of file Settings.cpp.

Here is the caller graph for this function:

◆ copyright()

auto galaxy::Settings::copyright ( ) -> const std::string &
staticnodiscardnoexcept

Copyright message.

Returns
Const string.

Definition at line 161 of file Settings.cpp.

Here is the caller graph for this function:

◆ website()

auto galaxy::Settings::website ( ) -> const std::string &
staticnodiscardnoexcept

Website URL.

Returns
Const string.

Definition at line 166 of file Settings.cpp.

Here is the caller graph for this function:

◆ logs_dir()

auto galaxy::Settings::logs_dir ( ) -> const std::string &
staticnodiscardnoexcept

Current root directory of application, unless it has been changed.

Returns
Const string.

Definition at line 171 of file Settings.cpp.

Here is the caller graph for this function:

◆ root_dir()

auto galaxy::Settings::root_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Current root directory of application, unless it has been changed.

Returns
Filesystem path.

Definition at line 176 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir()

auto galaxy::Settings::assets_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Main data directory.

Returns
Filesystem path.

Definition at line 181 of file Settings.cpp.

Here is the caller graph for this function:

◆ editor_dir()

auto galaxy::Settings::editor_dir ( ) -> std::filesystem::path
staticnodiscardnoexcept

Directory for editor specific stuff.

Returns
Filesystem path.

Definition at line 186 of file Settings.cpp.

Here is the caller graph for this function:

◆ asset_pack()

auto galaxy::Settings::asset_pack ( ) -> const std::string &
staticnodiscardnoexcept

Name of packed assets file.

Returns
Const string.

Definition at line 191 of file Settings.cpp.

Here is the caller graph for this function:

◆ use_loose_assets()

auto galaxy::Settings::use_loose_assets ( ) -> bool
staticnodiscardnoexcept

Should asset data be read from pack or assets dir.

Returns
Boolean.

Definition at line 196 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_music()

auto galaxy::Settings::assets_dir_music ( ) -> const std::string &
staticnodiscardnoexcept

Music asset location.

Returns
Const string.

Definition at line 201 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_sfx()

auto galaxy::Settings::assets_dir_sfx ( ) -> const std::string &
staticnodiscardnoexcept

SFX asset location.

Returns
Const string.

Definition at line 206 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_voice()

auto galaxy::Settings::assets_dir_voice ( ) -> const std::string &
staticnodiscardnoexcept

Voice asset location.

Returns
Const string.

Definition at line 211 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_font()

auto galaxy::Settings::assets_dir_font ( ) -> const std::string &
staticnodiscardnoexcept

Font asset location.

Returns
Const string.

Definition at line 216 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_script()

auto galaxy::Settings::assets_dir_script ( ) -> const std::string &
staticnodiscardnoexcept

Scripts asset location.

Returns
Const string.

Definition at line 221 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_shaders()

auto galaxy::Settings::assets_dir_shaders ( ) -> const std::string &
staticnodiscardnoexcept

Shaders asset location.

Returns
Const string.

Definition at line 226 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_animation()

auto galaxy::Settings::assets_dir_animation ( ) -> const std::string &
staticnodiscardnoexcept

Animation data location.

Returns
Const string.

Definition at line 231 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_texture()

auto galaxy::Settings::assets_dir_texture ( ) -> const std::string &
staticnodiscardnoexcept

Textures asset location.

Returns
Const string.

Definition at line 236 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_prefabs()

auto galaxy::Settings::assets_dir_prefabs ( ) -> const std::string &
staticnodiscardnoexcept

Prefab asset location.

Returns
Const string.

Definition at line 241 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_maps()

auto galaxy::Settings::assets_dir_maps ( ) -> const std::string &
staticnodiscardnoexcept

Maps asset location.

Returns
Const string.

Definition at line 246 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_video()

auto galaxy::Settings::assets_dir_video ( ) -> const std::string &
staticnodiscardnoexcept

Video asset location.

Returns
Const string.

Definition at line 251 of file Settings.cpp.

Here is the caller graph for this function:

◆ assets_dir_ui()

auto galaxy::Settings::assets_dir_ui ( ) -> const std::string &
staticnodiscardnoexcept

UI asset location.

Returns
Const string.

Definition at line 256 of file Settings.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ s_vsync

bool galaxy::Settings::s_vsync
inlinestaticprivate

Definition at line 242 of file Settings.hpp.

◆ s_audio_freq

int galaxy::Settings::s_audio_freq
inlinestaticprivate

Definition at line 243 of file Settings.hpp.

◆ s_title

std::string galaxy::Settings::s_title
inlinestaticprivate

Definition at line 245 of file Settings.hpp.

◆ s_version

std::string galaxy::Settings::s_version
inlinestaticprivate

Definition at line 246 of file Settings.hpp.

◆ s_identifier

std::string galaxy::Settings::s_identifier
inlinestaticprivate

Definition at line 247 of file Settings.hpp.

◆ s_creator

std::string galaxy::Settings::s_creator
inlinestaticprivate

Definition at line 248 of file Settings.hpp.

◆ s_copyright

std::string galaxy::Settings::s_copyright
inlinestaticprivate

Definition at line 249 of file Settings.hpp.

◆ s_website

std::string galaxy::Settings::s_website
inlinestaticprivate

Definition at line 250 of file Settings.hpp.

◆ s_logs_dir

std::string galaxy::Settings::s_logs_dir
inlinestaticprivate

Definition at line 252 of file Settings.hpp.

◆ s_assets_dir

std::filesystem::path galaxy::Settings::s_assets_dir
inlinestaticprivate

Definition at line 253 of file Settings.hpp.

◆ s_editor_dir

std::filesystem::path galaxy::Settings::s_editor_dir
inlinestaticprivate

Definition at line 254 of file Settings.hpp.

◆ s_asset_pack

std::string galaxy::Settings::s_asset_pack
inlinestaticprivate

Definition at line 255 of file Settings.hpp.

◆ s_use_loose_assets

bool galaxy::Settings::s_use_loose_assets
inlinestaticprivate

Definition at line 256 of file Settings.hpp.

◆ s_assets_music

std::string galaxy::Settings::s_assets_music
inlinestaticprivate

Definition at line 257 of file Settings.hpp.

◆ s_assets_sfx

std::string galaxy::Settings::s_assets_sfx
inlinestaticprivate

Definition at line 258 of file Settings.hpp.

◆ s_assets_voice

std::string galaxy::Settings::s_assets_voice
inlinestaticprivate

Definition at line 259 of file Settings.hpp.

◆ s_assets_font

std::string galaxy::Settings::s_assets_font
inlinestaticprivate

Definition at line 260 of file Settings.hpp.

◆ s_assets_script

std::string galaxy::Settings::s_assets_script
inlinestaticprivate

Definition at line 261 of file Settings.hpp.

◆ s_assets_shaders

std::string galaxy::Settings::s_assets_shaders
inlinestaticprivate

Definition at line 262 of file Settings.hpp.

◆ s_assets_animation

std::string galaxy::Settings::s_assets_animation
inlinestaticprivate

Definition at line 263 of file Settings.hpp.

◆ s_assets_texture

std::string galaxy::Settings::s_assets_texture
inlinestaticprivate

Definition at line 264 of file Settings.hpp.

◆ s_assets_prefabs

std::string galaxy::Settings::s_assets_prefabs
inlinestaticprivate

Definition at line 265 of file Settings.hpp.

◆ s_assets_maps

std::string galaxy::Settings::s_assets_maps
inlinestaticprivate

Definition at line 266 of file Settings.hpp.

◆ s_assets_video

std::string galaxy::Settings::s_assets_video
inlinestaticprivate

Definition at line 267 of file Settings.hpp.

◆ s_assets_ui

std::string galaxy::Settings::s_assets_ui
inlinestaticprivate

Definition at line 268 of file Settings.hpp.


The documentation for this struct was generated from the following files: