Update of /cvsroot/netrek/client/netrekxp/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25229/include

Modified Files:
	data.h defs.h packets.h struct.h 
Log Message:
Main change:
1) The way memory was set up for all the weapons/planets/player structs
was changed.  Instead of a static struct memory universe, it was changed
to malloc calls during entry.  A bunch of new functions (for paradise) were
called to dealloc this memory and realloc if it a game parameter packet
was received which indicated new array sizes.  Currently there is only
partial support for increasing torp/plasma array sizes, and no support for
increasing number of phasers per ship.  Maxplayer, while dynamic in
paradise client, was too much a PITA to realloc on the fly without changing
all the MAXPLAYER checks, so I'm keeping it constant at 257 for paradise,
rather than trying to save some memory by downsizing it if the actual number
of players is less.  Paradise does something weird in that it has a max player
value for what the server says, and a second max player value for what
the client can actually handle.  I'm not going to go that route, just keeping
1 maxplayer value thank you very much.
Paradise only changes:
1) Add support for adjustable gwidth, it starts at 100000, but if a planet loc
packet is sent beyond this range, it increases to 200000.  Very stupid, but
that's how paradise does it.  Wouldn't seem to support galaxies with sizes
other than these 2 values.
2) Increased paradise planet window size so it wasn't getting cut off.
Bronco changes:
1) Support new server change from rank defense to rank offense.
2) Renamed view to viewboxview for drawing viewbox.
3) Removed unnecessary bounds check on drawing lockline.

Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- defs.h	18 May 2007 19:54:36 -0000	1.27
+++ defs.h	7 Jun 2007 04:43:36 -0000	1.28
@@ -70,7 +70,8 @@
 
 /* These are configuration definitions */
 #ifdef PARADISE
-#define GWIDTH 200000
+#define GWIDTH gwidth           /* Paradise has variable galaxy
+                                   width, up to 200000 */
 #else
 #define GWIDTH 100000           /* galaxy is 100000 spaces
                                  * on a side */

Index: packets.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- packets.h	25 May 2007 03:36:44 -0000	1.10
+++ packets.h	7 Jun 2007 04:43:37 -0000	1.11
@@ -1084,7 +1084,8 @@
     char pnum;                  /* How many kills in packet */
     unsigned short kills;       /* 6 bit player numer   */
     /* 10 bit kills*100     */
-    unsigned short mkills[MAXPLAYER];
+    unsigned short mkills[32];
+    /* NOTE: this must be identical to MAXPLAYER in Vanilla server */
 };
 
 struct phaser_s_spacket

Index: struct.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- struct.h	25 May 2007 03:36:44 -0000	1.22
+++ struct.h	7 Jun 2007 04:43:37 -0000	1.23
@@ -756,7 +756,7 @@
 
 struct rank
 {
-    float hours, ratings, defense;
+    float hours, ratings, offense;
     char *name, *cname;
 };
 
@@ -776,26 +776,6 @@
 };
 #endif
 
-struct memory
-{
-    struct player players[MAXPLAYER];
-    struct torp torps[MAXPLAYER * MAXTORP];
-    struct plasmatorp plasmatorps[MAXPLAYER * MAXPLASMA];
-#ifdef PARADISE
-    struct thingy thingies[MAXPLAYER * 20]; // Arbitrary
-    struct rank2 ranks2[30]; // Arbitrary
-    struct teaminfo_s teaminfo[6]; // Arbitrary
-    struct royalty royal[5]; // Arbitrary
-    struct status2 status2[1]; // Arbitrary
-#endif
-    struct status status[1];
-    struct planet planets[MAXPLANETS];
-    struct phaser phasers[MAXPLAYER];
-    struct mctl mctl[1];
-    struct message messages[MAXMESSAGE];
-    struct ship shipvals[NUM_TYPES];
-};
-
 struct plupdate
 {
     int plu_update;

Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- data.h	25 May 2007 03:36:44 -0000	1.88
+++ data.h	7 Jun 2007 04:43:36 -0000	1.89
@@ -50,7 +50,6 @@
 extern struct mctl *mctl;
 extern struct team *teams;
 extern struct ship shipvals[];
-extern struct memory universe;
 extern struct planet pdata[];
 extern struct _star stars[MAXSECTORS][MAXSECTORS][MAXSTARS];
 
@@ -283,7 +282,8 @@
 extern int received_terrain_info;
 extern int terrain_x;
 extern int terrain_y;
-extern int gwidth;		/* galaxy width, adjusted for zoom [BDyess] */
+extern int gwidth;		/* Paradise version of GWIDTH */
+extern int gwidth_zoom; 	/* galaxy width, adjusted for zoom, unused */
 extern int offsetx;
 extern int offsety;		/* offsets when zooming [BDyess] */
 extern int nplayers;
@@ -810,6 +810,7 @@
 extern int sortPlanets; 	/* sort planet list by team and army count */
 extern int packetLights;        /* show packet send/receive via dashboard */
 extern int infoRange;           /* show limit on info with large tactical windows */
-extern int scaleFactor;         /* allows for scaling of graphics */
+extern int scaleFactor;         /* allows for scaling of tactical window */
+extern int mapscaleFactor;      /* allows for scaling of galactic window, unused */
 extern int fullBitmapRotation;  /* draw old bitmap sets to all angles */
 #endif /* _h_data */