Blamite Game Engine - Blam (Core)
config.cpp File Reference

Functions

int loadConfigMain (std::string filename, bool load_defaults, int defaults_resource_id, const char *defaults_res_type)
 Main function to load a configuration file. More...
 

Function Documentation

◆ loadConfigMain()

int loadConfigMain ( std::string  filename,
bool  load_defaults,
int  defaults_resource_id,
const char *  defaults_res_type 
)

Main function to load a configuration file.

This function is called from the other LoadConfig() functions.

Parameters
filename- The path to the configuration file
load_defaults- Whether or not to load defaults from an embedded resource.
defaults_resource_id- The resource ID that refers to the file containing the default configuration file contents.
defaults_res_type- The type of resource that the default configuration file is stored in. Should almost always be "CFG"
Returns
- Will return negative if the file failed to load, will return 0 if file was loaded without error.