diff options
author | Paul Gilbert | 2013-06-26 22:23:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-06-26 22:23:50 -0400 |
commit | 66d1f7a8de2ff5a21ad013f45924c406f4833e9a (patch) | |
tree | ac884211bbe983cf92d5254aec9efc36bd639bde /engines/voyeur | |
parent | d8ef42a7619113f57ce14aa3a4430e4d576ad0b4 (diff) | |
download | scummvm-rg350-66d1f7a8de2ff5a21ad013f45924c406f4833e9a.tar.gz scummvm-rg350-66d1f7a8de2ff5a21ad013f45924c406f4833e9a.tar.bz2 scummvm-rg350-66d1f7a8de2ff5a21ad013f45924c406f4833e9a.zip |
VOYEUR: Fixes for opening scene to start
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/animation.cpp | 1 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp index 1f4e623976..3bcc6cf10f 100644 --- a/engines/voyeur/animation.cpp +++ b/engines/voyeur/animation.cpp @@ -141,7 +141,6 @@ bool RL2Decoder::RL2FileHeader::isValid() const { RL2Decoder::RL2VideoTrack::RL2VideoTrack(const RL2FileHeader &header, RL2AudioTrack *audioTrack, Common::SeekableReadStream *stream): _header(header), _audioTrack(audioTrack), _fileStream(stream) { - assert(header._backSize == 0 || header._backSize == (320 * 200)); // Calculate the frame rate int fps = (header._soundRate > 0) ? header._rate / header._defSoundSize : 11025 / 1103; diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index f517f1afa2..6e3ed103ce 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -54,6 +54,7 @@ GraphicsManager::GraphicsManager(): _drawTextPermFlag = false; _clipPtr = NULL; _viewPortListPtr = NULL; + _backgroundPage = NULL; _vPort = NULL; _fontPtr = NULL; } @@ -586,6 +587,11 @@ void GraphicsManager::restoreBack(Common::Array<Common::Rect> &rectList, int rec bool saveBack = _saveBack; _saveBack = false; + // WORKAROUND: Since _backgroundPage can point to a resource freed at the end of display methods, + // I'm now explicitly resetting it to null in screenReset(), so at this point it can be null + if (!srcPic) + return; + if (rectListCount == -1) { sDrawPic(srcPic, destPic, Common::Point()); } else { @@ -629,6 +635,7 @@ void GraphicsManager::setColor(int idx, byte r, byte g, byte b) { void GraphicsManager::screenReset() { resetPalette(); + _backgroundPage = NULL; (*_vPort)->setupViewPort(); fillPic(*_vPort, 0); (*_vPort)->_parent->_flags |= DISPFLAG_8; |