diff options
author | Marisa-Chan | 2013-10-24 22:45:55 +0000 |
---|---|---|
committer | Marisa-Chan | 2013-10-24 22:45:55 +0000 |
commit | d8ad0e5235b036a69bdcae68ec99020de95c47bc (patch) | |
tree | 700f077e7298cb706195e3532fd07193f0bfdd2a /engines/zvision | |
parent | 803ff02136ddc102084094430aabc366192afe99 (diff) | |
download | scummvm-rg350-d8ad0e5235b036a69bdcae68ec99020de95c47bc.tar.gz scummvm-rg350-d8ad0e5235b036a69bdcae68ec99020de95c47bc.tar.bz2 scummvm-rg350-d8ad0e5235b036a69bdcae68ec99020de95c47bc.zip |
ZVISION: Added clean function for script scope and body for queue
routine.
Diffstat (limited to 'engines/zvision')
-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: |