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

Modified Files:
	data.c local.c makefile map.c mswindow.c newwin.c 
Log Message:
Fixed case of view box not updating under certain circumstances, like flipping through options menus
Changed drawing of the new ship bitmaps to overwrite any other image on the screen, except for where the ship source bitmap is black (black treated as transparent).  Logic being that ship draws should take precedence over things like planet and planet resource draws, to make it easier to see the new ships.
Removed the clock masking bitmap, instead using true transparent drawing

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- mswindow.c	11 Jun 2006 20:53:52 -0000	1.34
+++ mswindow.c	12 Jun 2006 14:10:31 -0000	1.35
@@ -504,7 +504,6 @@
     // Free other bitmaps
     free (clockpic);
     free (clockhandpic);
-    free (clockhandmask);
     
     for (j = 0; j < NUM_CTORP_TYPES; j++)
     {
@@ -5151,6 +5150,7 @@
     }
 }
 
+/* Copy over destination imagemap, but make any black in source image transparent */
 void
 W_OverlayScaleBitmap (int x,
                       int y,
@@ -5236,8 +5236,7 @@
         xForm.eDy = eDy;
 
         SetWorldTransform(hdc,&xForm);
-
-        BitBlt(hdc, 0, 0, newwidth, newheight, GlobalMemDC2, srcx, srcy, SRCAND);
+        TransparentBlt(hdc, 0, 0, newwidth, newheight, GlobalMemDC2, srcx, srcy, newwidth, newheight, colortable[BLACK].rgb);
     
         // Reset xForm
         xForm.eM11 = (FLOAT) 1.0; 
@@ -5270,7 +5269,7 @@
         else if ((newheight = (usebitmaphwnd? bitmap->ClipRectAddr->bottom : win->ClipRect.bottom) - y) > destheight)
             newheight = destheight;
 
-        BitBlt(hdc, x, y, newwidth, newheight, GlobalMemDC2, srcx, srcy, SRCAND);
+        TransparentBlt(hdc, x, y, newwidth, newheight, GlobalMemDC2, srcx, srcy, newwidth, newheight, colortable[BLACK].rgb);
     }
 
     SelectObject (GlobalMemDC2, GlobalOldMemDC2Bitmap);   //So we don't crunch on the next line...

Index: newwin.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/newwin.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- newwin.c	11 Jun 2006 20:53:52 -0000	1.37
+++ newwin.c	12 Jun 2006 14:10:31 -0000	1.38
@@ -1313,10 +1313,7 @@
                             BMP_CCLOCK_HEIGHT, BMP_CLOCK, qwin, LR_DEFAULTCOLOR);
         clockhandpic =
             W_StoreBitmap3 ("bitmaps/misclib/color/clockhand.bmp", BMP_CHAND_WIDTH,
-                            BMP_CHAND_HEIGHT, BMP_CLOCKHAND, qwin, LR_DEFAULTCOLOR);
-        clockhandmask =
-            W_StoreBitmap3 ("bitmaps/misclib/color/clockhandmask.bmp", BMP_CHAND_WIDTH,
-                            BMP_CHAND_HEIGHT, BMP_CLOCKHAND, qwin, LR_MONOCHROME);                             
+                            BMP_CHAND_HEIGHT, BMP_CLOCKHAND, qwin, LR_DEFAULTCOLOR);                          
     }
     else
     {
@@ -2100,9 +2097,6 @@
         W_WriteBitmap ( CLOCK_BDR, CLOCK_BDR, clockpic, foreColor, qwin);
         W_OverlayScaleBitmap (CLOCK_BDR, CLOCK_BDR, BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
                               BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
-                              angle, clockhandmask, foreColor, qwin);
-        W_WriteScaleBitmap (CLOCK_BDR, CLOCK_BDR, BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
-                              BMP_CHAND_WIDTH, BMP_CHAND_HEIGHT,
                               angle, clockhandpic, foreColor, qwin);
         sprintf (buf, "%d", max - time);
         tx = cx - W_Textwidth * strlen (buf) / 2;

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- local.c	9 Jun 2006 22:08:40 -0000	1.41
+++ local.c	12 Jun 2006 14:10:30 -0000	1.42
@@ -983,16 +983,16 @@
             }
             else
             {
-                W_WriteScaleBitmap (dx - (j->p_ship.s_width / 2),
-                                    dy - (j->p_ship.s_height / 2),
-                                    j->p_ship.s_width,
-                                    j->p_ship.s_height,
-                                    BMP_SHIP_WIDTH_HR,
-                                    BMP_SHIP_HEIGHT_HR,
-                                    (360 * j->p_dir/255), // Converted to angle
-                                    ship_bitsHR[j->p_ship.s_type],
-                                    playerColor (j),
-                                    w);
+                W_OverlayScaleBitmap (dx - (j->p_ship.s_width / 2),
+                                      dy - (j->p_ship.s_height / 2),
+                                      j->p_ship.s_width,
+                                      j->p_ship.s_height,
+                                      BMP_SHIP_WIDTH_HR,
+                                      BMP_SHIP_HEIGHT_HR,
+                                      (360 * j->p_dir/255), // Converted to angle
+                                      ship_bitsHR[j->p_ship.s_type],
+                                      playerColor (j),
+                                      w);
             }
 
             if (j->p_cloakphase > 0)

Index: makefile
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/makefile,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- makefile	12 May 2006 01:58:37 -0000	1.10
+++ makefile	12 Jun 2006 14:10:31 -0000	1.11
@@ -26,7 +26,7 @@
 # Libs
 LIBOPTS = /L..\Win32\lib\BCC /Tpe
 
-LIBS = SDL.LIB SDL_mixer.LIB SDLmain.LIB CW32mt.LIB IMPORT32.LIB user32.lib gdi32.lib wsock32.lib kernel32.lib shell32.lib winmm.lib mpr.lib $(GMPLIB)
+LIBS = SDL.LIB SDL_mixer.LIB SDLmain.LIB CW32mt.LIB IMPORT32.LIB user32.lib gdi32.lib wsock32.lib kernel32.lib shell32.lib winmm.lib mpr.lib msimg32.lib $(GMPLIB)
 
 INCS = -I..\win32 -I..\win32\h -I..\win32\SDL -I..\win32\h\gmp -I..\include
 

Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- data.c	11 Jun 2006 20:53:52 -0000	1.35
+++ data.c	12 Jun 2006 14:10:29 -0000	1.36
@@ -246,7 +246,7 @@
 
 extern double Sin[], Cos[];
 
-W_Icon stipple, clockpic, clockhandpic, clockhandmask, genopic, genopic2, icon;
+W_Icon stipple, clockpic, clockhandpic, genopic, genopic2, icon;
 
 W_Color borderColor, backColor, textColor, myColor, warningColor, shipCol[5],
     rColor, yColor, gColor, unColor, foreColor;

Index: map.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- map.c	11 Jun 2006 20:53:52 -0000	1.19
+++ map.c	12 Jun 2006 14:10:31 -0000	1.20
@@ -740,7 +740,7 @@
 
         clearlock = 0;
         clearviewbox = 0;
-        viewboxcleared = 0;
+        viewboxcleared = 1;
 
         for (i = 0; i < MAXPLAYER; i++)
         {