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

void OSystem_Dreamcast::setMouseCursor ( const byte *  buf,
uint  w,
uint  h,
int  hotspotX,
int  hotspotY,
uint32  keycolor,
int  cursorTargetScale,
const Graphics::PixelFormat format 
) [virtual]

Set the bitmap used for drawing the cursor.

Parameters:
bufthe pixmap data to be used
wwidth of the mouse cursor
hheight of the mouse cursor
hotspotXhorizontal offset from the left side to the hotspot
hotspotYvertical offset from the top side to the hotspot
keycolortransparency color value. This should not exceed the maximum color value of the specified format. In case it does the behavior is undefined. The backend might just error out or simply ignore the value. (The SDL backend will just assert to prevent abuse of this).
cursorTargetScalescale factor which cursor is designed for
formatpointer to the pixel format which cursor graphic uses (0 means CLUT8)

Implements OSystem.

Definition at line 302 of file display.cpp.

{
  _ms_cur_w = w;
  _ms_cur_h = h;

  _ms_hotspot_x = hotspot_x;
  _ms_hotspot_y = hotspot_y;

  _ms_keycolor = keycolor;

  int i = 0;
  if (format != NULL)
    for (i=NUM_FORMATS-1; i>0; --i)
      if (*format == screenFormats[i])
      break;
  _mouseFormat = i;

  free(_ms_buf);

  if (_mouseFormat != 0)
    w <<= 1;

  _ms_buf = (byte *)malloc(w * h);
  memcpy(_ms_buf, buf, w * h);
}

Generated by  Doxygen 1.6.0   Back to index