diff options
author | Sven Hesse | 2009-07-24 21:34:17 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-24 21:34:17 +0000 |
commit | b2154f612da6d92cb86338accd8a23f51c49e1f4 (patch) | |
tree | a09b4004ee8250c4761540e0aca975660c110105 | |
parent | 90d8dcca5f7bcbaf309f72eca8c2a0d3863657d0 (diff) | |
download | scummvm-rg350-b2154f612da6d92cb86338accd8a23f51c49e1f4.tar.gz scummvm-rg350-b2154f612da6d92cb86338accd8a23f51c49e1f4.tar.bz2 scummvm-rg350-b2154f612da6d92cb86338accd8a23f51c49e1f4.zip |
Adding stubs for newer VMDs found in Addy 5
svn-id: r42710
-rw-r--r-- | graphics/video/coktelvideo/coktelvideo.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 1c0ed08167..80106215cb 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -1118,8 +1118,17 @@ bool Vmd::load(Common::SeekableReadStream &stream) { handle = _stream->readUint16LE(); _version = _stream->readUint16LE(); + bool readPalette; + // Version checking - if (headerLength != 814) { + if (headerLength == 50) { + // Newer version, used in Addy 5 upwards + warning("Vmd::load(): TODO: Addy 5 videos"); + readPalette = false; + } else if (headerLength == 814) { + // Old version + readPalette = true; + } else { warning("Vmd::load(): Version incorrect (%d, %d, %d)", headerLength, handle, _version); unload(); return false; @@ -1162,7 +1171,8 @@ bool Vmd::load(Common::SeekableReadStream &stream) { _videoCodec = _stream->readUint32BE(); - _stream->read((byte *) _palette, 768); + if (readPalette) + _stream->read((byte *) _palette, 768); _frameDataSize = _stream->readUint32LE(); _vidBufferSize = _stream->readUint32LE(); @@ -1398,6 +1408,10 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { } _stream->skip(part.size); + } else if (part.flags == 4) { + warning("Vmd::processFrame(): TODO: Addy 5 sound type 4 (%d)", part.size); + disableSound(); + _stream->skip(part.size); } else { warning("Vmd::processFrame(): Unknown sound type %d", part.flags); _stream->skip(part.size); |