diff options
author | Marisa-Chan | 2013-10-18 22:44:33 +0000 |
---|---|---|
committer | Marisa-Chan | 2013-10-18 22:44:33 +0000 |
commit | 4ac2c3e93bd78d4e151035fcde0dae9f17eeb11a (patch) | |
tree | a51de42fc5fe710ef4bb4427b572fc22f2998972 /engines | |
parent | 96ac92aae3bd3cb195abcc73f4df16864c0e3738 (diff) | |
download | scummvm-rg350-4ac2c3e93bd78d4e151035fcde0dae9f17eeb11a.tar.gz scummvm-rg350-4ac2c3e93bd78d4e151035fcde0dae9f17eeb11a.tar.bz2 scummvm-rg350-4ac2c3e93bd78d4e151035fcde0dae9f17eeb11a.zip |
ZVISION: Move TimerNode to SideFX-based class.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/actions.cpp | 2 | ||||
-rw-r--r-- | engines/zvision/sidefx.h | 3 | ||||
-rw-r--r-- | engines/zvision/timer_node.cpp | 5 | ||||
-rw-r--r-- | engines/zvision/timer_node.h | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index fbf2a58ad6..fb4034fbdb 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -387,7 +387,7 @@ ActionTimer::ActionTimer(const Common::String &line) { } bool ActionTimer::execute(ZVision *engine) { - engine->getScriptManager()->addControl(new TimerNode(engine, _key, _time)); + engine->getScriptManager()->addSideFX(new TimerNode(engine, _key, _time)); return true; } diff --git a/engines/zvision/sidefx.h b/engines/zvision/sidefx.h index 35d25d4431..d495655a22 100644 --- a/engines/zvision/sidefx.h +++ b/engines/zvision/sidefx.h @@ -37,7 +37,8 @@ class SideFX { public: enum SideFXType{ - SIDEFX_UNK = 0 + SIDEFX_UNK = 0, + SIDEFX_TIMER = 1 }; SideFX() : _engine(0), _key(0), _type(SIDEFX_UNK) {} diff --git a/engines/zvision/timer_node.cpp b/engines/zvision/timer_node.cpp index 55dfa51dfe..7fc3199a8a 100644 --- a/engines/zvision/timer_node.cpp +++ b/engines/zvision/timer_node.cpp @@ -32,8 +32,9 @@ namespace ZVision { -TimerNode::TimerNode(ZVision *engine, uint32 key, uint timeInSeconds) - : Control(engine, key), _timeLeft(timeInSeconds * 1000) { +TimerNode::TimerNode(ZVision *engine, uint32 key, uint timeInSeconds) + : SideFX(engine, key, SIDEFX_TIMER) { + _timeLeft = timeInSeconds * 1000; } bool TimerNode::process(uint32 deltaTimeInMillis) { diff --git a/engines/zvision/timer_node.h b/engines/zvision/timer_node.h index 32dca71548..afdbd39803 100644 --- a/engines/zvision/timer_node.h +++ b/engines/zvision/timer_node.h @@ -23,13 +23,13 @@ #ifndef ZVISION_TIMER_NODE_H #define ZVISION_TIMER_NODE_H -#include "zvision/control.h" +#include "zvision/sidefx.h" namespace ZVision { class ZVision; -class TimerNode : public Control { +class TimerNode : public SideFX { public: TimerNode(ZVision *engine, uint32 key, uint timeInSeconds); |