|
|
@ -50,7 +50,7 @@ game_init ()
|
|
|
|
bman.fieldsize.y = 17;
|
|
|
|
bman.fieldsize.y = 17;
|
|
|
|
sprintf (bman.datapath, "data");
|
|
|
|
sprintf (bman.datapath, "data");
|
|
|
|
bman.fieldpath[0] = 0;
|
|
|
|
bman.fieldpath[0] = 0;
|
|
|
|
bman.random_map = 1;
|
|
|
|
bman.random_map = 2;
|
|
|
|
init_map_tileset();
|
|
|
|
init_map_tileset();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -171,6 +171,15 @@ ReadConfig ()
|
|
|
|
if (!strcmp (keyword, "maxplayer")) {
|
|
|
|
if (!strcmp (keyword, "maxplayer")) {
|
|
|
|
bman.maxplayer = atoi (value);
|
|
|
|
bman.maxplayer = atoi (value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "fieldpath")) {
|
|
|
|
|
|
|
|
strcpy (bman.fieldpath, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "randommap")) {
|
|
|
|
|
|
|
|
bman.random_map = atoi (value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "randomtileset")) {
|
|
|
|
|
|
|
|
gfx.random_tileset = atoi (value);
|
|
|
|
|
|
|
|
}
|
|
|
|
for (i = 0; i < MAX_SERVERENTRYS; i++) {
|
|
|
|
for (i = 0; i < MAX_SERVERENTRYS; i++) {
|
|
|
|
sprintf (key2, "ip%d", i);
|
|
|
|
sprintf (key2, "ip%d", i);
|
|
|
|
if (!strcmp (keyword, key2)) {
|
|
|
|
if (!strcmp (keyword, key2)) {
|
|
|
@ -212,7 +221,9 @@ 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, "randommap=%d\n", bman.random_map);
|
|
|
|
fclose (config);
|
|
|
|
fclose (config);
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|