[Scummvm-cvs-logs] SF.net SVN: scummvm: [30810] scummvm/trunk/engines/parallaction/graphics. cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Wed Feb 6 15:56:11 CET 2008


Revision: 30810
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30810&view=rev
Author:   peres001
Date:     2008-02-06 06:56:10 -0800 (Wed, 06 Feb 2008)

Log Message:
-----------
Fixed broken halfbrite implementation from some time ago (nobody complained!!!).

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/graphics.cpp

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2008-02-06 14:12:59 UTC (rev 30809)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2008-02-06 14:56:10 UTC (rev 30810)
@@ -434,11 +434,10 @@
 
 	if (_halfbrite) {
 		// FIXME: the implementation of halfbrite is now largely sub-optimal in that a full screen
-		// rewrite is needed to apply the effect.
-		byte *src = (byte*)_backgroundInfo.bg.pixels;
-		byte *dst = (byte*)surf->pixels;
+		// rewrite is needed to apply the effect. Also, we are manipulating the frame buffer. Is it a good idea?
+		byte *buf = (byte*)surf->pixels;
 		for (int i = 0; i < surf->w*surf->h; i++) {
-			*dst++ = *src++ | 0x20;
+			*buf++ |= 0x20;
 		}
 		if (_hbCircleRadius > 0) {
 			drawCircle(_hbCirclePos.x, _hbCirclePos.y, _hbCircleRadius, 0, &halfbritePixel, surf->pixels);


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