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

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Tue Nov 18 20:54:45 CET 2008


Revision: 35118
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35118&view=rev
Author:   buddha_
Date:     2008-11-18 19:54:44 +0000 (Tue, 18 Nov 2008)

Log Message:
-----------
Make the 256 color transformPaletteRange-function and Future Wars's refreshPalette-function compliant with disassembly.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/pal.cpp

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2008-11-18 19:40:07 UTC (rev 35117)
+++ scummvm/trunk/engines/cine/gfx.cpp	2008-11-18 19:54:44 UTC (rev 35118)
@@ -556,10 +556,9 @@
 	assert(_activeLowPal);
 
 	for (i = 0; i < 16; i++) {
-		// This seems to match the output from DOSbox.
-		pal[i * 4 + 2] = ((_activeLowPal[i] & 0x00f) >> 0) * 32;
-		pal[i * 4 + 1] = ((_activeLowPal[i] & 0x0f0) >> 4) * 32;
-		pal[i * 4 + 0] = ((_activeLowPal[i] & 0xf00) >> 8) * 32;
+		pal[i * 4 + 2] = ((_activeLowPal[i] & 0x007) >> 0) * 32;
+		pal[i * 4 + 1] = ((_activeLowPal[i] & 0x070) >> 4) * 32;
+		pal[i * 4 + 0] = ((_activeLowPal[i] & 0x700) >> 8) * 32;
 		pal[i * 4 + 3] = 0;
 	}
 

Modified: scummvm/trunk/engines/cine/pal.cpp
===================================================================
--- scummvm/trunk/engines/cine/pal.cpp	2008-11-18 19:40:07 UTC (rev 35117)
+++ scummvm/trunk/engines/cine/pal.cpp	2008-11-18 19:54:44 UTC (rev 35118)
@@ -155,9 +155,9 @@
 	assert(srcPal && dstPal);
 
 	for (int i = startColor; i <= stopColor; i++) {
-		dstPal[3 * i + 0] = CLIP(srcPal[3 * i + 0] + r * 32, 0, 255);
-		dstPal[3 * i + 1] = CLIP(srcPal[3 * i + 1] + g * 32, 0, 255);
-		dstPal[3 * i + 2] = CLIP(srcPal[3 * i + 2] + b * 32, 0, 255);
+		dstPal[3 * i + 0] = CLIP(srcPal[3 * i + 0] + r * 36, 0, 252);
+		dstPal[3 * i + 1] = CLIP(srcPal[3 * i + 1] + g * 36, 0, 252);
+		dstPal[3 * i + 2] = CLIP(srcPal[3 * i + 2] + b * 36, 0, 252);
 	}
 }
 


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