|
|
@ -135,6 +135,9 @@ ReadConfig ()
|
|
|
|
if (!strcmp (keyword, "resolutiony")) {
|
|
|
|
if (!strcmp (keyword, "resolutiony")) {
|
|
|
|
gfx.res.y = atoi (value);
|
|
|
|
gfx.res.y = atoi (value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "tileset")) {
|
|
|
|
|
|
|
|
strcpy (gfx.tileset, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!strcmp (keyword, "fieldpath")) {
|
|
|
|
if (!strcmp (keyword, "fieldpath")) {
|
|
|
|
if (strlen (value) > 510) {
|
|
|
|
if (strlen (value) > 510) {
|
|
|
|
d_printf
|
|
|
|
d_printf
|
|
|
@ -207,6 +210,7 @@ WriteConfig ()
|
|
|
|
fprintf (config, "resolutionx=%d\n", gfx.res.x);
|
|
|
|
fprintf (config, "resolutionx=%d\n", gfx.res.x);
|
|
|
|
fprintf (config, "resolutiony=%d\n", gfx.res.y);
|
|
|
|
fprintf (config, "resolutiony=%d\n", gfx.res.y);
|
|
|
|
fprintf (config, "fullscreen=%d\n", gfx.fullscreen);
|
|
|
|
fprintf (config, "fullscreen=%d\n", gfx.fullscreen);
|
|
|
|
|
|
|
|
fprintf (config, "tileset=%s\n", gfx.tileset);
|
|
|
|
fprintf (config, "fieldpath=%s\n", bman.fieldpath);
|
|
|
|
fprintf (config, "fieldpath=%s\n", bman.fieldpath);
|
|
|
|
fprintf (config, "fieldsizex=%d\n", bman.fieldsize.x);
|
|
|
|
fprintf (config, "fieldsizex=%d\n", bman.fieldsize.x);
|
|
|
|
fprintf (config, "fieldsizey=%d\n", bman.fieldsize.y);
|
|
|
|
fprintf (config, "fieldsizey=%d\n", bman.fieldsize.y);
|
|
|
@ -221,7 +225,6 @@ WriteConfig ()
|
|
|
|
fprintf (config, "askplayername=%d\n", bman.askplayername);
|
|
|
|
fprintf (config, "askplayername=%d\n", bman.askplayername);
|
|
|
|
fprintf (config, "playername=%s\n", bman.playername);
|
|
|
|
fprintf (config, "playername=%s\n", bman.playername);
|
|
|
|
fprintf (config, "bitsperpixel=%d\n", gfx.bpp);
|
|
|
|
fprintf (config, "bitsperpixel=%d\n", gfx.bpp);
|
|
|
|
fprintf (config, "fieldpath=%s\n", bman.fieldpath);
|
|
|
|
|
|
|
|
fprintf (config, "randomtileset=%d\n", gfx.random_tileset);
|
|
|
|
fprintf (config, "randomtileset=%d\n", gfx.random_tileset);
|
|
|
|
fprintf (config, "randommap=%d\n", bman.random_map);
|
|
|
|
fprintf (config, "randommap=%d\n", bman.random_map);
|
|
|
|
fclose (config);
|
|
|
|
fclose (config);
|
|
|
|