Configurations...

I whipped up a class to look after general application configuration data in similar fashion to the logger... It contains a static map to house all our config data that we now read in from a config.ini file...

We started with reading in all the data with a parse function, and rewriting the entire file with a save function... I wasn't happy with this, so we started looking into the possibility of writing only the values we wanted to change...
Tim and I spent ages looking up reference material and different forums to see if it was possible... Everything I tried ended up rewriting the entire config file with chinese characters... We eventually agreed with everyone else out there that what we want to do just is not possible...
So I added another static variable, a bool to tell the save function if anything has changed... When writing a value to the map, it flips to true... When saving the file, which is again a complete rewrite of the file, it flips to false... So its a little better than rewriting the file everytime the program is run...

I also started messing around with the OpenGL calls, setting some things up for when we start moving the camera around... Also to remember what the hell everything does in OpenGL, as it has been quite a while since I touched it last... Its all coming back slowly though...

0 comments:

Post a Comment