mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 20:19:26 +00:00
Fixed warnings
svn path=/trunk/; revision=2024
This commit is contained in:
parent
e9ff4263ca
commit
a9be5303eb
4 changed files with 32 additions and 32 deletions
|
@ -1,17 +1,17 @@
|
||||||
static unsigned char notmask[2] = { 0x0f, 0xf0 };
|
static unsigned char notmask[2] = { 0x0f, 0xf0 };
|
||||||
static unsigned char altnotmask[2] = { 0xf0, 0x0f };
|
static unsigned char altnotmask[2] = { 0xf0, 0x0f };
|
||||||
|
|
||||||
typedef VOID (*PFN_DIB_PutPixel)(SURFOBJ *, LONG, LONG, ULONG);
|
typedef VOID (*PFN_DIB_PutPixel)(PSURFOBJ, LONG, LONG, ULONG);
|
||||||
typedef ULONG (*PFN_DIB_GetPixel)(SURFOBJ *, LONG, LONG);
|
typedef ULONG (*PFN_DIB_GetPixel)(PSURFOBJ, LONG, LONG);
|
||||||
typedef VOID (*PFN_DIB_HLine) (SURFOBJ *, LONG, LONG, LONG, ULONG);
|
typedef VOID (*PFN_DIB_HLine) (PSURFOBJ, LONG, LONG, LONG, ULONG);
|
||||||
typedef VOID (*PFN_DIB_VLine) (SURFOBJ *, LONG, LONG, LONG, ULONG);
|
typedef VOID (*PFN_DIB_VLine) (PSURFOBJ, LONG, LONG, LONG, ULONG);
|
||||||
|
|
||||||
VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, BYTE c);
|
PFN_DIB_PutPixel DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c);
|
||||||
BYTE DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y);
|
PFN_DIB_GetPixel DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y);
|
||||||
VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, BYTE c);
|
PFN_DIB_HLine DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c);
|
||||||
VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, BYTE c);
|
PFN_DIB_VLine DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c);
|
||||||
|
|
||||||
VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, RGBTRIPLE c);
|
PFN_DIB_PutPixel DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c);
|
||||||
RGBTRIPLE DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y);
|
PFN_DIB_GetPixel DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y);
|
||||||
VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, RGBTRIPLE c);
|
PFN_DIB_HLine DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c);
|
||||||
VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, RGBTRIPLE c);
|
PFN_DIB_VLine DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c);
|
||||||
|
|
|
@ -8,36 +8,36 @@
|
||||||
#include "../eng/objects.h"
|
#include "../eng/objects.h"
|
||||||
#include "dib.h"
|
#include "dib.h"
|
||||||
|
|
||||||
VOID DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, RGBTRIPLE c)
|
PFN_DIB_PutPixel DIB_24BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
||||||
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
||||||
|
|
||||||
*addr = c;
|
*(PULONG)(addr) = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
RGBTRIPLE DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
PFN_DIB_GetPixel DIB_24BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
||||||
{
|
{
|
||||||
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
||||||
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
||||||
|
|
||||||
return *addr;
|
return (PFN_DIB_GetPixel)(*(PULONG)(addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, RGBTRIPLE c)
|
PFN_DIB_HLine DIB_24BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
PBYTE byteaddr = SurfObj->pvBits + y * SurfObj->lDelta;
|
||||||
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x1;
|
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x1;
|
||||||
LONG cx = x1;
|
LONG cx = x1;
|
||||||
|
|
||||||
while(cx <= x2) {
|
while(cx <= x2) {
|
||||||
*addr = c;
|
*(PULONG)(addr) = c;
|
||||||
++addr;
|
++addr;
|
||||||
++cx;
|
++cx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, RGBTRIPLE c)
|
PFN_DIB_VLine DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
{
|
{
|
||||||
PBYTE byteaddr = SurfObj->pvBits + y1 * SurfObj->lDelta;
|
PBYTE byteaddr = SurfObj->pvBits + y1 * SurfObj->lDelta;
|
||||||
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
PRGBTRIPLE addr = (PRGBTRIPLE)byteaddr + x;
|
||||||
|
@ -45,7 +45,7 @@ VOID DIB_24BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, RGBTRIPLE c)
|
||||||
|
|
||||||
byteaddr = (PBYTE)addr;
|
byteaddr = (PBYTE)addr;
|
||||||
while(y1++ <= y2) {
|
while(y1++ <= y2) {
|
||||||
*addr = c;
|
*(PULONG)(addr) = c;
|
||||||
|
|
||||||
byteaddr += lDelta;
|
byteaddr += lDelta;
|
||||||
addr = (PRGBTRIPLE)byteaddr;
|
addr = (PRGBTRIPLE)byteaddr;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "../eng/objects.h"
|
#include "../eng/objects.h"
|
||||||
#include "dib.h"
|
#include "dib.h"
|
||||||
|
|
||||||
VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, BYTE c)
|
PFN_DIB_PutPixel DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
unsigned char *vp;
|
unsigned char *vp;
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
|
@ -18,14 +18,14 @@ VOID DIB_4BPP_PutPixel(PSURFOBJ SurfObj, LONG x, LONG y, BYTE c)
|
||||||
*addr = (*addr & notmask[x&1]) | (c << ((1-(x&1))<<2));
|
*addr = (*addr & notmask[x&1]) | (c << ((1-(x&1))<<2));
|
||||||
}
|
}
|
||||||
|
|
||||||
BYTE DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
PFN_DIB_GetPixel DIB_4BPP_GetPixel(PSURFOBJ SurfObj, LONG x, LONG y)
|
||||||
{
|
{
|
||||||
PBYTE addr = SurfObj->pvBits;
|
PBYTE addr = SurfObj->pvBits;
|
||||||
|
|
||||||
return (addr[(x>>1) + y * SurfObj->lDelta] >> ((1-(x&1))<<2) ) & 0x0f;
|
return (PFN_DIB_GetPixel)((addr[(x>>1) + y * SurfObj->lDelta] >> ((1-(x&1))<<2) ) & 0x0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, BYTE c)
|
PFN_DIB_HLine DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
|
||||||
{
|
{
|
||||||
PBYTE addr = SurfObj->pvBits + (x1>>1) + y * SurfObj->lDelta;
|
PBYTE addr = SurfObj->pvBits + (x1>>1) + y * SurfObj->lDelta;
|
||||||
LONG cx = x1;
|
LONG cx = x1;
|
||||||
|
@ -38,7 +38,7 @@ VOID DIB_4BPP_HLine(PSURFOBJ SurfObj, LONG x1, LONG x2, LONG y, BYTE c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, BYTE c)
|
PFN_DIB_VLine DIB_4BPP_VLine(PSURFOBJ SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
|
||||||
{
|
{
|
||||||
PBYTE addr = SurfObj->pvBits;
|
PBYTE addr = SurfObj->pvBits;
|
||||||
int lDelta = SurfObj->lDelta;
|
int lDelta = SurfObj->lDelta;
|
||||||
|
|
|
@ -32,15 +32,15 @@ BOOL EngLineTo(SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush,
|
||||||
switch(BitsPerFormat(Surface->iBitmapFormat))
|
switch(BitsPerFormat(Surface->iBitmapFormat))
|
||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
DIB_PutPixel = DIB_4BPP_PutPixel;
|
DIB_PutPixel = (PFN_DIB_PutPixel)DIB_4BPP_PutPixel;
|
||||||
DIB_HLine = DIB_4BPP_HLine;
|
DIB_HLine = (PFN_DIB_HLine)DIB_4BPP_HLine;
|
||||||
DIB_VLine = DIB_4BPP_VLine;
|
DIB_VLine = (PFN_DIB_VLine)DIB_4BPP_VLine;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case 24:
|
||||||
DIB_PutPixel = DIB_24BPP_PutPixel;
|
DIB_PutPixel = (PFN_DIB_PutPixel)DIB_24BPP_PutPixel;
|
||||||
DIB_HLine = DIB_24BPP_HLine;
|
DIB_HLine = (PFN_DIB_HLine)DIB_24BPP_HLine;
|
||||||
DIB_VLine = DIB_24BPP_VLine;
|
DIB_VLine = (PFN_DIB_VLine)DIB_24BPP_VLine;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -52,7 +52,6 @@ BOOL EngLineTo(SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Implement clipping
|
// FIXME: Implement clipping
|
||||||
|
|
||||||
x=x1;
|
x=x1;
|
||||||
y=y1;
|
y=y1;
|
||||||
deltax=x2-x1;
|
deltax=x2-x1;
|
||||||
|
@ -120,5 +119,6 @@ BOOL EngLineTo(SURFOBJ *Surface, CLIPOBJ *Clip, BRUSHOBJ *Brush,
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseSafetyOnDrawEnd(Surface, SurfGDI);
|
MouseSafetyOnDrawEnd(Surface, SurfGDI);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue