diff options
author | Filippos Karapetis | 2011-02-08 19:50:45 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-02-08 19:50:45 +0000 |
commit | 72a9706950675cc3fd04e39d0f842193d66a5f9e (patch) | |
tree | 39ad5b83dfc81c0836f1dc3473f73f4cd19990db /engines/sci/engine | |
parent | 656afd6daa2b468fdf2731f082d1fd5897e43110 (diff) | |
download | scummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.tar.gz scummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.tar.bz2 scummvm-rg350-72a9706950675cc3fd04e39d0f842193d66a5f9e.zip |
SCI: Some work on robot videos
- The size of the videos is now calculated when they are loaded (this helps remove some
nasty hacks and constant memory reallocations and simplifies the code)
- Some work on frame placement (e.g. in robot 1305, Phantasmagoria)
svn-id: r55830
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 1ed3a713b0..e905764d03 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -51,15 +51,12 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { uint16 screenWidth = g_system->getWidth(); uint16 screenHeight = g_system->getHeight(); bool isVMD = videoState.fileName.hasSuffix(".vmd"); - bool isRobot = videoState.fileName.hasSuffix(".rbt"); - - if (!isRobot) { - if (screenWidth == 640 && width <= 320 && height <= 240 && ((videoState.flags & kDoubled) || !isVMD)) { - width *= 2; - height *= 2; - pitch *= 2; - scaleBuffer = new byte[width * height * bytesPerPixel]; - } + + if (screenWidth == 640 && width <= 320 && height <= 240 && ((videoState.flags & kDoubled) || !isVMD)) { + width *= 2; + height *= 2; + pitch *= 2; + scaleBuffer = new byte[width * height * bytesPerPixel]; } uint16 x, y; @@ -76,13 +73,8 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { y = (screenHeight - height) / 2; } } else { - if (!isRobot) { x = (screenWidth - width) / 2; y = (screenHeight - height) / 2; - } else { - x = 0; - y = 0; - } } bool skipVideo = false; @@ -99,10 +91,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { g_sci->_gfxScreen->scale2x((byte *)frame->pixels, scaleBuffer, videoDecoder->getWidth(), videoDecoder->getHeight(), bytesPerPixel); g_system->copyRectToScreen(scaleBuffer, pitch, x, y, width, height); } else { - if (!isRobot) - g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, width, height); - else // Frames in robot videos have different dimensions - g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); + g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, width, height); } if (videoDecoder->hasDirtyPalette()) |