Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

void OSystem_Dreamcast::copyRectToScreen ( const byte *  buf,
int  pitch,
int  x,
int  y,
int  w,
int  h 
) [virtual]

Blit a bitmap to the virtual screen. The real screen will not immediately be updated to reflect the changes. Client code has to to call updateScreen to ensure any changes are visible to the user. This can be used to optimize drawing and reduce flicker. If the current pixel format has one byte per pixel, the graphics data uses 8 bits per pixel, using the palette specified via setPalette. If more than one byte per pixel is in use, the graphics data uses the pixel format returned by getScreenFormat.

Parameters:
bufthe buffer containing the graphics data source
pitchthe pitch of the buffer (number of bytes in a scanline)
xthe x coordinate of the destination rectangle
ythe y coordinate of the destination rectangle
wthe width of the destination rectangle
hthe height of the destination rectangle
Note:
The specified destination rectangle must be completly contained in the visible screen space, and must be non-empty. If not, a backend may or may not perform clipping, trigger an assert or silently corrupt memory.
See also:
updateScreen
getScreenFormat

Implements OSystem.

Definition at line 271 of file display.cpp.

{
  if (w<1 || h<1)
    return;
  if (_screenFormat != 0) {
    x<<=1; w<<=1;
  }
  unsigned char *dst = screen + y*SCREEN_W*2 + x;
  do {
    memcpy(dst, buf, w);
    dst += SCREEN_W*2;
    buf += pitch;
  } while (--h);
  _screen_dirty = true;
}

Generated by  Doxygen 1.6.0   Back to index