diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/action_node.cpp | 2 | ||||
-rw-r--r-- | engines/zvision/action_node.h | 8 | ||||
-rw-r--r-- | engines/zvision/actions.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/engines/zvision/action_node.cpp b/engines/zvision/action_node.cpp index f51801a75d..8e354606f8 100644 --- a/engines/zvision/action_node.cpp +++ b/engines/zvision/action_node.cpp @@ -29,7 +29,7 @@ namespace ZVision { TimerNode::TimerNode(ZVision *engine, uint32 key, uint timeInSeconds) - : _engine(engine), _key(key), _timeLeft(timeInSeconds * 1000) { + : Control(engine, key), _timeLeft(timeInSeconds * 1000) { } bool TimerNode::process(uint32 deltaTimeInMillis) { diff --git a/engines/zvision/action_node.h b/engines/zvision/action_node.h index 9df06c750f..b0b8cae4b1 100644 --- a/engines/zvision/action_node.h +++ b/engines/zvision/action_node.h @@ -25,14 +25,16 @@ #include "common/types.h" +#include "zvision/control.h" + namespace ZVision { class ZVision; - -class TimerNode : public ActionNode { +class TimerNode : public Control { public: TimerNode(ZVision *engine, uint32 key, uint timeInSeconds); + /** * Decrement the timer by the delta time. If the timer is finished, set the status * in _globalState and let this node be deleted @@ -43,8 +45,6 @@ public: bool process(uint32 deltaTimeInMillis); private: - ZVision *_engine; - uint32 _key; uint32 _timeLeft; }; diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index baa89aa165..d039f04d95 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -354,7 +354,7 @@ ActionTimer::ActionTimer(const Common::String &line) { } bool ActionTimer::execute(ZVision *engine) { - engine->getScriptManager()->addActionNode(new TimerNode(engine, _key, _time)); + engine->getScriptManager()->addControl(new TimerNode(engine, _key, _time)); return true; } |