diff options
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(); |