aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarisa-Chan2014-11-08 12:26:04 +0600
committerMarisa-Chan2014-11-08 12:26:04 +0600
commitd0f6b61d7d86598c71c7ff8679f610bbd1341aaa (patch)
treeca2091c8004323d31de3c5c2169e2f358d1b9abe
parent53002dd2d067c24baaecfbc32071365bef58cfca (diff)
downloadscummvm-rg350-d0f6b61d7d86598c71c7ff8679f610bbd1341aaa.tar.gz
scummvm-rg350-d0f6b61d7d86598c71c7ff8679f610bbd1341aaa.tar.bz2
scummvm-rg350-d0f6b61d7d86598c71c7ff8679f610bbd1341aaa.zip
ZVISION: Implement action:delay_render
-rw-r--r--engines/zvision/scripting/actions.cpp13
-rw-r--r--engines/zvision/scripting/actions.h3
-rw-r--r--engines/zvision/scripting/scr_file_handling.cpp2
3 files changed, 15 insertions, 3 deletions
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp
index 8a3d17f2c5..3763eb6e30 100644
--- a/engines/zvision/scripting/actions.cpp
+++ b/engines/zvision/scripting/actions.cpp
@@ -160,6 +160,19 @@ bool ActionCrossfade::execute() {
return true;
}
+//////////////////////////////////////////////////////////////////////////////
+// ActionDelayRender
+//////////////////////////////////////////////////////////////////////////////
+
+ActionDelayRender::ActionDelayRender(ZVision *engine, int32 slotkey, const Common::String &line) :
+ ResultAction(engine, slotkey) {
+ sscanf(line.c_str(), "%u", &_framesToDelay);
+}
+
+bool ActionDelayRender::execute() {
+ _engine->setRenderDelay(_framesToDelay);
+ return true;
+}
//////////////////////////////////////////////////////////////////////////////
// ActionDisableControl
diff --git a/engines/zvision/scripting/actions.h b/engines/zvision/scripting/actions.h
index 731105d591..ade57ba14c 100644
--- a/engines/zvision/scripting/actions.h
+++ b/engines/zvision/scripting/actions.h
@@ -162,8 +162,7 @@ public:
bool execute();
private:
- // TODO: Check if this should actually be frames or if it should be milliseconds/seconds
- uint32 framesToDelay;
+ uint32 _framesToDelay;
};
class ActionDisableControl : public ResultAction {
diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp
index a2b5311666..68840aa413 100644
--- a/engines/zvision/scripting/scr_file_handling.cpp
+++ b/engines/zvision/scripting/scr_file_handling.cpp
@@ -232,7 +232,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (act.matchString("debug", true)) {
// TODO: Implement ActionDebug
} else if (act.matchString("delay_render", true)) {
- // TODO: Implement ActionDelayRender
+ actionList.push_back(new ActionDelayRender(_engine, slot, args));
} else if (act.matchString("disable_control", true)) {
actionList.push_back(new ActionDisableControl(_engine, slot, args));
} else if (act.matchString("disable_venus", true)) {