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

Modified Files:
	cowmain.c data.c defaults.c local.c mswindow.c newwin.c 
	option.c playback.c 
Log Message:
- all ship bitmap libraries now load into memory.  Can be modified at a later date
  if this proves to be a bad idea.
- added "dynamicBitmap: (on)/off".  Enables dynamic bitmap switching from the options menu
- renumbered the ship bitmap sets for the colorClient option.  Choices are 0=mono,
  1=new color graphics, 2=single color graphics, and 3=shaded single color graphics.
  Default setting is still 1.  Settings 2 and 3 have the bonus effect of turning your
  ship color to white (similar to COW) due to there being a greyscale bitmap library
  with matching ship designs.
- updated NetrekXP manual (in docs folder)

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mswindow.c	12 Apr 2006 12:36:58 -0000	1.3
+++ mswindow.c	15 Apr 2006 01:04:34 -0000	1.4
@@ -407,15 +407,30 @@
     for (j = 0; j < NUM_TYPES; j++)
         for (k = 0; k < SHIP_VIEWS; k++)
         {
+            free (fed_bitmapsT[j][k]);
+            free (fed_bitmapsM[j][k]);
             free (fed_bitmapsG[j][k]);
+            free (fed_bitmaps1[j][k]);
             free (fed_bitmaps[j][k]);
+            free (ind_bitmapsT[j][k]);
+            free (ind_bitmapsM[j][k]);
             free (ind_bitmapsG[j][k]);
+            free (ind_bitmaps1[j][k]);
             free (ind_bitmaps[j][k]);
+            free (kli_bitmapsT[j][k]);
+            free (kli_bitmapsM[j][k]);
             free (kli_bitmapsG[j][k]);
+            free (kli_bitmaps1[j][k]);
             free (kli_bitmaps[j][k]);
+            free (ori_bitmapsT[j][k]);
+            free (ori_bitmapsM[j][k]);
             free (ori_bitmapsG[j][k]);
+            free (ori_bitmaps1[j][k]);
             free (ori_bitmaps[j][k]);
+            free (rom_bitmapsT[j][k]);
+            free (rom_bitmapsM[j][k]);
             free (rom_bitmapsG[j][k]);
+            free (rom_bitmaps1[j][k]);
             free (rom_bitmaps[j][k]);
         }
 

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- newwin.c	12 Apr 2006 04:20:04 -0000	1.2
+++ newwin.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -349,160 +349,199 @@
         break;
     }
 
-    if (colorClient > 0)
-    {
-        ship_bitmaps[0] =
-            W_StoreBitmap3 (fed_ship_bmp, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
-                            LR_DEFAULTCOLOR);
-        ship_bitmaps[1] =
-            W_StoreBitmap3 (ind_ship_bmp, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
-                            LR_DEFAULTCOLOR);
-        ship_bitmaps[2] =
-            W_StoreBitmap3 (kli_ship_bmp, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
-                            LR_DEFAULTCOLOR);
-        ship_bitmaps[3] =
-            W_StoreBitmap3 (ori_ship_bmp, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
-                            LR_DEFAULTCOLOR);
-        ship_bitmaps[4] =
-            W_StoreBitmap3 (rom_ship_bmp, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
-                            LR_DEFAULTCOLOR);
+/*  Load all the bitmaps in.  Let the user be able to toggle between
+    any type if dynamicBitmaps is set. */
+   
+    ship_bitmaps[0] =
+        W_StoreBitmap3 (fed_ship_bmp, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps[1] =
+        W_StoreBitmap3 (ind_ship_bmp, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps[2] =
+        W_StoreBitmap3 (kli_ship_bmp, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps[3] =
+        W_StoreBitmap3 (ori_ship_bmp, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps[4] =
+        W_StoreBitmap3 (rom_ship_bmp, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
+                        LR_DEFAULTCOLOR);
 
-        if (colorClient == 1)
-        {
-            ship_bitmapsG[0] =
-                W_StoreBitmap3 (fed_ship_bmp_T, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[1] =
-                W_StoreBitmap3 (ind_ship_bmp_T, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[2] =
-                W_StoreBitmap3 (kli_ship_bmp_T, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[3] =
-                W_StoreBitmap3 (ori_ship_bmp_T, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[4] =
-                W_StoreBitmap3 (rom_ship_bmp_T, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
-                                LR_DEFAULTCOLOR);
-        }
-        else
-        {
-            ship_bitmapsG[0] =
-                W_StoreBitmap3 (fed_ship_bmp_G, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[1] =
-                W_StoreBitmap3 (ind_ship_bmp_G, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[2] =
-                W_StoreBitmap3 (kli_ship_bmp_G, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[3] =
-                W_StoreBitmap3 (ori_ship_bmp_G, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
-                                LR_DEFAULTCOLOR);
-            ship_bitmapsG[4] =
-                W_StoreBitmap3 (rom_ship_bmp_G, BMP_SHIP_WIDTH * 8,
-                                BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
-                                LR_DEFAULTCOLOR);
-        }
+    ship_bitmaps1[0] =
+        W_StoreBitmap3 (fed_ship_bmp_1, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps1[1] =
+        W_StoreBitmap3 (ind_ship_bmp_1, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps1[2] =
+        W_StoreBitmap3 (kli_ship_bmp_1, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps1[3] =
+        W_StoreBitmap3 (ori_ship_bmp_1, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmaps1[4] =
+        W_StoreBitmap3 (rom_ship_bmp_1, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
+                        LR_DEFAULTCOLOR);
+                            
+    ship_bitmapsT[0] =
+        W_StoreBitmap3 (fed_ship_bmp_T, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsT[1] =
+        W_StoreBitmap3 (ind_ship_bmp_T, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsT[2] =
+        W_StoreBitmap3 (kli_ship_bmp_T, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsT[3] =
+        W_StoreBitmap3 (ori_ship_bmp_T, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsT[4] =
+        W_StoreBitmap3 (rom_ship_bmp_T, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
+                        LR_DEFAULTCOLOR);
 
-        for (j = 0; j < NUM_TYPES; j++)
-        {
-            for (k = 0; k < SHIP_VIEWS; k++)
-            {
-                fed_bitmapsG[j][k] =
-                    W_PointBitmap2 (ship_bitmapsG[0], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                fed_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[0], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ind_bitmapsG[j][k] =
-                    W_PointBitmap2 (ship_bitmapsG[1], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ind_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[1], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                kli_bitmapsG[j][k] =
-                    W_PointBitmap2 (ship_bitmapsG[2], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                kli_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[2], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ori_bitmapsG[j][k] =
-                    W_PointBitmap2 (ship_bitmapsG[3], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ori_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[3], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                rom_bitmapsG[j][k] =
-                    W_PointBitmap2 (ship_bitmapsG[4], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                rom_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[4], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-            }
-        }
-    }
-    else
-    {
-        ship_bitmaps[0] =
-            W_StoreBitmap3 (fed_ship_bmp_M, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
-                            LR_MONOCHROME);
-        ship_bitmaps[1] =
-            W_StoreBitmap3 (ind_ship_bmp_M, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
-                            LR_MONOCHROME);
-        ship_bitmaps[2] =
-            W_StoreBitmap3 (kli_ship_bmp_M, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
-                            LR_MONOCHROME);
-        ship_bitmaps[3] =
-            W_StoreBitmap3 (ori_ship_bmp_M, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
-                            LR_MONOCHROME);
-        ship_bitmaps[4] =
-            W_StoreBitmap3 (rom_ship_bmp_M, BMP_SHIP_WIDTH * 8,
-                            BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
-                            LR_MONOCHROME);
+    ship_bitmapsM[0] =
+        W_StoreBitmap3 (fed_ship_bmp_M, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
+                        LR_MONOCHROME);
+    ship_bitmapsM[1] =
+        W_StoreBitmap3 (ind_ship_bmp_M, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
+                        LR_MONOCHROME);
+    ship_bitmapsM[2] =
+        W_StoreBitmap3 (kli_ship_bmp_M, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
+                        LR_MONOCHROME);
+    ship_bitmapsM[3] =
+        W_StoreBitmap3 (ori_ship_bmp_M, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
+                        LR_MONOCHROME);
+    ship_bitmapsM[4] =
+        W_StoreBitmap3 (rom_ship_bmp_M, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
+                        LR_MONOCHROME);
+                            
+    ship_bitmapsG[0] =
+        W_StoreBitmap3 (fed_ship_bmp_G, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_FED_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsG[1] =
+        W_StoreBitmap3 (ind_ship_bmp_G, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_IND_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsG[2] =
+        W_StoreBitmap3 (kli_ship_bmp_G, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_KLI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsG[3] =
+        W_StoreBitmap3 (ori_ship_bmp_G, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ORI_SHIP, w,
+                        LR_DEFAULTCOLOR);
+    ship_bitmapsG[4] =
+        W_StoreBitmap3 (rom_ship_bmp_G, BMP_SHIP_WIDTH * 8,
+                        BMP_SHIP_HEIGHT * 32, BMP_ROM_SHIP, w,
+                        LR_DEFAULTCOLOR);
 
-        for (j = 0; j < NUM_TYPES; j++)
+    for (j = 0; j < NUM_TYPES; j++)
+    {
+        for (k = 0; k < SHIP_VIEWS; k++)
         {
-            for (k = 0; k < SHIP_VIEWS; k++)
-            {
-                fed_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[0], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ind_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[1], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                kli_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[2], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                ori_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[3], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-                rom_bitmaps[j][k] =
-                    W_PointBitmap2 (ship_bitmaps[4], j, k, BMP_SHIP_WIDTH,
-                                    BMP_SHIP_HEIGHT);
-            }
+            fed_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[0], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            fed_bitmapsM[j][k] =
+                W_PointBitmap2 (ship_bitmapsM[0], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            fed_bitmapsG[j][k] =
+                W_PointBitmap2 (ship_bitmapsG[0], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            fed_bitmaps1[j][k] =
+                W_PointBitmap2 (ship_bitmaps1[0], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            fed_bitmaps[j][k] =
+                W_PointBitmap2 (ship_bitmaps[0], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmapsM[j][k] =
+                W_PointBitmap2 (ship_bitmapsM[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmapsG[j][k] =
+                W_PointBitmap2 (ship_bitmapsG[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmaps1[j][k] =
+                W_PointBitmap2 (ship_bitmaps1[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmaps[j][k] =
+                W_PointBitmap2 (ship_bitmaps[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ind_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[1], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            kli_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[2], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            kli_bitmapsM[j][k] =
+                W_PointBitmap2 (ship_bitmapsM[2], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            kli_bitmapsG[j][k] =
+                W_PointBitmap2 (ship_bitmapsG[2], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            kli_bitmaps1[j][k] =
+                W_PointBitmap2 (ship_bitmaps1[2], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            kli_bitmaps[j][k] =
+                W_PointBitmap2 (ship_bitmaps[2], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ori_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[3], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ori_bitmapsM[j][k] =
+                W_PointBitmap2 (ship_bitmapsM[3], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ori_bitmapsG[j][k] =
+                W_PointBitmap2 (ship_bitmapsG[3], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ori_bitmaps1[j][k] =
+                W_PointBitmap2 (ship_bitmaps1[3], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            ori_bitmaps[j][k] =
+                W_PointBitmap2 (ship_bitmaps[3], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            rom_bitmapsT[j][k] =
+                W_PointBitmap2 (ship_bitmapsT[4], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            rom_bitmapsM[j][k] =
+                W_PointBitmap2 (ship_bitmapsM[4], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            rom_bitmapsG[j][k] =
+                W_PointBitmap2 (ship_bitmapsG[4], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            rom_bitmaps1[j][k] =
+                W_PointBitmap2 (ship_bitmaps1[4], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
+            rom_bitmaps[j][k] =
+                W_PointBitmap2 (ship_bitmaps[4], j, k, BMP_SHIP_WIDTH,
+                                BMP_SHIP_HEIGHT);
         }
     }
 
-
 /* Experimental weapons */
 #ifdef COLORIZEWEAPON
 /* Not implemented... have to redo code with StoreBitmap3

Index: cowmain.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/cowmain.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cowmain.c	12 Apr 2006 04:20:03 -0000	1.2
+++ cowmain.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -654,23 +654,15 @@
     if (usemeta)
         parsemeta (usemeta);
 #endif
-
-/* Check to see if we should load color bitmaps  SRS 1/11/99 */
-/* 0 = mono
- * 1 = color with tinted bitmaps in center representing your ship
- * 2 = color with greyscale bitmaps in center representing your ship
- */
-
-    /* This is here for backwards compatibility with old bool default */
-    colorClient = booleanDefault ("colorClient", 0);
-    /* If it's already 0, it can't hurt to check for int default */
-    if (colorClient == 0)
-        colorClient = intDefault ("colorClient", 1);
-
+  
     fed_ship_bmp = "bitmaps/shiplib/fedship.bmp";
     if ((stringDefault ("fedshipbmpfile")) != NULL)
         fed_ship_bmp = stringDefault ("fedshipbmpfile");
 
+    fed_ship_bmp_1 = "bitmaps/shiplib/fedship1.bmp";
+    if ((stringDefault ("fedshipbmp1file")) != NULL)
+        fed_ship_bmp_1 = stringDefault ("fedshipbmp1file");
+        
     fed_ship_bmp_G = "bitmaps/shiplib/fedshipG.bmp";
     if ((stringDefault ("fedshipGbmpfile")) != NULL)
         fed_ship_bmp_G = stringDefault ("fedshipGbmpfile");
@@ -687,6 +679,10 @@
     if ((stringDefault ("romshipbmpfile")) != NULL)
         rom_ship_bmp = stringDefault ("romshipbmpfile");
 
+    rom_ship_bmp_1 = "bitmaps/shiplib/romship1.bmp";
+    if ((stringDefault ("romshipbmp1file")) != NULL)
+        rom_ship_bmp_1 = stringDefault ("romshipbmp1file");
+        
     rom_ship_bmp_G = "bitmaps/shiplib/romshipG.bmp";
     if ((stringDefault ("romshipGbmpfile")) != NULL)
         rom_ship_bmp_G = stringDefault ("romshipGbmpfile");
@@ -702,7 +698,11 @@
     kli_ship_bmp = "bitmaps/shiplib/kliship.bmp";
     if ((stringDefault ("klishipbmpfile")) != NULL)
         kli_ship_bmp = stringDefault ("klishipbmpfile");
-
+        
+    kli_ship_bmp_1 = "bitmaps/shiplib/kliship1.bmp";
+    if ((stringDefault ("klishipbmp1file")) != NULL)
+        kli_ship_bmp_1 = stringDefault ("klishipbmp1file");
+        
     kli_ship_bmp_G = "bitmaps/shiplib/klishipG.bmp";
     if ((stringDefault ("klishipGbmpfile")) != NULL)
         kli_ship_bmp_G = stringDefault ("klishipGbmpfile");
@@ -719,6 +719,10 @@
     if ((stringDefault ("orishipbmpfile")) != NULL)
         ori_ship_bmp = stringDefault ("orishipbmpfile");
 
+    ori_ship_bmp_1 = "bitmaps/shiplib/oriship1.bmp";
+    if ((stringDefault ("orishipbmp1file")) != NULL)
+        ori_ship_bmp_1 = stringDefault ("orishipbmp1file");
+        
     ori_ship_bmp_G = "bitmaps/shiplib/orishipG.bmp";
     if ((stringDefault ("orishipGbmpfile")) != NULL)
         ori_ship_bmp_G = stringDefault ("orishipGbmpfile");
@@ -734,6 +738,10 @@
     ind_ship_bmp = "bitmaps/shiplib/indship.bmp";
     if ((stringDefault ("indshipbmpfile")) != NULL)
         ind_ship_bmp = stringDefault ("indshipbmpfile");
+        
+    ind_ship_bmp_1 = "bitmaps/shiplib/indship1.bmp";
+    if ((stringDefault ("indshipbmp1file")) != NULL)
+        ind_ship_bmp_1 = stringDefault ("indshipbmp1file");
 
     ind_ship_bmp_G = "bitmaps/shiplib/indshipG.bmp";
     if ((stringDefault ("indshipGbmpfile")) != NULL)

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- local.c	14 Apr 2006 12:24:00 -0000	1.3
+++ local.c	15 Apr 2006 01:04:34 -0000	1.4
@@ -445,11 +445,7 @@
     int dx, dy, px, py, wx, wy, tx, ty, lx, ly;
     int new_dx, new_dy;
 
-#ifndef DYNAMIC_BITMAPS
     W_Icon (*ship_bits)[SHIP_VIEWS];
-#endif
-
-
 
     /* Kludge to try to fix missing ID chars on tactical (short range)
        display. */
@@ -541,35 +537,63 @@
         }
         if (j->p_status == PALIVE)
         {
-
-#ifndef DYNAMIC_BITMAPS
-            switch (j->p_team)
-            {
-            case FED:
-                ship_bits = fed_bitmaps;
-                break;
-            case ROM:
-                ship_bits = rom_bitmaps;
-                break;
-            case KLI:
-                ship_bits = kli_bitmaps;
-                break;
-            case ORI:
-                ship_bits = ori_bitmaps;
-                break;
-            default:
-                ship_bits = ind_bitmaps;
-                break;
-            }
-#endif
-
             clearzone[0][clearcount] = dx - (shield_width / 2);
             clearzone[1][clearcount] = dy - (shield_height / 2);
             clearzone[2][clearcount] = shield_width;
             clearzone[3][clearcount] = shield_height;
             clearcount++;
 
-            if (!myPlayer (j) || (!(colorClient > 0)))
+	/* Logic of color scheme is as follows:
+	   1) Mono bitmaps (colorClient 0) and new bitmaps (colorClient 1)
+	      are the same for both player and everyone else.
+	   2) Single color bitmaps (colorClient 2) and shaded single color
+	      bitmaps (colorClient 3) have a monochrome version (bitmap set
+	      G) that will be used for the player's ship, to set it apart in
+	      color from the rest of the team
+	 */
+	    if (colorClient <= 0 || colorClient > 3)
+            {
+            	switch (j->p_team)
+            	{
+                case FED:
+                    ship_bits = fed_bitmapsM;
+                    break;
+                case ROM:
+                    ship_bits = rom_bitmapsM;
+                    break;
+                case KLI:
+                    ship_bits = kli_bitmapsM;
+                    break;
+                case ORI:
+                    ship_bits = ori_bitmapsM;
+                    break;
+                default:
+                    ship_bits = ind_bitmapsM;
+                    break;
+           	}
+            }
+            else if (colorClient == 1)
+            {
+                switch (j->p_team)
+                {
+                case FED:
+                    ship_bits = fed_bitmaps1;
+                    break;
+                case ROM:
+                    ship_bits = rom_bitmaps1;
+                    break;
+                case KLI:
+                    ship_bits = kli_bitmaps1;
+                    break;
+                case ORI:
+                    ship_bits = ori_bitmaps1;
+                    break;
+                default:
+                    ship_bits = ind_bitmaps1;
+                    break;
+                }
+            }
+            else if (colorClient == 2 && !myPlayer(j))
             {
                 switch (j->p_team)
                 {
@@ -589,24 +613,33 @@
                     ship_bits = ind_bitmaps;
                     break;
                 }
-                W_WriteBitmap (dx - (j->p_ship.s_width / 2),
-                               dy - (j->p_ship.s_height / 2),
-                /*W_WriteBitmapDB (localSDB, dx - (j->p_ship.s_width / 2),
-                                 dy - (j->p_ship.s_height / 2),*/
-#ifndef DYNAMIC_BITMAPS
-                               ship_bits[j->p_ship.
-                                         s_type][rosette (j->p_dir)],
-#else
-                               ship_bitmaps[PlayerBitmap (j)][rosette
-                                                              (j->p_dir)],
-#endif
-                               playerColor (j));
             }
-            else
+            else if (colorClient == 3 && !myPlayer(j))
             {
                 switch (j->p_team)
                 {
                 case FED:
+                    ship_bits = fed_bitmapsT;
+                    break;
+                case ROM:
+                    ship_bits = rom_bitmapsT;
+                    break;
+                case KLI:
+                    ship_bits = kli_bitmapsT;
+                    break;
+                case ORI:
+                    ship_bits = ori_bitmapsT;
+                    break;
+                default:
+                    ship_bits = ind_bitmapsT;
+                    break;
+                }
+            }
+            else /* Default to bitmap set G (greyscale) for player's ship */
+            {
+            	switch (j->p_team)
+                {
+                case FED:
                     ship_bits = fed_bitmapsG;
                     break;
                 case ROM:
@@ -622,21 +655,15 @@
                     ship_bits = ind_bitmapsG;
                     break;
                 }
-                W_WriteBitmap (dx - (j->p_ship.s_width / 2),
-                               dy - (j->p_ship.s_height / 2),
-                /*W_WriteBitmapDB (localSDB, dx - (j->p_ship.s_width / 2),
-                                 dy - (j->p_ship.s_height / 2),*/
-#ifndef DYNAMIC_BITMAPS
-                               ship_bits[j->p_ship.
-                                         s_type][rosette (j->p_dir)],
-#else
-                               ship_bitmaps[PlayerBitmap (j)][rosette
-                                                              (j->p_dir)],
-#endif
-                               playerColor (j));
             }
 
+            W_WriteBitmap (dx - (j->p_ship.s_width / 2),
+                           dy - (j->p_ship.s_height / 2),
+                           ship_bits[j->p_ship.
+                                     s_type][rosette (j->p_dir)],
 
+                           playerColor (j));
+                           
             if (j->p_cloakphase > 0)
             {
                 W_WriteBitmap (dx - (cloak_width / 2),

Index: playback.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/playback.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- playback.c	12 Apr 2006 04:20:04 -0000	1.2
+++ playback.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -75,13 +75,14 @@
 
     SRANDOM (getpid () * time ((LONG *) 0));
 
-    /* Check to see if we should load color bitmaps  SRS 1/11/99 */
-    colorClient = intDefault ("colorClient", colorClient);
-
     fed_ship_bmp = "bitmaps/shiplib/fedship.bmp";
     if ((stringDefault ("fedshipbmpfile")) != NULL)
         fed_ship_bmp = stringDefault ("fedshipbmpfile");
 
+    fed_ship_bmp_1 = "bitmaps/shiplib/fedship1.bmp";
+    if ((stringDefault ("fedshipbmp1file")) != NULL)
+        fed_ship_bmp_1 = stringDefault ("fedshipbmp1file");
+        
     fed_ship_bmp_G = "bitmaps/shiplib/fedshipG.bmp";
     if ((stringDefault ("fedshipGbmpfile")) != NULL)
         fed_ship_bmp_G = stringDefault ("fedshipGbmpfile");
@@ -98,6 +99,10 @@
     if ((stringDefault ("romshipbmpfile")) != NULL)
         rom_ship_bmp = stringDefault ("romshipbmpfile");
 
+    rom_ship_bmp_1 = "bitmaps/shiplib/romship1.bmp";
+    if ((stringDefault ("romshipbmp1file")) != NULL)
+        rom_ship_bmp_1 = stringDefault ("romshipbmp1file");
+        
     rom_ship_bmp_G = "bitmaps/shiplib/romshipG.bmp";
     if ((stringDefault ("romshipGbmpfile")) != NULL)
         rom_ship_bmp_G = stringDefault ("romshipGbmpfile");
@@ -113,7 +118,11 @@
     kli_ship_bmp = "bitmaps/shiplib/kliship.bmp";
     if ((stringDefault ("klishipbmpfile")) != NULL)
         kli_ship_bmp = stringDefault ("klishipbmpfile");
-
+        
+    kli_ship_bmp_1 = "bitmaps/shiplib/kliship1.bmp";
+    if ((stringDefault ("klishipbmp1file")) != NULL)
+        kli_ship_bmp_1 = stringDefault ("klishipbmp1file");
+        
     kli_ship_bmp_G = "bitmaps/shiplib/klishipG.bmp";
     if ((stringDefault ("klishipGbmpfile")) != NULL)
         kli_ship_bmp_G = stringDefault ("klishipGbmpfile");
@@ -130,6 +139,10 @@
     if ((stringDefault ("orishipbmpfile")) != NULL)
         ori_ship_bmp = stringDefault ("orishipbmpfile");
 
+    ori_ship_bmp_1 = "bitmaps/shiplib/oriship1.bmp";
+    if ((stringDefault ("orishipbmp1file")) != NULL)
+        ori_ship_bmp_1 = stringDefault ("orishipbmp1file");
+        
     ori_ship_bmp_G = "bitmaps/shiplib/orishipG.bmp";
     if ((stringDefault ("orishipGbmpfile")) != NULL)
         ori_ship_bmp_G = stringDefault ("orishipGbmpfile");
@@ -145,6 +158,10 @@
     ind_ship_bmp = "bitmaps/shiplib/indship.bmp";
     if ((stringDefault ("indshipbmpfile")) != NULL)
         ind_ship_bmp = stringDefault ("indshipbmpfile");
+        
+    ind_ship_bmp_1 = "bitmaps/shiplib/indship1.bmp";
+    if ((stringDefault ("indshipbmp1file")) != NULL)
+        ind_ship_bmp_1 = stringDefault ("indshipbmp1file");
 
     ind_ship_bmp_G = "bitmaps/shiplib/indshipG.bmp";
     if ((stringDefault ("indshipGbmpfile")) != NULL)

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- defaults.c	12 Apr 2006 04:20:03 -0000	1.2
+++ defaults.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -76,10 +76,18 @@
         {
             "What type of ship bitmaps to load",
             "0 - mono",
-            "1 - color (default)",
+            "1 - new color bitmaps (default)",
+            "2 - old color bitmaps",
+            "3 - shaded old color bitmaps",
             NULL
         }
     },
+    {"dynamicBitmaps", &dynamicBitmaps, RC_BOOL,
+    	{
+    	    "Allow switching of ship bitmaps in game",
+    	    NULL
+    	}
+    },
 #ifdef JUBILEE_PHASERS
     {"colorfulPhasers", &colorfulPhasers, RC_BOOL,
         {
@@ -131,7 +139,7 @@
     {"forceDisplay", &forceDisplay, RC_INT,
         {
             "Number of colors the client will display",
-            "0 - mono",
+            "0 - find best available color option",
             "1 - 16 colors",
             "2 - 256 colors",
             "3 - true color (default)",
@@ -140,7 +148,8 @@
     },
     {"forceMono", &forceMono, RC_BOOL,
         {
-            "Force old bitmaps",
+            "Outdated option.  Will force display to 16 colors",
+            "(but only works if forceDisplay = 0).",
             NULL
         }
     },
@@ -1383,6 +1392,8 @@
     showStats = booleanDefault ("showStats", showStats);
     showHints = booleanDefault ("showHints", showHints);
     keepPeace = booleanDefault ("keepPeace", keepPeace);
+    colorClient = intDefault ("colorClient", colorClient);
+    dynamicBitmaps = booleanDefault ("dynamicBitmaps", dynamicBitmaps);
     continueTractor = booleanDefault ("continueTractor", continueTractor);
     showTractorPressor = booleanDefault ("showTractorPressor", showTractorPressor);
     showAllTractorPressor = booleanDefault ("showAllTractorPressor", showAllTractorPressor);

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- data.c	12 Apr 2006 04:20:03 -0000	1.2
+++ data.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -46,7 +46,7 @@
 int shrinkPhaserOnMiss = 0;
 
 int colorClient = 1;            /* Use new colorized bitmaps SRS 11/12/99 */
-
+int dynamicBitmaps = 1;		/* in game switching of ship bitmaps, default to on */
 int newDashboard = 2;           /* use new graphic
                                  * dashboard, 6/2/93 LAB */
 int old_db = 0;                 /* should be same as
@@ -274,11 +274,25 @@
     rom_bitmaps[NUM_TYPES][SHIP_VIEWS], ori_bitmaps[NUM_TYPES][SHIP_VIEWS],
     ind_bitmaps[NUM_TYPES][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 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 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 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];
 
 // Planets
 W_Icon base_planets;
@@ -577,6 +591,11 @@
 char *kli_ship_bmp;
 char *ori_ship_bmp;
 char *ind_ship_bmp;
+char *fed_ship_bmp_1;
+char *rom_ship_bmp_1;
+char *kli_ship_bmp_1;
+char *ori_ship_bmp_1;
+char *ind_ship_bmp_1;
 char *fed_ship_bmp_G;
 char *rom_ship_bmp_G;
 char *kli_ship_bmp_G;

Index: option.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- option.c	12 Apr 2006 04:20:04 -0000	1.2
+++ option.c	15 Apr 2006 01:04:34 -0000	1.3
@@ -32,11 +32,6 @@
 static int lastUpdateSpeed = 5;
 static char newkeys[14];
 
-#if (defined( DEBUG) || defined (BITMAP_DEBUG)) && defined(DYNAMIC_BITMAPS)
-extern int OwnBitmapNum;
-
-#endif
-
 char *localmes[] = { "Show owner on local planets",
                      "Show resources on local planets",
                      "Show nothing on local planets",
@@ -132,6 +127,13 @@
                                  ""
 };
 
+static char *bitmaptypemess[] = { "Mono bitmaps",
+                                  "New color bitmaps",
+                                  "Old color bitmaps",
+                                  "Shaded old color bitmaps",
+                                  ""
+};
+
 static char *windowmovemess[] = { "Disable moving of internal windows",
                                   "Enable moving of internal windows",
                                   ""
@@ -214,9 +216,7 @@
 /* range of menus. Will be updated when menu list is assembled */
 struct int_range Menus_Range = { 0, 1, 1 };
 
-#if (defined( DEBUG) || defined (BITMAP_DEBUG)) && defined(DYNAMIC_BITMAPS)
-struct int_range bitmap_range = { 0, 50, 1 };
-#endif
+struct int_range bitmap_range = { 0, 3, 1 };
 
 struct int_range keepInfo_range = { 0, 100, 1 };
 
@@ -237,9 +237,7 @@
 struct option Ship_Menu[] = {
     {0, "Ship Menu", &MenuPage, 0, 0, 0, NULL, &Menus_Range},
     {1, "Page %d (click to change)", &MenuPage, 0, 0, 0, NULL, &Menus_Range},
-#if (defined( DEBUG) || defined (BITMAP_DEBUG)) && defined(DYNAMIC_BITMAPS)
-    {1, "Own bitmap number: %d", &OwnBitmapNum, 0, 0, 0, NULL, &bitmap_range},
-#endif
+    {1, "", &colorClient, 0, 0, 0, bitmaptypemess, &bitmap_range},
 #ifdef VSHIELD_BITMAPS
     {1, "vary shields bitmap", &varyShields, 0, 0, 0, NULL, NULL},
 #endif
@@ -631,6 +629,13 @@
     /* Toggle int, if it exists */
     if (op->op_array)
     {
+         /* Actions to be taken when certain options are selected. (Yes, this is
+         * a hack). */
+        if (op->op_option == &colorClient)
+        {
+        	if (!dynamicBitmaps)
+        		return;
+        }
         if (data->key == W_RBUTTON)
         {
             (*op->op_option)++;