aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/scr_file_handling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/scr_file_handling.cpp')
-rw-r--r--engines/zvision/scr_file_handling.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp
index 061079cd85..efd122994d 100644
--- a/engines/zvision/scr_file_handling.cpp
+++ b/engines/zvision/scr_file_handling.cpp
@@ -33,7 +33,7 @@
namespace ZVision {
-void ScriptManager::parseScrFile(const Common::String &fileName) {
+void ScriptManager::parseScrFile(const Common::String &fileName, bool isGlobal) {
Common::File file;
if (!file.open(fileName))
return; // File.open already throws a warning if the file doesn't exist, so there is no need to throw another
@@ -54,7 +54,11 @@ void ScriptManager::parseScrFile(const Common::String &fileName) {
sscanf(line.c_str(),"puzzle:%u",&(puzzle.key));
parsePuzzle(puzzle, file);
- _activePuzzles.push_back(puzzle);
+ if (isGlobal) {
+ _globalPuzzles.push_back(puzzle);
+ } else {
+ _activePuzzles.push_back(puzzle);
+ }
} else if (line.matchString("control:*", true)) {
Common::SharedPtr<Control> control;