From: bharat@shadow.Eng.Sun.COM (Bharat Mediratta)
Newsgroups: rec.games.netrek
Subject: XSG and bronco.final
Date: 23 Aug 92 21:03:53 GMT
Reply-To: bharat@shadow.Eng.Sun.COM
Organization: Sun Microsystems
NNTP-Posting-Host: shadow


Hello all,

	I recently downloaded bronco.final and set up the server.  I found that
XSG 1.21 didn't work with this release because Terence added a new structure to the
player (?) struct.  Apparently, he added 32 bytes to keep track of the full
hostname of the client, which xsg couldn't handle.  Included are the diffs to
make it work.


---
    /\        Bharat Mediratta
   \\ \       Graphics Continuation Group
  \ \\ /      
 / \/ / /     
/ /   \//\    SUN Microsystems, Inc.	
\//\   / /    Mailstop: MTV18-218
 / / /\ /     2550 Garcia Avenue, Building 18
  / \\ \      Mountain View, CA 94043
   \ \\       Phone:  (415)336-4347, FAX:(415)336-5471
    \/        Email:  bharat.mediratta@eng.sun.com


-- CUT HERE --
*** ../xsg.orig/Makefile	Fri May 15 13:09:57 1992
--- Makefile	Sun Aug 23 16:37:52 1992
***************
*** 5,18 ****
  #
  # If you are running on a BSD system, use the following defines:
  #
! #SYSTYPE = -DBSD
! #LIBS = -lm 
  
  #
  # If you are running on a System V system (heaven help you), use the following:
  #
! SYSTYPE = -DSYSV
! LIBS = -lm -lsocket -lbsd
  
  #
  # If you have support for AT&T starships:
--- 5,18 ----
  #
  # If you are running on a BSD system, use the following defines:
  #
! SYSTYPE = -DBSD
! LIBS = -lm 
  
  #
  # If you are running on a System V system (heaven help you), use the following:
  #
! #SYSTYPE = -DSYSV
! #LIBS = -lm -lsocket -lbsd
  
  #
  # If you have support for AT&T starships:
***************
*** 22,38 ****
  #
  # If you have support for Galaxy class starships:
  #
! GALAXY = -DHAS_GALAXY
  
  #
  # If you have scanning beams as weapon #3 (others are plasmas & tractors):
  #
! SCANNER = -DHAS_SCANNER
  
  #
  # If you have the independent (Iggy) bitmaps:
  #
! IGGYBITS = -DHAS_IGGYBITS
  
  
  OBJS =	main.o \
--- 22,38 ----
  #
  # If you have support for Galaxy class starships:
  #
! #GALAXY = -DHAS_GALAXY
  
  #
  # If you have scanning beams as weapon #3 (others are plasmas & tractors):
  #
! #SCANNER = -DHAS_SCANNER
  
  #
  # If you have the independent (Iggy) bitmaps:
  #
! #IGGYBITS = -DHAS_IGGYBITS
  
  
  OBJS =	main.o \
***************
*** 87,97 ****
  	    data.h \
  	    oldbitmaps.h
  
! X11LIB = -lX11
  X11OBJS = x11window.o
  
  #CFLAGS = -g $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS)
! CFLAGS = -O -s $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS)
  
  xsg:	$(OBJS) $(X11OBJS)
  	cc -o xsg $(CFLAGS) $(OBJS) $(X11OBJS) $(X11LIB) $(LIBS)
--- 87,103 ----
  	    data.h \
  	    oldbitmaps.h
  
! # Change this to find X11/*.h
! X11INCLUDE_PATH = /usr/dist/sun4/openwin,v3.0/include
! 
! # Change this to find X11 libs
! X11LIB_PATH = /usr/dist/sun4/openwin,3.0/lib
! 
! X11LIB = -L$(X11LIB_PATH) -lX11
  X11OBJS = x11window.o
  
  #CFLAGS = -g $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS)
! CFLAGS = -O -s $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS) -DFULL_HOSTNAMES -I$(X11INCLUDE_PATH)
  
  xsg:	$(OBJS) $(X11OBJS)
  	cc -o xsg $(CFLAGS) $(OBJS) $(X11OBJS) $(X11LIB) $(LIBS)
*** ../xsg.orig/struct.h	Mon Jan  6 17:24:48 1992
--- struct.h	Sun Aug 23 16:30:17 1992
***************
*** 52,57 ****
--- 52,59 ----
  #define PFDOCKOK	0x1000000	/* docking permission */
  #define PFSEEN		0x2000000	/* seen by enemy on galactic map? */
  
+ 
+ 
  #define KQUIT		0x01		/* Player quit */
  #define KTORP		0x02		/* killed by torp */
  #define KPHASER		0x03		/* killed by phaser */
***************
*** 67,74 ****
--- 69,82 ----
  
  struct team {
      int s_turns;	/* turns till another starbase is legal */
+     int s_surrender;        /* minutes until this team surrenders */
+     int s_plcount;      /* how many planets this team owns */
  };
  
+ #define SURRSTART 1
+ #define SURREND 4
+ #define SURRLENGTH 45
+ 
  #define SCOUT 0
  #define DESTROYER 1
  #define CRUISER 2
***************
*** 154,159 ****
--- 162,170 ----
  #define ST_SHOWLOCAL    16      /* two bits for these two */
  #define ST_SHOWGLOBAL   64
  
+ #define ST_INITIAL ST_MAPMODE+ST_NAMEMODE+ST_SHOWSHIELDS+ \
+                    ST_KEEPPEACE+ST_SHOWLOCAL*2+ST_SHOWGLOBAL*2;
+ 
  struct player {
      int p_no;
      int p_updates;		/* Number of updates ship has survived */
***************
*** 205,210 ****
--- 216,224 ----
  				   else p_port[0] = port # docked to on host.   */
      short p_tractor;		/* What player is in tractor lock */
      int p_pos;			/* My position in the player file */
+ #ifdef FULL_HOSTNAMES
+     char p_full_hostname[32];   /* full hostname 4/13/92 TC */
+ #endif
  };
  
  struct statentry {
***************
*** 307,312 ****
--- 321,342 ----
  #define MTEAM  0x04
  #define MALL   0x08
  #define MGOD   0x10		/* ATM */
+ 
+ #define MGENO  0x100        /* order these by importance (0x100 - 0x400) */
+ #define MCONQ  0x110
+ #define MTAKE  0x120
+ #define MDEST  0x130
+ #define MKILLA 0x200
+ #define MBOMB  0x210
+ #define MKILLP 0x220
+ #define MKILL  0x230
+ #define MLEAVE 0x300
+ #define MJOIN  0x310
+ #define MGHOST 0x320
+ #define MCOUP1 0x330
+ #define MCOUP2 0x340
+ 
+ #define MMASK  0x3F0
  
  struct message {
      int m_no;