Commit in reactos/subsys/win32k/dib on MAIN
dib16bpp.c+10-161.26 -> 1.27
dib1bpp.c+15-221.20 -> 1.21
dib24bpp.c+8-151.22 -> 1.23
dib32bpp.c+8-121.22 -> 1.23
dib4bpp.c+18-241.28 -> 1.29
dib8bpp.c+10-161.20 -> 1.21
+69-105
6 modified files
little clean-up

reactos/subsys/win32k/dib
dib16bpp.c 1.26 -> 1.27
diff -u -r1.26 -r1.27
--- dib16bpp.c	7 Apr 2004 10:19:34 -0000	1.26
+++ dib16bpp.c	7 Apr 2004 15:37:49 -0000	1.27
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib16bpp.c,v 1.26 2004/04/07 10:19:34 weiden Exp $ */
+/* $Id: dib16bpp.c,v 1.27 2004/04/07 15:37:49 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -286,7 +286,7 @@
    ULONG wd, Dest, Source, Pattern = 0, PatternY;
    PULONG DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    ULONG RoundedRight;
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
@@ -307,14 +307,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
       
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -331,11 +327,12 @@
          PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
-         CalcPattern = TRUE;
+         
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = (Brush->iSolidColor & 0xFFFF) |
                     ((Brush->iSolidColor & 0xFFFF) << 16);
       }
@@ -353,7 +350,7 @@
    {
       SourceX = SourcePoint->x;
       
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = Y % PatternHeight;
       
       for (X = DestRect->left; X < RoundedRight; X += 2, DestBits++, SourceX += 2)
@@ -366,7 +363,7 @@
             Source |= DIB_GetSource(SourceSurf, SourceGDI, SourceX + 1, SourceY, ColorTranslation) << 16;
          }
 
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
 	 {
             Pattern = (DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack);
             Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
@@ -386,10 +383,7 @@
 
          if (UsesPattern)
          {
-            if (Brush->iSolidColor == 0xFFFFFFFF)
-               Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
-            else
-               Pattern = Brush->iSolidColor & 0xFFFF;
+            Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }				
 
          DIB_16BPP_PutPixel(DestSurf, X, Y, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xFFFF);

reactos/subsys/win32k/dib
dib1bpp.c 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- dib1bpp.c	7 Apr 2004 10:19:34 -0000	1.20
+++ dib1bpp.c	7 Apr 2004 15:37:50 -0000	1.21
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib1bpp.c,v 1.20 2004/04/07 10:19:34 weiden Exp $ */
+/* $Id: dib1bpp.c,v 1.21 2004/04/07 15:37:50 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -357,7 +357,7 @@
    ULONG Dest, Source, Pattern = 0;
    PULONG DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    ULONG RoundedRight;
    BYTE NoBits;
    /* Pattern brushes */
@@ -379,14 +379,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
 
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -404,11 +400,11 @@
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
-         CalcPattern = TRUE;
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = Brush->iSolidColor;
       }
    }
@@ -426,7 +422,7 @@
          (DestRect->left >> 3) +
          Y * DestSurf->lDelta);
 
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = Y % PatternHeight;
 
       X = DestRect->left;
@@ -444,7 +440,7 @@
                Source |= (DIB_GetSource(SourceSurf, SourceGDI, SourceX + k, SourceY, ColorTranslation) << (31 - k));
          }
 
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
          {
             Pattern = 0;
             for (k = 31 - NoBits; k < NoBits; k++)
@@ -479,16 +475,13 @@
 
          if (UsesPattern)
          {
-            if (Brush->iSolidColor == 0xFFFFFFFF)
+            Pattern = 0;
+            for (k = 0; k < 8; k++)
             {
-               Pattern = 0;
-               for (k = 0; k < 8; k++)
-               {
-                  Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, Y % PatternHeight) << (7 - k));
-                  Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 8) % PatternWidth, Y % PatternHeight) << (8 + (7 - k)));
-                  Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 16) % PatternWidth, Y % PatternHeight) << (16 + (7 - k)));
-                  Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 24) % PatternWidth, Y % PatternHeight) << (24 + (7 - k)));
-               }
+               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, Y % PatternHeight) << (7 - k));
+               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 8) % PatternWidth, Y % PatternHeight) << (8 + (7 - k)));
+               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 16) % PatternWidth, Y % PatternHeight) << (16 + (7 - k)));
+               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 24) % PatternWidth, Y % PatternHeight) << (24 + (7 - k)));
             }
          }
 
@@ -508,7 +501,7 @@
                Source = DIB_GetSource(SourceSurf, SourceGDI, SourceX, SourceY, ColorTranslation);
             }
 
-            if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+            if (UsesPattern)
             {
                Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, Y % PatternHeight);
             }

reactos/subsys/win32k/dib
dib24bpp.c 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- dib24bpp.c	7 Apr 2004 10:19:34 -0000	1.22
+++ dib24bpp.c	7 Apr 2004 15:37:50 -0000	1.23
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib24bpp.c,v 1.22 2004/04/07 10:19:34 weiden Exp $ */
+/* $Id: dib24bpp.c,v 1.23 2004/04/07 15:37:50 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -258,7 +258,7 @@
    ULONG Dest, Source, Pattern = 0, PatternY;
    PBYTE DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
@@ -278,14 +278,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
       
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -303,11 +299,11 @@
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
-         CalcPattern = TRUE;
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = Brush->iSolidColor;
       }
    }
@@ -322,7 +318,7 @@
    {
       SourceX = SourcePoint->x;
       
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = Y % PatternHeight;
       
       for (X = DestRect->left; X < DestRect->right; X++, DestBits += 3, SourceX++)
@@ -336,10 +332,7 @@
 
          if (UsesPattern)
 	 {
-            if (Brush->iSolidColor == 0xFFFFFFFF)
-            {
-               Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
-            }
+            Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }
 
          Dest = DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xFFFFFF;

reactos/subsys/win32k/dib
dib32bpp.c 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- dib32bpp.c	7 Apr 2004 10:19:34 -0000	1.22
+++ dib32bpp.c	7 Apr 2004 15:37:50 -0000	1.23
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib32bpp.c,v 1.22 2004/04/07 10:19:34 weiden Exp $ */
+/* $Id: dib32bpp.c,v 1.23 2004/04/07 15:37:50 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -307,7 +307,7 @@
    ULONG Dest, Source, Pattern = 0, wd;
    PULONG DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
    HBITMAP PatternSurface = NULL;
@@ -327,14 +327,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
       
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -352,11 +348,11 @@
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
          
-         CalcPattern = TRUE;
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = Brush->iSolidColor;
       }
    }
@@ -373,7 +369,7 @@
       ULONG PatternY;
       SourceX = SourcePoint->x;
       
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = Y % PatternHeight;
       
       for (X = DestRect->left; X < DestRect->right; X++, DestBits++, SourceX++)
@@ -385,7 +381,7 @@
             Source = DIB_GetSource(SourceSurf, SourceGDI, SourceX, SourceY, ColorTranslation);
          }
 
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
 	 {
             Pattern = DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }

reactos/subsys/win32k/dib
dib4bpp.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- dib4bpp.c	7 Apr 2004 14:43:08 -0000	1.28
+++ dib4bpp.c	7 Apr 2004 15:37:50 -0000	1.29
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib4bpp.c,v 1.28 2004/04/07 14:43:08 weiden Exp $ */
+/* $Id: dib4bpp.c,v 1.29 2004/04/07 15:37:50 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -242,7 +242,7 @@
    ULONG Dest, Source, Pattern = 0, PatternY;
    PULONG DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    LONG RoundedRight;
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
@@ -282,14 +282,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
 
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -306,11 +302,12 @@
          PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
-         CalcPattern = TRUE;
+         
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = ExpandSolidColor[Brush->iSolidColor & 0xF];
       }
    }
@@ -324,7 +321,7 @@
       sx = SourcePoint->x;
       i = DestRect->left;
 
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = j % PatternHeight;
 
       if (i & 0x1)
@@ -336,7 +333,7 @@
             Source = DIB_GetSource(SourceSurf, SourceGDI, sx, sy, ColorTranslation);
          }
 
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
          {
             Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }				
@@ -365,17 +362,14 @@
          }
          if (UsesPattern)
          {
-            if (Brush->iSolidColor == 0xFFFFFFFF)
-            {
-               Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 4;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 2) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 3) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 12;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 4) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 5) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 20;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 6) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24;
-               Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 7) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 28;
-            }
+            Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 4;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 2) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 3) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 12;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 4) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 5) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 20;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 6) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24;
+            Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 7) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 28;
          }
          *DestBits = DIB_DoRop(Rop4, Dest, Source, Pattern);	    
       }
@@ -388,7 +382,7 @@
          {
             Source = DIB_GetSource(SourceSurf, SourceGDI, sx, sy, ColorTranslation);
          }
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
          {
             Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
          }				

reactos/subsys/win32k/dib
dib8bpp.c 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- dib8bpp.c	7 Apr 2004 10:19:34 -0000	1.20
+++ dib8bpp.c	7 Apr 2004 15:37:50 -0000	1.21
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dib8bpp.c,v 1.20 2004/04/07 10:19:34 weiden Exp $ */
+/* $Id: dib8bpp.c,v 1.21 2004/04/07 15:37:50 weiden Exp $ */
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdlib.h>
@@ -280,7 +280,7 @@
    ULONG Dest, Source, Pattern = 0, PatternY;
    PULONG DestBits;
    BOOL UsesSource;
-   BOOL UsesPattern, CalcPattern;
+   BOOL UsesPattern;
    LONG RoundedRight;
    /* Pattern brushes */
    PGDIBRUSHOBJ GdiBrush;
@@ -301,14 +301,10 @@
    }
 
    UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000);
-   UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000);  
+   UsesPattern = (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) && Brush;  
 
-   if ((CalcPattern = UsesPattern))
+   if (UsesPattern)
    {
-      if (Brush == NULL)
-      {
-         UsesPattern = CalcPattern = FALSE;
-      } else
       if (Brush->iSolidColor == 0xFFFFFFFF)
       {
          PBITMAPOBJ PatternBitmap;
@@ -325,11 +321,12 @@
          PatternObj = (PSURFOBJ)AccessUserObject((ULONG)PatternSurface);
          PatternWidth = PatternObj->sizlBitmap.cx;
          PatternHeight = PatternObj->sizlBitmap.cy;
-         CalcPattern = TRUE;
+         
+         UsesPattern = TRUE;
       }
       else
       {
-         CalcPattern = FALSE;
+         UsesPattern = FALSE;
          Pattern = (Brush->iSolidColor & 0xFF) |
                     ((Brush->iSolidColor & 0xFF) << 8) |
                     ((Brush->iSolidColor & 0xFF) << 16) |
@@ -345,7 +342,7 @@
       sx = SourcePoint->x;
       DestBits = (PULONG)(DestSurf->pvScan0 + DestRect->left + j * DestSurf->lDelta);
 
-      if(CalcPattern)
+      if(UsesPattern)
         PatternY = j % PatternHeight;
 
       for (i = DestRect->left; i < RoundedRight; i += 4, DestBits++)
@@ -359,7 +356,7 @@
                Source |= (DIB_GetSource(SourceSurf, SourceGDI, sx + (i - DestRect->left) + k, sy, ColorTranslation) << (k * 8));
          }
 
-         if (UsesPattern && (Brush->iSolidColor == 0xFFFFFFFF))
+         if (UsesPattern)
          {
             Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
             Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
@@ -381,10 +378,7 @@
 
             if (UsesPattern)
             {
-               if (Brush->iSolidColor == 0xFFFFFFFF)
-                  Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth,PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
-               else
-                  Pattern = Brush->iSolidColor & 0xFF;
+               Pattern = DIB_1BPP_GetPixel(PatternObj, i % PatternWidth,PatternY) ? GdiBrush->crFore : GdiBrush->crBack;
             }
 
             DIB_8BPP_PutPixel(DestSurf, i, j, DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xFFFF);
CVSspam 0.2.8