aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2009-07-17 20:03:41 +0000
committerSven Hesse2009-07-17 20:03:41 +0000
commit025702ba4084dcad8dbe65c07a718f086320c19c (patch)
tree86a1dd5f674402dad083ef91c782953094377987 /engines/gob
parentdf52a5d58ea5bedba031aed900e228a75eef7c58 (diff)
downloadscummvm-rg350-025702ba4084dcad8dbe65c07a718f086320c19c.tar.gz
scummvm-rg350-025702ba4084dcad8dbe65c07a718f086320c19c.tar.bz2
scummvm-rg350-025702ba4084dcad8dbe65c07a718f086320c19c.zip
/Finally/ fixing the longstanding flicker bug in Woodruff. I was completely mistaken about its cause, too
svn-id: r42572
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/videoplayer.cpp15
-rw-r--r--engines/gob/videoplayer.h4
2 files changed, 12 insertions, 7 deletions
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();
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index e2e2ef6787..532d216d7e 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -70,7 +70,7 @@ public:
void playFrame(int16 frame, int16 breakKey = kShortKeyEscape,
uint16 palCmd = 8, int16 palStart = 0, int16 palEnd = 255,
- int16 palFrame = -1 , int16 endFrame = -1);
+ int16 palFrame = -1 , int16 endFrame = -1, bool noRetrace = false);
int slotOpen(const char *videoFile, Type which = kVideoTypeTry);
void slotPlay(int slot, int16 frame = -1);
@@ -164,7 +164,7 @@ private:
void copyPalette(Graphics::CoktelVideo &video, int16 palStart = -1, int16 palEnd = -1);
bool doPlay(int16 frame, int16 breakKey,
uint16 palCmd, int16 palStart, int16 palEnd,
- int16 palFrame, int16 endFrame);
+ int16 palFrame, int16 endFrame, bool noRetrace = false);
void evalBgShading(Graphics::CoktelVideo &video);
};