[Scummvm-cvs-logs] SF.net SVN: scummvm: [28686] scummvm/trunk/engines/saga/gfx.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Aug 21 16:59:03 CEST 2007
Revision: 28686
http://scummvm.svn.sourceforge.net/scummvm/?rev=28686&view=rev
Author: thebluegr
Date: 2007-08-21 07:59:02 -0700 (Tue, 21 Aug 2007)
Log Message:
-----------
Simplified blackToPal
Modified Paths:
--------------
scummvm/trunk/engines/saga/gfx.cpp
Modified: scummvm/trunk/engines/saga/gfx.cpp
===================================================================
--- scummvm/trunk/engines/saga/gfx.cpp 2007-08-21 12:46:21 UTC (rev 28685)
+++ scummvm/trunk/engines/saga/gfx.cpp 2007-08-21 14:59:02 UTC (rev 28686)
@@ -356,8 +356,6 @@
// Exponential fade
fpercent = percent * percent;
- fpercent = 1.0 - fpercent;
-
// Use the correct percentage change per frame for each palette entry
for (i = 0, ppal = _currentPal; i < PAL_ENTRIES; i++, ppal += 4) {
if (i < from || i >= from + numcolors)
@@ -365,7 +363,7 @@
else
palE = &srcPal[i];
- new_entry = (int)(palE->red - palE->red * fpercent);
+ new_entry = (int)(palE->red * fpercent);
if (new_entry < 0) {
ppal[0] = 0;
@@ -373,7 +371,7 @@
ppal[0] = (byte)new_entry;
}
- new_entry = (int)(palE->green - palE->green * fpercent);
+ new_entry = (int)(palE->green * fpercent);
if (new_entry < 0) {
ppal[1] = 0;
@@ -381,7 +379,7 @@
ppal[1] = (byte) new_entry;
}
- new_entry = (int)(palE->blue - palE->blue * fpercent);
+ new_entry = (int)(palE->blue * fpercent);
if (new_entry < 0) {
ppal[2] = 0;
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