From df52a5d58ea5bedba031aed900e228a75eef7c58 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 17 Jul 2009 19:22:12 +0000 Subject: Adding a workaround for the vanishing Coh Cott bug (#1972466), which is actually an error in that video file svn-id: r42570 --- engines/gob/videoplayer.cpp | 15 +++++++++++++++ engines/gob/videoplayer.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'engines') diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index da552d7202..2a385ea4d1 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -156,6 +156,7 @@ VideoPlayer::VideoPlayer(GobEngine *vm) : _vm(vm) { _backSurf = false; _needBlit = false; _noCursorSwitch = false; + _woodruffCohCottWorkaround = false; } VideoPlayer::~VideoPlayer() { @@ -248,6 +249,14 @@ bool VideoPlayer::primaryOpen(const char *videoFile, int16 x, int16 y, _noCursorSwitch = true; } + // WORKAROUND: In Woodruff, Coh Cott vanished in one video on her party. + // This is a bug in video, so we work around it. + _woodruffCohCottWorkaround = false; + if (_vm->getGameType() == kGameTypeWoodruff) { + if (!scumm_stricmp(fileName, "SQ32-03.VMD")) + _woodruffCohCottWorkaround = true; + } + _ownSurf = false; if (!(flags & kFlagNoVideo)) { @@ -657,6 +666,12 @@ void VideoPlayer::playFrame(int16 frame, int16 breakKey, Graphics::CoktelVideo::State state = video.nextFrame(); WRITE_VAR(11, frame); + if (_woodruffCohCottWorkaround && (frame == 32)) { + // WORKAROUND: This frame mistakenly masks Coh Cott, making her vanish + // To prevent that, we'll never draw that part + state.left += 50; + } + if (_needBlit) _vm->_draw->forceBlit(true); diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index ead752d446..e2e2ef6787 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -152,6 +152,8 @@ private: bool _needBlit; bool _noCursorSwitch; + bool _woodruffCohCottWorkaround; + bool findFile(char *fileName, Type &which); const Video *getVideoBySlot(int slot = -1) const; -- cgit v1.2.3