[Scummvm-cvs-logs] SF.net SVN: scummvm: [31318] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 30 05:18:16 CEST 2008


Revision: 31318
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31318&view=rev
Author:   lordhoto
Date:     2008-03-29 20:18:16 -0700 (Sat, 29 Mar 2008)

Log Message:
-----------
Always clip rect to copy in Screen::copyRegion now, like the original does.
This fixes bug #1537373 "KYRA1: Crash when meeting Zanthia".

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/animator_v1.cpp
    scummvm/trunk/engines/kyra/animator_v2.cpp
    scummvm/trunk/engines/kyra/screen.cpp
    scummvm/trunk/engines/kyra/screen.h

Modified: scummvm/trunk/engines/kyra/animator_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/animator_v1.cpp	2008-03-30 02:43:22 UTC (rev 31317)
+++ scummvm/trunk/engines/kyra/animator_v1.cpp	2008-03-30 03:18:16 UTC (rev 31318)
@@ -391,7 +391,7 @@
 				if (ypos + height > 136)
 					height = 136 - ypos;
 
-				_screen->copyRegion(xpos << 3, ypos, xpos << 3, ypos, width << 3, height, 2, 0, Screen::CR_CLIPPED);
+				_screen->copyRegion(xpos << 3, ypos, xpos << 3, ypos, width << 3, height, 2, 0);
 				curObject->refreshFlag = 0;
 				_updateScreen = true;
 			}

Modified: scummvm/trunk/engines/kyra/animator_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/animator_v2.cpp	2008-03-30 02:43:22 UTC (rev 31317)
+++ scummvm/trunk/engines/kyra/animator_v2.cpp	2008-03-30 03:18:16 UTC (rev 31318)
@@ -188,7 +188,7 @@
 			height -= height + y - 144;
 
 		_screen->hideMouse();
-		_screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_CLIPPED | Screen::CR_NO_P_CHECK);
+		_screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_NO_P_CHECK);
 		_screen->showMouse();
 
 		curObject->needRefresh = false;

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2008-03-30 02:43:22 UTC (rev 31317)
+++ scummvm/trunk/engines/kyra/screen.cpp	2008-03-30 03:18:16 UTC (rev 31318)
@@ -515,30 +515,28 @@
 void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags) {
 	debugC(9, kDebugLevelScreen, "Screen::copyRegion(%d, %d, %d, %d, %d, %d, %d, %d, %d)", x1, y1, x2, y2, w, h, srcPage, dstPage, flags);
 
-	if (flags & CR_CLIPPED) {
-		if (x2 < 0) {
-			if (x2  <= -w)
-				return;
-			w += x2;
-			x1 -= x2;
-			x2 = 0;
-		} else if (x2 + w >= SCREEN_W) {
-			if (x2 > SCREEN_W)
-				return;
-			w = SCREEN_W - x2;
-		}
+	if (x2 < 0) {
+		if (x2  <= -w)
+			return;
+		w += x2;
+		x1 -= x2;
+		x2 = 0;
+	} else if (x2 + w >= SCREEN_W) {
+		if (x2 > SCREEN_W)
+			return;
+		w = SCREEN_W - x2;
+	}
 
-		if (y2 < 0) {
-			if (y2 <= -h )
-				return;
-			h += y2;
-			y1 -= y2;
-			y2 = 0;
-		} else if (y2 + h >= SCREEN_H) {
-			if (y2 > SCREEN_H)
-				return;
-			h = SCREEN_H - y2;
-		}
+	if (y2 < 0) {
+		if (y2 <= -h )
+			return;
+		h += y2;
+		y1 -= y2;
+		y2 = 0;
+	} else if (y2 + h >= SCREEN_H) {
+		if (y2 > SCREEN_H)
+			return;
+		h = SCREEN_H - y2;
 	}
 
 	assert(x1 + w <= SCREEN_W && y1 + h <= SCREEN_H);

Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h	2008-03-30 02:43:22 UTC (rev 31317)
+++ scummvm/trunk/engines/kyra/screen.h	2008-03-30 03:18:16 UTC (rev 31318)
@@ -74,8 +74,7 @@
 
 	enum CopyRegionFlags {
 		CR_X_FLIPPED  = 0x01,
-		CR_CLIPPED    = 0x02,
-		CR_NO_P_CHECK = 0x04
+		CR_NO_P_CHECK = 0x02
 	};
 
 	enum DrawShapeFlags {


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