[Scummvm-cvs-logs] CVS: scummvm/common scaler.cpp,1.31,1.32
Max Horn
fingolfin at users.sourceforge.net
Sun Jun 22 10:33:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv2673
Modified Files:
scaler.cpp
Log Message:
fix the inaccurate version of interpolate5Line to work correctly for odd widths
Index: scaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- scaler.cpp 22 Jun 2003 17:29:55 -0000 1.31
+++ scaler.cpp 22 Jun 2003 17:32:50 -0000 1.32
@@ -666,6 +666,19 @@
}
#else
// Not fully accurate, but a bit faster
+
+ if (width & 1) {
+ // For efficency reasons we normally blit two pixels at a time; but if the
+ // width is odd, we first blit a single pixel.
+ width--;
+ if (scale == 1) {
+ uint32 B = *srcB++;
+ *dst++ = (uint16)Q_INTERPOLATE(*srcA++, B, B, B);
+ } else {
+ *dst++ = (uint16)INTERPOLATE(*srcA++, *srcB++);
+ }
+ }
+
width /= 2;
const uint32 *sA = (const uint32 *)srcA;
const uint32 *sB = (const uint32 *)srcB;
More information about the Scummvm-git-logs
mailing list