Index: dib1bpp.c =================================================================== --- dib1bpp.c (Revision 40310) +++ dib1bpp.c (Arbeitskopie) @@ -62,8 +62,11 @@ static void DIB_1BPP_BitBltSrcCopy_From1BPP ( - SURFOBJ* DestSurf, SURFOBJ* SourceSurf, - PRECTL DestRect, POINTL *SourcePoint ) + SURFOBJ* DestSurf, + SURFOBJ* SourceSurf, + XLATEOBJ* pxlo, + PRECTL DestRect, + POINTL *SourcePoint ) { // the 'window' in this sense is the x-position that corresponds // to the left-edge of the 8-pixel byte we are currently working with. @@ -90,7 +93,7 @@ int dx; int shift; - BYTE srcmask, dstmask; + BYTE srcmask, dstmask, xormask; // 'd' and 's' are the dest & src buffer pointers that I use on my x-sweep // 'pd' and 'ps' are the dest & src buffer pointers used on the inner y-sweep @@ -99,6 +102,8 @@ shift = (dl-sl)&7; + xormask = 0xFF * XLATEOBJ_iXlate(pxlo, 0); + if ( DestRect->top <= SourcePoint->y ) { // moving up ( scan top -> bottom ) @@ -164,7 +169,7 @@ { for ( ;; ) { - *pd = (BYTE)((*pd & dstmask) | (*ps & srcmask)); + *pd = (BYTE)((*pd & dstmask) | ((ps[0]^xormask) & srcmask)); // this *must* be here, because we could be going up *or* down... if ( dy == dy2 ) @@ -179,7 +184,7 @@ for ( ;; ) { *pd = (BYTE)((*pd & dstmask) - | ( ( ps[1] >> shift ) & srcmask )); + | ( ( (ps[1]^xormask) >> shift ) & srcmask )); // this *must* be here, because we could be going up *or* down... if ( dy == dy2 ) @@ -194,7 +199,7 @@ for ( ;; ) { *pd = (*pd & dstmask) - | ( ( ps[0] << ( 8 - shift ) ) & srcmask ); + | ( ( (ps[0]^xormask) << ( 8 - shift ) ) & srcmask ); // this *must* be here, because we could be going up *or* down... if ( dy == dy2 ) @@ -209,7 +214,7 @@ for ( ;; ) { *pd = (*pd & dstmask) - | ( ( ( (ps[1])|(ps[0]<<8) ) >> shift ) & srcmask ); + | ( ( ( ((ps[1]^xormask))|((ps[0]^xormask)<<8) ) >> shift ) & srcmask ); // this *must* be here, because we could be going up *or* down... if ( dy == dy2 )