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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Apr 9 09:50:52 CEST 2007


Revision: 26422
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26422&view=rev
Author:   peres001
Date:     2007-04-09 00:50:52 -0700 (Mon, 09 Apr 2007)

Log Message:
-----------
Fixed regression bug in dialogue code.

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

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2007-04-08 23:26:49 UTC (rev 26421)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2007-04-09 07:50:52 UTC (rev 26422)
@@ -354,25 +354,26 @@
 	Cnv *face = isNpc ? _disk->loadTalk(data->_name) : _char._talk;
 
 	_askPassword = false;
-	uint16 answer = 0;
 	CommandList *cmdlist = NULL;
 
+	uint16 answer;
 	Dialogue *q = data->_dialogue;
 	while (q) {
 
+		answer = 0;
+
 		displayQuestion(q, face);
 		if (q->_answers[0] == NULL) break;
 
 		_answerBalloonY[0] = 10;
 
 		if (scumm_stricmp(q->_answers[0]->_text, "NULL")) {
-
 			if (!displayAnswers(q)) break;
 			answer = getDialogueAnswer(q, _char._talk);
 			cmdlist = &q->_answers[answer]->_commands;
 		}
 
-		q = (Dialogue*)q->_answers[answer]->_following._question;
+		q = q->_answers[answer]->_following._question;
 	}
 
 	debugC(1, kDebugDialogue, "runDialogue: out of dialogue loop");


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