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 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/gob/videoplayer.cpp') 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); -- cgit v1.2.3 From 025702ba4084dcad8dbe65c07a718f086320c19c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 17 Jul 2009 20:03:41 +0000 Subject: /Finally/ fixing the longstanding flicker bug in Woodruff. I was completely mistaken about its cause, too svn-id: r42572 --- engines/gob/videoplayer.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'engines/gob/videoplayer.cpp') diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 2a385ea4d1..f708729fd8 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -325,6 +325,7 @@ bool VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey, endFrame = lastFrame; palCmd &= 0x3F; + int16 realStartFrame = startFrame; if (video.getCurrentFrame() != startFrame) { if (!forceSeek && (video.getFeatures() & Graphics::CoktelVideo::kFeaturesSound)) startFrame = video.getCurrentFrame(); @@ -340,7 +341,9 @@ bool VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey, bool canceled = false; while (startFrame <= lastFrame) { - if (doPlay(startFrame, breakKey, palCmd, palStart, palEnd, palFrame, endFrame)) { + if (doPlay(startFrame, breakKey, + palCmd, palStart, palEnd, palFrame, endFrame, startFrame < realStartFrame)) { + canceled = true; break; } @@ -630,7 +633,7 @@ Common::MemoryReadStream *VideoPlayer::getExtraData(const char *fileName, int sl void VideoPlayer::playFrame(int16 frame, int16 breakKey, uint16 palCmd, int16 palStart, int16 palEnd, - int16 palFrame, int16 endFrame) { + int16 palFrame, int16 endFrame, bool noRetrace) { if (!_primaryVideo) return; @@ -703,7 +706,9 @@ void VideoPlayer::playFrame(int16 frame, int16 breakKey, _vm->_draw->blitInvalidated(); } else _vm->_video->dirtyRectsAdd(state.left, state.top, state.right, state.bottom); - _vm->_video->retrace(); + + if (!noRetrace) + _vm->_video->retrace(); } @@ -713,9 +718,9 @@ void VideoPlayer::playFrame(int16 frame, int16 breakKey, bool VideoPlayer::doPlay(int16 frame, int16 breakKey, uint16 palCmd, int16 palStart, int16 palEnd, - int16 palFrame, int16 endFrame) { + int16 palFrame, int16 endFrame, bool noRetrace) { - playFrame(frame, breakKey, palCmd, palStart, palEnd, palFrame, endFrame); + playFrame(frame, breakKey, palCmd, palStart, palEnd, palFrame, endFrame, noRetrace); _vm->_util->processInput(); -- cgit v1.2.3