From 7760628bdba085f57711b18c3fa9fdff6c12a38b Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Fri, 28 Jan 2011 14:19:39 +0000 Subject: 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 --- engines/parallaction/dialogue.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') 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; } -- cgit v1.2.3