aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorSven Hesse2009-07-24 21:35:06 +0000
committerSven Hesse2009-07-24 21:35:06 +0000
commit8396e2071330957121ad765df80aeaf0ffe5c4d0 (patch)
tree9e44130a2a082312a7a9a063d19b81de5fd69845 /graphics/video
parent6a28c0af12bc98c8b2bc8f31f3d6fb63c9efaf9a (diff)
downloadscummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.tar.gz
scummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.tar.bz2
scummvm-rg350-8396e2071330957121ad765df80aeaf0ffe5c4d0.zip
Fixing bytes per pixel detection
svn-id: r42712
Diffstat (limited to 'graphics/video')
-rw-r--r--graphics/video/coktelvideo/coktelvideo.cpp15
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();