aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2011-01-28 14:19:39 +0000
committerNicola Mettifogo2011-01-28 14:19:39 +0000
commit7760628bdba085f57711b18c3fa9fdff6c12a38b (patch)
treea836fcbf761f8a1819b26bbac5a515c9bcae252d
parentdd7bc67f82179b40ad0118d3cb81a226e5e53a0a (diff)
downloadscummvm-rg350-7760628bdba085f57711b18c3fa9fdff6c12a38b.tar.gz
scummvm-rg350-7760628bdba085f57711b18c3fa9fdff6c12a38b.tar.bz2
scummvm-rg350-7760628bdba085f57711b18c3fa9fdff6c12a38b.zip
PARALLACTION: Flexible monologues in BRA (patch #3021740 by fuzzie)
Some dialogue answers are set to the literal 'null', which is used in NS to simulate a fixed monologue ('null' instructs the engine to jump to the first entry in the list of available questions, which is always made of a single item in this case). BRA has flexible monologues that depend on the game state, so this patch goes and checks all the available branches before picking the correct one. svn-id: r55591
-rw-r--r--engines/parallaction/dialogue.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 44087ab0b1..b471d29c82 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -252,8 +252,13 @@ void DialogueManager::nextAnswer() {
}
if (!_q->_answers[0]->_text.compareToIgnoreCase("NULL")) {
- _answerId = 0;
- _state = NEXT_QUESTION;
+ addVisibleAnswers(_q);
+ if (_numVisAnswers) {
+ _answerId = _visAnswers[0]._index;
+ _state = NEXT_QUESTION;
+ } else {
+ _state = DIALOGUE_OVER;
+ }
return;
}