ZVISION: Added clean function for script scope and body for queue
routine.
This commit is contained in:
parent
803ff02136
commit
d8ad0e5235
2 changed files with 23 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue