[Scummvm-git-logs] scummvm master -> 32e7086b886c63752157843c0975772b81d2eea1
dreammaster
dreammaster at scummvm.org
Thu Dec 1 02:00:10 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
32e7086b88 TITANIC: Handle 16-bit source movie frames
Commit: 32e7086b886c63752157843c0975772b81d2eea1
https://github.com/scummvm/scummvm/commit/32e7086b886c63752157843c0975772b81d2eea1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-30T20:00:03-05:00
Commit Message:
TITANIC: Handle 16-bit source movie frames
Changed paths:
engines/titanic/support/avi_surface.cpp
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index d05ad64..9d6ece0 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();
More information about the Scummvm-git-logs
mailing list