4 modified files
reactos/subsys/win32k/dib
diff -u -r1.24 -r1.25
--- dib16bpp.c 6 Apr 2004 21:53:48 -0000 1.24
+++ dib16bpp.c 6 Apr 2004 23:05:36 -0000 1.25
@@ -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.24 2004/04/06 21:53:48 weiden Exp $ */
+/* $Id: dib16bpp.c,v 1.25 2004/04/06 23:05:36 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
@@ -607,8 +607,7 @@
RECTL* DestRect, POINTL *SourcePoint,
XLATEOBJ *ColorTranslation, ULONG iTransColor)
{
- ULONG X, Y, SourceX, SourceY, Source, wd, Dest;
- LONG RoundedRight;
+ ULONG RoundedRight, X, Y, SourceX, SourceY, Source, wd, Dest;
ULONG *DestBits;
RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x1);
@@ -616,7 +615,7 @@
DestBits = (ULONG*)(DestSurf->pvScan0 +
(DestRect->left << 1) +
DestRect->top * DestSurf->lDelta);
- wd = ((DestRect->right - DestRect->left) << 1) - DestSurf->lDelta;
+ wd = DestSurf->lDelta - ((DestRect->right - DestRect->left) << 1);
for(Y = DestRect->top; Y < DestRect->bottom; Y++)
{
@@ -653,7 +652,7 @@
DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
}
SourceY++;
- DestBits = (ULONG*)((ULONG_PTR)DestBits - wd);
+ DestBits = (ULONG*)((ULONG_PTR)DestBits + wd);
}
return TRUE;
reactos/subsys/win32k/dib
diff -u -r1.20 -r1.21
--- dib24bpp.c 6 Apr 2004 21:53:48 -0000 1.20
+++ dib24bpp.c 6 Apr 2004 23:05:36 -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: dib24bpp.c,v 1.20 2004/04/06 21:53:48 weiden Exp $ */
+/* $Id: dib24bpp.c,v 1.21 2004/04/06 23:05:36 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
@@ -374,7 +374,7 @@
DestBits = (BYTE*)(DestSurf->pvScan0 +
(DestRect->left << 2) +
DestRect->top * DestSurf->lDelta);
- wd = ((DestRect->right - DestRect->left) << 2) - DestSurf->lDelta;
+ wd = DestSurf->lDelta - ((DestRect->right - DestRect->left) << 2);
for(Y = DestRect->top; Y < DestRect->bottom; Y++)
{
@@ -391,7 +391,7 @@
}
SourceY++;
- DestBits = (BYTE*)((ULONG_PTR)DestBits - wd);
+ DestBits = (BYTE*)((ULONG_PTR)DestBits + wd);
}
return TRUE;
reactos/subsys/win32k/dib
diff -u -r1.20 -r1.21
--- dib32bpp.c 6 Apr 2004 21:53:48 -0000 1.20
+++ dib32bpp.c 6 Apr 2004 23:05:36 -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: dib32bpp.c,v 1.20 2004/04/06 21:53:48 weiden Exp $ */
+/* $Id: dib32bpp.c,v 1.21 2004/04/06 23:05:36 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
@@ -579,7 +579,7 @@
DestBits = (ULONG*)(DestSurf->pvScan0 +
(DestRect->left << 2) +
DestRect->top * DestSurf->lDelta);
- wd = ((DestRect->right - DestRect->left) << 2) - DestSurf->lDelta;
+ wd = DestSurf->lDelta - ((DestRect->right - DestRect->left) << 2);
for(Y = DestRect->top; Y < DestRect->bottom; Y++)
{
@@ -594,7 +594,7 @@
}
SourceY++;
- DestBits = (ULONG*)((ULONG_PTR)DestBits - wd);
+ DestBits = (ULONG*)((ULONG_PTR)DestBits + wd);
}
return TRUE;
reactos/subsys/win32k/dib
diff -u -r1.18 -r1.19
--- dib8bpp.c 6 Apr 2004 17:54:32 -0000 1.18
+++ dib8bpp.c 6 Apr 2004 23:05:36 -0000 1.19
@@ -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.18 2004/04/06 17:54:32 weiden Exp $ */
+/* $Id: dib8bpp.c,v 1.19 2004/04/06 23:05:36 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
@@ -568,7 +568,71 @@
RECTL* DestRect, POINTL *SourcePoint,
XLATEOBJ *ColorTranslation, ULONG iTransColor)
{
- return FALSE;
+ ULONG RoundedRight, X, Y, SourceX, SourceY, Source, wd, Dest;
+ ULONG *DestBits;
+
+ RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x3);
+ SourceY = SourcePoint->y;
+ DestBits = (ULONG*)(DestSurf->pvScan0 + DestRect->left +
+ (DestRect->top * DestSurf->lDelta));
+ wd = DestSurf->lDelta - (DestRect->right - DestRect->left);
+
+ for(Y = DestRect->top; Y < DestRect->bottom; Y++)
+ {
+ DestBits = (ULONG*)(DestSurf->pvScan0 + DestRect->left +
+ (Y * DestSurf->lDelta));
+ SourceX = SourcePoint->x;
+ for (X = DestRect->left; X < RoundedRight; X += 4, DestBits++)
+ {
+ Dest = *DestBits;
+
+ Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX++, SourceY);
+ if(Source != iTransColor)
+ {
+ Dest &= 0xFFFFFF00;
+ Dest |= (XLATEOBJ_iXlate(ColorTranslation, Source) & 0xFF);
+ }
+
+ Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX++, SourceY);
+ if(Source != iTransColor)
+ {
+ Dest &= 0xFFFF00FF;
+ Dest |= ((XLATEOBJ_iXlate(ColorTranslation, Source) << 8) & 0xFF00);
+ }
+
+ Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX++, SourceY);
+ if(Source != iTransColor)
+ {
+ Dest &= 0xFF00FFFF;
+ Dest |= ((XLATEOBJ_iXlate(ColorTranslation, Source) << 16) & 0xFF0000);
+ }
+
+ Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX++, SourceY);
+ if(Source != iTransColor)
+ {
+ Dest &= 0x00FFFFFF;
+ Dest |= ((XLATEOBJ_iXlate(ColorTranslation, Source) << 24) & 0xFF000000);
+ }
+
+ *DestBits = Dest;
+ }
+
+ if(X < DestRect->right)
+ {
+ for (; X < DestRect->right; X++)
+ {
+ Source = DIB_GetSourceIndex(SourceSurf, SourceGDI, SourceX++, SourceY);
+ if(Source != iTransColor)
+ {
+ *((BYTE*)DestBits) = (BYTE)(XLATEOBJ_iXlate(ColorTranslation, Source) & 0xFF);
+ }
+ DestBits = (PULONG)((ULONG_PTR)DestBits + 1);
+ }
+ }
+ SourceY++;
+ }
+
+ return TRUE;
}
/* EOF */
CVSspam 0.2.8