[Scummvm-cvs-logs] SF.net SVN: scummvm: [21658] scummvm/trunk/engines/cine/gfx.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Apr 6 19:03:07 CEST 2006


Revision: 21658
Author:   eriktorbjorn
Date:     2006-04-06 19:02:06 -0700 (Thu, 06 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21658&view=rev

Log Message:
-----------
This may look like a less good way of transforming three bits of colour into
eight bits. Perhaps it is. But it seems to match the output from DOSbox when
running Future Wars, and I tend to trust DOSbox in such matters.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/gfx.cpp
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2006-04-07 01:48:54 UTC (rev 21657)
+++ scummvm/trunk/engines/cine/gfx.cpp	2006-04-07 02:02:06 UTC (rev 21658)
@@ -307,9 +307,10 @@
 		g_system->setPalette(pal, 0, 256);
 	} else {
 		for (i = 0; i < 16; i++) {
-			pal[i * 4 + 2] = ((c_palette[i] & 0x00f) >> 0) * 255 / 7;
-			pal[i * 4 + 1] = ((c_palette[i] & 0x0f0) >> 4) * 255 / 7;
-			pal[i * 4 + 0] = ((c_palette[i] & 0xf00) >> 8) * 255 / 7;
+			// This seems to match the output from DOSbox.
+			pal[i * 4 + 2] = ((c_palette[i] & 0x00f) >> 0) * 32;
+			pal[i * 4 + 1] = ((c_palette[i] & 0x0f0) >> 4) * 32;
+			pal[i * 4 + 0] = ((c_palette[i] & 0xf00) >> 8) * 32;
 			pal[i * 4 + 3] = 0;
 		}
 		g_system->setPalette(pal, 0, 16);


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