aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/script_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/script_manager.cpp')
-rw-r--r--engines/zvision/script_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index c217cb8612..9a4e9d13be 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -108,9 +108,10 @@ void ScriptManager::createReferenceTable() {
void ScriptManager::updateNodes(uint deltaTimeMillis) {
// If process() returns true, it means the node can be deleted
- for (Common::List<Common::SharedPtr<ActionNode> >::iterator iter = _activeNodes.begin(); iter != _activeNodes.end();) {
- if ((*iter)->process(_engine, deltaTimeMillis)) {
- // Remove the node from _activeNodes, the SharedPtr destructor will delete the actual ActionNode
+ for (Common::List<ActionNode *>::iterator iter = _activeNodes.begin(); iter != _activeNodes.end();) {
+ if ((*iter)->process(deltaTimeMillis)) {
+ // Delete the node then remove the pointer
+ delete (*iter);
iter = _activeNodes.erase(iter);
} else {
iter++;
@@ -223,11 +224,11 @@ bool ScriptManager::disableControl(uint32 key) {
if (!_activeControls.contains(key)) {
return false;
} else {
- return _activeControls[key]->disable(_engine);
+ return _activeControls[key]->disable();
}
}
-void ScriptManager::addActionNode(const Common::SharedPtr<ActionNode> &node) {
+void ScriptManager::addActionNode(ActionNode *node) {
_activeNodes.push_back(node);
}