Some fixes for COMI mouse pointer

svn-id: r6138
This commit is contained in:
Ruediger Hanke 2002-12-25 17:22:01 +00:00
parent eb4d0145ff
commit 3dd648b8c8
2 changed files with 14 additions and 9 deletions

View File

@ -1180,12 +1180,16 @@ void OSystem_MorphOS::DrawMouse()
return;
MouseDrawn = true;
const int ydraw = MouseY - MouseHotspotY;
const int xdraw = MouseX - MouseHotspotX;
const int w = MouseWidth;
const int h = MouseHeight;
bak = MouseBackup;
byte *buf = MouseImage;
int ydraw = MouseY - MouseHotspotY;
int xdraw = MouseX - MouseHotspotX;
int w = MouseWidth;
int h = MouseHeight;
int x_mouseimg_offs = 0;
int y_mouseimg_offs = 0;
byte *buf;
if (xdraw < 0) { x_mouseimg_offs = -xdraw; w += xdraw; xdraw = 0; }
if (ydraw < 0) { y_mouseimg_offs = -ydraw; h += ydraw; ydraw = 0; }
MouseOldX = xdraw;
MouseOldY = ydraw;
@ -1195,8 +1199,9 @@ void OSystem_MorphOS::DrawMouse()
AddUpdateRect(xdraw, ydraw, w, h);
dst = (byte*)ScummBuffer + ydraw*ScummBufferWidth + xdraw;
bak = MouseBackup;
buf = MouseImage + y_mouseimg_offs*MAX_MOUSE_W + x_mouseimg_offs;
for (y = 0; y < h; y++, dst += ScummBufferWidth, bak += MAX_MOUSE_W, buf += w)
for (y = 0; y < h; y++, dst += ScummBufferWidth, bak += MAX_MOUSE_W, buf += MouseWidth)
{
if (ydraw+y < ScummBufferHeight)
{

View File

@ -123,8 +123,8 @@ class OSystem_MorphOS : public OSystem
private:
typedef enum { CSDSPTYPE_WINDOWED, CSDSPTYPE_FULLSCREEN, CSDSPTYPE_TOGGLE, CSDSPTYPE_KEEP } CS_DSPTYPE;
static const int MAX_MOUSE_W = 40;
static const int MAX_MOUSE_H = 40;
static const int MAX_MOUSE_W = 80;
static const int MAX_MOUSE_H = 80;
void CreateScreen(CS_DSPTYPE dspType);
void SwitchScalerTo(SCALERTYPE newScaler);