Update of /cvsroot/netrek/client/netrekxp/include
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29214/include

Modified Files:
	data.h defs.h packets.h proto.h 
Log Message:
Support for server feature packet SP_RANKS.
NUMRANKS removed, replaced with dynamic variable
nranks.
Nranks treated like nranks2 (paradise), rank table is
loaded upon client initialization, table can be resized
if server sends additional ranks.
Ranklist window will always resize to proper size
based on number of ranks.

Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- defs.h	23 May 2009 15:21:19 -0000	1.36
+++ defs.h	25 May 2009 14:43:53 -0000	1.37
@@ -61,7 +61,6 @@
 #define CLOAK_PHASES 12         /* number of drawing phases
                                  * in a cloak
                                  * engage/disengage */
-#define NUMRANKS 9
 #define PUCKARROW_LEN 6
 #define TIC_DIST 5000           /* distance from ship to draw
                                  * heading tic mark */

Index: data.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- data.h	23 May 2009 13:23:39 -0000	1.109
+++ data.h	25 May 2009 14:43:52 -0000	1.110
@@ -440,9 +440,10 @@
 extern char defpasswd[PSEUDOSIZE];
 extern char login[PSEUDOSIZE];
 
-extern struct rank ranks[NUMRANKS];
+extern struct rank *ranks;
 extern struct rank2 *ranks2;
 extern struct royalty *royal;
+extern int nranks;
 extern int nranks2;
 extern int nroyals;
 
@@ -660,6 +661,7 @@
 extern int F_sp_flags_all;
 extern int F_why_dead_2;
 extern int F_auto_weapons;
+extern int F_sp_ranks;
 extern int F_terrain;		/* paradise */
 extern int F_armies_shipcap;	/* paradise */
 

Index: packets.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/packets.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- packets.h	9 May 2009 21:21:43 -0000	1.20
+++ packets.h	25 May 2009 14:43:53 -0000	1.21
@@ -131,6 +131,7 @@
 #define SP_S_PHASER     57      /* see struct */
 #define SP_S_KILLS      58      /* # of kills player have */
 #define SP_S_STATS      59      /* see SP_STATS */
+#define SP_RANKS        61      /* rank data */
 
 /* variable length packets */
 #define VPLAYER_SIZE    4
@@ -852,6 +853,19 @@
 
 #endif
 
+struct ranks_spacket
+{
+    char        type;           /* SP_RANKS */
+    int         rankn;          /* rank number */
+    char        name[11];       /* rank name */
+    char        cname[5];       /* short name */
+    unsigned    hours;          /* where 1234=12.34 hours
+                                 * and 0=0.00 hours */
+    unsigned    ratings;        /* as per hours */
+    unsigned    offense;        /* as per hours */
+
+};
+
 struct ship_cap_spacket
 {                               /* Server configuration of
                                  * client */

Index: proto.h
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- proto.h	9 May 2009 21:21:43 -0000	1.65
+++ proto.h	25 May 2009 14:43:53 -0000	1.66
@@ -1133,6 +1133,7 @@
 void handleGeneric32 (struct generic_32_spacket *packet);
 struct flags_all_spacket;
 void handleFlagsAll (struct flags_all_spacket *packet);
+void handleRanks (struct ranks_spacket *packet);
 void initialize_players (void);
 void initialize_plasmas (void);
 void initialize_torps (void);