mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:05:42 +00:00
Fixed some compiler warnings
svn path=/trunk/; revision=4230
This commit is contained in:
parent
1b1e741e1b
commit
0dcf21545b
1 changed files with 9 additions and 12 deletions
|
@ -8,43 +8,40 @@
|
||||||
#include "../eng/objects.h"
|
#include "../eng/objects.h"
|
||||||
#include "dib.h"
|
#include "dib.h"
|
||||||
|
|
||||||
PFN_DIB_PutPixel DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
|
VOID DIB_1BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
unsigned char *vp;
|
|
||||||
unsigned char mask;
|
|
||||||
PBYTE addr = SurfObj->pvBits;
|
PBYTE addr = SurfObj->pvBits;
|
||||||
|
|
||||||
addr += y * SurfObj->lDelta + (x >> 3);
|
addr += y * SurfObj->lDelta + (x >> 3);
|
||||||
|
|
||||||
if(c == 0)
|
if(c == 0)
|
||||||
{
|
{
|
||||||
*addr = (*addr ^ mask1Bpp[mod(x, 8)]);
|
*addr = (*addr ^ mask1Bpp[x % 8]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*addr = (*addr | mask1Bpp[mod(x, 8)]);
|
*addr = (*addr | mask1Bpp[x % 8]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PFN_DIB_GetPixel DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
ULONG DIB_1BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
||||||
{
|
{
|
||||||
PBYTE addr = SurfObj->pvBits + y * SurfObj->lDelta + (x >> 3);
|
PBYTE addr = SurfObj->pvBits + y * SurfObj->lDelta + (x >> 3);
|
||||||
|
|
||||||
if(*addr & mask1Bpp[mod(x, 8)]) return (PFN_DIB_GetPixel)(1);
|
return (*addr & mask1Bpp[x % 8] ? 1 : 0);
|
||||||
return (PFN_DIB_GetPixel)(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PFN_DIB_HLine DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
VOID DIB_1BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
while(x1 <= x2) {
|
while(x1 < x2) {
|
||||||
DIB_1BPP_PutPixel(SurfObj, x1, y, c);
|
DIB_1BPP_PutPixel(SurfObj, x1, y, c);
|
||||||
x1++;
|
x1++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PFN_DIB_VLine DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
VOID DIB_1BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
{
|
{
|
||||||
while(y1 <= y2) {
|
while(y1 < y2) {
|
||||||
DIB_1BPP_PutPixel(SurfObj, x, y1, c);
|
DIB_1BPP_PutPixel(SurfObj, x, y1, c);
|
||||||
y1++;
|
y1++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue