diff options
author | Dmitry Iskrich | 2016-06-15 18:08:08 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 16a2b7e7c3c89945c1e80702238e6cee5bbe4faa (patch) | |
tree | 74621319104ec3943dfe31089028cabb7dfd5370 /engines/director | |
parent | d3b49ba5095af8af75555bd5609122ad2105f016 (diff) | |
download | scummvm-rg350-16a2b7e7c3c89945c1e80702238e6cee5bbe4faa.tar.gz scummvm-rg350-16a2b7e7c3c89945c1e80702238e6cee5bbe4faa.tar.bz2 scummvm-rg350-16a2b7e7c3c89945c1e80702238e6cee5bbe4faa.zip |
DIRECTOR: Add other cover transitions such as cover left, right, down right, down left, up right, up left
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/score.cpp | 80 | ||||
-rw-r--r-- | engines/director/score.h | 14 |
2 files changed, 85 insertions, 9 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 5bce536300..4cbc4f2cf0 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -790,7 +790,57 @@ void Frame::playTransition(Score *score) { uint16 stepSize = score->_movieRect.height() / steps; Common::Rect r = score->_movieRect; for (uint16 i = 1; i < steps; i++) { - r.setHeight(stepSize*i); + r.setHeight(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, score->_movieRect.height() - stepSize * i, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; + case kTransCoverRight: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; + case kTransCoverLeft: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, score->_movieRect.width() - stepSize * i, 0, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; + case kTransCoverUpLeft: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + r.setHeight(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, score->_movieRect.width() - stepSize * i, score->_movieRect.height() - stepSize * i, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; + case kTransCoverUpRight: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + r.setHeight(stepSize * i); g_system->delayMillis(stepDuration); score->processEvents(); g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, score->_movieRect.height() - stepSize * i, r.width(), r.height()); @@ -798,8 +848,34 @@ void Frame::playTransition(Score *score) { } } break; + case kTransCoverDownLeft: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + r.setHeight(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, score->_movieRect.width() - stepSize * i, 0, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; + case kTransCoverDownRight: { + uint16 stepSize = score->_movieRect.width() / steps; + Common::Rect r = score->_movieRect; + for (uint16 i = 1; i < steps; i++) { + r.setWidth(stepSize * i); + r.setHeight(stepSize * i); + g_system->delayMillis(stepDuration); + score->processEvents(); + g_system->copyRectToScreen(score->_surface->getPixels(), score->_surface->pitch, 0, 0, r.width(), r.height()); + g_system->updateScreen(); + } + } + break; default: - warning("Unhandled transition type %d", _transType); + warning("Unhandled transition type %d %d %d", _transType, duration, _transChunkSize); break; } diff --git a/engines/director/score.h b/engines/director/score.h index 90226d7149..a05c6bb060 100644 --- a/engines/director/score.h +++ b/engines/director/score.h @@ -130,10 +130,10 @@ enum TransitionType { kTransRevealDownLeft, kTransRevealLeft, kTransRevealUpLeft, - kTransDisolvePixelsFast, - kTransDisolveBoxyRects, - kTransDisolveBoxySquares, - kTransDisolvePatterns, + kTransDissolvePixelsFast, + kTransDissolveBoxyRects, + kTransDissolveBoxySquares, + kTransDissolvePatterns, kTransRandomRows, kTransRandomColumns, kTransCoverDown, @@ -157,9 +157,9 @@ enum TransitionType { kTransZoomOpen, kTransZoomClose, kTransVerticalBinds, - kTransDisolveBitsTrans, - kTransDisolvePixels, - kTransDisolveBits + kTransDissolveBitsTrans, + kTransDissolvePixels, + kTransDissolveBits }; struct Cast { |