diff options
author | Ruediger Hanke | 2002-12-25 17:22:01 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-12-25 17:22:01 +0000 |
commit | 3dd648b8c8fb4557bfda332b4087fd61e4707b97 (patch) | |
tree | ac25bb716f699a43a7978bdac12603d01484edaa /backends | |
parent | eb4d0145ff78728fb1461f9a1fd41ddd7caa0628 (diff) | |
download | scummvm-rg350-3dd648b8c8fb4557bfda332b4087fd61e4707b97.tar.gz scummvm-rg350-3dd648b8c8fb4557bfda332b4087fd61e4707b97.tar.bz2 scummvm-rg350-3dd648b8c8fb4557bfda332b4087fd61e4707b97.zip |
Some fixes for COMI mouse pointer
svn-id: r6138
Diffstat (limited to 'backends')
-rw-r--r-- | backends/morphos/morphos.cpp | 19 | ||||
-rw-r--r-- | backends/morphos/morphos.h | 4 |
2 files changed, 14 insertions, 9 deletions
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp index a8ca0e9d12..2dbfca2f14 100644 --- a/backends/morphos/morphos.cpp +++ b/backends/morphos/morphos.cpp @@ -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) { diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h index 225ee6d6df..aa6184f16d 100644 --- a/backends/morphos/morphos.h +++ b/backends/morphos/morphos.h @@ -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); |