diff options
author | Johannes Schickel | 2009-05-22 22:28:06 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-22 22:28:06 +0000 |
commit | 54a170978ad481a142829997f0d27076033b3a5b (patch) | |
tree | f2a02b2148c5a948762f944c11b4acd298be928e /engines/kyra | |
parent | ef4947060ef637d6b7e84c6c1b2981e69db8af91 (diff) | |
download | scummvm-rg350-54a170978ad481a142829997f0d27076033b3a5b.tar.gz scummvm-rg350-54a170978ad481a142829997f0d27076033b3a5b.tar.bz2 scummvm-rg350-54a170978ad481a142829997f0d27076033b3a5b.zip |
Handle mouse move events like the original.
svn-id: r40791
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/lol.cpp | 21 | ||||
-rw-r--r-- | engines/kyra/lol.h | 2 |
3 files changed, 1 insertions, 30 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 6106efdf9c..7e98c1be80 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -324,12 +324,6 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop) { } break; - case Common::EVENT_MOUSEMOVE: { - Common::Point pos = getMousePos(); - _mouseX = pos.x; - _mouseY = pos.y; - } break; - case Common::EVENT_LBUTTONDOWN: case Common::EVENT_LBUTTONUP: { Common::Point pos = getMousePos(); @@ -407,7 +401,7 @@ void KyraEngine_v1::updateInput() { case Common::EVENT_MOUSEMOVE: if (screen()->isMouseVisible()) updateScreen = true; - // fall through + break; case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 5584fc8ddf..9125038bf1 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -640,27 +640,6 @@ void LoLEngine::loadItemIconShapes() { _screen->setMouseCursor(0, 0, _itemIconShapes[0]); } -int LoLEngine::checkInput(Button *buttonList, bool mainLoop) { - int mx = _mouseX; - int my = _mouseY; - - int inputFlag = KyraEngine_v1::checkInput(buttonList, mainLoop); - - if (!inputFlag) { - // This fixes a bug with some interactive sequences (like the inn where you mee Timothy). - // In the original code Mouse position variables are only updated when mouse button - // or keyboard events get triggered. - - // TODO/FIXME: Check whether this is the correct way to do it in KYRA, too. In this case a - // fix could be added to KyraEngine_v1::checkInput() and the virtual stuff would not be - // necessary. - _mouseX = mx; - _mouseY = my; - } - - return inputFlag; -} - void LoLEngine::setMouseCursorToIcon(int icon) { _gameFlags[15] |= 0x200; int i = _itemProperties[_itemsInPlay[_itemInHand].itemPropertyIndex].shpIndex; diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index e4504428d3..e5d513d75f 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -306,8 +306,6 @@ private: void updateEnvironmentalSfx(int soundId); // mouse - int checkInput(Button *buttonList, bool mainLoop = false); - void setMouseCursorToIcon(int icon); void setMouseCursorToItemInHand(); uint8 *getItemIconShapePtr(int index); |