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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sun Dec 21 16:41:41 CET 2008


Revision: 35465
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35465&view=rev
Author:   peres001
Date:     2008-12-21 15:41:41 +0000 (Sun, 21 Dec 2008)

Log Message:
-----------
Added a stub to dialogue parser, so that dialogue lines controlled by counters are displayed.

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

Modified: scummvm/trunk/engines/parallaction/parser_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parser_ns.cpp	2008-12-21 12:30:30 UTC (rev 35464)
+++ scummvm/trunk/engines/parallaction/parser_ns.cpp	2008-12-21 15:41:41 UTC (rev 35465)
@@ -862,12 +862,16 @@
 	return question;
 }
 
-Answer *LocationParser_ns::parseAnswer() {
+void LocationParser_ns::parseAnswerVariants(Answer *answer) {
+	if (!_tokens[1][0]) {
+		return;
+	}
 
-	Answer *answer = new Answer;
-	assert(answer);
+	if (!scumm_stricmp(_tokens[1], "counter")) {
+		// TODO: parse the counter and the condition. This is done creating a new
+		// Command and usng the command parser for CMD_TEST in the original.
 
-	if (_tokens[1][0]) {
+	} else {
 
 		Table* flagNames;
 		uint16 token;
@@ -896,7 +900,15 @@
 		} while (!scumm_stricmp(_tokens[token++], "|"));
 
 	}
+}
 
+Answer *LocationParser_ns::parseAnswer() {
+
+	Answer *answer = new Answer;
+	assert(answer);
+
+	parseAnswerVariants(answer);
+
 	answer->_text = parseDialogueString();
 
 	_script->readLineToken(true);


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