aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2008-12-21 15:41:41 +0000
committerNicola Mettifogo2008-12-21 15:41:41 +0000
commit74b251d45d0ae9bafaa96f36e4e3dc2aebefa225 (patch)
tree838a967d8aea7c8f403cedc374ad497c852cedec /engines/parallaction
parent94b914b0cb3c1644f031212225e53ea7f5a8bb9b (diff)
downloadscummvm-rg350-74b251d45d0ae9bafaa96f36e4e3dc2aebefa225.tar.gz
scummvm-rg350-74b251d45d0ae9bafaa96f36e4e3dc2aebefa225.tar.bz2
scummvm-rg350-74b251d45d0ae9bafaa96f36e4e3dc2aebefa225.zip
Added a stub to dialogue parser, so that dialogue lines controlled by counters are displayed.
svn-id: r35465
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/parser_ns.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index f244ab2687..07e364fecc 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -862,12 +862,16 @@ Question *LocationParser_ns::parseQuestion() {
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,6 +900,14 @@ Answer *LocationParser_ns::parseAnswer() {
} while (!scumm_stricmp(_tokens[token++], "|"));
}
+}
+
+Answer *LocationParser_ns::parseAnswer() {
+
+ Answer *answer = new Answer;
+ assert(answer);
+
+ parseAnswerVariants(answer);
answer->_text = parseDialogueString();