[Scummvm-cvs-logs] SF.net SVN: scummvm: [32207] scummvm/branches/gsoc2008-gui/graphics

Tanoku at users.sourceforge.net Tanoku at users.sourceforge.net
Wed May 21 19:44:39 CEST 2008


Revision: 32207
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32207&view=rev
Author:   Tanoku
Date:     2008-05-21 10:44:38 -0700 (Wed, 21 May 2008)

Log Message:
-----------
Code formatting guidelines

Modified Paths:
--------------
    scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
    scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h

Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-05-21 11:21:19 UTC (rev 32206)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp	2008-05-21 17:44:38 UTC (rev 32207)
@@ -210,7 +210,6 @@
 
 	if (dy == 0) { // horizontal lines
 		// these can be filled really fast with a single memset.
-		// TODO: Platform specific ASM in set_to, would make this thing fly 
 		colorFill(ptr, ptr + dx + 1, (PixelType)_fgColor);
 
 	} else if (dx == 0) { // vertical lines
@@ -605,7 +604,6 @@
 	int f, ddF_x, ddF_y;
 	int x, y, px, py;
 	int pitch = Base::surfacePitch();
-	int sw = 0, sp = 0, hp = h * pitch;
 	int alpha = 102;
 
 	x1 += blur;

Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h	2008-05-21 11:21:19 UTC (rev 32206)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h	2008-05-21 17:44:38 UTC (rev 32207)
@@ -499,19 +499,18 @@
 	virtual inline void colorFill(PixelType *first, PixelType *last, PixelType color) {
 		register PixelType *ptr = first;
 		register int count = (last - first);
-		{
-			register int n = (count + 7) / 8;
-			switch (count % 8) {
-			case 0: do { *ptr++ = color;
-			case 7:      *ptr++ = color;
-			case 6:      *ptr++ = color;
-			case 5:      *ptr++ = color;
-			case 4:      *ptr++ = color;
-			case 3:      *ptr++ = color;
-			case 2:      *ptr++ = color;
-			case 1:      *ptr++ = color;
-					} while (--n > 0);
-			}
+		register int n = (count + 7) >> 3;
+		switch (count % 8) {
+		case 0: do { 
+					*ptr++ = color;
+		case 7:		*ptr++ = color;
+		case 6:		*ptr++ = color;
+		case 5:		*ptr++ = color;
+		case 4:		*ptr++ = color;
+		case 3:		*ptr++ = color;
+		case 2:		*ptr++ = color;
+		case 1:		*ptr++ = color;
+				} while (--n > 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