aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/draw_v2.cpp
diff options
context:
space:
mode:
authorSven Hesse2007-02-07 13:08:17 +0000
committerSven Hesse2007-02-07 13:08:17 +0000
commit3442ea1582869c38c7f122a6586b27baac9bdebb (patch)
tree624cc167b3827b9980d5d81c68d682ac258ea99b /engines/gob/draw_v2.cpp
parentedefc7bde397b766c0bbe944e3ade6417f323e72 (diff)
downloadscummvm-rg350-3442ea1582869c38c7f122a6586b27baac9bdebb.tar.gz
scummvm-rg350-3442ea1582869c38c7f122a6586b27baac9bdebb.tar.bz2
scummvm-rg350-3442ea1582869c38c7f122a6586b27baac9bdebb.zip
- Fixed another freeze in Ween
- Changed cursor visibility handling a bit svn-id: r25407
Diffstat (limited to 'engines/gob/draw_v2.cpp')
-rw-r--r--engines/gob/draw_v2.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 77e95921b7..c703888e0d 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -818,8 +818,7 @@ void Draw_v2::blitCursor(void) {
if (_cursorIndex == -1)
return;
- if (_showCursor == 2)
- _showCursor = 0;
+ _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1);
}
void Draw_v2::animateCursor(int16 cursor) {
@@ -832,16 +831,7 @@ void Draw_v2::animateCursor(int16 cursor) {
int16 maxY;
int16 cursorIndex;
- _showCursor |= 2;
-
- /*
- if (((_backSurface->width - 9) < _vm->_global->_inter_mouseX) ||
- ((_backSurface->height - 4) < _vm->_global->_inter_mouseY)) {
- _vm->_global->_inter_mouseX = MIN((int) _vm->_global->_inter_mouseX, _backSurface->width - 9);
- _vm->_global->_inter_mouseY = MIN((int) _vm->_global->_inter_mouseY, _backSurface->height - 4);
- _vm->_util->setMousePos(_vm->_global->_inter_mouseX, _vm->_global->_inter_mouseY);
- }
- */
+ _showCursor |= 1;
// .-- _draw_animateCursorSUB1 ---
cursorIndex = cursor;
@@ -891,8 +881,6 @@ void Draw_v2::animateCursor(int16 cursor) {
} else {
if ((_noInvalidated != 0) && (_vm->_global->_inter_mouseX == _cursorX) &&
(_vm->_global->_inter_mouseY == _cursorY)) {
- if (!CursorMan.isVisible())
- _showCursor = 0;
_vm->_video->waitRetrace(_vm->_global->_videoMode);
return;
}
@@ -932,26 +920,23 @@ void Draw_v2::animateCursor(int16 cursor) {
CursorMan.replaceCursor(_scummvmCursor->vidPtr, _cursorWidth, _cursorHeight, 0, 0, 0);
if (_frontSurface != _backSurface) {
- _showCursor |= 1;
if (_noInvalidated == 0) {
- _showCursor = CursorMan.isVisible() ? 2 : 0;
int16 tmp = _cursorIndex;
_cursorIndex = -1;
blitInvalidated();
_cursorIndex = tmp;
} else {
+ _showCursor = 3;
_vm->_video->waitRetrace(_vm->_global->_videoMode);
if (minY < 50)
_vm->_util->delay(5);
- _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1);
}
- _showCursor &= ~1;
}
} else
blitCursor();
- if (CursorMan.isVisible())
- _showCursor = 2;
+ _showCursor &= ~1;
+
_cursorX = newX;
_cursorY = newY;
}