diff options
author | richiesams | 2013-08-29 02:04:06 -0500 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-24 13:59:38 +0200 |
commit | 4288c4fa0e36d2274257154c5365f71f6f6dd015 (patch) | |
tree | 04ac938eba26c0e69de39cc2840d0319324fff64 /engines | |
parent | cdc484218186daa9a4f60792a2070ad089b7853e (diff) | |
download | scummvm-rg350-4288c4fa0e36d2274257154c5365f71f6f6dd015.tar.gz scummvm-rg350-4288c4fa0e36d2274257154c5365f71f6f6dd015.tar.bz2 scummvm-rg350-4288c4fa0e36d2274257154c5365f71f6f6dd015.zip |
ZVISION: Remove unnecessary pixel format switching from video code
This is part of a series of commits converting all game assets to RBG 565 from
RBG 555. The argument is that certain backends do not support RGB 555. AVI
videos are already in RGB 565, so we just need to remove the code that switched
the pixelFormat during videos.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/video.cpp | 8 | ||||
-rw-r--r-- | engines/zvision/zvision.cpp | 3 |
2 files changed, 2 insertions, 9 deletions
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp index 377b24af2a..d0dbbc5755 100644 --- a/engines/zvision/video.cpp +++ b/engines/zvision/video.cpp @@ -77,11 +77,6 @@ void scaleBuffer(const byte *src, byte *dst, uint32 srcWidth, uint32 srcHeight, } void ZVision::playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &destRect, bool skippable) { - // Videos use a different pixel format - Common::List<Graphics::PixelFormat> formats; - formats.push_back(videoDecoder.getPixelFormat()); - initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, true, formats); - byte bytesPerPixel = videoDecoder.getPixelFormat().bytesPerPixel; uint16 origWidth = videoDecoder.getWidth(); @@ -167,9 +162,6 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &d if (scale != 1) { delete[] scaledVideoFrameBuffer; } - - // Reset the pixel format to the original state - initGraphics(WINDOW_WIDTH, WINDOW_HEIGHT, true, &_pixelFormat); } } // End of namespace ZVision diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp index c32e78214f..b5cae8acd3 100644 --- a/engines/zvision/zvision.cpp +++ b/engines/zvision/zvision.cpp @@ -50,9 +50,10 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _workingWindow((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2, (WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2, ((WINDOW_WIDTH - WORKING_WINDOW_WIDTH) / 2) + WORKING_WINDOW_WIDTH, ((WINDOW_HEIGHT - WORKING_WINDOW_HEIGHT) / 2) + WORKING_WINDOW_HEIGHT), - _pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0), /*RGB 555*/ + _pixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), /*RGB 565*/ _desiredFrameTime(33), /* ~30 fps */ _clock(_system) { + // Put your engine in a sane state, but do nothing big yet; // in particular, do not load data from files; rather, if you // need to do such things, do them from run(). |