- Added a missing break - fixes nonmasked, non-pattern blits.

- Added support for all vga to vga blit directions.

svn path=/trunk/; revision=5365
This commit is contained in:
David Welch 2003-08-01 14:34:19 +00:00
parent f8c432602c
commit 07a3d1d8e3

View file

@ -140,8 +140,7 @@ VGAtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
RECTL *DestRect, POINTL *SourcePoint) RECTL *DestRect, POINTL *SourcePoint)
{ {
// FIXME: Use fast blts instead of get and putpixels // FIXME: Use fast blts instead of get and putpixels
LONG i, j, dx, dy, alterx, altery, BltDirection;
int i, j, dx, dy, alterx, altery, BltDirection;
// Calculate deltas // Calculate deltas
@ -179,16 +178,46 @@ VGAtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
} }
// Do the VGA to VGA BitBlt // Do the VGA to VGA BitBlt
// FIXME: Right now we're only doing CN_LEFTDOWN and we're using slow // FIXME: we're using slow get and put pixel routines
// get and put pixel routines switch (BltDirection)
{
for(j=SourcePoint->y; j<SourcePoint->y+dy; j++) case CD_LEFTDOWN:
{ for(j=SourcePoint->y; j<SourcePoint->y+dy; j++)
for(i=SourcePoint->x; i<SourcePoint->x+dx; i++) {
{ for(i=SourcePoint->x; i<SourcePoint->x+dx; i++)
vgaPutPixel(i+alterx, j+altery, vgaGetPixel(i, j)); {
} vgaPutPixel(i+alterx, j+altery, vgaGetPixel(i, j));
} }
}
break;
case CD_LEFTUP:
for(j=(SourcePoint->y+dy-1); j>=SourcePoint->y; j--)
{
for(i=SourcePoint->x; i<SourcePoint->x+dx; i++)
{
vgaPutPixel(i+alterx, j+altery, vgaGetPixel(i, j));
}
}
break;
case CD_RIGHTDOWN:
for(j=SourcePoint->y; j<SourcePoint->y+dy; j++)
{
for(i=(SourcePoint->x+dx-1); i>=SourcePoint->x; i--)
{
vgaPutPixel(i+alterx, j+altery, vgaGetPixel(i, j));
}
}
break;
case CD_RIGHTUP:
for(j=(SourcePoint->y+dy-1); j>=SourcePoint->y; j--)
{
for(i=(SourcePoint->x+dx-1); i>=SourcePoint->x; i--)
{
vgaPutPixel(i+alterx, j+altery, vgaGetPixel(i, j));
}
}
break;
}
return TRUE; return TRUE;
} }
@ -413,6 +442,7 @@ DrvBitBlt(SURFOBJ *Dest,
{ {
return FALSE; return FALSE;
} }
break;
case 0xAACC: case 0xAACC:
BltRectFunc = VGADDI_BltMask; BltRectFunc = VGADDI_BltMask;