[Scummvm-cvs-logs] SF.net SVN: scummvm:[35588] scummvm/trunk/engines/gob/video_v6.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Dec 28 12:27:10 CET 2008


Revision: 35588
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35588&view=rev
Author:   drmccoy
Date:     2008-12-28 11:27:09 +0000 (Sun, 28 Dec 2008)

Log Message:
-----------
Fixing the semi-transparency

Modified Paths:
--------------
    scummvm/trunk/engines/gob/video_v6.cpp

Modified: scummvm/trunk/engines/gob/video_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/video_v6.cpp	2008-12-28 09:28:43 UTC (rev 35587)
+++ scummvm/trunk/engines/gob/video_v6.cpp	2008-12-28 11:27:09 UTC (rev 35588)
@@ -172,10 +172,14 @@
 	int height = bottom - top  + 1;
 	int dWidth = dest->getWidth();
 	byte *vidMem = dest->getVidMem() + dWidth * top + left;
+
 	byte sY, sU, sV;
-
 	_palLUT->getEntry(color, sY, sU, sV);
 
+	int shadeY = sY * (16 - strength);
+	int shadeU = sU * (16 - strength);
+	int shadeV = sV * (16 - strength);
+
 	Graphics::SierraLight *dither =
 		new Graphics::SierraLight(width, _palLUT);
 
@@ -188,8 +192,11 @@
 
 			_palLUT->getEntry(dC, dY, dU, dV);
 
-			dY = CLIP<int>(sY + (dY >> 2), 0, 255);
-			*d++ = dither->dither(dY, sU, sV, j);
+			dY = CLIP<int>((shadeY + strength * dY) >> 4, 0, 255);
+			dU = CLIP<int>((shadeU + strength * dU) >> 4, 0, 255);
+			dV = CLIP<int>((shadeV + strength * dV) >> 4, 0, 255);
+
+			*d++ = dither->dither(dY, dU, dV, j);
 		}
 
 		dither->nextLine();


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