|
|
|
@ -32,14 +32,13 @@ game_init ()
|
|
|
|
|
|
|
|
|
|
bman.maxplayer = MAX_PLAYERS;
|
|
|
|
|
bman.net_ai_family = PF_INET;
|
|
|
|
|
bman.net_pkgsend_set = 2;
|
|
|
|
|
bman.gamename[0] = 0;
|
|
|
|
|
sprintf (bman.port, "%d", DEFAULT_UDPPORT);
|
|
|
|
|
sprintf (bman.gamemaster, DEFAULT_GAMEMASTER);
|
|
|
|
|
resend_cache.data = NULL;
|
|
|
|
|
resend_cache.fill = -1;
|
|
|
|
|
bman.notifygamemaster = 1;
|
|
|
|
|
bman.selectplayer = 1;
|
|
|
|
|
bman.askplayername = 1;
|
|
|
|
|
debug = 0;
|
|
|
|
|
gfx.res.x = 640;
|
|
|
|
|
gfx.res.y = 480;
|
|
|
|
@ -122,8 +121,8 @@ ReadConfig ()
|
|
|
|
|
strcpy (bman.gamename, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!strcmp (keyword, "selectplayer")) {
|
|
|
|
|
bman.selectplayer = atoi (value);
|
|
|
|
|
if (!strcmp (keyword, "askplayername")) {
|
|
|
|
|
bman.askplayername = atoi (value);
|
|
|
|
|
}
|
|
|
|
|
if (!strcmp (keyword, "resolutionx")) {
|
|
|
|
|
gfx.res.x = atoi (value);
|
|
|
|
@ -195,7 +194,7 @@ WriteConfig ()
|
|
|
|
|
for (i = 0; i < MAX_SERVERENTRYS; i++)
|
|
|
|
|
fprintf (config, "ip%d=%s\n", i, bman.serverlist[i].name);
|
|
|
|
|
fprintf (config, "debug=%d\n", debug);
|
|
|
|
|
fprintf (config, "selectplayer=%d\n", bman.selectplayer);
|
|
|
|
|
fprintf (config, "askplayername=%d\n", bman.askplayername);
|
|
|
|
|
fprintf (config, "playername=%s\n", bman.playername);
|
|
|
|
|
fprintf (config, "bitsperpixel=%d\n", gfx.bpp);
|
|
|
|
|
|
|
|
|
@ -313,7 +312,7 @@ configuration ()
|
|
|
|
|
else
|
|
|
|
|
sprintf (menu[6].text, "Debug Messages OFF");
|
|
|
|
|
|
|
|
|
|
if (bman.selectplayer == 1)
|
|
|
|
|
if (bman.askplayername == 1)
|
|
|
|
|
sprintf (menu[6].text, "Prompt For Name: Yes");
|
|
|
|
|
else
|
|
|
|
|
sprintf (menu[6].text, "Prompt For Name: No");
|
|
|
|
@ -355,10 +354,10 @@ configuration ()
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case (6): // Debugging On / Off
|
|
|
|
|
if (bman.selectplayer == 1)
|
|
|
|
|
bman.selectplayer = 0;
|
|
|
|
|
if (bman.askplayername == 1)
|
|
|
|
|
bman.askplayername = 0;
|
|
|
|
|
else
|
|
|
|
|
bman.selectplayer = 1;
|
|
|
|
|
bman.askplayername = 1;
|
|
|
|
|
break;
|
|
|
|
|
case (7): // Debugging On / Off
|
|
|
|
|
if (debug == 1)
|
|
|
|
|