diff options
author | Paul Gilbert | 2016-12-05 23:17:18 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-05 23:17:18 -0500 |
commit | c332251f5930e069f1facb3e968be6bb57317434 (patch) | |
tree | 714fb6d0affcefe990af3fc94d658a68cc2bbb72 | |
parent | 0c200e833efa863ec810e8d7fbefaa59f9f7603d (diff) | |
download | scummvm-rg350-c332251f5930e069f1facb3e968be6bb57317434.tar.gz scummvm-rg350-c332251f5930e069f1facb3e968be6bb57317434.tar.bz2 scummvm-rg350-c332251f5930e069f1facb3e968be6bb57317434.zip |
TITANIC: In progress code for reverse playback in AVISurface
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 9d6ece0bbb..6240de951c 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -132,6 +132,8 @@ bool AVISurface::startAtFrame(int frameNumber) { if (frameNumber == -1) // Default to starting frame of first movie range frameNumber = _movieRangeInfo.front()->_startFrame; + if (_isReversed && frameNumber == _decoder->getFrameCount()) + --frameNumber; // Get the initial frame seekToFrame(frameNumber); @@ -139,11 +141,16 @@ bool AVISurface::startAtFrame(int frameNumber) { // Start the playback _decoder->start(); + if (_isReversed) + _decoder->setRate(-1.0); return true; } void AVISurface::seekToFrame(uint frameNumber) { + if (_isReversed && frameNumber == _decoder->getFrameCount()) + --frameNumber; + if ((int)frameNumber != getFrame()) { _decoder->seekToFrame(frameNumber); _currentFrame = (int)frameNumber; @@ -378,6 +385,7 @@ bool AVISurface::renderFrame() { // since the blitting method we're using doesn't support palettes Graphics::Surface *s = frameSurface.convertTo(g_system->getScreenFormat(), _decoder->getPalette()); + _videoSurface->getRawSurface()->blitFrom(*s); s->free(); delete s; |