Am Dienstag, 12. September 2006 03:43 schrieb Christian Ohm:
> On Sunday,  3 September 2006 at 15:11, Dennis Schridde wrote:
> > Currently:
> > - warzoneconfig has some runtime functions to store config values
> > - Some subsystems like ivis have their own runtime config storage
> > - configfile stores values in files and gets them from the runtime
> > storage - Probably several other places and methods
>
> The keymap, stored in a binary file.
>
> > My idea:
> > - Get everything from the configfile, everywhere, everytime
> >   (Don't parse it everytime, of course. But use and enhance the current
> > runtime config registry.)
>
> Sounds good. Include the keybindings in that, possibly without the need
> to reset the keymap when a new keyboard function is introduced.
Ok, I'll keep that in mind. :)

Somewhere (don't remember the location) some config values are allready set to 
their default value if they don't yet exist. (Would be good if this would 
also be true for keymaps. ;) )

Brainstorming:

bool WZ_CONF_loadConfig( const char * configFile );
bool WZ_CONF_saveConfig( const char * configFile );

The WZ_CONF_ system would on initialization set everything to it's default and 
when WZ_CONF_loadConfig is called it overwrites everything with the values 
from the configfile.


bool WZ_CONF_registerString( const char * configSection, cchar* optionName, 
cchar* optionDefault );
Analogue for Bool and Int values.

Configfile would look like:

[section]
option=value


Another approach:
Integrate this with the scripting engine (LUA probably) like eg Quake style 
games do. (Set all variables to their default, load the config script and 
then fetch all variables from the scripting engine environment.)

set option=value
bind function=key

and so on.


Or similar:

option=value
bind(function, key)

Or other variants of this. (Combination with sections (eg in LUA struct like 
style), etc...)

--Dennis

Attachment: pgpiWbBmte0z0.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to