[Scummvm-git-logs] scummvm master -> 4352ea6a2300f732e119125b601e01d5089032ad

dreammaster dreammaster at scummvm.org
Thu Apr 5 03:34:18 CEST 2018


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:
4352ea6a23 XEEN: Improved clipping for drawing within scene area


Commit: 4352ea6a2300f732e119125b601e01d5089032ad
    https://github.com/scummvm/scummvm/commit/4352ea6a2300f732e119125b601e01d5089032ad
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-04T21:34:12-04:00

Commit Message:
XEEN: Improved clipping for drawing within scene area

Changed paths:
    engines/xeen/sprites.cpp


diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp
index adeb567..2a5d18e 100644
--- a/engines/xeen/sprites.cpp
+++ b/engines/xeen/sprites.cpp
@@ -147,8 +147,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi
 		bounds = Common::Rect(0, 0, dest.w, dest.h);
 	}
 	if (flags & SPRFLAG_SCENE_CLIPPED) {
-		bounds.top = 8;
-		bounds.bottom = 149;
+		bounds.clip(Common::Rect(8, 8, 230, 149));
 	}
 
 	uint16 scaleMaskXCopy = scaleMaskX;
@@ -285,8 +284,7 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi
 				if (bit) {
 					// Check whether there's a pixel to write, and we're within the allowable bounds. Note that for
 					// the SPRFLAG_SCENE_CLIPPED or when enlarging, we also have an extra horizontal bounds check
-					if (*lineP != -1 && xp >= bounds.left && xp < bounds.right &&
-							((!(flags & SPRFLAG_SCENE_CLIPPED) && !enlarge) || (xp >= SCENE_CLIP_LEFT && xp < SCENE_CLIP_RIGHT))) {
+					if (*lineP != -1 && xp >= bounds.left && xp < bounds.right) {
 						drawBounds.left = MIN(drawBounds.left, xp);
 						drawBounds.right = MAX((int)drawBounds.right, xp + 1);
 						*destP = (byte)*lineP;





More information about the Scummvm-git-logs mailing list