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) {
|
uint ScriptManager::getStateValue(uint32 key) {
|
||||||
if (_globalState.contains(key))
|
if (_globalState.contains(key))
|
||||||
return _globalState[key];
|
return _globalState[key];
|
||||||
|
@ -223,6 +241,9 @@ uint ScriptManager::getStateValue(uint32 key) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptManager::queuePuzzles(uint32 key) {
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptManager::setStateValue(uint32 key, uint value) {
|
void ScriptManager::setStateValue(uint32 key, uint value) {
|
||||||
_globalState[key] = value;
|
_globalState[key] = value;
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,7 @@ private:
|
||||||
public:
|
public:
|
||||||
void initialize();
|
void initialize();
|
||||||
void update(uint deltaTimeMillis);
|
void update(uint deltaTimeMillis);
|
||||||
|
void queuePuzzles(uint32 key);
|
||||||
|
|
||||||
uint getStateValue(uint32 key);
|
uint getStateValue(uint32 key);
|
||||||
void setStateValue(uint32 key, uint value);
|
void setStateValue(uint32 key, uint value);
|
||||||
|
@ -228,6 +229,7 @@ private:
|
||||||
void updateNodes(uint deltaTimeMillis);
|
void updateNodes(uint deltaTimeMillis);
|
||||||
void checkPuzzleCriteria();
|
void checkPuzzleCriteria();
|
||||||
void cleanStateTable();
|
void cleanStateTable();
|
||||||
|
void cleanScriptScope(script_scope &scope);
|
||||||
|
|
||||||
// TODO: Make this private. It was only made public so Console::cmdParseAllScrFiles() could use it
|
// TODO: Make this private. It was only made public so Console::cmdParseAllScrFiles() could use it
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue