Date: Saturday August 23, 2003 @ 1:14 Author: cameron Update of /home/netrek/cvsroot/Vanilla/tools In directory swashbuckler.real-time.com:/var/tmp/cvs-serv28837/tools Modified Files: Makefile.in setgalaxy.c Log Message: Makefile.in mods for GNU standards **************************************** Index: Vanilla/tools/Makefile.in diff -u Vanilla/tools/Makefile.in:1.5 Vanilla/tools/Makefile.in:1.6 --- Vanilla/tools/Makefile.in:1.5 Wed May 29 17:34:38 2002 +++ Vanilla/tools/Makefile.in Sat Aug 23 01:14:20 2003 @@ -60,33 +60,33 @@ install: $(EXECS) - - at if [ ! -d $(LIBDIR)/tools ]; then \ - /bin/mkdir $(LIBDIR)/tools; \ + - at if [ ! -d $(DESTDIR)$(LIBDIR)/tools ]; then \ + /bin/mkdir $(DESTDIR)$(LIBDIR)/tools; \ fi - $(INSTALLPROG) $(INSTALLOPTS) ${srcdir}/updatekeys $(LIBDIR)/tools/updatekeys - $(INSTALLPROG) $(INSTALLOPTS) blotpassword $(LIBDIR)/tools/blotpassword - $(INSTALLPROG) $(INSTALLOPTS) loadchecker $(LIBDIR)/tools/loadchecker - $(INSTALLPROG) $(INSTALLOPTS) mess $(LIBDIR)/tools/mess - $(INSTALLPROG) $(INSTALLOPTS) message $(LIBDIR)/tools/message - $(INSTALLPROG) $(INSTALLOPTS) newscores $(LIBDIR)/tools/newscores - $(INSTALLPROG) $(INSTALLOPTS) planets $(LIBDIR)/tools/planets - $(INSTALLPROG) $(INSTALLOPTS) players $(LIBDIR)/tools/players - $(INSTALLPROG) $(INSTALLOPTS) nuke $(LIBDIR)/tools/nuke - $(INSTALLPROG) $(INSTALLOPTS) scores $(LIBDIR)/tools/scores - $(INSTALLPROG) $(INSTALLOPTS) setgalaxy $(LIBDIR)/tools/setgalaxy - $(INSTALLPROG) $(INSTALLOPTS) showgalaxy $(LIBDIR)/tools/showgalaxy - $(INSTALLPROG) $(INSTALLOPTS) stat $(LIBDIR)/tools/stat - $(INSTALLPROG) $(INSTALLOPTS) trimscores $(LIBDIR)/tools/trimscores - $(INSTALLPROG) $(INSTALLOPTS) watchmes $(LIBDIR)/tools/watchmes - $(INSTALLPROG) $(INSTALLOPTS) xtkill $(LIBDIR)/tools/xtkill - $(INSTALLPROG) $(INSTALLOPTS) mergescores $(LIBDIR)/tools/mergescores - $(INSTALLPROG) $(INSTALLOPTS) keyman $(LIBDIR)/tools/keyman - $(INSTALLPROG) $(INSTALLOPTS) fun $(LIBDIR)/tools/fun - $(INSTALLPROG) $(INSTALLOPTS) sortdb $(LIBDIR)/tools/sortdb - $(INSTALLPROG) $(INSTALLOPTS) ntpasswd $(LIBDIR)/tools/ntpasswd - $(INSTALLPROG) $(INSTALLOPTS) ltd_dump $(LIBDIR)/tools/ltd_dump - $(INSTALLPROG) $(INSTALLOPTS) updated $(LIBDIR)/updated - $(INSTALLPROG) $(INSTALLOPTS) cambot $(LIBDIR)/cambot + $(INSTALLPROG) $(INSTALLOPTS) ${srcdir}/updatekeys $(DESTDIR)$(LIBDIR)/tools/updatekeys + $(INSTALLPROG) $(INSTALLOPTS) blotpassword $(DESTDIR)$(LIBDIR)/tools/blotpassword + $(INSTALLPROG) $(INSTALLOPTS) loadchecker $(DESTDIR)$(LIBDIR)/tools/loadchecker + $(INSTALLPROG) $(INSTALLOPTS) mess $(DESTDIR)$(LIBDIR)/tools/mess + $(INSTALLPROG) $(INSTALLOPTS) message $(DESTDIR)$(LIBDIR)/tools/message + $(INSTALLPROG) $(INSTALLOPTS) newscores $(DESTDIR)$(LIBDIR)/tools/newscores + $(INSTALLPROG) $(INSTALLOPTS) planets $(DESTDIR)$(LIBDIR)/tools/planets + $(INSTALLPROG) $(INSTALLOPTS) players $(DESTDIR)$(LIBDIR)/tools/players + $(INSTALLPROG) $(INSTALLOPTS) nuke $(DESTDIR)$(LIBDIR)/tools/nuke + $(INSTALLPROG) $(INSTALLOPTS) scores $(DESTDIR)$(LIBDIR)/tools/scores + $(INSTALLPROG) $(INSTALLOPTS) setgalaxy $(DESTDIR)$(LIBDIR)/tools/setgalaxy + $(INSTALLPROG) $(INSTALLOPTS) showgalaxy $(DESTDIR)$(LIBDIR)/tools/showgalaxy + $(INSTALLPROG) $(INSTALLOPTS) stat $(DESTDIR)$(LIBDIR)/tools/stat + $(INSTALLPROG) $(INSTALLOPTS) trimscores $(DESTDIR)$(LIBDIR)/tools/trimscores + $(INSTALLPROG) $(INSTALLOPTS) watchmes $(DESTDIR)$(LIBDIR)/tools/watchmes + $(INSTALLPROG) $(INSTALLOPTS) xtkill $(DESTDIR)$(LIBDIR)/tools/xtkill + $(INSTALLPROG) $(INSTALLOPTS) mergescores $(DESTDIR)$(LIBDIR)/tools/mergescores + $(INSTALLPROG) $(INSTALLOPTS) keyman $(DESTDIR)$(LIBDIR)/tools/keyman + $(INSTALLPROG) $(INSTALLOPTS) fun $(DESTDIR)$(LIBDIR)/tools/fun + $(INSTALLPROG) $(INSTALLOPTS) sortdb $(DESTDIR)$(LIBDIR)/tools/sortdb + $(INSTALLPROG) $(INSTALLOPTS) ntpasswd $(DESTDIR)$(LIBDIR)/tools/ntpasswd + $(INSTALLPROG) $(INSTALLOPTS) ltd_dump $(DESTDIR)$(LIBDIR)/tools/ltd_dump + $(INSTALLPROG) $(INSTALLOPTS) updated $(DESTDIR)$(LIBDIR)/updated + $(INSTALLPROG) $(INSTALLOPTS) cambot $(DESTDIR)$(LIBDIR)/cambot # cb_sock.o: packets.h ../ntserv/socket.c # $(CC) -o ./cb_sock.o -g $(CFLAGS) -DCAMBOT -c ../ntserv/socket.c @@ -179,14 +179,14 @@ chmod a+x trekon installtrekon: trekon - @if [ -f $(LIBDIR)/trekon ]; then touch $(LIBDIR)/trekon; \ - else cp trekon $(LIBDIR)/trekon; \ + @if [ -f $(DESTDIR)$(LIBDIR)/trekon ]; then touch $(DESTDIR)$(LIBDIR)/trekon; \ + else cp trekon $(DESTDIR)$(LIBDIR)/trekon; \ fi - @if [ -f $(LIBDIR)/trekon.bitmap ]; then touch $(LIBDIR)/trekon.bitmap; \ - else cp ${srcdir}/trekon.bitmap $(LIBDIR)/trekon.bitmap; \ + @if [ -f $(DESTDIR)$(LIBDIR)/trekon.bitmap ]; then touch $(DESTDIR)$(LIBDIR)/trekon.bitmap; \ + else cp ${srcdir}/trekon.bitmap $(DESTDIR)$(LIBDIR)/trekon.bitmap; \ fi - @if [ -f $(LIBDIR)/trekoff.bitmap ]; then touch $(LIBDIR)/trekoff.bitmap; \ - else cp ${srcdir}/trekoff.bitmap $(LIBDIR)/trekoff.bitmap; \ + @if [ -f $(DESTDIR)$(LIBDIR)/trekoff.bitmap ]; then touch $(DESTDIR)$(LIBDIR)/trekoff.bitmap; \ + else cp ${srcdir}/trekoff.bitmap $(DESTDIR)$(LIBDIR)/trekoff.bitmap; \ fi lint: $(SRCS) Index: Vanilla/tools/setgalaxy.c diff -u Vanilla/tools/setgalaxy.c:1.3 Vanilla/tools/setgalaxy.c:1.4 --- Vanilla/tools/setgalaxy.c:1.3 Tue May 1 21:00:20 2001 +++ Vanilla/tools/setgalaxy.c Sat Aug 23 01:14:20 2003 @@ -8,6 +8,7 @@ setgalaxy F top out all planets at START_ARMIES setgalaxy n <num>:<str> rename planet <num> to <str> setgalaxy C cool server idea from felix at coop.com 25 Mar 1994 + setgalaxy Z close up shop for maintenance */ #include <stdio.h> @@ -34,6 +35,7 @@ static void usage(void); static void CoolServerIdea(void); +static void CloseUpShop(void); static void doINLResources(void); static void doResources(void); @@ -76,6 +78,11 @@ exit(0); } + if (*argv[1] == 'Z') { + CloseUpShop(); + exit(0); + } + if (*argv[1] == 'l') { for (i = 0; i < MAXPLANETS; i++) { planets[i].pl_x = pdata[i].pl_x; @@ -286,5 +293,98 @@ { planets[i].pl_namelen = strlen(planets[i].pl_name); } +} + +static void CloseUp(int i) { + int m, dx, dy, t = 200; + dx = (planets[i].pl_x - 50000)/t; + dy = (planets[i].pl_y - 50000)/t; + for(m=0; m<t; m++) { + planets[i].pl_x -= dx; + planets[i].pl_y -= dy; + usleep(100000); + } + planets[i].pl_x = -10000; + planets[i].pl_y = -10000; + planets[i].pl_flags = 0; + planets[i].pl_owner = 0; + planets[i].pl_info = 0; + planets[i].pl_armies = 0; + strcpy ( planets[i].pl_name, "" ); + planets[i].pl_namelen = strlen(planets[i].pl_name); + +} + +static void CloseUpShop2(void) +{ + int x, y; + + for (y=0; y<5; y++) { + for (x=0; x<4; x++) { + CloseUp(front_planets[x][y]); + } + sleep(2); + } + for (y=0; y<4; y++) { + for (x=0; x<4; x++) { + CloseUp(core_planets[x][y]); + } + sleep(2); + } + CloseUp(0); + CloseUp(10); + CloseUp(20); + CloseUp(30); +} + +static void CloseUpShop() { + int i, m, dx[MAXPLANETS], dy[MAXPLANETS], t = 600; + + for(i=0; i<MAXPLANETS; i++) { + dx[i] = (planets[i].pl_x - 50000)/t; + dy[i] = (planets[i].pl_y - 50000)/t; + } + + for(m=0; m<t; m++) { + for(i=0; i<MAXPLANETS; i++) { + planets[i].pl_x -= dx[i]; + planets[i].pl_y -= dy[i]; + } + if (m == (t-100)) { + for(i=0; i<MAXPLANETS; i++) { + planets[i].pl_flags = 0; + planets[i].pl_owner = 0; + planets[i].pl_info = ALLTEAM; + planets[i].pl_armies = 0; + strcpy ( planets[i].pl_name, " " ); + planets[i].pl_namelen = strlen(planets[i].pl_name); + } + } + usleep(200000); + } + + for(i=0; i<MAXPLANETS; i++) { + planets[i].pl_x = -20000; + planets[i].pl_y = -20000; + } + + sleep(2); + + for(i=0; i<MAXPLAYER; i++) { + players[i].p_team = 0; + players[i].p_hostile = ALLTEAM; + players[i].p_swar = ALLTEAM; + players[i].p_war = ALLTEAM; + sprintf(players[i].p_mapchars, "%c%c", + teamlet[players[i].p_team], shipnos[i]); + sprintf(players[i].p_longname, "%s (%s)", + players[i].p_name, players[i].p_mapchars); + } + + /* don't let them come back? */ + planets[0].pl_couptime = 999999; + planets[10].pl_couptime = 999999; + planets[20].pl_couptime = 999999; + planets[30].pl_couptime = 999999; } _______________________________________________ vanilla-devel mailing list vanilla-devel at us.netrek.org https://mailman.real-time.com/mailman/listinfo/vanilla-devel