aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-30 20:00:03 -0500
committerPaul Gilbert2016-11-30 20:00:03 -0500
commit32e7086b886c63752157843c0975772b81d2eea1 (patch)
treeeb7730e8dd6679986e1c3c71f46dccdd862dbffc /engines/titanic/support
parent02184cff7e5636b1fdc623d53640c07656a21c6d (diff)
downloadscummvm-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.cpp6
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();