2007-10-21 18:35:19 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS VGA display driver
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* FILE: drivers/video/displays/vga/objects/copybits.c
|
|
|
|
* PURPOSE:
|
|
|
|
* PROGRAMMERS:
|
|
|
|
*/
|
|
|
|
|
2007-10-31 09:45:15 +00:00
|
|
|
#include <vgaddi.h>
|
2004-11-27 00:46:25 +00:00
|
|
|
|
2007-10-21 11:50:55 +00:00
|
|
|
BOOL APIENTRY
|
2007-10-21 18:35:19 +00:00
|
|
|
DrvCopyBits(
|
|
|
|
OUT SURFOBJ* DestObj,
|
|
|
|
IN SURFOBJ* SourceObj,
|
|
|
|
IN CLIPOBJ* ClipObj,
|
|
|
|
IN XLATEOBJ* XLateObj,
|
|
|
|
IN RECTL* DestRectL,
|
|
|
|
IN POINTL* SrcPointL)
|
2004-11-27 00:46:25 +00:00
|
|
|
{
|
2007-10-21 18:35:19 +00:00
|
|
|
BOOL Done = FALSE;
|
2004-11-27 00:46:25 +00:00
|
|
|
|
2007-10-21 18:35:19 +00:00
|
|
|
if (STYPE_BITMAP == DestObj->iType && BMF_4BPP == DestObj->iBitmapFormat &&
|
|
|
|
STYPE_DEVICE == SourceObj->iType)
|
2004-11-27 00:46:25 +00:00
|
|
|
{
|
2007-10-21 18:35:19 +00:00
|
|
|
/* Screen to 4 BPP DIB */
|
|
|
|
DIB_BltFromVGA(SrcPointL->x, SrcPointL->y,
|
|
|
|
DestRectL->right - DestRectL->left,
|
|
|
|
DestRectL->bottom - DestRectL->top,
|
|
|
|
DestObj->pvScan0, DestObj->lDelta);
|
|
|
|
Done = TRUE;
|
2004-11-27 00:46:25 +00:00
|
|
|
}
|
2007-10-21 18:35:19 +00:00
|
|
|
else if (STYPE_DEVICE == DestObj->iType &&
|
|
|
|
STYPE_BITMAP == SourceObj->iType && BMF_4BPP == SourceObj->iBitmapFormat)
|
2004-11-27 00:46:25 +00:00
|
|
|
{
|
2007-10-21 18:35:19 +00:00
|
|
|
/* 4 BPP DIB to Screen */
|
|
|
|
DIB_BltToVGA(DestRectL->left, DestRectL->top,
|
|
|
|
DestRectL->right - DestRectL->left,
|
|
|
|
DestRectL->bottom - DestRectL->top,
|
|
|
|
SourceObj->pvScan0, SourceObj->lDelta,
|
|
|
|
0);
|
|
|
|
Done = TRUE;
|
2004-11-27 00:46:25 +00:00
|
|
|
}
|
|
|
|
|
2007-10-21 18:35:19 +00:00
|
|
|
return Done;
|
2004-11-27 00:46:25 +00:00
|
|
|
}
|