[YAROTOWS] Reintegrate the branch. For a brighter future.
[reactos.git] / reactos / subsystems / win32 / win32k / dib / dib1bpp.c
index 13fbe9d..b924112 100644 (file)
@@ -6,7 +6,7 @@
  * PROGRAMMERS:     Jason Filby
  */
 
-#include <w32k.h>
+#include <win32k.h>
 
 #define NDEBUG
 #include <debug.h>
@@ -33,7 +33,7 @@ DIB_1BPP_GetPixel(SURFOBJ *SurfObj, LONG x, LONG y)
 VOID
 DIB_1BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 {
-  while(x1 < x2) 
+  while(x1 < x2)
   {
     DIB_1BPP_PutPixel(SurfObj, x1, y, c);
     x1++;
@@ -43,7 +43,7 @@ DIB_1BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
 VOID
 DIB_1BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
 {
-  while(y1 < y2) 
+  while(y1 < y2)
   {
     DIB_1BPP_PutPixel(SurfObj, x, y1, c);
     y1++;
@@ -82,7 +82,6 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
   int dy2; // dest y end
   int sy1; // src y start
 
-  int dx;
   int shift;
   BYTE srcmask, dstmask, xormask;
 
@@ -139,12 +138,10 @@ DIB_1BPP_BitBltSrcCopy_From1BPP (
     pd = d;
     ps = s;
     srcmask = 0xff;
-    dx = dwx; /* dest x for this pass */
     if ( dwx < dl )
     {
       int diff = dl-dwx;
       srcmask &= (1<<(8-diff))-1;
-      dx = dl;
     }
     if ( dwx+7 > dr )
     {
@@ -380,7 +377,7 @@ DIB_1BPP_BitBlt(PBLTINFO BltInfo)
       {
         Pattern = 0;
         for (k = 31 - NoBits; k >= 0; k++)
-          Pattern |= (DIB_GetSource(PatternObj, (X + BrushOrigin.x + k) % PatternWidth, PatternY, BltInfo->XlatePatternToDest) << (31 - k));
+          Pattern |= (DIB_GetSourceIndex(PatternObj, (X + BrushOrigin.x + k) % PatternWidth, PatternY) << (31 - k));
       }
 
       Dest = DIB_DoRop(Rop4, Dest, Source, Pattern);
@@ -415,10 +412,10 @@ DIB_1BPP_BitBlt(PBLTINFO BltInfo)
         Pattern = 0;
         for (Index = 0; Index < 8; Index++)
         {
-          Pattern |= DIB_GetSource(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY, BltInfo->XlatePatternToDest) << (7 - Index);
-          Pattern |= DIB_GetSource(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 8) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY, BltInfo->XlatePatternToDest) << (8 + (7 - Index));
-          Pattern |= DIB_GetSource(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 16) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY, BltInfo->XlatePatternToDest) << (16 + (7 - Index));
-          Pattern |= DIB_GetSource(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 24) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY, BltInfo->XlatePatternToDest) << (24 + (7 - Index));
+          Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (7 - Index);
+          Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 8) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (8 + (7 - Index));
+          Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 16) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (16 + (7 - Index));
+          Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x + Index + 24) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY) << (24 + (7 - Index));
         }
       }
 
@@ -438,7 +435,7 @@ DIB_1BPP_BitBlt(PBLTINFO BltInfo)
 
         if (BltInfo->PatternSurface)
         {
-          Pattern = DIB_GetSource(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY, BltInfo->XlatePatternToDest);
+          Pattern = DIB_GetSourceIndex(BltInfo->PatternSurface, (DestX + BltInfo->BrushOrigin.x) % BltInfo->PatternSurface->sizlBitmap.cx, PatternY);
         }
 
         DIB_1BPP_PutPixel(BltInfo->DestSurface, DestX, DestY, DIB_DoRop(BltInfo->Rop4, Dest, Source, Pattern) & 0xF);
@@ -477,13 +474,4 @@ DIB_1BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
   return FALSE;
 }
 
-BOOLEAN
-DIB_1BPP_AlphaBlend(SURFOBJ* Dest, SURFOBJ* Source, RECTL* DestRect,
-                    RECTL* SourceRect, CLIPOBJ* ClipRegion,
-                    XLATEOBJ* ColorTranslation, BLENDOBJ* BlendObj)
-{
-  UNIMPLEMENTED;
-  return FALSE;
-}
-
 /* EOF */