aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-16 07:57:08 +0000
committerFilippos Karapetis2009-10-16 07:57:08 +0000
commit788af1b81e92387db02bb666762f1820f19dfb06 (patch)
treeaed45d2aa816ca558f2ce28ddbb88fcc57b5fbfe
parent422b732dbadde0b23aaec05b39edec9e1c81f91e (diff)
downloadscummvm-rg350-788af1b81e92387db02bb666762f1820f19dfb06.tar.gz
scummvm-rg350-788af1b81e92387db02bb666762f1820f19dfb06.tar.bz2
scummvm-rg350-788af1b81e92387db02bb666762f1820f19dfb06.zip
Fixed an assert in the introduction of the CD version of KQ6
svn-id: r45152
-rw-r--r--engines/sci/gfx/seq_decoder.cpp10
-rw-r--r--engines/sci/gfx/seq_decoder.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/engines/sci/gfx/seq_decoder.cpp b/engines/sci/gfx/seq_decoder.cpp
index 829eea004a..c5978c39bf 100644
--- a/engines/sci/gfx/seq_decoder.cpp
+++ b/engines/sci/gfx/seq_decoder.cpp
@@ -129,9 +129,13 @@ bool SeqDecoder::decodeNextFrame() {
_videoInfo.startTime = g_system->getMillis();
if (frameType == kSeqFrameFull) {
- assert (frameLeft == 0);
- assert (frameWidth == 320);
- _fileStream->read(_videoFrameBuffer + 320 * frameTop, frameSize);
+ if (frameLeft != 0 && frameWidth != 320) {
+ // This case should never happen, but apparently it does in the
+ // seagulls video in KQ6 CD (most likely due to bad/incomplete data)
+ _fileStream->skip(frameSize);
+ } else {
+ _fileStream->read(_videoFrameBuffer + 320 * frameTop, frameSize);
+ }
} else {
byte *buf = new byte[frameSize];
_fileStream->read(buf, frameSize);
diff --git a/engines/sci/gfx/seq_decoder.h b/engines/sci/gfx/seq_decoder.h
index cb528b0324..d4b9840d76 100644
--- a/engines/sci/gfx/seq_decoder.h
+++ b/engines/sci/gfx/seq_decoder.h
@@ -31,7 +31,7 @@
namespace Graphics {
/**
- * Implementation of the KQ6 floppy SEQ decoder
+ * Implementation of the KQ6 DOS floppy/CD SEQ decoder
*/
class SeqDecoder : public VideoDecoder {
public: