aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/videoplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/videoplayer.cpp')
-rw-r--r--engines/gob/videoplayer.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index da552d7202..f708729fd8 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)) {
@@ -316,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();
@@ -331,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;
}
@@ -621,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;
@@ -657,6 +669,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);
@@ -688,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();
}
@@ -698,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();