From 7c14cf2b1bddaf4ec9403f49a1fc09ec750ee6c6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 22 Jan 2011 12:26:31 +0000 Subject: GOB: Fix some of the live-video glitchyness svn-id: r55421 --- engines/gob/draw.cpp | 3 +++ engines/gob/inter_v1.cpp | 7 +++++-- engines/gob/videoplayer.cpp | 5 +++++ engines/gob/videoplayer.h | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'engines/gob') diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 216dbb5b77..f86d5e67c9 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -245,6 +245,9 @@ void Draw::blitInvalidated() { if (_noInvalidated && !_applyPal) return; + if (_vm->isTrueColor()) + _applyPal = false; + if (_noInvalidated) { setPalette(); _applyPal = false; diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index bbd972c459..6035f22d79 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -45,6 +45,7 @@ #include "gob/palanim.h" #include "gob/scenery.h" #include "gob/video.h" +#include "gob/videoplayer.h" #include "gob/sound/sound.h" namespace Gob { @@ -1189,8 +1190,10 @@ bool Inter_v1::o1_keyFunc(OpFuncParams ¶ms) { int16 key; uint32 now; - _vm->_draw->forceBlit(); - _vm->_video->retrace(); + if (!_vm->_vidPlayer->isPlayingLive()) { + _vm->_draw->forceBlit(); + _vm->_video->retrace(); + } cmd = _vm->_game->_script->readInt16(); animPalette(); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index f1876f5294..c0e450c9a2 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -299,6 +299,11 @@ void VideoPlayer::waitEndFrame(int slot, bool onlySound) { } } +bool VideoPlayer::isPlayingLive() const { + const Video *video = getVideoBySlot(0); + return video && video->live; +} + void VideoPlayer::updateLive(bool force) { Video *video = getVideoBySlot(0); if (!video || !video->live) diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index bf473180a4..5e12494c85 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -112,6 +112,8 @@ public: bool play(int slot, Properties &properties); void waitEndFrame(int slot, bool onlySound = false); + bool isPlayingLive() const; + void updateLive(bool force = false); bool slotIsOpen(int slot = 0) const; -- cgit v1.2.3