diff options
author | Matthew Hoops | 2012-08-16 12:17:23 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-08-16 12:17:23 -0400 |
commit | 7294a1cbcf1cf5e8c846faf8838e537bd8c638dc (patch) | |
tree | 37f8c97ba038b72744e8341f9b23add9fcd68281 /engines/sci | |
parent | 92432a136bff7c327b5328cc10a84198f571b0d0 (diff) | |
download | scummvm-rg350-7294a1cbcf1cf5e8c846faf8838e537bd8c638dc.tar.gz scummvm-rg350-7294a1cbcf1cf5e8c846faf8838e537bd8c638dc.tar.bz2 scummvm-rg350-7294a1cbcf1cf5e8c846faf8838e537bd8c638dc.zip |
VIDEO: Remove the Coktel video code from using the VideoDecoder API
After discussing with DrMcCoy, we felt this the best way to proceed. A wrapper class that implements AdvancedVideoDecoder is still around for use in SCI.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/console.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 9b5ef35e92..de852ca9c0 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -253,7 +253,7 @@ void Console::postEnter() { videoDecoder = new SEQDecoder(_videoFrameDelay); #ifdef ENABLE_SCI32 } else if (_videoFile.hasSuffix(".vmd")) { - videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + videoDecoder = new Video::AdvancedVMDDecoder(); } else if (_videoFile.hasSuffix(".rbt")) { videoDecoder = new RobotDecoder(_engine->getPlatform() == Common::kPlatformMacintosh); } else if (_videoFile.hasSuffix(".duk")) { @@ -267,8 +267,7 @@ void Console::postEnter() { } if (videoDecoder && videoDecoder->loadFile(_videoFile)) { - if (!_videoFile.hasSuffix(".vmd")) // TODO: Remove after new API is complete - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); _engine->_gfxCursor->kernelHide(); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index da63aa3a8d..3e0f35c037 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -50,6 +50,8 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { if (!videoDecoder) return; + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + byte *scaleBuffer = 0; byte bytesPerPixel = videoDecoder->getPixelFormat().bytesPerPixel; uint16 width = videoDecoder->getWidth(); @@ -219,7 +221,6 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { } if (videoDecoder) { - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete playVideo(videoDecoder, s->_videoState); // HACK: Switch back to 8bpp if we played a true color video. @@ -349,7 +350,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { break; } case 6: // Play - videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + videoDecoder = new Video::AdvancedVMDDecoder(); if (s->_videoState.fileName.empty()) { // Happens in Lighthouse @@ -414,8 +415,6 @@ reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) { break; } - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); - if (reshowCursor) g_sci->_gfxCursor->kernelHide(); |