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

Modified Files:
	data.h defs.h 
Log Message:
This patch changes the number of planets from a static to dynamic define.  Paradise servers can have more than 40 planets, so we first redefine the maximum # of planets that we will ever receive, which is MAXPLANETS = 60.  This is a change from the previous value of MAXPLANETS = 40.  We then use a 2nd variable, nplanets, to keep track of how many planets the server actually has.  The default value of nplanets is 40, which is what is used for bronco.  Most places in the code dealing with loop checks have been changed from MAXPLANETS to nplanets.  In a few cases where arrays are defined, the MAXPLANETS value is still used.  The planet window is initially created at bronco size, but as more planets are received via handlePlanet2, the window is recreated to fit the added planets.
Added another possible bug to the paradise todo list.
Fixed bug where print_packets was erroneously changing the value of nplanets.

Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- defs.h	7 Jun 2007 04:43:36 -0000	1.28
+++ defs.h	13 Apr 2008 02:25:50 -0000	1.29
@@ -45,11 +45,9 @@
 
 #define TESTERS 4               /* Priveledged slots for
                                  * robots and game 'testers' */
-#ifdef PARADISE
-#define MAXPLANETS 60
-#else
-#define MAXPLANETS 40
-#endif
+
+#define MAXPLANETS 60           /* Maximum planets any server will send us.
+                                   Bronco has 40, paradise can go up to 60 */
 #define MAXTORP 8
 #define MAXPLASMA 1
 #define PKEY 128

Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- data.h	12 Apr 2008 23:28:29 -0000	1.94
+++ data.h	13 Apr 2008 02:25:50 -0000	1.95
@@ -57,6 +57,7 @@
 extern int TWINSIDE;
 extern int GWINSIDE;
 
+extern int nplanets;
 extern unsigned int oldalert;
 extern unsigned char oldtourn;
 extern unsigned int oldengflag;
@@ -296,7 +297,6 @@
 extern int ngthingies;
 extern int nplasmas;
 extern int nphasers;
-extern int nplanets;
 extern struct teaminfo_s *teaminfo;
 extern int number_of_teams;
 /* MOTD data */