[Scummvm-cvs-logs] SF.net SVN: scummvm:[41852] scummvm/trunk/engines/kyra/screen.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jun 25 04:39:23 CEST 2009


Revision: 41852
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41852&view=rev
Author:   lordhoto
Date:     2009-06-25 02:39:23 +0000 (Thu, 25 Jun 2009)

Log Message:
-----------
Implement proper AMIGA to VGA color conversion.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen.cpp

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2009-06-25 02:39:00 UTC (rev 41851)
+++ scummvm/trunk/engines/kyra/screen.cpp	2009-06-25 02:39:23 UTC (rev 41852)
@@ -3276,9 +3276,9 @@
 
 	for (int i = 0; i < colors; ++i) {
 		uint16 col = stream.readUint16BE();
-		_palData[i * 3 + 2] = (col & 0xF) << 2; col >>= 4;
-		_palData[i * 3 + 1] = (col & 0xF) << 2; col >>= 4;
-		_palData[i * 3 + 0] = (col & 0xF) << 2; col >>= 4;
+		_palData[i * 3 + 2] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
+		_palData[i * 3 + 1] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
+		_palData[i * 3 + 0] = ((col & 0xF) * 0xFF) / 0x3F; col >>= 4;
 	}
 
 	memset(_palData + colors * 3, 0, (_numColors - colors) * 3);


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