diff options
Diffstat (limited to 'engines/zvision/actions.cpp')
-rw-r--r-- | engines/zvision/actions.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index 99fa6a646d..f60a69744a 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -33,6 +33,7 @@ #include "zvision/music_node.h" #include "zvision/syncsound_node.h" #include "zvision/animation_node.h" +#include "zvision/ttytext_node.h" #include "common/file.h" @@ -653,4 +654,28 @@ bool ActionTimer::execute() { return true; } +////////////////////////////////////////////////////////////////////////////// +// ActionTtyText +////////////////////////////////////////////////////////////////////////////// + +ActionTtyText::ActionTtyText(ZVision *engine, int32 slotkey, const Common::String &line) : + ResultAction(engine, slotkey) { + char filename[64]; + int32 x1, y1, x2, y2; + sscanf(line.c_str(), "%d %d %d %d %s %u", &x1, &y1, &x2, &y2, filename, &_delay); + _r = Common::Rect(x1, y1, x2, y2); + _filename = Common::String(filename); +} + +ActionTtyText::~ActionTtyText() { + _engine->getScriptManager()->killSideFx(_slotkey); +} + +bool ActionTtyText::execute() { + if (_engine->getScriptManager()->getSideFX(_slotkey)) + return true; + _engine->getScriptManager()->addSideFX(new ttyTextNode(_engine, _slotkey, _filename, _r, _delay)); + return true; +} + } // End of namespace ZVision |