aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2009-10-14 06:12:16 +0000
committerNicola Mettifogo2009-10-14 06:12:16 +0000
commit8c17b257eab6c7b84e0a779ae1a1cb068cc44cce (patch)
tree6e39888b456d4b90df8a058fc6c01cc1184af440 /engines/parallaction
parent724e7a873ae3342fab34f247b7a4647736491563 (diff)
downloadscummvm-rg350-8c17b257eab6c7b84e0a779ae1a1cb068cc44cce.tar.gz
scummvm-rg350-8c17b257eab6c7b84e0a779ae1a1cb068cc44cce.tar.bz2
scummvm-rg350-8c17b257eab6c7b84e0a779ae1a1cb068cc44cce.zip
Fixed regression bug #2874229. Regression had happened in r39878, when the dialogue code was refactored.
svn-id: r45053
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/dialogue.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index f63cec3c22..20a33a59c4 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -93,6 +93,7 @@ protected:
BalloonPositions _ballonPos;
struct VisibleAnswer {
Answer *_a;
+ int _index; // index into Question::_answers[]
int _balloon;
} _visAnswers[5];
int _numVisAnswers;
@@ -197,11 +198,11 @@ bool DialogueManager::displayAnswers() {
int16 DialogueManager::selectAnswer1() {
if (!_visAnswers[0]._a->_text.compareToIgnoreCase("null")) {
- return 0;
+ return _visAnswers[0]._index;
}
if (_mouseButtons == kMouseLeftUp) {
- return 0;
+ return _visAnswers[0]._index;
}
return -1;
@@ -225,7 +226,7 @@ int16 DialogueManager::selectAnswerN() {
_oldSelection = _selection;
if ((_mouseButtons == kMouseLeftUp) && (_selection != -1)) {
- return _selection;
+ return _visAnswers[_selection]._index;
}
return -1;
@@ -273,7 +274,6 @@ void DialogueManager::runAnswer() {
debugC(9, kDebugDialogue, "runAnswer\n");
_answerId = selectAnswer();
-
if (_answerId != -1) {
_cmdList = &_q->_answers[_answerId]->_commands;
_vm->_gfx->freeDialogueObjects();
@@ -400,6 +400,7 @@ public:
}
_visAnswers[_numVisAnswers]._a = a;
+ _visAnswers[_numVisAnswers]._index = i;
_numVisAnswers++;
}