diff options
author | Nicola Mettifogo | 2007-03-19 22:24:40 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-19 22:24:40 +0000 |
commit | 33f827c83e0b047b4dcbffc9355fc6bc5fc02038 (patch) | |
tree | 9a83a2bccc5c15d1f64fe9d656435e1de029c73e /engines/parallaction | |
parent | 8f69bae8eca8da9c6473c832386527051113c364 (diff) | |
download | scummvm-rg350-33f827c83e0b047b4dcbffc9355fc6bc5fc02038.tar.gz scummvm-rg350-33f827c83e0b047b4dcbffc9355fc6bc5fc02038.tar.bz2 scummvm-rg350-33f827c83e0b047b4dcbffc9355fc6bc5fc02038.zip |
refactoring of the main loop of runDialogue, now in a decent shape
svn-id: r26247
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/dialogue.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 596be3b262..aef8dec71d 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -383,7 +383,6 @@ void runDialogue(SpeakData *data) { v6E = _vm->_disk->loadTalk(data->_name); } - bool displayedAnswers = false; _askPassword = false; uint16 answer = 0; Command *v34 = NULL; @@ -395,22 +394,18 @@ void runDialogue(SpeakData *data) { if (q->_answers[0] == NULL) break; _answerBalloonY[0] = 10; - displayedAnswers = false; if (scumm_stricmp(q->_answers[0], "NULL")) { - displayedAnswers = displayAnswers(q); - if (displayedAnswers == true) { - answer = getDialogueAnswer(q, _vm->_char._talk); - v34 = q->_commands[answer]; - q = (Dialogue*)q->_following._questions[answer]; - } else { - q = NULL; - } - } else { - q = (Dialogue*)q->_following._questions[answer]; + if (!displayAnswers(q)) break; + + answer = getDialogueAnswer(q, _vm->_char._talk); + v34 = q->_commands[answer]; } + + q = (Dialogue*)q->_following._questions[answer]; } + debugC(1, kDebugDialogue, "runDialogue: out of dialogue loop"); _vm->_gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront); |