From 823bddb0d9cc63ddda17a2cd20266aa3b82bde38 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 30 Sep 1998 11:07:25 +0200 Subject: [PATCH] rnd-19980930-1 --- src/Makefile | 8 ++- src/buttons.c | 13 ++-- src/buttons.h | 13 ++-- src/cartoons.c | 13 ++-- src/cartoons.h | 13 ++-- src/editor.c | 13 ++-- src/editor.h | 13 ++-- src/events.c | 13 ++-- src/events.h | 13 ++-- src/files.c | 13 ++-- src/files.h | 13 ++-- src/game.c | 13 ++-- src/game.h | 13 ++-- src/gfxload.c | 13 ++-- src/gfxload.h | 13 ++-- src/gifload.c | 13 ++-- src/gifload.h | 13 ++-- src/init.c | 164 ++++++++++++++++++++++++++++++++++++++++++++++--- src/init.h | 13 ++-- src/joystick.c | 12 ++-- src/joystick.h | 12 ++-- src/main.c | 30 ++++++--- src/main.h | 16 ++--- src/misc.c | 13 ++-- src/misc.h | 13 ++-- src/msdos.c | 13 ++-- src/msdos.h | 15 +++-- src/random.h | 13 ++-- src/screens.c | 13 ++-- src/screens.h | 13 ++-- src/sound.c | 13 ++-- src/sound.h | 13 ++-- src/tape.c | 12 ++-- src/tape.h | 12 ++-- src/tools.c | 13 ++-- src/tools.h | 13 ++-- 36 files changed, 387 insertions(+), 245 deletions(-) diff --git a/src/Makefile b/src/Makefile index 9f912dc8..8b9de786 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,6 +3,7 @@ # PROGNAME = rocksndiamonds +SERVNAME = rnd_server RM = rm -f CC = gcc @@ -87,9 +88,14 @@ OBJS = main.o \ new.o \ random.o -all: $(OBJS) +all: $(PROGNAME) $(SERVNAME) + +$(PROGNAME): $(OBJS) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(PROGNAME) +$(SERVNAME): $(SERVNAME).c + $(CC) $(CFLAGS) $(SERVNAME).c $(LIBS) -o $(SERVNAME) + .c.o: $(CC) $(CFLAGS) -c $*.c diff --git a/src/buttons.c b/src/buttons.c index dc4860e0..8077b03a 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * buttons.c * ***********************************************************/ diff --git a/src/buttons.h b/src/buttons.h index 7d4153c1..397aa6f9 100644 --- a/src/buttons.h +++ b/src/buttons.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * buttons.h * ***********************************************************/ diff --git a/src/cartoons.c b/src/cartoons.c index 8aee8a26..9eef8e1e 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * cartoons.c * ***********************************************************/ diff --git a/src/cartoons.h b/src/cartoons.h index 25b4d2c4..fdde0cbc 100644 --- a/src/cartoons.h +++ b/src/cartoons.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * cartoons.h * ***********************************************************/ diff --git a/src/editor.c b/src/editor.c index ae7e7e8c..3434b4c2 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * editor.c * ***********************************************************/ diff --git a/src/editor.h b/src/editor.h index b4ebfed2..b282fe4b 100644 --- a/src/editor.h +++ b/src/editor.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * editor.h * ***********************************************************/ diff --git a/src/events.c b/src/events.c index ff86409e..d0684ed3 100644 --- a/src/events.c +++ b/src/events.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * events.c * ***********************************************************/ diff --git a/src/events.h b/src/events.h index 88c627d9..ccf604c3 100644 --- a/src/events.h +++ b/src/events.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * events.h * ***********************************************************/ diff --git a/src/files.c b/src/files.c index 284ed51f..9e35c060 100644 --- a/src/files.c +++ b/src/files.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * files.h * ***********************************************************/ diff --git a/src/files.h b/src/files.h index e34532a1..c0050d36 100644 --- a/src/files.h +++ b/src/files.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * files.h * ***********************************************************/ diff --git a/src/game.c b/src/game.c index 86d83660..3392e0ec 100644 --- a/src/game.c +++ b/src/game.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * game.c * ***********************************************************/ diff --git a/src/game.h b/src/game.h index 9cf6a297..fce92603 100644 --- a/src/game.h +++ b/src/game.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * game.h * ***********************************************************/ diff --git a/src/gfxload.c b/src/gfxload.c index 05e72a15..bcc7f221 100644 --- a/src/gfxload.c +++ b/src/gfxload.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * gfxload.c * ***********************************************************/ diff --git a/src/gfxload.h b/src/gfxload.h index 654dacdb..7489447e 100644 --- a/src/gfxload.h +++ b/src/gfxload.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * gfxload.h * ***********************************************************/ diff --git a/src/gifload.c b/src/gifload.c index ac64df6a..1e1aebcd 100644 --- a/src/gifload.c +++ b/src/gifload.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * gifload.c * ***********************************************************/ diff --git a/src/gifload.h b/src/gifload.h index 967221de..1551375a 100644 --- a/src/gifload.h +++ b/src/gifload.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * gifload.h * ***********************************************************/ diff --git a/src/init.c b/src/init.c index 4181eb00..27247acd 100644 --- a/src/init.c +++ b/src/init.c @@ -1,17 +1,22 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * init.c * ***********************************************************/ +#include +#include +#include +#include +#include + #include "init.h" #include "misc.h" #include "sound.h" @@ -22,8 +27,6 @@ #include "gfxload.h" #include "gifload.h" -#include - #ifdef DEBUG /* #define DEBUG_TIMING @@ -44,6 +47,7 @@ struct IconFileInfo static int sound_process_id = 0; +static void InitServer(void); static void InitLevelAndPlayerInfo(void); static void InitDisplay(int, char **); static void InitSound(void); @@ -55,6 +59,13 @@ static void InitElementProperties(void); void OpenAll(int argc, char *argv[]) { + + + /* TEST TEST TEST */ + InitServer(); + /* TEST TEST TEST */ + + InitLevelAndPlayerInfo(); InitCounter(); @@ -78,6 +89,141 @@ void OpenAll(int argc, char *argv[]) DrawMainMenu(); } + + +/* TEST STUFF -------------------------------------------------------------- */ + +int norestart = 0; +int nospeedup = 0; + +/* server stuff */ + +#define DEFAULTPORT 19503 +#define BUFLEN 4096 + +int sfd; +unsigned char realbuf[512], readbuf[BUFLEN], writbuf[BUFLEN]; +unsigned char *buf = realbuf + 4; +int nread = 0, nwrite = 0; + +void fatal(char *s) +{ + fprintf(stderr, "%s.\n", s); + exit(1); +} + +void u_sleep(int i) +{ + struct timeval tm; + tm.tv_sec = i / 1000000; + tm.tv_usec = i % 1000000; + select(0, NULL, NULL, NULL, &tm); +} + +void startserver() +{ + char *options[2]; + int n = 0; + + options[0] = options[1] = NULL; + if (norestart) + options[n++] = "-norestart"; + if (nospeedup) + options[n++] = "-nospeedup"; + + switch (fork()) + { + case 0: + execlp( +#ifdef XTRISPATH + XTRISPATH "/rnd_server", +#else + "rnd_server", +#endif + "rnd_server", "-once", "-v", options[0], options[1], NULL); + + fprintf(stderr, "Can't start server '%s'.\n", +#ifdef XTRISPATH + XTRISPATH "/xtserv"); +#else + "xtserv"); +#endif + + _exit(1); + + case -1: + fatal("fork() failed"); + + default: + return; + } +} + +void connect2server(char *host, int port) +{ + struct hostent *hp; + struct sockaddr_in s; + struct protoent *tcpproto; + int on = 1, i; + + if (host) + { + if ((s.sin_addr.s_addr = inet_addr(host)) == -1) + { + hp = gethostbyname(host); + if (!hp) + fatal("Host not found"); + s.sin_addr = *(struct in_addr *)(hp->h_addr_list[0]); + } + } + else + s.sin_addr.s_addr = inet_addr("127.0.0.1"); + + s.sin_port = htons(port); + s.sin_family = AF_INET; + sfd = socket(PF_INET, SOCK_STREAM, 0); + if (sfd < 0) + fatal("Out of file descriptors"); + if ((tcpproto = getprotobyname("tcp")) != NULL) + setsockopt(sfd, tcpproto->p_proto, TCP_NODELAY, (char *)&on, sizeof(int)); + + if (connect(sfd, (struct sockaddr *)&s, sizeof(s)) < 0) + { + if (!host) + { + printf("No xtris server on localhost - starting up one ...\n"); + startserver(); + for (i=0; i<6; i++) + { + u_sleep(500000); + close(sfd); + sfd = socket(PF_INET, SOCK_STREAM, 0); + if (sfd < 0) + fatal("Out of file descriptors"); + setsockopt(sfd, tcpproto->p_proto, TCP_NODELAY, (char *)&on, sizeof(int)); + if (connect(sfd, (struct sockaddr *)&s, sizeof(s)) >= 0) + break; + } + if (i==6) + fatal("Can't connect to server"); + } + else + fatal("Can't connect to server"); + } +} + +void InitServer() +{ + if (server_port == 0) + server_port = DEFAULTPORT; + + connect2server(server_host, server_port); +} + +/* TEST STUFF -------------------------------------------------------------- */ + + + void InitLevelAndPlayerInfo() { local_player = &stored_player[0]; diff --git a/src/init.h b/src/init.h index a4025311..2c435418 100644 --- a/src/init.h +++ b/src/init.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * init.h * ***********************************************************/ diff --git a/src/joystick.c b/src/joystick.c index 7bf648ed..0e1a42cd 100644 --- a/src/joystick.c +++ b/src/joystick.c @@ -1,12 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33604 Bielefeld * -* Telefon: (0521) 290471 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * joystick.c * ***********************************************************/ diff --git a/src/joystick.h b/src/joystick.h index 205f51f8..56c5b43d 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -1,12 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1997 Artsoft Development * -* Holger Schemel * -* 33604 Bielefeld * -* Telefon: (0521) 290471 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * joystick.h * ***********************************************************/ diff --git a/src/main.c b/src/main.c index 93cff5b0..4b1a8c64 100644 --- a/src/main.c +++ b/src/main.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * main.c * ***********************************************************/ @@ -46,6 +45,9 @@ char *joystick_device_name[2] = { DEV_JOYSTICK_0, DEV_JOYSTICK_1 }; char *level_directory = LEVEL_PATH; int width, height; +char *server_host = NULL; +int server_port = 0; + int game_status = MAINMENU; int game_emulation = EMU_NONE; int button_status = MB_NOT_PRESSED, motion_status = FALSE; @@ -193,8 +195,22 @@ int main(int argc, char *argv[]) { progname = argv[0]; + + + /* if (argc>1) level_directory = argv[1]; + */ + + + + if (argc > 1) + server_host = argv[1]; + + if (argc > 2) + server_port = atoi(argv[2]); + + #ifdef MSDOS _fmode = O_BINARY; diff --git a/src/main.h b/src/main.h index 54efac83..d1abeccc 100644 --- a/src/main.h +++ b/src/main.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * main.h * ***********************************************************/ @@ -322,6 +321,9 @@ extern char *joystick_device_name[2]; extern char *level_directory; extern int width, height; +extern char *server_host; +extern int server_port; + extern int game_status; extern int game_emulation; extern int button_status, motion_status; diff --git a/src/misc.c b/src/misc.c index 8a17d8c3..1ab116d6 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * misc.c * ***********************************************************/ diff --git a/src/misc.h b/src/misc.h index a6a8fb01..99c867a0 100644 --- a/src/misc.h +++ b/src/misc.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * misc.h * ***********************************************************/ diff --git a/src/msdos.c b/src/msdos.c index bd4ad73d..54502aef 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * msdos.c * ***********************************************************/ diff --git a/src/msdos.h b/src/msdos.h index c3357a65..b09c4ce4 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * msdos.h * ***********************************************************/ @@ -469,4 +468,4 @@ extern KeySym XLookupKeysym(XKeyEvent*, int); //extern void XSetClipOrigin(Display*, GC, int, int); //extern XImage *XGetImage(Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int); -BITMAP *load_gif(char *filename, RGB *pal); \ No newline at end of file +BITMAP *load_gif(char *filename, RGB *pal); diff --git a/src/random.h b/src/random.h index 0f99fffd..366d1ff5 100644 --- a/src/random.h +++ b/src/random.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * random.h * ***********************************************************/ diff --git a/src/screens.c b/src/screens.c index 5cc2e514..86a1235d 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * screens.c * ***********************************************************/ diff --git a/src/screens.h b/src/screens.h index abe2f198..bde71a06 100644 --- a/src/screens.h +++ b/src/screens.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * screens.h * ***********************************************************/ diff --git a/src/sound.c b/src/sound.c index 516892b5..af9af974 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * sound.c * ***********************************************************/ diff --git a/src/sound.h b/src/sound.h index 213cd746..02431c45 100644 --- a/src/sound.h +++ b/src/sound.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * sound.c * ***********************************************************/ diff --git a/src/tape.c b/src/tape.c index 9c266845..53ce1d9e 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1,12 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1997 Artsoft Development * -* Holger Schemel * -* 33604 Bielefeld * -* Telefon: (0521) 290471 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * tape.c * ***********************************************************/ diff --git a/src/tape.h b/src/tape.h index ee0a98e3..aa1b5826 100644 --- a/src/tape.h +++ b/src/tape.h @@ -1,12 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1997 Artsoft Development * -* Holger Schemel * -* 33604 Bielefeld * -* Telefon: (0521) 290471 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * tape.c * ***********************************************************/ diff --git a/src/tools.c b/src/tools.c index 41e1b455..2aad13a9 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * tools.c * ***********************************************************/ diff --git a/src/tools.h b/src/tools.h index 55759822..c8436d11 100644 --- a/src/tools.h +++ b/src/tools.h @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * tools.h * ***********************************************************/ -- 2.34.1