[Scummvm-cvs-logs] scummvm master -> 7658821afd7a6d2e70286866c15eff7dd2618115

dreammaster dreammaster at scummvm.org
Sun Feb 15 14:11:34 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7658821afd MADS: Fix left screen clipping for scaled flipped sprites


Commit: 7658821afd7a6d2e70286866c15eff7dd2618115
    https://github.com/scummvm/scummvm/commit/7658821afd7a6d2e70286866c15eff7dd2618115
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-02-15T08:10:13-05:00

Commit Message:
MADS: Fix left screen clipping for scaled flipped sprites

Changed paths:
    engines/mads/msurface.cpp



diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp
index cc12442..702b9e5 100644
--- a/engines/mads/msurface.cpp
+++ b/engines/mads/msurface.cpp
@@ -400,14 +400,16 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth,
 		const byte *srcP = srcPixelsP;
 		byte *destP = destPixelsP;
 
-		for (int xp = 0, sprX = 0; xp < frameWidth; ++xp, ++srcP) {
-			if (xp < spriteLeft)
-				// Not yet reached start of display area
-				continue;
-			if (!lineDist[sprX++])
+		for (int xp = 0, sprX = -1; xp < frameWidth; ++xp, ++srcP) {
+			if (!lineDist[xp])
 				// Not a display pixel
 				continue;
 
+			++sprX;
+			if (sprX < spriteLeft || sprX >= spriteRight)
+				// Skip pixel if it's not in horizontal display portion
+				continue;
+
 			// Get depth of current output pixel in depth surface
 			Common::Point pt((destP - (byte *)this->pixels) % this->pitch,
 				(destP - (byte *)this->pixels) / this->pitch);






More information about the Scummvm-git-logs mailing list