diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp index ca29527748a..07af95e341a 100644 --- a/engines/mads/action.cpp +++ b/engines/mads/action.cpp @@ -31,7 +31,6 @@ namespace MADS { MADSAction::MADSAction(MADSEngine *vm) : _vm(vm) { clear(); - _currentAction = VERB_NONE; _startWalkFlag = false; _statusTextIndex = -1; _selectedAction = 0; @@ -124,18 +123,18 @@ void MADSAction::set() { if (_selectedRow >= 0) { if (_actionMode == ACTIONMODE_VERB) { // Standard verb action - _currentAction = scene._verbList[_selectedRow]._id; + _action._verbId = scene._verbList[_selectedRow]._id; } else { // Selected action on an inventory object int invIndex = userInterface._selectedInvIndex; InventoryObject &objEntry = _vm->_game->_objects.getItem(invIndex); - _currentAction = objEntry._vocabList[_selectedRow]._vocabId; + _action._verbId = objEntry._vocabList[_selectedRow]._vocabId; } appendVocab(_action._verbId, true); - if (_currentAction == VERB_LOOK) { + if (_action._verbId == VERB_LOOK) { // Add in the word 'add' _statusText += kAtStr; _statusText += " "; @@ -164,11 +163,11 @@ void MADSAction::set() { if (verbId > 0) { // Set the specified action - _currentAction = verbId; - appendVocab(_currentAction, true); + _action._verbId = verbId; + appendVocab(_action._verbId, true); } else { // Default to a standard 'walk to' - _currentAction = VERB_WALKTO; + _action._verbId = VERB_WALKTO; _statusText += kWalkToStr; } } diff --git a/engines/mads/action.h b/engines/mads/action.h index 802dfb05763..26ab0626733 100644 --- a/engines/mads/action.h +++ b/engines/mads/action.h @@ -78,7 +78,6 @@ private: void checkCustomDest(int v); public: ActionDetails _action, _activeAction; - int _currentAction; int8 _flags1, _flags2; ActionMode _actionMode; ActionMode2 _actionMode2; diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp index a4e1a96a5af..70ca166aabf 100644 --- a/engines/mads/events.cpp +++ b/engines/mads/events.cpp @@ -128,6 +128,7 @@ void EventsManager::pollEvents() { case Common::EVENT_RBUTTONDOWN: _mouseClicked = true; _mouseButtons = 1; + _mouseMoved = true; return; case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: @@ -190,6 +191,7 @@ void EventsManager::initVars() { void EventsManager::resetMouseFlags() { _mouseClicked = false; _mouseReleased = false; + _mouseButtons = 0; } } // End of namespace MADS diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index a2cc75f381f..c881e9560e6 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -300,7 +300,7 @@ void ScreenObjects::check(bool scanFlag) { // Handling for easy mouse ScrCategory category = scene._userInterface._category; - if (_vm->_easyMouse && !_vm->_events->_vD4 && category != _category + if (_vm->_easyMouse && _vm->_events->_mouseButtons && category != _category && scene._userInterface._category != CAT_NONE) { _released = true; if (category >= CAT_ACTION && category <= CAT_TALK_ENTRY) { @@ -310,7 +310,7 @@ void ScreenObjects::check(bool scanFlag) { scene._action.checkActionAtMousePos(); } - _released = _vm->_events->_mouseReleased; + //_released = _vm->_events->_mouseReleased; if (_vm->_events->_vD2 || (_vm->_easyMouse && !_vm->_events->_vD4)) scene._userInterface._category = _category;