ReactOS  0.4.15-dev-1018-g0695ecb
bitblt.c File Reference
#include <vgaddi.h>
#include "bitblt.h"
Include dependency graph for bitblt.c:

Go to the source code of this file.

Typedefs

typedef BOOL(* PFN_VGABlt) (SURFOBJ *, SURFOBJ *, XLATEOBJ *, RECTL *, POINTL *)
 
typedef BOOL(APIENTRYPBLTRECTFUNC) (SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)
 

Functions

static BOOL FASTCALL VGADDI_IntersectRect (OUT RECTL *prcDst, IN RECTL *prcSrc1, IN RECTL *prcSrc2)
 
void DIB_BltToVGA_Fixed (int x, int y, int w, int h, void *b, int Source_lDelta, int mod)
 
BOOL DIBtoVGA (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
 
BOOL VGAtoDIB (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
 
BOOL DFBtoVGA (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
 
BOOL VGAtoDFB (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
 
BOOL VGAtoVGA (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
 
BOOL APIENTRY VGADDI_BltBrush (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *MaskSurf, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
 
BOOL APIENTRY VGADDI_BltSrc (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskOrigin, IN BRUSHOBJ *Brush, IN POINTL *BrushOrigin, IN ROP4 Rop4)
 
BOOL APIENTRY VGADDI_BltMask (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
 
BOOL APIENTRY DrvBitBlt (IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN CLIPOBJ *Clip, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 rop4)
 

Typedef Documentation

◆ PBLTRECTFUNC

typedef BOOL(APIENTRY * PBLTRECTFUNC) (SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)

Definition at line 14 of file bitblt.c.

◆ PFN_VGABlt

typedef BOOL(* PFN_VGABlt) (SURFOBJ *, SURFOBJ *, XLATEOBJ *, RECTL *, POINTL *)

Definition at line 13 of file bitblt.c.

Function Documentation

◆ DFBtoVGA()

BOOL DFBtoVGA ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint 
)

Definition at line 125 of file bitblt.c.

131 {
132  /* Do DFBs need color translation?? */
133  return FALSE;
134 }
#define FALSE
Definition: types.h:117

Referenced by VGADDI_BltSrc().

◆ DIB_BltToVGA_Fixed()

void DIB_BltToVGA_Fixed ( int  x,
int  y,
int  w,
int  h,
void b,
int  Source_lDelta,
int  mod 
)

◆ DIBtoVGA()

BOOL DIBtoVGA ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint 
)

Definition at line 51 of file bitblt.c.

57 {
58  LONG dx, dy;
59 
60  dx = DestRect->right - DestRect->left;
61  dy = DestRect->bottom - DestRect->top;
62 
63  if (NULL == ColorTranslation || 0 != (ColorTranslation->flXlate & XO_TRIVIAL))
64  {
65  DIB_BltToVGA(DestRect->left, DestRect->top, dx, dy,
66  (PVOID)((ULONG_PTR)Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1)),
67  Source->lDelta, SourcePoint->x % 2);
68  }
69  else
70  {
71  /* Perform color translation */
72  DIB_BltToVGAWithXlate(DestRect->left, DestRect->top, dx, dy,
73  (PVOID)((ULONG_PTR)Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1)),
74  Source->lDelta, ColorTranslation);
75  }
76  return FALSE;
77 }
GLint dy
Definition: linetemp.h:97
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define FALSE
Definition: types.h:117
void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, XLATEOBJ *Xlate)
Definition: vgavideo.c:491
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
#define XO_TRIVIAL
Definition: winddi.h:1247
void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod)
Definition: vgavideo.c:447
GLint dx
Definition: linetemp.h:97
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167

Referenced by VGADDI_BltSrc().

◆ DrvBitBlt()

BOOL APIENTRY DrvBitBlt ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN SURFOBJ Mask,
IN CLIPOBJ Clip,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint,
IN POINTL MaskPoint,
IN BRUSHOBJ Brush,
IN POINTL BrushPoint,
IN ROP4  rop4 
)

Definition at line 410 of file bitblt.c.

422 {
423  PBLTRECTFUNC BltRectFunc;
424  RECTL CombinedRect;
425  BOOL Ret = FALSE;
426  RECT_ENUM RectEnum;
427  BOOL EnumMore;
428  UINT i;
429  POINTL Pt;
431  POINTL FinalSourcePoint;
432 
433  if (Source && SourcePoint)
434  {
435  FinalSourcePoint.x = SourcePoint->x;
436  FinalSourcePoint.y = SourcePoint->y;
437  }
438  else
439  {
440  FinalSourcePoint.x = 0;
441  FinalSourcePoint.y = 0;
442  }
443 
444  switch (rop4)
445  {
446  case ROP3_TO_ROP4(BLACKNESS):
447  case ROP3_TO_ROP4(PATCOPY):
448  case ROP3_TO_ROP4(WHITENESS):
449  case ROP3_TO_ROP4(PATINVERT):
450  case ROP3_TO_ROP4(DSTINVERT):
451  BltRectFunc = VGADDI_BltBrush;
452  break;
453 
454  case ROP3_TO_ROP4(SRCCOPY):
455  if (BMF_4BPP == Source->iBitmapFormat && BMF_4BPP == Dest->iBitmapFormat)
456  BltRectFunc = VGADDI_BltSrc;
457  else
458  return FALSE;
459  break;
460 
461  case R4_MASK:
462  BltRectFunc = VGADDI_BltMask;
463  break;
464 
465  default:
466  return FALSE;
467  }
468 
469  switch (NULL == Clip ? DC_TRIVIAL : Clip->iDComplexity)
470  {
471  case DC_TRIVIAL:
472  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, DestRect,
473  SourcePoint, MaskPoint, Brush, BrushPoint,
474  rop4);
475  break;
476  case DC_RECT:
477  /* Clip the blt to the clip rectangle */
478  VGADDI_IntersectRect(&CombinedRect, DestRect, &(Clip->rclBounds));
479  Pt.x = FinalSourcePoint.x + CombinedRect.left - DestRect->left;
480  Pt.y = FinalSourcePoint.y + CombinedRect.top - DestRect->top;
481  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, &CombinedRect,
482  &Pt, MaskPoint, Brush, BrushPoint,
483  rop4);
484  break;
485  case DC_COMPLEX:
486  Ret = TRUE;
487  if (Dest == Source)
488  {
489  if (DestRect->top <= FinalSourcePoint.y)
490  Direction = DestRect->left < FinalSourcePoint.y ? CD_RIGHTDOWN : CD_LEFTDOWN;
491  else
492  Direction = DestRect->left < FinalSourcePoint.x ? CD_RIGHTUP : CD_LEFTUP;
493  }
494  else
495  {
496  Direction = CD_ANY;
497  }
499  do
500  {
501  EnumMore = CLIPOBJ_bEnum(Clip, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum);
502 
503  for (i = 0; i < RectEnum.c; i++)
504  {
505  VGADDI_IntersectRect(&CombinedRect, DestRect, RectEnum.arcl + i);
506  Pt.x = FinalSourcePoint.x + CombinedRect.left - DestRect->left;
507  Pt.y = FinalSourcePoint.y + CombinedRect.top - DestRect->top;
508  Ret = (*BltRectFunc)(Dest, Source, Mask, ColorTranslation, &CombinedRect,
509  &Pt, MaskPoint, Brush, BrushPoint, rop4) &&
510  Ret;
511  }
512  } while (EnumMore);
513  break;
514  }
515 
516  return Ret;
517 }
BOOL APIENTRY VGADDI_BltBrush(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *MaskSurf, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
Definition: bitblt.c:192
#define PATINVERT
Definition: wingdi.h:327
BOOL(APIENTRY * PBLTRECTFUNC)(SURFOBJ *OutputObj, SURFOBJ *InputObj, SURFOBJ *Mask, XLATEOBJ *ColorTranslation, RECTL *OutputRect, POINTL *InputPoint, POINTL *MaskOrigin, BRUSHOBJ *Brush, POINTL *BrushOrigin, ROP4 Rop4)
Definition: bitblt.c:14
BOOL APIENTRY VGADDI_BltMask(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskPoint, IN BRUSHOBJ *Brush, IN POINTL *BrushPoint, IN ROP4 Rop4)
Definition: bitblt.c:364
#define TRUE
Definition: types.h:120
#define R4_MASK
Definition: bitblt.h:29
#define DC_TRIVIAL
Definition: winddi.h:259
_In_opt_ SURFOBJ _In_opt_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_opt_ POINTL _In_opt_ POINTL _In_opt_ BRUSHOBJ _In_opt_ POINTL _In_ ROP4 rop4
Definition: winddi.h:3433
BOOL APIENTRY VGADDI_BltSrc(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN SURFOBJ *Mask, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint, IN POINTL *MaskOrigin, IN BRUSHOBJ *Brush, IN POINTL *BrushOrigin, IN ROP4 Rop4)
Definition: bitblt.c:326
Definition: xlate.c:9
ULONG c
Definition: vgaddi.h:78
LONG y
Definition: windef.h:330
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CD_RIGHTDOWN
Definition: winddi.h:1320
long top
Definition: polytest.cpp:53
void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG style)
Definition: drawing.cpp:160
smooth NULL
Definition: ftsmooth.c:416
#define CT_RECTANGLES
Definition: winddi.h:1317
long left
Definition: polytest.cpp:53
#define DSTINVERT
Definition: wingdi.h:326
#define DC_RECT
Definition: winddi.h:260
#define CD_RIGHTUP
Definition: winddi.h:1323
if(!(yy_init))
Definition: macro.lex.yy.c:714
ENGAPI ULONG APIENTRY CLIPOBJ_cEnumStart(_Inout_ CLIPOBJ *pco, _In_ BOOL bAll, _In_ ULONG iType, _In_ ULONG iDirection, _In_ ULONG cLimit)
Definition: clip.c:255
_Inout_ PSIZE_T _In_opt_ PMDLX _In_ MM_ROTATE_DIRECTION Direction
Definition: mmfuncs.h:773
LONG x
Definition: windef.h:329
static BOOL FASTCALL VGADDI_IntersectRect(OUT RECTL *prcDst, IN RECTL *prcSrc1, IN RECTL *prcSrc2)
Definition: bitblt.c:25
#define CD_LEFTDOWN
Definition: winddi.h:1321
#define CD_LEFTUP
Definition: winddi.h:1325
#define WHITENESS
Definition: wingdi.h:336
#define PATCOPY
Definition: wingdi.h:334
#define ROP3_TO_ROP4(Rop3)
Definition: bitblt.h:26
RECTL arcl[ENUM_RECT_LIMIT]
Definition: vgaddi.h:79
#define DC_COMPLEX
Definition: winddi.h:261
#define BLACKNESS
Definition: wingdi.h:322
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
ENGAPI BOOL APIENTRY CLIPOBJ_bEnum(_In_ CLIPOBJ *pco, _In_ ULONG cj, _Out_bytecap_(cj) ULONG *pul)
Definition: clip.c:319
#define SRCCOPY
Definition: wingdi.h:332
#define CD_ANY
Definition: winddi.h:1326

◆ VGADDI_BltBrush()

BOOL APIENTRY VGADDI_BltBrush ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN SURFOBJ MaskSurf,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint,
IN POINTL MaskPoint,
IN BRUSHOBJ Brush,
IN POINTL BrushPoint,
IN ROP4  Rop4 
)

Definition at line 192 of file bitblt.c.

203 {
204  UCHAR SolidColor = 0;
205  LONG Left;
206  LONG Length;
207  PUCHAR Video;
208  UCHAR Mask;
209  INT i, j;
210  ULONG RasterOp = VGA_NORMAL;
211 
212  /* Punt brush blts to non-device surfaces. */
213  if (Dest->iType != STYPE_DEVICE)
214  return FALSE;
215 
216  /* Punt pattern fills. */
219  Brush->iSolidColor == 0xFFFFFFFF)
220  {
221  return FALSE;
222  }
223 
224  /* Get the brush colour. */
225  switch (GET_OPINDEX_FROM_ROP4(Rop4))
226  {
227  case GET_OPINDEX_FROM_ROP3(PATCOPY): SolidColor = Brush->iSolidColor; break;
228  case GET_OPINDEX_FROM_ROP3(PATINVERT): SolidColor = Brush->iSolidColor; RasterOp = VGA_XOR; break;
229  case GET_OPINDEX_FROM_ROP3(WHITENESS): SolidColor = 0xF; break;
230  case GET_OPINDEX_FROM_ROP3(BLACKNESS): SolidColor = 0x0; break;
231  case GET_OPINDEX_FROM_ROP3(DSTINVERT): SolidColor = 0xF; RasterOp = VGA_XOR; break;
232  }
233 
234  /* Select write mode 3. */
235  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
236  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x03);
237 
238  /* Setup set/reset register. */
239  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x00);
240  WRITE_PORT_UCHAR((PUCHAR)GRA_D, (UCHAR)SolidColor);
241 
242  /* Enable writes to all pixels. */
243  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x08);
244  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0xFF);
245 
246  /* Set up data rotate. */
247  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
248  WRITE_PORT_UCHAR((PUCHAR)GRA_D, RasterOp);
249 
250  /* Fill any pixels on the left which don't fall into a full row of eight. */
251  if ((DestRect->left % 8) != 0)
252  {
253  /* Disable writes to pixels outside of the destination rectangle. */
254  Mask = (1 << (8 - (DestRect->left % 8))) - 1;
255  if ((DestRect->right - DestRect->left) < (8 - (DestRect->left % 8)))
256  Mask &= ~((1 << (8 - (DestRect->right % 8))) - 1);
257 
258  /* Write the same color to each pixel. */
259  Video = (PUCHAR)vidmem + DestRect->top * 80 + (DestRect->left >> 3);
260  for (i = DestRect->top; i < DestRect->bottom; i++, Video += 80)
261  {
262  (VOID)READ_REGISTER_UCHAR(Video);
263  WRITE_REGISTER_UCHAR(Video, Mask);
264  }
265 
266  /* Have we finished. */
267  if ((DestRect->right - DestRect->left) < (8 - (DestRect->left % 8)))
268  {
269  /* Restore write mode 2. */
270  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
271  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
272 
273  /* Set up data rotate. */
274  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
275  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
276 
277  return TRUE;
278  }
279  }
280 
281  /* Fill any whole rows of eight pixels. */
282  Left = (DestRect->left + 7) & ~0x7;
283  Length = (DestRect->right >> 3) - (Left >> 3);
284  for (i = DestRect->top; i < DestRect->bottom; i++)
285  {
286  Video = (PUCHAR)vidmem + i * 80 + (Left >> 3);
287  for (j = 0; j < Length; j++, Video++)
288  {
289 #if 0
290  (VOID)READ_REGISTER_UCHAR(Video);
291  WRITE_REGISTER_UCHAR(Video, 0xFF);
292 #else
293  char volatile Temp = *Video;
294  Temp |= 0;
295  *Video = 0xFF;
296 #endif
297  }
298  }
299 
300  /* Fill any pixels on the right which don't fall into a complete row. */
301  if ((DestRect->right % 8) != 0)
302  {
303  /* Disable writes to pixels outside the destination rectangle. */
304  Mask = ~((1 << (8 - (DestRect->right % 8))) - 1);
305 
306  Video = (PUCHAR)vidmem + DestRect->top * 80 + (DestRect->right >> 3);
307  for (i = DestRect->top; i < DestRect->bottom; i++, Video += 80)
308  {
309  (VOID)READ_REGISTER_UCHAR(Video);
310  WRITE_REGISTER_UCHAR(Video, Mask);
311  }
312  }
313 
314  /* Restore write mode 2. */
315  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05);
316  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02);
317 
318  /* Set up data rotate. */
319  WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x03);
320  WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x00);
321 
322  return TRUE;
323 }
#define STYPE_DEVICE
Definition: lmshare.h:24
PBYTE vidmem
Definition: vgavideo.c:18
#define PATINVERT
Definition: wingdi.h:327
GLint x0
Definition: linetemp.h:95
#define TRUE
Definition: types.h:120
#define GET_OPINDEX_FROM_ROP3(Rop3)
Definition: bitblt.h:24
unsigned char * PUCHAR
Definition: retypes.h:3
#define GET_OPINDEX_FROM_ROP4(Rop4)
Definition: bitblt.h:25
#define GRA_I
Definition: vgavideo.h:59
int32_t INT
Definition: typedefs.h:58
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
GLint GLint bottom
Definition: glext.h:7726
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define DSTINVERT
Definition: wingdi.h:326
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define VGA_XOR
Definition: vgavideo.h:10
#define VGA_NORMAL
Definition: vgavideo.h:7
unsigned char UCHAR
Definition: xmlstorage.h:181
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:20
#define VOID
Definition: acefi.h:82
#define WHITENESS
Definition: wingdi.h:336
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
#define PATCOPY
Definition: wingdi.h:334
#define BLACKNESS
Definition: wingdi.h:322
#define GRA_D
Definition: vgavideo.h:60
unsigned int ULONG
Definition: retypes.h:1
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)

Referenced by DrvBitBlt().

◆ VGADDI_BltMask()

BOOL APIENTRY VGADDI_BltMask ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN SURFOBJ Mask,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint,
IN POINTL MaskPoint,
IN BRUSHOBJ Brush,
IN POINTL BrushPoint,
IN ROP4  Rop4 
)

Definition at line 364 of file bitblt.c.

375 {
376  LONG i, j, dx, dy, c8;
377  BYTE *tMask, *lMask;
378 
379  dx = DestRect->right - DestRect->left;
380  dy = DestRect->bottom - DestRect->top;
381 
382  if (ColorTranslation == NULL)
383  {
384  if (Mask != NULL)
385  {
386  tMask = Mask->pvScan0;
387  for (j = 0; j < dy; j++)
388  {
389  lMask = tMask;
390  c8 = 0;
391  for (i = 0; i < dx; i++)
392  {
393  if((*lMask & maskbit[c8]) != 0)
394  vgaPutPixel(DestRect->left + i, DestRect->top + j, Brush->iSolidColor);
395  c8++;
396  if(c8 == 8)
397  {
398  lMask++;
399  c8=0;
400  }
401  }
402  tMask += Mask->lDelta;
403  }
404  }
405  }
406  return TRUE;
407 }
#define TRUE
Definition: types.h:120
GLint dy
Definition: linetemp.h:97
VOID vgaPutPixel(INT x, INT y, UCHAR c)
Definition: vgavideo.c:163
int maskbit[640]
Definition: vgavideo.c:12
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
unsigned char BYTE
Definition: xxhash.c:193
GLint dx
Definition: linetemp.h:97

Referenced by DrvBitBlt().

◆ VGADDI_BltSrc()

BOOL APIENTRY VGADDI_BltSrc ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN SURFOBJ Mask,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint,
IN POINTL MaskOrigin,
IN BRUSHOBJ Brush,
IN POINTL BrushOrigin,
IN ROP4  Rop4 
)

Definition at line 326 of file bitblt.c.

337 {
338  PFN_VGABlt BltOperation;
339  ULONG SourceType;
340 
341  SourceType = Source->iType;
342 
343  if (SourceType == STYPE_BITMAP && Dest->iType == STYPE_DEVICE)
344  BltOperation = DIBtoVGA;
345  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_BITMAP)
346  BltOperation = VGAtoDIB;
347  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_DEVICE)
348  BltOperation = VGAtoVGA;
349  else if (SourceType == STYPE_DEVBITMAP && Dest->iType == STYPE_DEVICE)
350  BltOperation = DFBtoVGA;
351  else if (SourceType == STYPE_DEVICE && Dest->iType == STYPE_DEVBITMAP)
352  BltOperation = VGAtoDFB;
353  else
354  {
355  /* Punt blts not involving a device or a device-bitmap. */
356  return FALSE;
357  }
358 
359  BltOperation(Dest, Source, ColorTranslation, DestRect, SourcePoint);
360  return TRUE;
361 }
#define STYPE_DEVICE
Definition: lmshare.h:24
#define STYPE_DEVBITMAP
Definition: winddi.h:1177
#define STYPE_BITMAP
Definition: winddi.h:1175
#define TRUE
Definition: types.h:120
BOOL DFBtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:125
#define FALSE
Definition: types.h:117
BOOL VGAtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:149
BOOL DIBtoVGA(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:51
BOOL VGAtoDFB(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:137
BOOL(* PFN_VGABlt)(SURFOBJ *, SURFOBJ *, XLATEOBJ *, RECTL *, POINTL *)
Definition: bitblt.c:13
BOOL VGAtoDIB(IN SURFOBJ *Dest, IN SURFOBJ *Source, IN XLATEOBJ *ColorTranslation, IN RECTL *DestRect, IN POINTL *SourcePoint)
Definition: bitblt.c:80
unsigned int ULONG
Definition: retypes.h:1
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167

Referenced by DrvBitBlt().

◆ VGADDI_IntersectRect()

static BOOL FASTCALL VGADDI_IntersectRect ( OUT RECTL prcDst,
IN RECTL prcSrc1,
IN RECTL prcSrc2 
)
static

Definition at line 25 of file bitblt.c.

29 {
30  static const RECTL rclEmpty = { 0, 0, 0, 0 };
31 
32  prcDst->left = max(prcSrc1->left, prcSrc2->left);
33  prcDst->right = min(prcSrc1->right, prcSrc2->right);
34 
35  if (prcDst->left < prcDst->right)
36  {
37  prcDst->top = max(prcSrc1->top, prcSrc2->top);
38  prcDst->bottom = min(prcSrc1->bottom, prcSrc2->bottom);
39 
40  if (prcDst->top < prcDst->bottom) return(TRUE);
41  }
42 
43  *prcDst = rclEmpty;
44 
45  return FALSE;
46 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
long left
Definition: polytest.cpp:53
static const RECTL rclEmpty
Definition: vgavideo.c:331
#define min(a, b)
Definition: monoChain.cc:55

Referenced by DrvBitBlt().

◆ VGAtoDFB()

BOOL VGAtoDFB ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint 
)

Definition at line 137 of file bitblt.c.

143 {
144  /* Do DFBs need color translation?? */
145  return FALSE;
146 }
#define FALSE
Definition: types.h:117

Referenced by VGADDI_BltSrc().

◆ VGAtoDIB()

BOOL VGAtoDIB ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint 
)

Definition at line 80 of file bitblt.c.

86 {
87  LONG i, j, dx, dy;
88  UCHAR *GDIpos, *initial;
89 
90  /* Used by the temporary DFB */
91  //DEVSURF DestDevSurf;
92 
93  /* FIXME: Optimize to retrieve entire bytes at a time (see ../vgavideo/vgavideo.c:vgaGetByte) */
94 
95  GDIpos = Dest->pvScan0 /* + (DestRect->top * Dest->lDelta) + (DestRect->left >> 1) */ ;
96  dx = DestRect->right - DestRect->left;
97  dy = DestRect->bottom - DestRect->top;
98 
99  if (ColorTranslation == NULL)
100  {
101  /* Prepare a Dest Dev Target and copy from the DFB to the DIB */
102  //DestDevSurf.NextScan = Dest->lDelta;
103  //DestDevSurf.StartBmp = Dest->pvScan0;
104 
105  DIB_BltFromVGA(SourcePoint->x, SourcePoint->y, dx, dy, Dest->pvScan0, Dest->lDelta);
106  }
107  else
108  {
109  /* Color translation */
110  for (j = SourcePoint->y; j < SourcePoint->y + dy; j++)
111  {
112  initial = GDIpos;
113  for (i = SourcePoint->x; i < SourcePoint->x + dx; i++)
114  {
115  *GDIpos = XLATEOBJ_iXlate(ColorTranslation, vgaGetPixel(i, j));
116  GDIpos++;
117  }
118  GDIpos = initial + Dest->lDelta;
119  }
120  }
121  return FALSE;
122 }
GLint dy
Definition: linetemp.h:97
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
INT vgaGetPixel(IN INT x, IN INT y)
Definition: vgavideo.c:206
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta)
Definition: vgavideo.c:352
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
unsigned char UCHAR
Definition: xmlstorage.h:181
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
ENGAPI ULONG APIENTRY XLATEOBJ_iXlate(_In_ XLATEOBJ *pxlo, _In_ ULONG iColor)
Definition: xlateobj.c:664

Referenced by VGADDI_BltSrc().

◆ VGAtoVGA()

BOOL VGAtoVGA ( IN SURFOBJ Dest,
IN SURFOBJ Source,
IN XLATEOBJ ColorTranslation,
IN RECTL DestRect,
IN POINTL SourcePoint 
)

Definition at line 149 of file bitblt.c.

155 {
156  LONG i, i2, j, dx, dy, alterx, altery;
157  static char buf[SCREEN_X];
158 
159  /* Calculate deltas */
160  dx = DestRect->right - DestRect->left;
161  dy = DestRect->bottom - DestRect->top;
162 
163  alterx = DestRect->left - SourcePoint->x;
164  altery = DestRect->top - SourcePoint->y;
165 
166  i = SourcePoint->x;
167  i2 = i + alterx;
168 
169  if (SourcePoint->y >= DestRect->top)
170  {
171  for (j = SourcePoint->y; j < SourcePoint->y + dy; j++)
172  {
173  LONG j2 = j + altery;
174  vgaReadScan ( i, j, dx, buf );
175  vgaWriteScan ( i2, j2, dx, buf );
176  }
177  }
178  else
179  {
180  for(j = (SourcePoint->y + dy - 1); j >= SourcePoint->y; j--)
181  {
182  LONG j2 = j + altery;
183  vgaReadScan ( i, j, dx, buf );
184  vgaWriteScan ( i2, j2, dx, buf );
185  }
186  }
187 
188  return TRUE;
189 }
#define SCREEN_X
Definition: vgavideo.h:2
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define TRUE
Definition: types.h:120
GLint dy
Definition: linetemp.h:97
VOID FASTCALL vgaReadScan(int x, int y, int w, void *b)
Definition: vgavideo.c:579
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
VOID FASTCALL vgaWriteScan(int x, int y, int w, void *b)
Definition: vgavideo.c:655

Referenced by VGADDI_BltSrc().