- Select ref document -

SDK ConfigFile API documentation

version 1.2.149

<dmsdk/dlib/configfile.h>

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

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

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

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

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

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

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

value

const char* found value or default value

Typedefs

dmConfigFile::HConfig

typedef struct Config* HConfig;