From 7d7cee6649a3e69a1e27347bb55568416c9f479e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 17 Apr 2007 09:40:10 +0000 Subject: [PATCH] Fix scroll handler svn-id: r26541 --- engines/gob/game.cpp | 3 ++- engines/gob/game.h | 1 + engines/gob/game_v2.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index b22721a024b..515d99c66ad 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -78,6 +78,7 @@ Game::Game(GobEngine *vm) : _vm(vm) { _forceHandleMouse = 0; _menuLevel = 0; _noScroll = true; + _scrollHandleMouse = false; _tempStr[0] = 0; _curImaFile[0] = 0; @@ -290,7 +291,7 @@ void Game::freeSoundSlot(int16 slot) { } void Game::evaluateScroll(int16 x, int16 y) { - if ((_handleMouse == 0) || (_menuLevel > 0)) + if (!_scrollHandleMouse || (_menuLevel > 0)) return; if (_noScroll || (_vm->_global->_videoMode != 0x14)) diff --git a/engines/gob/game.h b/engines/gob/game.h index ca9162d3e79..244cc1b6e98 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -129,6 +129,7 @@ public: int16 _mouseButtons; bool _noScroll; + bool _scrollHandleMouse; Game(GobEngine *vm); virtual ~Game(); diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index 3113d81349e..126693fc480 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -407,7 +407,7 @@ int16 Game_v2::checkCollisions(byte handleMouse, int16 deltaTime, int16 *pResId, int16 newkey; uint32 timeKey; - _handleMouse = handleMouse; + _scrollHandleMouse = handleMouse != 0; if (deltaTime >= -1) { _lastCollKey = 0;