changed selectplayer to askplayername

origin
stpohle 23 years ago
parent 4ea37d00f3
commit e2516eaad9

@ -7,25 +7,27 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <ctype.h>
#ifdef _WIN32
#include <winsock.h>
#else
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/types.h>
#endif
#include <SDL.h>
#include "../config.h"
#include "gfx.h"
#include "network.h"
struct __playerilness {
int to; // if (to > 0) the ilness is still working
int data;
@ -126,9 +128,7 @@ struct __bomberclone {
char gamename[LEN_GAMENAME]; // this will hold the game name
char gamemaster[LEN_SERVERNAME + LEN_PORT + 2]; // ** CONFIG ... GameMaster Address
unsigned char notifygamemaster;
signed char net_pkgsend_to;
signed char net_pkgsend_set; // ** CONFIG
unsigned char selectplayer; // ask player for name at startup
unsigned char askplayername; // ask player for name at startup
signed char debug; // 0 = off 1 = on
} typedef _bomberclone;

@ -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)

Loading…
Cancel
Save