diff options
author | Paul Gilbert | 2016-11-30 20:00:03 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-30 20:00:03 -0500 |
commit | 32e7086b886c63752157843c0975772b81d2eea1 (patch) | |
tree | eb7730e8dd6679986e1c3c71f46dccdd862dbffc /engines/titanic/support | |
parent | 02184cff7e5636b1fdc623d53640c07656a21c6d (diff) | |
download | scummvm-rg350-32e7086b886c63752157843c0975772b81d2eea1.tar.gz scummvm-rg350-32e7086b886c63752157843c0975772b81d2eea1.tar.bz2 scummvm-rg350-32e7086b886c63752157843c0975772b81d2eea1.zip |
TITANIC: Handle 16-bit source movie frames
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index d05ad64e8c..9d6ece0bbb 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -269,11 +269,17 @@ void AVISurface::copyMovieFrame(const Graphics::Surface &src, Graphics::ManagedS assert(src.w == dest.w && src.h == dest.h); if (src.format.bytesPerPixel == 1) { + // Paletted 8-bit, so convert to 16-bit and copy over Graphics::Surface *s = src.convertTo(dest.format, _decoder->getPalette()); dest.blitFrom(*s); s->free(); delete s; + } else if (src.format.bytesPerPixel == 2) { + // Source is already 16-bit, with no alpha, so do a straight copy + dest.blitFrom(src); } else { + // Source is 32-bit which may have transparent pixels. Copy over each + // pixel, replacing transparent pixels with the special transparency color byte a, r, g, b; assert(src.format.bytesPerPixel == 4 && dest.format.bytesPerPixel == 2); uint16 transPixel = _videoSurface->getTransparencyColor(); |