aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-03 15:17:47 -0500
committerPaul Gilbert2017-01-03 15:17:47 -0500
commit2ebb0a37b575096551c7105c17dfbc1258ed42cd (patch)
tree05657d355124b5ebd8e7ae36f3612d13ec017d58 /engines/titanic/support
parent93cf19209a5bdd0a7f7824e9e491746d0c8fd537 (diff)
downloadscummvm-rg350-2ebb0a37b575096551c7105c17dfbc1258ed42cd.tar.gz
scummvm-rg350-2ebb0a37b575096551c7105c17dfbc1258ed42cd.tar.bz2
scummvm-rg350-2ebb0a37b575096551c7105c17dfbc1258ed42cd.zip
TITANIC: Fix assert on bad video frame in the Promenade
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/avi_surface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index de7b9abe3e..22b3e98c16 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -273,12 +273,14 @@ void AVISurface::setupDecompressor() {
}
void AVISurface::copyMovieFrame(const Graphics::Surface &src, Graphics::ManagedSurface &dest) {
- assert(src.w == dest.w && src.h == dest.h);
+ // WORKAROUND: A bad video in the Promenade has a frame with a width slightly larger
+ // than the defined width for the movie it's in. Hence the assert below is >=
+ 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);
+ dest.blitFrom(*s, Common::Rect(0, 0, dest.w, dest.h), Common::Point(0, 0));
s->free();
delete s;
} else if (src.format.bytesPerPixel == 2) {