diff options
-rw-r--r-- | engines/zvision/script_manager.cpp | 21 | ||||
-rw-r--r-- | engines/zvision/script_manager.h | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index 72e67bfa7f..515fd7a450 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -216,6 +216,24 @@ void ScriptManager::cleanStateTable() { } } +void ScriptManager::cleanScriptScope(script_scope &scope) { + scope._priv_queue_one.clear(); + scope._priv_queue_two.clear(); + scope.scope_queue = &scope._priv_queue_one; + scope.exec_queue = &scope._priv_queue_two; + for (PuzzleList::iterator iter = scope._puzzles.begin(); iter != scope._puzzles.end(); ++iter) + delete(*iter); + + scope._puzzles.clear(); + + for (ControlList::iterator iter = scope._controls.begin(); iter != scope._controls.end(); ++iter) + delete(*iter); + + scope._controls.clear(); + + scope.proc_count = 0; +} + uint ScriptManager::getStateValue(uint32 key) { if (_globalState.contains(key)) return _globalState[key]; @@ -223,6 +241,9 @@ uint ScriptManager::getStateValue(uint32 key) { return 0; } +void ScriptManager::queuePuzzles(uint32 key) { +} + void ScriptManager::setStateValue(uint32 key, uint value) { _globalState[key] = value; diff --git a/engines/zvision/script_manager.h b/engines/zvision/script_manager.h index 6dd2190cf1..a5324533c0 100644 --- a/engines/zvision/script_manager.h +++ b/engines/zvision/script_manager.h @@ -163,6 +163,7 @@ private: public: void initialize(); void update(uint deltaTimeMillis); + void queuePuzzles(uint32 key); uint getStateValue(uint32 key); void setStateValue(uint32 key, uint value); @@ -228,6 +229,7 @@ private: void updateNodes(uint deltaTimeMillis); void checkPuzzleCriteria(); void cleanStateTable(); + void cleanScriptScope(script_scope &scope); // TODO: Make this private. It was only made public so Console::cmdParseAllScrFiles() could use it public: |