hiho
I wrote a small configfile dll:
It can read values and strings out of a userdefined file. Comments are possible (as shown in the example) with just writing ";" as the first line character.
There are three data levels:
first one: [head topic]
second: #specified topic
third: variable / string
a short example code:Code:
//load the seconds
temp = DLL_cfgload("Settings.cfg", "GameSettings", "Game Time", "seconds");
//load the start string
DLL_cfgloadS("Settings.cfg", "GameSettings", "GameStarter", str_cpy(Start_str, "start"));
the string access is a bit tricky because the functions cannot have more than 4 parameters.. you have to take a string containing the cfg-value name for reading the user string. But that shouldnt be a problem..
a short example file:Code:
;----------------------------------------------
[GameSettings]
;time for one run
#Game Time
hours = 0
minutes = 0
seconds = 5
#GameStarter
start = Welcome!
rebirth = We'll start another round..
timeout = Timeout..
end = No lifes left
;settings for the player
#Player
healthpoints = 3
speed = 25
jumpSpeed = 10
Is anyone interested in it?