[Scummvm-cvs-logs] SF.net SVN: scummvm: [26247] scummvm/trunk/engines/parallaction/dialogue. cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Mar 19 23:24:41 CET 2007


Revision: 26247
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26247&view=rev
Author:   peres001
Date:     2007-03-19 15:24:40 -0700 (Mon, 19 Mar 2007)

Log Message:
-----------
refactoring of the main loop of runDialogue, now in a decent shape

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/dialogue.cpp

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2007-03-19 22:21:10 UTC (rev 26246)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2007-03-19 22:24:40 UTC (rev 26247)
@@ -383,7 +383,6 @@
 		v6E = _vm->_disk->loadTalk(data->_name);
 	}
 
-	bool displayedAnswers = false;
 	_askPassword = false;
 	uint16 answer = 0;
 	Command *v34 = NULL;
@@ -395,22 +394,18 @@
 		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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list