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

Modified Files:
	data.c defaults.c inform.c mswindow.c newwin.c playerlist.c 
	short.c 
Log Message:
First part of work at redoing ship types.
Use s_desig[] instead of static shiptype arrays for a few cases to get ship type letters.
Define # of typical ships for bronco vs paradise.

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- mswindow.c	16 Apr 2008 00:08:17 -0000	1.89
+++ mswindow.c	16 Apr 2008 02:57:09 -0000	1.90
@@ -421,7 +421,7 @@
         DeleteObject (NetrekPalette);
 
     // Remove the ship bitmap structures we've created
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- newwin.c	16 Apr 2008 00:08:18 -0000	1.72
+++ newwin.c	16 Apr 2008 02:57:09 -0000	1.73
@@ -141,7 +141,7 @@
 	                        LR_MONOCHROME);
     }
     
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {
@@ -218,7 +218,7 @@
 	                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
 	                        LR_MONOCHROME);
     }
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {
@@ -295,7 +295,7 @@
 	                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
 	                        LR_MONOCHROME);
     }
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {
@@ -372,7 +372,7 @@
 	                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
 	                        LR_MONOCHROME);
     }
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {
@@ -420,7 +420,7 @@
                         BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
                         LR_MONOCHROME);
                         
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         for (k = 0; k < SHIP_VIEWS; k++)
         {
@@ -604,7 +604,7 @@
         return;
     }
     
-    for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES_BRONCO; j++)
     {
         fed_bitmapsHR[j] =
             W_PointBitmap2 (ship_bitmapsHR[0], j, 0, BMP_SHIP_WIDTH_HR,

Index: inform.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/inform.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- inform.c	16 Apr 2008 00:08:16 -0000	1.8
+++ inform.c	16 Apr 2008 02:57:09 -0000	1.9
@@ -32,16 +32,6 @@
  * There is a different sized window for each type player/planet * and we take
  * care to keep it from extending beyond the main * window boundaries. */
 
-#ifdef PARADISE
-static char *my_classes[NUM_TYPES] = {
-    "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU",
-};
-#else
-static char *my_classes[NUM_TYPES] = {
-    "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT"
-};
-#endif
-
 static void Info_list_paradise (struct player * j);
 
 /******************************************************************************/
@@ -124,8 +114,8 @@
             (void) sprintf(buf, "dist:    %-1.2f sectors", dist);
              W_WriteText (infow, W_Textwidth, W_Textheight * line++,
                          playerColor (j), buf, strlen (buf), W_RegularFont);
-            (void) sprintf (buf, "Ship Type: %-s",
-                            my_classes[j->p_ship.s_type]);
+            (void) sprintf (buf, "Ship Type: %c%c",j->p_ship.s_desig[0],
+                         j->p_ship.s_desig[1]);
             W_WriteText (infow, W_Textwidth, W_Textheight * line++,
                          playerColor (j), buf, strlen (buf), W_RegularFont);
 
@@ -166,8 +156,8 @@
             (void) sprintf (buf, "kills:   %-4.2f", j->p_kills);
             W_WriteText (infow, W_Textwidth, W_Textheight * line++,
                          playerColor (j), buf, strlen (buf), W_RegularFont);
-            (void) sprintf (buf, "Ship Type: %-s",
-                            my_classes[j->p_ship.s_type]);
+            (void) sprintf (buf, "Ship Type: %c%c", j->p_ship.s_desig[0],
+                            j->p_ship.s_desig[1]);
             W_WriteText (infow, W_Textwidth, W_Textheight * line++,
                          playerColor (j), buf, strlen (buf), W_RegularFont);
 

Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- short.c	16 Apr 2008 00:08:21 -0000	1.27
+++ short.c	16 Apr 2008 02:57:09 -0000	1.28
@@ -221,7 +221,7 @@
 char no_memory[] = { "Not enough memory for warning string!" };
 
 /* For INL Server */
-char *shiptype[NUM_TYPES] = { "SC", "DD", "CA", "BB", "AS", "SB", "AT" };
+char *shiptype[NUM_TYPES_BRONCO] = { "SC", "DD", "CA", "BB", "AS", "SB", "AT" };
 int spwinside = 500;            /* WINSIDE from Server */
 
 #define SPWINSIDE 500           /* To make it safe */

Index: playerlist.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/playerlist.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- playerlist.c	16 Apr 2008 00:08:20 -0000	1.16
+++ playerlist.c	16 Apr 2008 02:57:09 -0000	1.17
@@ -98,7 +98,6 @@
    plistLayout       : The fields in the current playerlist.
    plistPos[plr]     : The player list row assigned to each player.
    plistWidth        : The width of the playerlist.
-   my_classes        : The letters to go with each ship type.
 */
 
 char *plistLayout = "";
@@ -106,13 +105,6 @@
 static int plistPos[MAXPLAYER];
 static int plistWidth = 0;
 static int plist2Width = 0;
-#ifdef PARADISE
-static char *my_classes[NUM_TYPES] = {
-    "SC", "DD", "CA", "BB", "AS", "SB", "AT", "JS", "FL", "WB", "CL", "CV", "UT", "PT", "PU" };
-#else
-static char *my_classes[NUM_TYPES] =
-    { "SC", "DD", "CA", "BB", "AS", "SB", "GA", "AT" };
-#endif
 
 /* Local Functions */
 
@@ -1126,8 +1118,8 @@
             }
             else
             {
-                *(buffPoint++) = my_classes[j->p_ship.s_type][0];
-                *(buffPoint++) = my_classes[j->p_ship.s_type][1];
+                *(buffPoint++) = j->p_ship.s_desig[0];
+                *(buffPoint++) = j->p_ship.s_desig[1];
             }
 
             break;

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- defaults.c	6 Apr 2008 23:29:56 -0000	1.89
+++ defaults.c	16 Apr 2008 02:57:08 -0000	1.90
@@ -21,10 +21,9 @@
 #include "proto.h"
 #include "version.h"
 
-#define DEFAULTSHIP NUM_TYPES
-
 #ifdef PARADISE
-struct shipdef shipdefaults[NUM_TYPES + 1] = {
+#define DEFAULTSHIP NUM_TYPES_PARADISE
+struct shipdef shipdefaults[NUM_TYPES_PARADISE + 1] = {
     {"sc", NULL, NULL, NULL, NULL},
     {"dd", NULL, NULL, NULL, NULL},
     {"ca", NULL, NULL, NULL, NULL},
@@ -43,7 +42,8 @@
     {"default", NULL, NULL, NULL, NULL}
 };
 #else
-struct shipdef shipdefaults[NUM_TYPES + 1] = {
+#define DEFAULTSHIP NUM_TYPES_BRONCO
+struct shipdef shipdefaults[NUM_TYPES_BRONCO + 1] = {
     {"sc", NULL, NULL, NULL, NULL},
     {"dd", NULL, NULL, NULL, NULL},
     {"ca", NULL, NULL, NULL, NULL},
@@ -3435,7 +3435,7 @@
         fputs ("# button keymaps (b1keymap through b5keymap)\n", fp);
     }
     // Individual ship type settings
-    for (j = NUM_TYPES; j >= 0; j--)
+    for (j = (paradise ? NUM_TYPES_PARADISE : NUM_TYPES_BRONCO); j >= 0; j--)
     {
         STRNCPY (str1, "rcfile-", 8);
         strcat (str1, shipdefaults[j].name);

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- data.c	16 Apr 2008 00:08:08 -0000	1.106
+++ data.c	16 Apr 2008 02:57:08 -0000	1.107
@@ -377,34 +377,34 @@
 
 // Ships
 W_Icon ship_bitmaps[5];
-W_Icon fed_bitmaps[NUM_TYPES][SHIP_VIEWS], kli_bitmaps[NUM_TYPES][SHIP_VIEWS],
-    rom_bitmaps[NUM_TYPES][SHIP_VIEWS], ori_bitmaps[NUM_TYPES][SHIP_VIEWS],
-    ind_bitmaps[NUM_TYPES][SHIP_VIEWS];
+W_Icon fed_bitmaps[NUM_TYPES_BRONCO][SHIP_VIEWS], kli_bitmaps[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    rom_bitmaps[NUM_TYPES_BRONCO][SHIP_VIEWS], ori_bitmaps[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    ind_bitmaps[NUM_TYPES_BRONCO][SHIP_VIEWS];
 
 W_Icon ship_bitmaps1[5];
-W_Icon fed_bitmaps1[NUM_TYPES][SHIP_VIEWS], kli_bitmaps1[NUM_TYPES][SHIP_VIEWS],
-    rom_bitmaps1[NUM_TYPES][SHIP_VIEWS], ori_bitmaps1[NUM_TYPES][SHIP_VIEWS],
-    ind_bitmaps1[NUM_TYPES][SHIP_VIEWS];
+W_Icon fed_bitmaps1[NUM_TYPES_BRONCO][SHIP_VIEWS], kli_bitmaps1[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    rom_bitmaps1[NUM_TYPES_BRONCO][SHIP_VIEWS], ori_bitmaps1[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    ind_bitmaps1[NUM_TYPES_BRONCO][SHIP_VIEWS];
 
 W_Icon ship_bitmapsG[5];
-W_Icon fed_bitmapsG[NUM_TYPES][SHIP_VIEWS],
-    kli_bitmapsG[NUM_TYPES][SHIP_VIEWS], rom_bitmapsG[NUM_TYPES][SHIP_VIEWS],
-    ori_bitmapsG[NUM_TYPES][SHIP_VIEWS], ind_bitmapsG[NUM_TYPES][SHIP_VIEWS];
+W_Icon fed_bitmapsG[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    kli_bitmapsG[NUM_TYPES_BRONCO][SHIP_VIEWS], rom_bitmapsG[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    ori_bitmapsG[NUM_TYPES_BRONCO][SHIP_VIEWS], ind_bitmapsG[NUM_TYPES_BRONCO][SHIP_VIEWS];
 
 W_Icon ship_bitmapsM[5];
-W_Icon fed_bitmapsM[NUM_TYPES][SHIP_VIEWS],
-    kli_bitmapsM[NUM_TYPES][SHIP_VIEWS], rom_bitmapsM[NUM_TYPES][SHIP_VIEWS],
-    ori_bitmapsM[NUM_TYPES][SHIP_VIEWS], ind_bitmapsM[NUM_TYPES][SHIP_VIEWS];
+W_Icon fed_bitmapsM[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    kli_bitmapsM[NUM_TYPES_BRONCO][SHIP_VIEWS], rom_bitmapsM[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    ori_bitmapsM[NUM_TYPES_BRONCO][SHIP_VIEWS], ind_bitmapsM[NUM_TYPES_BRONCO][SHIP_VIEWS];
     
 W_Icon ship_bitmapsT[5];
-W_Icon fed_bitmapsT[NUM_TYPES][SHIP_VIEWS],
-    kli_bitmapsT[NUM_TYPES][SHIP_VIEWS], rom_bitmapsT[NUM_TYPES][SHIP_VIEWS],
-    ori_bitmapsT[NUM_TYPES][SHIP_VIEWS], ind_bitmapsT[NUM_TYPES][SHIP_VIEWS];
+W_Icon fed_bitmapsT[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    kli_bitmapsT[NUM_TYPES_BRONCO][SHIP_VIEWS], rom_bitmapsT[NUM_TYPES_BRONCO][SHIP_VIEWS],
+    ori_bitmapsT[NUM_TYPES_BRONCO][SHIP_VIEWS], ind_bitmapsT[NUM_TYPES_BRONCO][SHIP_VIEWS];
 
 W_Icon ship_bitmapsHR[5];
-W_Icon fed_bitmapsHR[NUM_TYPES],
-    kli_bitmapsHR[NUM_TYPES], rom_bitmapsHR[NUM_TYPES],
-    ori_bitmapsHR[NUM_TYPES], ind_bitmapsHR[NUM_TYPES];
+W_Icon fed_bitmapsHR[NUM_TYPES_BRONCO],
+    kli_bitmapsHR[NUM_TYPES_BRONCO], rom_bitmapsHR[NUM_TYPES_BRONCO],
+    ori_bitmapsHR[NUM_TYPES_BRONCO], ind_bitmapsHR[NUM_TYPES_BRONCO];
 
 // Planets
 W_Icon planet_unknown_bitmap;
@@ -448,7 +448,7 @@
 char defpasswd[PSEUDOSIZE];
 char login[PSEUDOSIZE];
 
-struct ship shipvals[NUM_TYPES];
+struct ship shipvals[NUM_TYPES_BRONCO];
 
 /* 10 Aug 96 - Added curt (short) names -SAC */
 struct rank ranks[NUMRANKS] = {