aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-26 14:05:01 -0500
committerrichiesams2013-08-28 16:44:20 -0500
commit3263ab7390fe2197983f28012cfc7199cd3ec500 (patch)
tree8845683a3a7edbd777e90d59a4d7944668a894b7 /engines
parent93bc3570ea33e3f5d21d5b14fe081800f9c7e700 (diff)
downloadscummvm-rg350-3263ab7390fe2197983f28012cfc7199cd3ec500.tar.gz
scummvm-rg350-3263ab7390fe2197983f28012cfc7199cd3ec500.tar.bz2
scummvm-rg350-3263ab7390fe2197983f28012cfc7199cd3ec500.zip
ZVISION: Modify TimerNode to use Control base class
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/action_node.cpp2
-rw-r--r--engines/zvision/action_node.h8
-rw-r--r--engines/zvision/actions.cpp2
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;
}