[Scummvm-cvs-logs] CVS: scummvm gfx.cpp,1.87,1.88 scumm.h,1.157,1.158 scummvm.cpp,1.149,1.150 script_v2.cpp,1.60,1.61 saveload.cpp,1.47,1.48

Max Horn fingolfin at users.sourceforge.net
Sun May 12 10:52:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv6932

Modified Files:
	gfx.cpp scumm.h scummvm.cpp script_v2.cpp saveload.cpp 
Log Message:
renamed unkVirtScreen4 to fadeToBlackEffect; fixed graphic transition glitch (#551584)

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- gfx.cpp	8 May 2002 00:27:09 -0000	1.87
+++ gfx.cpp	12 May 2002 17:51:40 -0000	1.88
@@ -555,13 +555,14 @@
 	}
 }
 
-void Scumm::unkVirtScreen4(int a)
+void Scumm::fadeToBlackEffect(int a)
 {
 	VirtScreen *vs;
 
 	setDirtyRange(0, 0, 0);
 	if (!(_features & GF_AFTER_V7))
 		camera._last.x = camera._cur.x;
+
 	if (!_screenEffectFlag)
 		return;
 	_screenEffectFlag = false;
@@ -569,10 +570,12 @@
 	if (a == 0)
 		return;
 
+	// Fill screen 0 with black
 	vs = &virtscr[0];
 	gdi._backbuff_ptr = vs->screenPtr + vs->xstart;
 	memset(gdi._backbuff_ptr, 0, vs->size);
 
+	// Fade to black with the specified effect, if any.
 	switch (a) {
 	case 1:
 	case 2:
@@ -583,8 +586,9 @@
 		unkScreenEffect6();
 		break;
 	case 129:
-		//setDirtyRange(0, 0, vs->height);
-		//updateDirtyScreen(0);
+		// Just blit screen 0 to the display (i.e. display will be black)
+		setDirtyRange(0, 0, vs->height);
+		updateDirtyScreen(0);
 		/* XXX: EGA_proc4(0); */
 //		warning("EGA_proc4");				/* FIXME */
 		break;
@@ -595,7 +599,7 @@
 		unkScreenEffect5(1);
 		break;
 	default:
-		warning("unkVirtScreen4: default case %d", a);
+		warning("fadeToBlackEffect: default case %d", a);
 	}
 }
 
@@ -1759,6 +1763,7 @@
 	13, 25, 25, 25
 };
 
+/* Transition effect */
 void Scumm::unkScreenEffect7(int a)
 {
 	int tab_1[16];

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- scumm.h	10 May 2002 15:41:35 -0000	1.157
+++ scumm.h	12 May 2002 17:51:40 -0000	1.158
@@ -1212,7 +1212,7 @@
 	void updateDirtyScreen(int slot);
 
 	VirtScreen *findVirtScreen(int y);
-	void unkVirtScreen4(int a);
+	void fadeToBlackEffect(int a);
 	static void setVirtscreenDirty(VirtScreen *vs, int left, int top, int right, int bottom);
 
 	void screenEffect(int effect);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- scummvm.cpp	11 May 2002 21:09:30 -0000	1.149
+++ scummvm.cpp	12 May 2002 17:51:40 -0000	1.150
@@ -374,7 +374,7 @@
 
 	clearMsgQueue();
 
-	unkVirtScreen4(_switchRoomEffect2);
+	fadeToBlackEffect(_switchRoomEffect2);
 	_newEffect = _switchRoomEffect;
 
 	if (_currentScript != 0xFF) {

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- script_v2.cpp	12 May 2002 10:36:59 -0000	1.60
+++ script_v2.cpp	12 May 2002 17:51:40 -0000	1.61
@@ -2776,7 +2776,7 @@
 			grabCursor(args[1], args[2], args[3], args[4]);
 			break;
 		case 5:
-			unkVirtScreen4(args[1]);
+			fadeToBlackEffect(args[1]);
 			break;
 		case 6:
 			_fullRedraw = 1;

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saveload.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- saveload.cpp	6 May 2002 15:32:32 -0000	1.47
+++ saveload.cpp	12 May 2002 17:51:40 -0000	1.48
@@ -127,8 +127,8 @@
 	gdi._mask_left = -1;
 
 	initScreens(0, 0, 320, 200);
-	_screenEffectFlag = 1;
-	unkVirtScreen4(129);
+	_screenEffectFlag = true;
+	fadeToBlackEffect(129);
 
 	initScreens(0, sb, 320, sh);
 





More information about the Scummvm-git-logs mailing list