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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Jan 28 23:20:55 CET 2008


Revision: 30693
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30693&view=rev
Author:   fingolfin
Date:     2008-01-28 14:20:55 -0800 (Mon, 28 Jan 2008)

Log Message:
-----------
Replace lock/unlock/lock/unlock by lock/unlock for efficency

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

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2008-01-28 22:05:23 UTC (rev 30692)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2008-01-28 22:20:55 UTC (rev 30693)
@@ -350,12 +350,10 @@
 
 	Graphics::Surface *surf = g_system->lockScreen();
 	drawGfxObjects(*surf);
-	g_system->unlockScreen();
 
 	if (_halfbrite) {
 		// FIXME: the implementation of halfbrite is now largely sub-optimal in that a full screen
 		// rewrite is needed to apply the effect.
-		surf = g_system->lockScreen();
 		byte *src = (byte*)_buffers[kBit2]->pixels;
 		byte *dst = (byte*)surf->pixels;
 		for (int i = 0; i < surf->w*surf->h; i++) {
@@ -364,9 +362,10 @@
 		if (_hbCircleRadius > 0) {
 			drawCircle(_hbCirclePos.x, _hbCirclePos.y, _hbCircleRadius, 0, &halfbritePixel, surf->pixels);
 		}
-		g_system->unlockScreen();
 	}
 
+	g_system->unlockScreen();
+
 	drawInventory();
 
 	drawItems();


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