Start source tree (final, I hope!) restructuration. Part 1/X
[reactos.git] / reactos / win32ss / core / gdi / dib / dib32bppc.c
1 /*
2 * PROJECT: Win32 subsystem
3 * LICENSE: See COPYING in the top level directory
4 * FILE: subsystems/win32/win32k/dib/dib32bppc.c
5 * PURPOSE: C language equivalents of asm optimised 32bpp functions
6 * PROGRAMMERS: Jason Filby
7 * Magnus Olsen
8 */
9
10 #include <win32k.h>
11
12 #define NDEBUG
13 #include <debug.h>
14
15 VOID
16 DIB_32BPP_HLine(SURFOBJ *SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
17 {
18 PBYTE byteaddr = (PBYTE)((ULONG_PTR)SurfObj->pvScan0 + y * SurfObj->lDelta);
19 PDWORD addr = (PDWORD)byteaddr + x1;
20 LONG cx = x1;
21
22 while(cx < x2)
23 {
24 *addr = (DWORD)c;
25 ++addr;
26 ++cx;
27 }
28 }
29
30 BOOLEAN
31 DIB_32BPP_ColorFill(SURFOBJ* DestSurface, RECTL* DestRect, ULONG color)
32 {
33 ULONG DestY;
34
35 for (DestY = DestRect->top; DestY< DestRect->bottom; DestY++)
36 {
37 DIB_32BPP_HLine (DestSurface, DestRect->left, DestRect->right, DestY, color);
38 }
39
40 return TRUE;
41 }