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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jun 25 21:57:35 CEST 2009


Revision: 41882
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41882&view=rev
Author:   lordhoto
Date:     2009-06-25 19:57:35 +0000 (Thu, 25 Jun 2009)

Log Message:
-----------
Change Screen_LoL::generateGrayOverlay to use a Palette object internally.

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

Modified: scummvm/trunk/engines/kyra/screen_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_lol.cpp	2009-06-25 19:57:06 UTC (rev 41881)
+++ scummvm/trunk/engines/kyra/screen_lol.cpp	2009-06-25 19:57:35 UTC (rev 41882)
@@ -145,7 +145,7 @@
 }
 
 void Screen_LoL::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors) {
-	uint8 tmpPal[768];
+	Palette tmpPal(lastColor);
 
 	for (int i = 0; i != lastColor; i++) {
 		int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR;
@@ -157,7 +157,7 @@
 	}
 
 	for (int i = 0; i < lastColor; i++)
-		grayOverlay[i] = findLeastDifferentColor(tmpPal + 3 * i, srcPal, lastColor, skipSpecialColors);
+		grayOverlay[i] = findLeastDifferentColor(tmpPal.getData() + 3 * i, srcPal, lastColor, skipSpecialColors);
 }
 
 uint8 *Screen_LoL::generateLevelOverlay(const uint8 *srcPal, uint8 *ovl, int opColor, int weight) {


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