[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.183,1.184 boxes.h,1.8,1.9

Max Horn fingolfin at users.sourceforge.net
Fri Oct 31 17:18:19 CET 2003


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

Modified Files:
	actor.cpp boxes.h 
Log Message:
possible fix for bug #833854 - I rechecked the assembly, there actually is a check for box flag 0x20 in there. However, that flag has a differeing meaning in older engine versions, so I put a version check in and updated the comments. Please test.

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- actor.cpp	3 Oct 2003 18:33:53 -0000	1.183
+++ actor.cpp	1 Nov 2003 01:17:15 -0000	1.184
@@ -393,7 +393,6 @@
 
 
 void Actor::setupActorScale() {
-	uint16 scale;
 
 	if (_vm->_features & GF_NO_SCALING) {
 		scalex = 0xFF;
@@ -404,26 +403,13 @@
 	if (ignoreBoxes)
 		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;
+	// For some boxes, we ignore the scaling and use whatever values the
+	// scripts set. This is used e.g. in the Mystery Vortex in Sam&Max.
+	// Older games used the flag 0x20 differently, though.
+	if (_vm->_version >= 6 && (_vm->getBoxFlags(walkbox) & kBoxIgnoreScale))
+		return;
 
-	scale = _vm->getScale(walkbox, _pos.x, _pos.y);
+	uint16 scale = _vm->getScale(walkbox, _pos.x, _pos.y);
 	assert(scale <= 0xFF);
 
 	scalex = scaley = (byte)scale;

Index: boxes.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- boxes.h	3 Oct 2003 18:33:53 -0000	1.8
+++ boxes.h	1 Nov 2003 01:17:15 -0000	1.9
@@ -35,6 +35,7 @@
 typedef enum {
 	kBoxXFlip		= 0x08,
 	kBoxYFlip		= 0x10,
+	kBoxIgnoreScale	= 0x20,
 	kBoxPlayerOnly	= 0x20,
 	kBoxLocked		= 0x40,
 	kBoxInvisible	= 0x80





More information about the Scummvm-git-logs mailing list