Home » Renegade Discussions » Mod Forum » .ini
Re: .ini [message #447174 is a reply to message #447172] |
Sat, 14 May 2011 05:58 |
|
saberhawk
Messages: 1068 Registered: January 2006 Location: ::1
Karma:
|
General (1 Star) |
|
|
Why not just use INIClass directly, instead of SettingsLoader? It's inside engine_io.h and it's pretty simple to use. If you'd like to load lists of objects, let me know and I'll upload a modified engine_io with two extra INIClass functions that make it alot easier to do so.
/*
; lolhax.ini
[Section]
IntegerValue=42
FloatValue=13.37
BooleanValue=yes
StringValue=Can you hear me now?
*/
int integer_value = 42;
float float_value = 13.37f;
bool boolean_value = true;
char string_value[128] = "Can you hear me now?";
INIClass* ini = Get_INI("lolhax.ini");
if (ini)
{
integer_value = ini->Get_Int("Section", "IntegerValue", 42);
float_value = ini->Get_Float("Section", "FloatValue", 13.37f);
boolean_value = ini->Get_Bool("Section", "BooleanValue", true);
ini->Get_String("Section", "StringValue", "Can you hear me now?", string_value, sizeof(string_value));
Release_INI(ini);
}
[Updated on: Sat, 14 May 2011 06:00] Report message to a moderator
|
|
|
|
|
.ini
By: robbyke on Wed, 11 May 2011 07:21
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 09:33
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:50
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:54
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 22:37
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 08:51
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 11:31
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 12:00
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 05:24
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 06:31
|
|
|
Re: .ini
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 23:59
|
Goto Forum:
Current Time: Sun Dec 29 09:47:12 MST 2024
Total time taken to generate the page: 0.00929 seconds
|