[Scummvm-git-logs] scummvm master -> f0e08796b07d4a4c362e12f440125170288a5927
dreammaster
dreammaster at scummvm.org
Wed Feb 15 05:07:17 CET 2017
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:
f0e08796b0 TITANIC: Work around cylinder holder 8-bit frame with no palette
Commit: f0e08796b07d4a4c362e12f440125170288a5927
https://github.com/scummvm/scummvm/commit/f0e08796b07d4a4c362e12f440125170288a5927
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-02-14T23:05:59-05:00
Commit Message:
TITANIC: Work around cylinder holder 8-bit frame with no palette
The video for the cylinder holder has a single 8-bit frame at the
start of the sequence for opening when there's no cylinder inside.
This fix works around it by ignoring 8-bits frame when there's
no palette available.
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 42e3618..a1dbecb 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -284,10 +284,13 @@ void AVISurface::copyMovieFrame(const Graphics::Surface &src, Graphics::ManagedS
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, copyRect, Common::Point(0, 0));
- s->free();
- delete s;
+ const byte *palette = _decoder->getPalette();
+ if (palette) {
+ Graphics::Surface *s = src.convertTo(dest.format, palette);
+ dest.blitFrom(*s, copyRect, Common::Point(0, 0));
+ 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, copyRect, Common::Point(0, 0));
More information about the Scummvm-git-logs
mailing list