From 2f6f857eaf25dd78ac860d9c490041f4968884c2 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 7 Apr 2007 15:47:42 +0000 Subject: Fixed incomplete implementation of Command lists. svn-id: r26408 --- engines/parallaction/commands.cpp | 5 +---- engines/parallaction/dialogue.cpp | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'engines/parallaction') 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; -- cgit v1.2.3