[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.211,2.212 gfx.cpp,2.140,2.141

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Thu Jun 5 00:06:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv25388

Modified Files:
	scummvm.cpp gfx.cpp 
Log Message:
Inverse iris transition effect for V2 games. Also, some transition effects
weren't working properly unless the entire screen was first marked as not
dirty. I hope fixing that didn't break anything else.


Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.211
retrieving revision 2.212
diff -u -d -r2.211 -r2.212
--- scummvm.cpp	5 Jun 2003 05:03:57 -0000	2.211
+++ scummvm.cpp	5 Jun 2003 07:05:36 -0000	2.212
@@ -777,7 +777,7 @@
 		// Seems in V2 there was only a single room effect (iris),
 		// so we set that here.
 		_switchRoomEffect2 = 1;
-		_switchRoomEffect = 1;
+		_switchRoomEffect = 5;
 	}
 	
 	if (_features & GF_AFTER_V2)

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.140
retrieving revision 2.141
diff -u -d -r2.140 -r2.141
--- gfx.cpp	5 Jun 2003 00:18:15 -0000	2.140
+++ gfx.cpp	5 Jun 2003 07:05:37 -0000	2.141
@@ -66,7 +66,7 @@
 #ifdef __PALM_OS__
 static const TransitionEffect *transitionEffects;
 #else
-static const TransitionEffect transitionEffects[4] = {
+static const TransitionEffect transitionEffects[5] = {
 	// Iris effect (looks like an opening/closing camera iris)
 	{
 		13,		// Number of iterations
@@ -134,6 +134,23 @@
 		   38,  0, 38, 24,
 		  255,  0,  0,  0
 		}
+	},
+
+	// Inverse iris effect, specially tailored for V2 games
+	{
+		8,		// Number of iterations
+		{
+			-1, -1,  1, -1,
+			-1,  1,  1,  1,
+			-1, -1, -1,  1,
+			 1, -1,  1,  1
+		},
+		{
+			 7, 7, 32, 7,
+			 7, 8, 32, 8,
+			 7, 8,  7, 8,
+			32, 7, 32, 8
+		}
 	}
 };
 #endif
@@ -2071,6 +2088,14 @@
 	case 2:
 	case 3:
 	case 4:
+	case 5:
+		// Some of the transition effects won't work properly unless
+		// the screen is marked as clean first. At first I thought I
+		// could safely do this every time fadeIn() was called, but
+		// that broke the FOA intro. Probably other things as well.
+		//
+		// Hopefully it's safe to do it at this point, at least.
+		virtscr[0].setDirtyRange(0, 0);
 		transitionEffect(effect - 1);
 		break;
 	case 128:
@@ -2115,6 +2140,7 @@
 		case 2:
 		case 3:
 		case 4:
+		case 5:
 			transitionEffect(effect - 1);
 			break;
 		case 128:
@@ -2188,6 +2214,8 @@
 					continue;
 				if (b > bottom)
 					b = bottom;
+				if (t < 0)
+					t = 0;
 				virtscr[0].tdirty[l] = t << 3;
 				virtscr[0].bdirty[l] = (b + 1) << 3;
 			}





More information about the Scummvm-git-logs mailing list