[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.7,1.8 build_display.cpp,1.9,1.10 console.cpp,1.5,1.6 controls.cpp,1.6,1.7 debug.cpp,1.5,1.6 function.cpp,1.5,1.6 logic.cpp,1.4,1.5 mem_view.cpp,1.3,1.4 mouse.cpp,1.7,1.8 resman.cpp,1.11,1.12 router.cpp,1.6,1.7 startup.cpp,1.7,1.8 sword2.cpp,1.13,1.14

James Brown ender at users.sourceforge.net
Tue Aug 19 14:07:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv13217

Modified Files:
	anims.cpp build_display.cpp console.cpp controls.cpp debug.cpp 
	function.cpp logic.cpp mem_view.cpp mouse.cpp resman.cpp 
	router.cpp startup.cpp sword2.cpp 
Log Message:
Remove a bunch of unneeded cruft - but barely the surface of it. This code is depressing and duplicated all over the place... I don't think I can bear to touch this code until it's undergone some MAJOR cleanup :)



Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- anims.cpp	30 Jul 2003 19:25:27 -0000	1.7
+++ anims.cpp	19 Aug 2003 14:57:26 -0000	1.8
@@ -851,7 +851,6 @@
 	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q during the smacker
 	{
 		Close_game();	//close engine systems down
-		RestoreDisplay();
 		CloseAppWindow();
 		exit(0);	//quit the game
 	}
@@ -884,7 +883,6 @@
 
 	EraseBackBuffer();				// for hardware rendering
 	EraseSoftwareScreenBuffer();	// for software rendering
-	FlipScreens();					// to get the new blank screen visible
 
  	//--------------------------------------------------
 	// zero the entire palette in case we're about to fade up!

Index: build_display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/build_display.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- build_display.cpp	30 Jul 2003 19:25:27 -0000	1.9
+++ build_display.cpp	19 Aug 2003 14:57:26 -0000	1.10
@@ -254,7 +254,6 @@
 			// ready - blit to screen
 
 			CopyScreenBuffer();
-			FlipScreens();
 
  			//----------------------------------------------------
 			// update our fps reading
@@ -304,7 +303,6 @@
 			ExitWithReport("Driver Error %.8x (drawing console) [%s line %u]", rv, __FILE__, __LINE__);
 
 		CopyScreenBuffer();
-		FlipScreens();
 	}
 	else
 	{
@@ -349,7 +347,6 @@
 			if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 			{
 				Close_game();	//close engine systems down
-				RestoreDisplay();
 				CloseAppWindow();
 				exit(0);	//quit the game
 			}
@@ -404,7 +401,6 @@
 	SetPalette(0, 256, (uint8 *) pal, RDPAL_FADE);
 
 	CopyScreenBuffer();
-	FlipScreens();
 
 	FadeUp((float)0.75);
 
@@ -421,7 +417,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -442,7 +437,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -458,7 +452,6 @@
 		spriteInfo.y = oldY;			// Drivers change the y co-ordinate, don't know why...
 		spriteInfo.x = oldX;
 		CopyScreenBuffer();
-		FlipScreens();
 	}
 
 	SetPalette(0, 256, (uint8 *) oldPal, RDPAL_FADE);
@@ -483,7 +476,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -494,7 +486,6 @@
 	EraseBackBuffer();				// for hardware rendering
 	EraseSoftwareScreenBuffer();	// for software rendering
 	CopyScreenBuffer();
-	FlipScreens();
 
 //	FadeUp((float)0.75);	
 //	removed by JEL (08oct97) to prevent "eye" smacker corruption when restarting game from CD2

Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/console.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- console.cpp	30 Jul 2003 19:25:28 -0000	1.5
+++ console.cpp	19 Aug 2003 14:57:26 -0000	1.6
@@ -912,7 +912,6 @@
 				  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 					{
 						Close_game();	//close engine systems down
-						RestoreDisplay();
 						CloseAppWindow();
 						exit(0);	//quit the game
 					}
@@ -1030,7 +1029,6 @@
 
 	Close_game();	//should down game services - free's mallocs, etc.
 
-	RestoreDisplay();	//reset the Windows stuff
 	CloseAppWindow();	//
 
 	exit(0);
@@ -1144,7 +1142,6 @@
 				  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 					{
 						Close_game();	//close engine systems down
-						RestoreDisplay();
 						CloseAppWindow();
 						exit(0);	//quit the game
 					}

Index: controls.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/controls.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- controls.cpp	30 Jul 2003 19:25:28 -0000	1.6
+++ controls.cpp	19 Aug 2003 14:57:26 -0000	1.7
@@ -275,7 +275,6 @@
 	  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q during the smacker
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -417,14 +416,6 @@
 			SetFullPalette(CONTROL_PANEL_PALETTE);	// see Build_display.cpp (James17jun97)
 		}
 
-		FlipScreens();
-
-
-
-
-
-
-
 
 //mouse over buttons?
 //restore
@@ -972,7 +963,6 @@
 	  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q during the smacker
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1485,9 +1475,6 @@
 			first++;
 			SetFullPalette(CONTROL_PANEL_PALETTE);	// see Build_display.cpp (James17jun97)
 		}
-
-		FlipScreens();
-
 	}	//while
 
 
@@ -1513,15 +1500,9 @@
 
 	if	(!res)
 		return;	//just return to game
-
-//avoid corruption when windows kicks back in
-	EraseBackBuffer();
-	FlipScreens();
 	EraseBackBuffer();
-	FlipScreens();
 
 	Close_game();	//close engine systems down
-	RestoreDisplay();
 	CloseAppWindow();
 
 	exit(0);
@@ -1550,8 +1531,6 @@
 	Kill_mini_surfaces();
 	EraseBackBuffer();
 	//ProcessMenu();	//draw menu
-	FlipScreens();
-
 
 //restart the game
 //clear all memory and reset the globals
@@ -1656,7 +1635,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1747,7 +1725,6 @@
 		if	(breakOut)
 			break;
 
-		FlipScreens();
 		if	(!first)
 		{
 			first++;
@@ -1875,7 +1852,6 @@
 	  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q during the smacker
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -2379,7 +2355,6 @@
 	  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q during the smacker
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -2789,7 +2764,6 @@
 			first++;
 			SetFullPalette(CONTROL_PANEL_PALETTE);	// see Build_display.cpp (James17jun97)
 		}
-		FlipScreens();
 	}
 
 
@@ -2812,20 +2786,17 @@
 					break;
 
 				case 1:
-					RenderSoft();
 					ClearBltFx();
 					ClearShadowFx();
 					CloseBackgroundLayer();
 					break;
 
 				case 2:
-					RenderSoft();
 					ClearBltFx();
 					CloseBackgroundLayer();
 					break;
 
 				case 3:	// same as case 2 until case 2 has edge-blending inactivated
-					RenderSoft();
 					CloseBackgroundLayer();
 					break;
 			}
@@ -2838,7 +2809,6 @@
 					break;
 
 				case 0:
-					RenderHard();
 					SetUpBackgroundLayers();	// InitialiseBackgroundLayer for each layer! (see layers.cpp)
 					break;
 
@@ -2867,7 +2837,6 @@
 					break;
 
 				case 0:
-					RenderHard();
 					SetUpBackgroundLayers();	// InitialiseBackgroundLayer for each layer! (see layers.cpp)
 					break;
 			}
@@ -2889,7 +2858,6 @@
 					break;
 
 				case 0:
-					RenderHard();
 					SetUpBackgroundLayers();	// InitialiseBackgroundLayer for each layer! (see layers.cpp)
 					break;
 			}

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/debug.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- debug.cpp	30 Jul 2003 19:25:28 -0000	1.5
+++ debug.cpp	19 Aug 2003 14:57:26 -0000	1.6
@@ -105,7 +105,6 @@
 	while (GetFadeStatus())	// wait for fade to finish before calling RestoreDisplay()
 		ServiceWindows();
 
-	RestoreDisplay();
 	ReportFatalError((const uint8 *)buf);	// display message box
 	CloseAppWindow();
 	while (ServiceWindows() != RDERR_APPCLOSED);

Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/function.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- function.cpp	30 Jul 2003 19:25:28 -0000	1.5
+++ function.cpp	19 Aug 2003 14:57:26 -0000	1.6
@@ -446,7 +446,6 @@
 	if (rv || DEMO)		// if Ctrl-Q pressed during credits, or if this is the playable demo
 	{
 		Close_game();	//close engine systems down
-		RestoreDisplay();
 		CloseAppWindow();
 		exit(0);		// quit the game
 	}

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/logic.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- logic.cpp	30 Jul 2003 19:25:29 -0000	1.4
+++ logic.cpp	19 Aug 2003 14:57:26 -0000	1.5
@@ -323,7 +323,6 @@
 				  	if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 					{
 						Close_game();	//close engine systems down
-						RestoreDisplay();
 						CloseAppWindow();
 						exit(0);	//quit the game
 					}

Index: mem_view.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/mem_view.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mem_view.cpp	28 Jul 2003 03:12:49 -0000	1.3
+++ mem_view.cpp	19 Aug 2003 14:57:26 -0000	1.4
@@ -139,7 +139,6 @@
 				if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 				{
 					Close_game();	//close engine systems down
-					RestoreDisplay();
 					CloseAppWindow();
 					exit(0);	//quit the game
 				}

Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/mouse.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mouse.cpp	30 Jul 2003 19:25:29 -0000	1.7
+++ mouse.cpp	19 Aug 2003 14:57:26 -0000	1.8
@@ -253,7 +253,6 @@
 
 					EraseBackBuffer();
 					ProcessMenu();	// drivers to redraw menu over this blank screen!
-					FlipScreens();
 					ResetRenderEngine();
   					//------------------------
 
@@ -295,7 +294,6 @@
 
 					EraseBackBuffer();
 					ProcessMenu();	// drivers to redraw menu over this blank screen!
-					FlipScreens();
 
 					//------------------------
 					// reset game palette, but not after a successful restore or restart!

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- resman.cpp	1 Aug 2003 12:19:01 -0000	1.11
+++ resman.cpp	19 Aug 2003 14:57:26 -0000	1.12
@@ -862,7 +862,6 @@
 				  			if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 							{
 								Close_game();	//close engine systems down
-								RestoreDisplay();
 								CloseAppWindow();
 								exit(0);	//quit the game
 							}
@@ -953,7 +952,6 @@
 				  				if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 								{
 									Close_game();	//close engine systems down
-									RestoreDisplay();
 									CloseAppWindow();
 									exit(0);	//quit the game
 								}
@@ -1054,7 +1052,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1074,7 +1071,6 @@
 			if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 			{
 				Close_game();	//close engine systems down
-				RestoreDisplay();
 				CloseAppWindow();
 				exit(0);	//quit the game
 			}
@@ -1084,13 +1080,7 @@
 	}
 
 
-//get rid of top menu flash (tony 26Aug97)
 	EraseBackBuffer();
-	FlipScreens();
-	EraseBackBuffer();
-	FlipScreens();
-
-
 
 	Set_mouse(0);
 	Set_luggage(0);	//tw28Aug
@@ -1182,8 +1172,6 @@
 	textSprite.y = textY;
 
 	CopyScreenBuffer();
-	FlipScreens();
-
 	FadeUp((float)0.75);
 
 	do
@@ -1194,7 +1182,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1243,8 +1230,6 @@
 			textSprite.y = textY;
 
 			CopyScreenBuffer();
-			FlipScreens();
-
 			fr += 1;
 		}
 		else
@@ -1257,7 +1242,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1288,7 +1272,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1297,7 +1280,6 @@
 	while(GetFadeStatus()==RDFADE_DOWN);
 
 	CopyScreenBuffer();
-	FlipScreens();
 	FadeUp((float)0.75);
 
 	SVM_SetFileAttributes(resource_files[newCluster], FILE_ATTRIBUTE_NORMAL);	// Git rid of read-only status.
@@ -1498,7 +1480,6 @@
 		if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 		{
 			Close_game();	//close engine systems down
-			RestoreDisplay();
 			CloseAppWindow();
 			exit(0);	//quit the game
 		}
@@ -1517,7 +1498,6 @@
 			spriteInfo.y = oldY;			// Drivers change the y co-ordinate, don't know why...
 			spriteInfo.x = oldX;
 			CopyScreenBuffer();
-			FlipScreens();
 		}
 
 	} while (!done);

Index: router.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/router.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- router.cpp	30 Jul 2003 19:25:29 -0000	1.6
+++ router.cpp	19 Aug 2003 14:57:26 -0000	1.7
@@ -499,7 +499,6 @@
 		#else
 		RenderOffScreenBuffer( scroll_offset_x, scroll_offset_y, SCREEN_WIDTH, SCREEN_DEPTH );
 		#endif
-		FlipScreens();
 
 		FlushMouseEvents();	// clear mouse buffer
 		while (!TestForMouseEvent());	// wait for a button press or release

Index: startup.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/startup.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- startup.cpp	30 Jul 2003 19:25:30 -0000	1.7
+++ startup.cpp	19 Aug 2003 14:57:26 -0000	1.8
@@ -222,7 +222,6 @@
 					if (ServiceWindows() == RDERR_APPCLOSED)	// if we pressed Ctrl-Q
 					{
 						Close_game();	//close engine systems down
-						RestoreDisplay();
 						CloseAppWindow();
 						exit(0);	//quit the game
 					}

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- sword2.cpp	17 Aug 2003 14:07:16 -0000	1.13
+++ sword2.cpp	19 Aug 2003 14:57:26 -0000	1.14
@@ -189,11 +189,7 @@
 void	Close_game()	//Tony11Oct96
 {
 	Zdebug("Close_game() STARTING:");
-//avoid corruption when windows kicks back in
-	EraseBackBuffer();
-	FlipScreens();
 	EraseBackBuffer();
-	FlipScreens();
 
 	Kill_music();			// Stop music instantly! (James22aug97)
 	Close_memory_manager();	// free the memory again
@@ -315,7 +311,6 @@
 	if (InitialiseGame())
 	{
 	  	Zdebug("RETURNED from InitialiseGame - closing game");
-		RestoreDisplay();
 		CloseAppWindow();
 		return;
 	}
@@ -459,7 +454,6 @@
 	}
 
 	Close_game();	//close engine systems down
-	RestoreDisplay();
 	CloseAppWindow();
 
 	return;	//quit the game





More information about the Scummvm-git-logs mailing list