mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
MADS: Fix for selecting actions from the list
This commit is contained in:
parent
eeb4b940b7
commit
fc03e5a4fa
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ private:
|
||||
void checkCustomDest(int v);
|
||||
public:
|
||||
ActionDetails _action, _activeAction;
|
||||
int _currentAction;
|
||||
int8 _flags1, _flags2;
|
||||
ActionMode _actionMode;
|
||||
ActionMode2 _actionMode2;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user