aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-26 22:22:50 -0400
committerPaul Gilbert2014-03-26 22:22:50 -0400
commitfc03e5a4fadaa30efa98902f6650eb3a98651abb (patch)
treec30efd8ac4e86f74e621816bb5de494feb84951f /engines
parenteeb4b940b7245aedb7056947b4f5c435a43fc136 (diff)
downloadscummvm-rg350-fc03e5a4fadaa30efa98902f6650eb3a98651abb.tar.gz
scummvm-rg350-fc03e5a4fadaa30efa98902f6650eb3a98651abb.tar.bz2
scummvm-rg350-fc03e5a4fadaa30efa98902f6650eb3a98651abb.zip
MADS: Fix for selecting actions from the list
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/action.cpp13
-rw-r--r--engines/mads/action.h1
-rw-r--r--engines/mads/events.cpp2
-rw-r--r--engines/mads/screen.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/engines/mads/action.cpp b/engines/mads/action.cpp
index ca29527748..07af95e341 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 802dfb0576..26ab062673 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 a4e1a96a5a..70ca166aab 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 a2cc75f381..c881e9560e 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;