[Scummvm-cvs-logs] SF.net SVN: scummvm:[42712] scummvm/trunk/graphics/video/coktelvideo/ coktelvideo.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Fri Jul 24 23:35:06 CEST 2009


Revision: 42712
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42712&view=rev
Author:   drmccoy
Date:     2009-07-24 21:35:06 +0000 (Fri, 24 Jul 2009)

Log Message:
-----------
Fixing bytes per pixel detection

Modified Paths:
--------------
    scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp

Modified: scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp	2009-07-24 21:34:43 UTC (rev 42711)
+++ scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp	2009-07-24 21:35:06 UTC (rev 42712)
@@ -1149,21 +1149,16 @@
 	} 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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list