overload showMouse to kill mouse shadows in kyra

svn-id: r43088
This commit is contained in:
Kostas Nakos 2009-08-06 18:05:50 +00:00
parent 8820b6166e
commit b395b1836a
2 changed files with 18 additions and 3 deletions

View File

@ -1934,8 +1934,7 @@ void OSystem_WINCE3::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
_mouseData = (byte *) malloc(w * h);
memcpy(_mouseData, buf, w * h);
if (w > _mouseBackupDim || h > _mouseBackupDim)
{
if (w > _mouseBackupDim || h > _mouseBackupDim) {
// mouse has been undrawn, adjust sprite backup area
free(_mouseBackupOld);
free(_mouseBackupToolbar);
@ -2050,7 +2049,6 @@ void OSystem_WINCE3::undrawMouse() {
if (_mouseNeedsRedraw)
return;
_mouseNeedsRedraw = true;
int old_mouse_x = _mouseCurState.x - _mouseHotspotX;
int old_mouse_y = _mouseCurState.y - _mouseHotspotY;
@ -2101,6 +2099,22 @@ void OSystem_WINCE3::undrawMouse() {
addDirtyRect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen);
_mouseNeedsRedraw = true;
}
bool OSystem_WINCE3::showMouse(bool visible) {
if (_mouseVisible == visible)
return visible;
if (visible == false)
undrawMouse();
bool last = _mouseVisible;
_mouseVisible = visible;
_mouseNeedsRedraw = true;
return last;
}
void OSystem_WINCE3::drawToolbarMouse(SDL_Surface *surf, bool draw) {

View File

@ -94,6 +94,7 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend
void undrawMouse();
void blitCursor();
bool showMouse(bool visible);
void setMousePos(int x, int y);
void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME)
void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);