aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2007-04-07 15:47:42 +0000
committerNicola Mettifogo2007-04-07 15:47:42 +0000
commit2f6f857eaf25dd78ac860d9c490041f4968884c2 (patch)
tree68858547b50486649c5b2fcd5b7e2dd17438740d
parent162247ad3e765e8bc193f9d7b94d00cb844b5f2e (diff)
downloadscummvm-rg350-2f6f857eaf25dd78ac860d9c490041f4968884c2.tar.gz
scummvm-rg350-2f6f857eaf25dd78ac860d9c490041f4968884c2.tar.bz2
scummvm-rg350-2f6f857eaf25dd78ac860d9c490041f4968884c2.zip
Fixed incomplete implementation of Command lists.
svn-id: r26408
-rw-r--r--engines/parallaction/commands.cpp5
-rw-r--r--engines/parallaction/dialogue.cpp3
2 files changed, 3 insertions, 5 deletions
diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp
index af42318d19..a9918133b5 100644
--- a/engines/parallaction/commands.cpp
+++ b/engines/parallaction/commands.cpp
@@ -49,9 +49,6 @@ namespace Parallaction {
void Parallaction::parseCommands(Script &script, CommandList& list) {
// printf("parseCommands()");
- Node root;
- memset(&root, 0, sizeof(root));
-
fillBuffers(script, true);
while (scumm_stricmp(_tokens[0], "ENDCOMMANDS") && scumm_stricmp(_tokens[0], "ENDZONE")) {
@@ -184,7 +181,7 @@ void Parallaction::parseCommands(Script &script, CommandList& list) {
}
- addNode(&root, cmd);
+ list.push_front(cmd); // NOTE: command lists are written backwards in scripts
fillBuffers(script, true);
}
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index b7d6d0cf35..bc1ab90b23 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -384,7 +384,8 @@ void Parallaction::runDialogue(SpeakData *data) {
}
exitDialogue();
- runCommands(*cmdlist);
+ if (cmdlist)
+ runCommands(*cmdlist);
return;