Welcome to nephtys’s documentation!¶
api reference manual¶
nephtys::client::config¶
-
struct
config
¶ This is the game configuration.
Below is an example of a valid configuration for the nephtys client:
{
"window":{
"size":{
"height":1200,
"width":800
},
"title":"nephtys",
"fullscreen":false
}
}
See also nephtys::utils, nephtys::window::win_cfg.
nephtys::window::win_cfg¶
-
struct
win_cfg
¶ The configuration of the game window contains all the data necessary for its manipulation: size, name, full screen […].
nephtys::utils¶
-
template<typename
TConfig
>
TConfignephtys::utils
::
load_configuration
(std::filesystem::path &&config_path, std::string filename)¶ This function allows us to load a configuration through a
path
andfilename
. There are three different behaviors in this function:if the parameter path does not exist the function will attempt to create the directories of the given
path
.if the configuration does not exist a default one will be created.
if the
path
and thename
of the file exists, the contents of the configuration will be loaded.
Example:
auto cfg = utils::load_configuration<client::config>(std::filesystem::current_path() / "assets/config", "nephtys_client.config.json");
- Return
a loaded/created configuration.
- Template Parameters
TConfig
: the type of template you want to load
- Parameters
config_path
: the path to the configuration you want to loadfilename
: the name of the configuration you want to load.