[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.240,2.241 gfx.h,1.50,1.51 saveload.cpp,1.127,1.128 scumm.h,1.343,1.344 scummvm.cpp,2.528,2.529

Max Horn fingolfin at users.sourceforge.net
Sat Jan 3 14:24:18 CET 2004


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

Modified Files:
	gfx.cpp gfx.h saveload.cpp scumm.h scummvm.cpp 
Log Message:
cleanup

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.240
retrieving revision 2.241
diff -u -d -r2.240 -r2.241
--- gfx.cpp	3 Jan 2004 21:29:17 -0000	2.240
+++ gfx.cpp	3 Jan 2004 22:21:56 -0000	2.241
@@ -211,30 +211,6 @@
 		_roomPalette += 16;
 }
 
-void ScummEngine::getGraphicsPerformance() {
-	int i;
-
-	for (i = 10; i != 0; i--) {
-		initScreens(0, _screenWidth, _screenHeight);
-	}
-
-	if (VAR_PERFORMANCE_1 != 0xFF)	// Variable is reserved for game scripts in earlier games
-		VAR(VAR_PERFORMANCE_1) = 0;
-
-	for (i = 10; i != 0; i--) {
-		virtscr[0].setDirtyRange(0, _screenHeight);	//ender
-		drawDirtyScreenParts();
-	}
-
-	if (VAR_PERFORMANCE_2 != 0xFF)	// Variable is reserved for game scripts in earlier games
-		VAR(VAR_PERFORMANCE_2) = 0;
-
-	if (_version >= 7)
-		initScreens(0, _screenWidth, _screenHeight);
-	else
-		initScreens(16, _screenWidth, 144);
-}
-
 void ScummEngine::initScreens(int b, int w, int h) {
 	int i;
 
@@ -258,7 +234,6 @@
 
 	_screenB = b;
 	_screenH = h;
-
 }
 
 void ScummEngine::initVirtScreen(int slot, int number, int top, int width, int height, bool twobufs,
@@ -281,10 +256,9 @@
 	vs->alloctwobuffers = twobufs;
 	vs->scrollable = scrollable;
 	vs->xstart = 0;
-	size = vs->width * vs->height;
-	vs->size = size;
 	vs->backBuf = NULL;
 
+	size = vs->width * vs->height;
 	if (vs->scrollable) {
 		if (_version >= 7) {
 			size += _screenWidth * 8;
@@ -603,7 +577,7 @@
 	byte *room;
 
 	if (_version >= 7) {
-		initVirtScreen(0, 0, virtscr[0].topline, _screenWidth, height, 1, 1);
+		initVirtScreen(kMainVirtScreen, 0, virtscr[0].topline, _screenWidth, height, 1, 1);
 	}
 
 	room = getResourceAddress(rtRoom, _roomResource);
@@ -2238,7 +2212,7 @@
 	
 		// Fill screen 0 with black
 		
-		memset(vs->screenPtr + vs->xstart, 0, vs->size);
+		memset(vs->screenPtr + vs->xstart, 0, vs->width * vs->height);
 	
 		// Fade to black with the specified effect, if any.
 		switch (effect) {
@@ -2395,7 +2369,7 @@
 	if (width == 1 && height == 1) {
 		// Optimized case for pixel-by-pixel dissolve
 
-		for (i = 0; i < vs->size; i++)
+		for (i = 0; i < vs->width * vs->height; i++)
 			offsets[i] = i;
 
 		for (i = 1; i < w * h; i++) {

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- gfx.h	3 Jan 2004 21:22:06 -0000	1.50
+++ gfx.h	3 Jan 2004 22:21:56 -0000	1.51
@@ -59,7 +59,6 @@
 	int number;
 	uint16 topline;
 	uint16 width, height;
-	int size;
 	byte alloctwobuffers;
 	bool scrollable;
 	uint16 xstart;
@@ -194,7 +193,7 @@
 };
 
 
-// If you wan to try buggy hacked smooth scrolling support in The Dig, enable
+// If you want to try buggy hacked smooth scrolling support in The Dig, enable
 // the following preprocessor flag by uncommenting it.
 //
 // Note: This is purely experimental, NOT WORKING COMPLETLY and very buggy.

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- saveload.cpp	3 Jan 2004 21:26:44 -0000	1.127
+++ saveload.cpp	3 Jan 2004 22:21:56 -0000	1.128
@@ -161,7 +161,7 @@
 	gdi._mask.right = gdi._mask.bottom = 0;
 	_charset->_hasMask = false;
 
-	initScreens(0, _screenWidth, _screenHeight);
+	initScreens(kMainVirtScreen, _screenWidth, _screenHeight);
 
 	// Force a fade to black
 	int old_screenEffectFlag = _screenEffectFlag;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- scumm.h	3 Jan 2004 21:26:44 -0000	1.343
+++ scumm.h	3 Jan 2004 22:21:56 -0000	1.344
@@ -791,7 +791,6 @@
 	
 	StripTable *_roomStrips;
 
-	void getGraphicsPerformance();
 	void initScreens(int b, int w, int h);
 	void initVirtScreen(int slot, int number, int top, int width, int height, bool twobufs, bool scrollable);
 	void initBGBuffers(int height);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.528
retrieving revision 2.529
diff -u -d -r2.528 -r2.529
--- scummvm.cpp	3 Jan 2004 21:26:44 -0000	2.528
+++ scummvm.cpp	3 Jan 2004 22:21:56 -0000	2.529
@@ -925,7 +925,7 @@
 	_verbRedraw = false;
 
 	allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
-	initVirtScreen(0, 0, 0, _screenWidth, _screenHeight, false, false);
+//	initVirtScreen(kMainVirtScreen, 0, 0, _screenWidth, _screenHeight, false, false);	// FIXME - why is this here? It seems we could remove it in f
 
 	setupScummVars();
 
@@ -1167,9 +1167,6 @@
 	createResource(rtTemp, 6, 500);
 
 	initScummVars();
-
-	// FIXME: disabled, why we need this, it's looks completly dummy and slow down startup
-	//	getGraphicsPerformance();
 
 	_lastSaveTime = _system->get_msecs();
 }





More information about the Scummvm-git-logs mailing list