[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.175,1.176 actor.h,1.40,1.41 script.cpp,1.132,1.133

Max Horn fingolfin at users.sourceforge.net
Sat Sep 13 16:51:03 CEST 2003


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

Modified Files:
	actor.cpp actor.h script.cpp 
Log Message:
disabled a stone old hack; Ender, maybe you remember some details about this fix? anybody feel like playtesting the Mystery Vortex, please? :-)

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- actor.cpp	12 Sep 2003 00:42:36 -0000	1.175
+++ actor.cpp	13 Sep 2003 23:50:29 -0000	1.176
@@ -404,16 +404,29 @@
 	if (ignoreBoxes)
 		return;
 
-	if (_vm->getBoxFlags(walkbox) & kBoxPlayerOnly)
-		return;
+	// FIXME: The following two lines we apparenly added to fix bug #551944,
+	// which deals with "Script race in mystery vortex" in Sam&Max.
+	// (this was added in the *old* CVS repository in rev 1.61 of actor.cpp).
+	// The comment on that bug says: "Fixed by initial guesswork from jah.
+	// Turned out we need to check the box locking state."
+	// However:
+	// 1) Contrary to the bug comment, this doesn't check the box locking flag
+	// 2) For all Scumm versions from 1-5 this is definitely wrong
+	// 3) I checked a Sam&Max IDA DB, and found no evidence for this either
+	// 4) From a purely logical point of view (i.e. considering how actors,
+	//    scaling etc. work), this makes no sense either.
+	//
+	// Hence, I am hereby commenting out this code. It may cause regressions,
+	// esp. in the Mystery Vortex; it would be very good if people could hence
+	// playtest the Vortex. Should it turn out the Vortex needs this, we could
+	// re-enable it, although it would be preferable to find a proper fix :-)
+//	if (_vm->getBoxFlags(walkbox) & kBoxPlayerOnly)
+//		return;
 
 	scale = _vm->getScale(walkbox, x, y);
-	if (scale > 255) {
-		warning("Actor %d at %d, scale %d out of range", number, y, scale);
-	}
+	assert(scale <= 0xFF);
 
-	scalex = (byte)scale;
-	scaley = (byte)scale;
+	scalex = scaley = (byte)scale;
 }
 
 void Actor::startAnimActor(int f) {
@@ -1460,6 +1473,8 @@
 		// Can't walk through locked boxes
 		int flags = _vm->getBoxFlags(next_box);
 		if (flags & kBoxLocked && !(flags & kBoxPlayerOnly && !isPlayer())) {
+//			moving |= MF_LAST_LEG;
+//			return;
 			break;
 		}
 

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- actor.h	11 Sep 2003 22:36:21 -0000	1.40
+++ actor.h	13 Sep 2003 23:50:29 -0000	1.41
@@ -148,6 +148,7 @@
 	void faceToObject(int obj);
 	void turnToDirection(int newdir);
 	void walkActor();
+	void walkActorOld();
 	void drawActorCostume();
 	void animateCostume();
 	void setActorCostume(int c);
@@ -163,7 +164,6 @@
 	void startAnimActor(int frame);
 
 	void remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold);
-	void walkActorOld();
 
 	void animateActor(int anim);
 

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- script.cpp	11 Sep 2003 10:32:14 -0000	1.132
+++ script.cpp	13 Sep 2003 23:50:29 -0000	1.133
@@ -973,7 +973,7 @@
 	int size;
 	ArrayHeader *ah;
 
-	if (type != 5 && type != 4)
+	if (type != 4)
 		type = 5;
 
 	nukeArray(array);





More information about the Scummvm-git-logs mailing list