[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.471.2.7,2.471.2.8 gfx.h,1.122.2.3,1.122.2.4 script.cpp,1.232.2.3,1.232.2.4 script.h,2.6.2.2,2.6.2.3 script_v2.cpp,2.282.2.3,2.282.2.4 script_v5.cpp,1.300.2.2,1.300.2.3 script_v6.cpp,1.453.2.6,1.453.2.7 verbs.cpp,1.143.2.2,1.143.2.3

Max Horn fingolfin at users.sourceforge.net
Thu Jan 26 01:52:01 CET 2006


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30491

Modified Files:
      Tag: branch-0-8-0
	gfx.cpp gfx.h script.cpp script.h script_v2.cpp script_v5.cpp 
	script_v6.cpp verbs.cpp 
Log Message:
Backported some cosmetic changes (helps to make my diff's smaller ;-)

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.471.2.7
retrieving revision 2.471.2.8
diff -u -d -r2.471.2.7 -r2.471.2.8
--- gfx.cpp	26 Jan 2006 02:23:09 -0000	2.471.2.7
+++ gfx.cpp	26 Jan 2006 09:51:00 -0000	2.471.2.8
@@ -534,7 +534,7 @@
 	int y = vs->topline + top - _screenTop;
 	int height = bottom - top;
 	
-	if (height <= 0)
+	if (height <= 0 || width <= 0)
 		return;
 	
 	// Compute screen etc. buffer pointers
@@ -723,7 +723,7 @@
 		// Resize main virtual screen in V7 games. This is necessary
 		// because in V7, rooms may be higher than one screen, so we have
 		// to accomodate for that.
-		initVirtScreen(kMainVirtScreen, virtscr[0].topline, _screenWidth, height, 1, 1);
+		initVirtScreen(kMainVirtScreen, virtscr[0].topline, _screenWidth, height, true, true);
 	}
 
 	if (_heversion >= 70)
@@ -3063,6 +3063,7 @@
 			t = tab_2[i * 4 + 1];
 			r = tab_2[i * 4 + 2];
 			b = tab_2[i * 4 + 3];
+
 			if (t == b) {
 				while (l <= r) {
 					if (l >= 0 && l < gdi._numStrips && t < bottom) {

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.122.2.3
retrieving revision 1.122.2.4
diff -u -d -r1.122.2.3 -r1.122.2.4
--- gfx.h	18 Jan 2006 18:07:32 -0000	1.122.2.3
+++ gfx.h	26 Jan 2006 09:51:00 -0000	1.122.2.4
@@ -88,10 +88,6 @@
 	/**
 	 * Vertical position of the virtual screen. Tells how much the virtual
 	 * screen is shifted along the y axis relative to the real screen.
-	 * If you wonder why there is no horizontal position: there is none,
-	 * because all virtual screens are always exactly as wide as the
-	 * real screen. This might change in the future to allow smooth
-	 * horizontal scrolling in V7-V8 games.
 	 */
 	uint16 topline;
 
@@ -103,8 +99,8 @@
 	uint16 xstart;
 
 	/**
-	 * Flag indicating  which tells whether this screen has a back buffer or
-	 * not. This is yet another feature which is only used by the main screen.
+	 * Flag indicating whether this screen has a back buffer or not. This is
+	 * yet another feature which is only used by the main screen.
 	 * Strictly spoken one could remove this variable and replace checks
 	 * on it with checks on backBuf. But since some code needs to temporarily
 	 * disable the backBuf (so it can abuse drawBitmap; see drawVerbBitmap()

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.232.2.3
retrieving revision 1.232.2.4
diff -u -d -r1.232.2.3 -r1.232.2.4
--- script.cpp	18 Jan 2006 18:07:32 -0000	1.232.2.3
+++ script.cpp	26 Jan 2006 09:51:00 -0000	1.232.2.4
@@ -184,7 +184,7 @@
 			ptr += 2;
 		} while (1);
 		return verboffs + 8 + READ_LE_UINT32(ptr + 1);
-	} if (_version <= 2) {
+	} else if (_version <= 2) {
 		do {
 			if (!*verbptr)
 				return 0;

Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.h,v
retrieving revision 2.6.2.2
retrieving revision 2.6.2.3
diff -u -d -r2.6.2.2 -r2.6.2.3
--- script.h	18 Jan 2006 18:07:32 -0000	2.6.2.2
+++ script.h	26 Jan 2006 09:51:00 -0000	2.6.2.3
@@ -27,7 +27,13 @@
 
 namespace Scumm {
 
-/* System Wide Constants */
+/**
+ * The number of script slots, which determines the maximal number
+ * of concurrently running scripts.
+ * WARNING: Do NOT changes this value unless you really have to, as
+ * this will break savegame compatibility if done carelessly. If you
+ * have to change it, make sure you update saveload.cpp accordingly!
+ */
 enum {
 	NUM_SCRIPT_SLOT = 80
 };

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.282.2.3
retrieving revision 2.282.2.4
diff -u -d -r2.282.2.3 -r2.282.2.4
--- script_v2.cpp	18 Jan 2006 18:07:32 -0000	2.282.2.3
+++ script_v2.cpp	26 Jan 2006 09:51:00 -0000	2.282.2.4
@@ -1107,7 +1107,7 @@
 
 	int act = getVarOrDirectByte(PARAM_1);
 
-	// FIXME: Work around for bug #1252606
+	// WORKAROUND bug #1252606
 	if (_gameId == GID_ZAK && _version == 1 && vm.slot[_currentScript].number == 115 && act == 249) {
 		act = VAR(VAR_EGO);
 	}

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.300.2.2
retrieving revision 1.300.2.3
diff -u -d -r1.300.2.2 -r1.300.2.3
--- script_v5.cpp	18 Jan 2006 18:07:32 -0000	1.300.2.2
+++ script_v5.cpp	26 Jan 2006 09:51:00 -0000	1.300.2.3
@@ -1236,11 +1236,12 @@
 	o2 = getVarOrDirectWord(PARAM_2);
 	r = getObjActToObjActDist(o1, o2);
 
-	// FIXME: MI2 race workaround, see bug #597022
+	// FIXME: MI2 race workaround, see bug #597022. We never quite figured out
+	// what the real cause of this, or if it maybe occurs in the original, too...
 	if (_gameId == GID_MONKEY2 && vm.slot[_currentScript].number == 40 && r < 60)
 		r = 60;
 
-	// FIXME: Workaround for bug #795937
+	// WORKAROUND bug #795937
 	if ((_gameId == GID_MONKEY_EGA || _gameId == GID_PASS) && o1 == 1 && o2 == 307  && vm.slot[_currentScript].number == 205 && r == 2)
 		r = 3;
 
@@ -2818,7 +2819,7 @@
 				int byte_2FCCF = 0;
 
 				// For now, we force a redraw of the screen background. This
-				// Makes the Zak end credits work more or less correctly.
+				// way the Zak end credits seem to work mostly correct.
 				VirtScreen *vs = &virtscr[0];
 				restoreBG(Common::Rect(0,vs->topline, vs->w, vs->topline + vs->h));
 				vs->setDirtyRange(0, vs->h);

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.453.2.6
retrieving revision 1.453.2.7
diff -u -d -r1.453.2.6 -r1.453.2.7
--- script_v6.cpp	23 Jan 2006 19:28:45 -0000	1.453.2.6
+++ script_v6.cpp	26 Jan 2006 09:51:01 -0000	1.453.2.7
@@ -1185,9 +1185,8 @@
 	} else {
 		a2 = derefActorSafe(obj, "o6_walkActorToObj(2)");
 		if (_gameId == GID_SAMNMAX && a2 == 0) {
-			// FIXME: This is a hack to work around bug #742676 SAM: Fish Farm.
-			// Note quite sure why it happens, though, if it's normal or due to
-			// a bug in the ScummVM code.
+			// WORKAROUND bug #742676 SAM: Fish Farm. Note quite sure why it
+			// happens, whether it's normal or due to a bug in the ScummVM code.
 			debug(0, "o6_walkActorToObj: invalid actor %d", obj);
 			return;
 		}
@@ -1267,9 +1266,9 @@
 	int act = pop();
 	if (_gameId == GID_TENTACLE && _roomResource == 57 &&
 		vm.slot[_currentScript].number == 19 && act == 593) {
-		// FIXME: This very odd case (animateActor(593,250)) occurs in DOTT, in the
-		// cutscene after George cuts down the "cherry tree" and the tree Laverne
-		// is trapped in vanishes... see bug #743363.
+		// WORKAROUND bug #743363: This very odd case (animateActor(593,250))
+		// occurs in DOTT, in the cutscene after George cuts down the "cherry
+		// tree" and the tree Laverne is trapped in vanishes...
 		// Not sure if this means animateActor somehow also must work for objects
 		// (593 is the time machine in room 57), or if this is simply a script bug.
 		act = 6;
@@ -1321,7 +1320,7 @@
 	putState(obj, 1);
 	markObjectRectAsDirty(obj);
 	clearDrawObjectQueue();
-	runInventoryScript(obj);									/* Difference */
+	runInventoryScript(obj);
 }
 
 void ScummEngine_v6::o6_loadRoomWithEgo() {
@@ -2272,7 +2271,7 @@
 void ScummEngine_v6::o6_isAnyOf() {
 	int list[100];
 	int num;
-	int16 val;
+	int32 val;
 
 	num = getStackList(list, ARRAYSIZE(list));
 	val = pop();
@@ -3060,7 +3059,8 @@
 }
 
 void ScummEngine_v6::o6_getPixel() {
-	// this opcode check ground area in minigame "Asteroid Lander" in the dig
+	// This opcode is used to check fir ground area in the "Asteroid Lander"
+	// minigame in "The Dig"
 	int x, y;
 
 	if (_heversion == 61) {

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.143.2.2
retrieving revision 1.143.2.3
diff -u -d -r1.143.2.2 -r1.143.2.3
--- verbs.cpp	18 Jan 2006 18:07:33 -0000	1.143.2.2
+++ verbs.cpp	26 Jan 2006 09:51:02 -0000	1.143.2.3
@@ -723,7 +723,7 @@
 	gdi.disableZBuffer();
 
 	twobufs = vs->hasTwoBuffers;
-	vs->hasTwoBuffers = 0;
+	vs->hasTwoBuffers = false;
 
 	xstrip = x / 8;
 	ydiff = y - vs->topline;





More information about the Scummvm-git-logs mailing list