Fix warnings, and compilation of dib24bppc.c/dib32bppc.c

svn path=/trunk/; revision=28777
This commit is contained in:
Hervé Poussineau 2007-09-02 16:33:00 +00:00
parent f503e01b03
commit 2d5d8783a9
3 changed files with 23 additions and 19 deletions

View file

@ -130,7 +130,7 @@ DIB_16BPP_VLine(SURFOBJ *SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
"r"(SurfObj->lDelta), "r"(y2 - y1), "a"(c)
: "cc", "memory", "%ecx");
#else
PBYTE byteaddr = (ULONG_PTR)SurfObj->pvScan0 + y1 * SurfObj->lDelta;
PBYTE byteaddr = (PBYTE)(ULONG_PTR)SurfObj->pvScan0 + y1 * SurfObj->lDelta;
PWORD addr = (PWORD)byteaddr + x;
LONG lDelta = SurfObj->lDelta;

View file

@ -43,6 +43,9 @@ DIB_24BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
}
else
{
ULONG Fill[3];
ULONG MultiCount;
/* Align to 4-byte address */
while (0 != ((ULONG_PTR) addr & 0x3))
{
@ -86,4 +89,4 @@ DIB_24BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
addr += 1;
}
}
}
}

View file

@ -26,26 +26,27 @@
VOID
DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
{
PBYTE byteaddr = (ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta;
PDWORD addr = (PDWORD)byteaddr + x1;
LONG cx = x1;
while(cx < x2)
{
*addr = (DWORD)c;
++addr;
++cx;
}
PBYTE byteaddr = (PBYTE)((ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta);
PDWORD addr = (PDWORD)byteaddr + x1;
LONG cx = x1;
while(cx < x2)
{
*addr = (DWORD)c;
++addr;
++cx;
}
}
BOOLEAN
DIB_32BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color)
{
ULONG DestY;
{
ULONG DestY;
for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
{
DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color);
}
for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
{
DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color);
}
return TRUE;
}
return TRUE;
}