[Scummvm-git-logs] scummvm master -> 8204a23032f10a5d7a2195ba8f606f1111bf6db7

sev- sev at scummvm.org
Tue Sep 13 19:36:28 CEST 2016


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:
8204a23032 FULLPIPE: Simplified Dib clipping code


Commit: 8204a23032f10a5d7a2195ba8f606f1111bf6db7
    https://github.com/scummvm/scummvm/commit/8204a23032f10a5d7a2195ba8f606f1111bf6db7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-13T19:36:21+02:00

Commit Message:
FULLPIPE: Simplified Dib clipping code

Changed paths:
    engines/fullpipe/gfx.cpp



diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 1ef5c47..90b8ae5 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -843,25 +843,18 @@ void Bitmap::putDib(int x, int y, int32 *palette, int alpha) {
 		return;
 
 	Common::Rect sub(0, 0, _width, _height);
+	sub.translate(x, y);
+	sub.clip(g_fp->_sceneRect);
+	sub.translate(-x, -y);
 
-	if (x1 < 0) {
-		sub.left = -x1;
+	if (sub.isEmpty())
+		return;
+
+	if (x1 < 0)
 		x1 = 0;
-	}
 
-	if (y1 < 0) {
-		sub.top = -y1;
+	if (y1 < 0)
 		y1 = 0;
-	}
-
-	if (x1 + sub.width() > 799)
-		sub.right -= x1 + sub.width() - 799;
-
-	if (y1 + sub.height() > 599)
-		sub.bottom -= y1 + sub.height() - 599;
-
-	if (sub.width() <= 0 || sub.height() <= 0)
-		return;
 
 	int alphac = TS_ARGB(0xff, alpha, 0xff, 0xff);
 





More information about the Scummvm-git-logs mailing list