SDK ConfigFile API documentation

<dmsdk/dlib/configfile.h>

Configuration file access functions. The configuration file is compiled version of the game.project file.

FUNCTION
dmConfigFile::GetFloat()

get config value as float

dmConfigFile::GetInt()

get config value as int

dmConfigFile::GetString()

get config value as string

Functions

dmConfigFile::GetFloat()

dmConfigFile::GetFloat(config,key,default_value)

Get config value as float, returns default if the key isn't found Note: default_value is returned for invalid float values

PARAMETERS

config

dmBuffer::HConfig Config file handle

key

const char* Key in format section.key (.key for no section)

default_value

float Default value to return if key isn't found

RETURNS

value

float found value or default value


dmConfigFile::GetInt()

dmConfigFile::GetInt(config,key,default_value)

Get config value as int, returns default if the key isn't found Note: default_value is returned for invalid integer values

PARAMETERS

config

dmBuffer::HConfig Config file handle

key

const char* Key in format section.key (.key for no section)

default_value

int32_t Default value to return if key isn't found

RETURNS

value

int32_t found value or default value


dmConfigFile::GetString()

dmConfigFile::GetString(config,key,default_value)

Get config value as string, returns default if the key isn't found

PARAMETERS

config

dmBuffer::HConfig Config file handle

key

const char* Key in format section.key (.key for no section)

default_value

const char* Default value to return if key isn't found

RETURNS

value

const char* found value or default value