diff options
author | Matthew Hoops | 2013-06-16 18:08:12 -0400 |
---|---|---|
committer | Matthew Hoops | 2014-08-17 12:24:23 -0400 |
commit | 9a5b3bfddabd86205eefacc459a7887b4e735122 (patch) | |
tree | f6e106af00e53b6d6d21e6c7ea8bd4fc7cd90b68 /image | |
parent | 61b44c18feac38c829c513b32bd0c860b27cac17 (diff) | |
download | scummvm-rg350-9a5b3bfddabd86205eefacc459a7887b4e735122.tar.gz scummvm-rg350-9a5b3bfddabd86205eefacc459a7887b4e735122.tar.bz2 scummvm-rg350-9a5b3bfddabd86205eefacc459a7887b4e735122.zip |
IMAGE: Make Cinepak decode to 32bpp when in 8bpp screen mode
Diffstat (limited to 'image')
-rw-r--r-- | image/codecs/cinepak.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp index 8d5dbceb4a..8464aa3889 100644 --- a/image/codecs/cinepak.cpp +++ b/image/codecs/cinepak.cpp @@ -52,11 +52,16 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() { _curFrame.strips = NULL; _y = 0; - if (bitsPerPixel == 8) + if (bitsPerPixel == 8) { _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); - else + } else { _pixelFormat = g_system->getScreenFormat(); + // Default to a 32bpp format, if in 8bpp mode + if (_pixelFormat.bytesPerPixel == 1) + _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); + } + // Create a lookup for the clip function // This dramatically improves the performance of the color conversion _clipTableBuf = new byte[1024]; |