aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMarisa-Chan2013-11-01 16:55:19 +0700
committerMarisa-Chan2013-11-01 16:55:19 +0700
commitbe93d7d67dcea18532917a6c1bd6004665973f4f (patch)
treef37bdd49994c7b895d2e26f0c7563df80e801a7e /engines
parente1df572ab848f64826fc5cb4a0f22ccddd135871 (diff)
downloadscummvm-rg350-be93d7d67dcea18532917a6c1bd6004665973f4f.tar.gz
scummvm-rg350-be93d7d67dcea18532917a6c1bd6004665973f4f.tar.bz2
scummvm-rg350-be93d7d67dcea18532917a6c1bd6004665973f4f.zip
ZVISION: Implement ActionStop.
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/actions.cpp15
-rw-r--r--engines/zvision/actions.h9
-rw-r--r--engines/zvision/scr_file_handling.cpp2
3 files changed, 25 insertions, 1 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp
index 2a79500427..06ceea2573 100644
--- a/engines/zvision/actions.cpp
+++ b/engines/zvision/actions.cpp
@@ -409,6 +409,21 @@ bool ActionSetScreen::execute() {
return true;
}
+//////////////////////////////////////////////////////////////////////////////
+// ActionStop
+//////////////////////////////////////////////////////////////////////////////
+
+ActionStop::ActionStop(ZVision *engine, const Common::String &line) :
+ ResultAction(engine) {
+ _key = 0;
+ sscanf(line.c_str(), "%*[^(](%u)", &_key);
+}
+
+bool ActionStop::execute() {
+ _engine->getScriptManager()->stopSideFx(_key);
+ return true;
+}
+
//////////////////////////////////////////////////////////////////////////////
// ActionStreamVideo
diff --git a/engines/zvision/actions.h b/engines/zvision/actions.h
index bcd7848c10..8a8412fed5 100644
--- a/engines/zvision/actions.h
+++ b/engines/zvision/actions.h
@@ -327,6 +327,15 @@ private:
Common::String _fileName;
};
+class ActionStop : public ResultAction {
+public:
+ ActionStop(ZVision *engine, const Common::String &line);
+ bool execute();
+
+private:
+ uint32 _key;
+};
+
class ActionStreamVideo : public ResultAction {
public:
ActionStreamVideo(ZVision *engine, const Common::String &line);
diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp
index edb496a0eb..bfa1481007 100644
--- a/engines/zvision/scr_file_handling.cpp
+++ b/engines/zvision/scr_file_handling.cpp
@@ -229,7 +229,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (line.matchString("*:set_venus*", true)) {
// TODO: Implement ActionSetVenus
} else if (line.matchString("*:stop*", true)) {
- // TODO: Implement ActionStop
+ actionList.push_back(new ActionStop(_engine, line));
} else if (line.matchString("*:streamvideo*", true)) {
actionList.push_back(new ActionStreamVideo(_engine, line));
} else if (line.matchString("*:syncsound*", true)) {