diff options
author | Sven Hesse | 2008-05-22 17:33:31 +0000 |
---|---|---|
committer | Sven Hesse | 2008-05-22 17:33:31 +0000 |
commit | 6a54cbc4ebb47af65f5d6f9adcef82b5811aba10 (patch) | |
tree | 6df2032a6492920d55f810f7fecf594e57c0a5cf | |
parent | f2294d9b89da81929816484f2b845d4c2a68e741 (diff) | |
download | scummvm-rg350-6a54cbc4ebb47af65f5d6f9adcef82b5811aba10.tar.gz scummvm-rg350-6a54cbc4ebb47af65f5d6f9adcef82b5811aba10.tar.bz2 scummvm-rg350-6a54cbc4ebb47af65f5d6f9adcef82b5811aba10.zip |
Fixing the flickering when changing from object animations to videos
svn-id: r32213
-rw-r--r-- | engines/gob/draw.cpp | 8 | ||||
-rw-r--r-- | engines/gob/draw.h | 2 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 8a7de9bdaa..cc3b413f41 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -225,7 +225,7 @@ void Draw::invalidateRect(int16 left, int16 top, int16 right, int16 bottom) { _invalidatedCount++; } -void Draw::blitInvalidated() { +void Draw::blitInvalidated(bool noForce) { if (_noInvalidated57 && ((_vm->_global->_videoMode == 5) || (_vm->_global->_videoMode == 7))) return; @@ -248,8 +248,12 @@ void Draw::blitInvalidated() { _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); if (_applyPal) { clearPalette(); - forceBlit(); + + if (!noForce) + forceBlit(); + setPalette(); + _invalidatedCount = 0; _noInvalidated = true; _applyPal = false; diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 9ba589aa53..b7e5ef9f08 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -133,7 +133,7 @@ public: int16 _scrollOffsetX; void invalidateRect(int16 left, int16 top, int16 right, int16 bottom); - void blitInvalidated(); + void blitInvalidated(bool noForce = false); void setPalette(); void clearPalette(); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index c6910c1369..c3bf60c95a 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -557,7 +557,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey, if (_backSurf) { _vm->_draw->invalidateRect(state.left, state.top, state.right, state.bottom); - _vm->_draw->blitInvalidated(); + _vm->_draw->blitInvalidated(palCmd <= 1); } _vm->_video->retrace(); |