Skip to content

Commit

Permalink
ZVISION: Implement action:delay_render
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan committed Nov 8, 2014
1 parent 53002dd commit d0f6b61
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
13 changes: 13 additions & 0 deletions engines/zvision/scripting/actions.cpp
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions engines/zvision/scripting/actions.h
Expand Up @@ -162,8 +162,7 @@ class ActionDelayRender : public ResultAction {
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 {
Expand Down
2 changes: 1 addition & 1 deletion engines/zvision/scripting/scr_file_handling.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit d0f6b61

Please sign in to comment.