ConfigFile

<dmsdk/dlib/configfile.h>

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

dmConfigFile::GetFloat()

get config value as float

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

RETURN

value -

float found value or default value


dmConfigFile::GetInt()

get config value as int

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

RETURN

value -

int32_t found value or default value


dmConfigFile::GetString()

get config value as string

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

RETURN

value -

const char* found value or default value


dmConfigFile::HConfig

HConfig type definition

typedef struct Config* HConfig;