Skip to content

Commit

Permalink
ZVISION: Implement action:dissolve
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan committed Nov 8, 2014
1 parent 7ddfcfd commit b8ef942
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions engines/zvision/graphics/render_manager.cpp
Expand Up @@ -1053,4 +1053,9 @@ void RenderManager::markDirty() {
_bkgDirtyRect = Common::Rect(_bkgWidth, _bkgHeight);
}

void RenderManager::bkgFill(uint8 r, uint8 g, uint8 b) {
_curBkg.fillRect(Common::Rect(_curBkg.w, _curBkg.h), _curBkg.format.RGBToColor(r, g, b));
markDirty();
}

} // End of namespace ZVision
2 changes: 2 additions & 0 deletions engines/zvision/graphics/render_manager.h
Expand Up @@ -283,6 +283,8 @@ class RenderManager {
Common::Rect bkgRectToScreen(const Common::Rect &src);

void markDirty();

void bkgFill(uint8 r, uint8 g, uint8 b);
};

} // End of namespace ZVision
Expand Down
14 changes: 14 additions & 0 deletions engines/zvision/scripting/actions.cpp
Expand Up @@ -221,6 +221,20 @@ bool ActionDisplayMessage::execute() {
return true;
}

//////////////////////////////////////////////////////////////////////////////
// ActionDissolve
//////////////////////////////////////////////////////////////////////////////

ActionDissolve::ActionDissolve(ZVision *engine) :
ResultAction(engine, 0) {
}

bool ActionDissolve::execute() {
// Cause black screen flick
// _engine->getRenderManager()->bkgFill(0, 0, 0);
return true;
}

//////////////////////////////////////////////////////////////////////////////
// ActionDistort
//////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion engines/zvision/scripting/scr_file_handling.cpp
Expand Up @@ -240,7 +240,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis
} else if (act.matchString("display_message", true)) {
actionList.push_back(new ActionDisplayMessage(_engine, slot, args));
} else if (act.matchString("dissolve", true)) {
// TODO: Implement ActionDissolve
actionList.push_back(new ActionDissolve(_engine));
} else if (act.matchString("distort", true)) {
actionList.push_back(new ActionDistort(_engine, slot, args));
} else if (act.matchString("enable_control", true)) {
Expand Down

0 comments on commit b8ef942

Please sign in to comment.