Exemple #1
0
/**
	Demonstrate the use of the simple .ini script-like functions for reading
	values from a script.
**/
void
TestScript::DoScriptIniReadTest()
{
	Script script;

	script.DoFile("ScriptIniTest.dmp");

	float windSpeed = script.ConfigGetReal("Environment", "WindSpeed", 0.0);
	const char* typeStr = script.ConfigGetString("Environment", "TypeStr", "Clear");
	int integerValue = script.ConfigGetInteger("AnotherGroup", "IntegerValue");
	printf("windSpeed: %f, typeStr: %s, intValue: %d\n", windSpeed, typeStr, integerValue);
}