[Scummvm-cvs-logs] SF.net SVN: scummvm:[36089] scummvm/trunk/graphics/scaler/2xsai.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Jan 27 02:35:23 CET 2009


Revision: 36089
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36089&view=rev
Author:   fingolfin
Date:     2009-01-27 01:35:21 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
Replaced small lookup table in 2xsai by direct computation

Modified Paths:
--------------
    scummvm/trunk/graphics/scaler/2xsai.cpp

Modified: scummvm/trunk/graphics/scaler/2xsai.cpp
===================================================================
--- scummvm/trunk/graphics/scaler/2xsai.cpp	2009-01-27 01:29:22 UTC (rev 36088)
+++ scummvm/trunk/graphics/scaler/2xsai.cpp	2009-01-27 01:35:21 UTC (rev 36089)
@@ -38,12 +38,7 @@
 	const int y2 = (bd & !ad);
 	const int x = x1+x2;
 	const int y = y1+y2;
-	static const int rmap[3][3] = {
-			{0, 0, -1},
-			{0, 0, -1},
-			{1, 1,  0}
-		};
-	return rmap[y][x];
+	return (y>>1) - (x>>1);
 }
 
 #define interpolate_1_1		interpolate16_1_1<Graphics::ColorMasks<bitFormat> >


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