diff options
author | Sven Hesse | 2009-07-24 21:35:06 +0000 |
---|---|---|
committer | Sven Hesse | 2009-07-24 21:35:06 +0000 |
commit | 8396e2071330957121ad765df80aeaf0ffe5c4d0 (patch) | |
tree | 9e44130a2a082312a7a9a063d19b81de5fd69845 | |
parent | 6a28c0af12bc98c8b2bc8f31f3d6fb63c9efaf9a (diff) | |
download | scummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.tar.gz scummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.tar.bz2 scummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.zip |
Fixing bytes per pixel detection
svn-id: r42712
-rw-r--r-- | graphics/video/coktelvideo/coktelvideo.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 80106215cb..64f968888c 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -1149,21 +1149,16 @@ bool Vmd::load(Common::SeekableReadStream &stream) { } else _hasVideo = false; - if (_width > 320) { - if (!(_version & 4)) { - _version |= 4; - handle = 0; - } - } + _bytesPerPixel = 1; + if (_version & 4) + _bytesPerPixel = handle + 1; - if (handle > 2) { - warning("Vmd::load(): Version incorrect (%d, %d, %d)", headerLength, handle, _version); + if (_bytesPerPixel > 3) { + warning("Vmd::load(): Requested %d bytes per pixel (%d, %d, %d)", _bytesPerPixel, headerLength, handle, _version); unload(); return false; } - _bytesPerPixel = handle + 1; - _flags = _stream->readUint16LE(); _partsPerFrame = _stream->readUint16LE(); |