diff options
author | Sven Hesse | 2007-03-05 11:26:50 +0000 |
---|---|---|
committer | Sven Hesse | 2007-03-05 11:26:50 +0000 |
commit | 190e32725217b5328d154398fc1a9329a41a48a6 (patch) | |
tree | cd5f64d47c5b0b5e5c193454ebfe61df64004d7a /engines/gob | |
parent | 2560c5d76b6637f02c6a80674118194260c37629 (diff) | |
download | scummvm-rg350-190e32725217b5328d154398fc1a9329a41a48a6.tar.gz scummvm-rg350-190e32725217b5328d154398fc1a9329a41a48a6.tar.bz2 scummvm-rg350-190e32725217b5328d154398fc1a9329a41a48a6.zip |
Fixed the cursor hotspots
svn-id: r25990
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/draw_v2.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 4a764fd257..500dcb586c 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -835,6 +835,8 @@ void Draw_v2::animateCursor(int16 cursor) { int16 maxX; int16 maxY; int16 cursorIndex; + uint16 hotspotX = 0; + uint16 hotspotY = 0; _showCursor |= 1; @@ -910,8 +912,8 @@ void Draw_v2::animateCursor(int16 cursor) { newX = _vm->_global->_inter_mouseX; newY = _vm->_global->_inter_mouseY; if (_cursorXDeltaVar != -1) { - newX -= (uint16)VAR(_cursorIndex + _cursorXDeltaVar); - newY -= (uint16)VAR(_cursorIndex + _cursorYDeltaVar); + newX -= hotspotX = (uint16) VAR(_cursorIndex + _cursorXDeltaVar); + newY -= hotspotY = (uint16) VAR(_cursorIndex + _cursorYDeltaVar); } minX = MIN(newX, _cursorX); @@ -922,7 +924,8 @@ void Draw_v2::animateCursor(int16 cursor) { _vm->_video->clearSurf(_scummvmCursor); _vm->_video->drawSprite(_cursorSprites, _scummvmCursor, cursorIndex * _cursorWidth, 0, (cursorIndex * _cursorWidth) + _cursorWidth - 1, _cursorHeight - 1, 0, 0, 0); - CursorMan.replaceCursor(_scummvmCursor->vidPtr, _cursorWidth, _cursorHeight, 0, 0, 0); + CursorMan.replaceCursor(_scummvmCursor->vidPtr, _cursorWidth, _cursorHeight, + hotspotX, hotspotY, 0); if (_frontSurface != _backSurface) { if (_noInvalidated == 0) { |