[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.102,1.103 script_v5.cpp,1.89,1.90 script_v6.cpp,1.121,1.122

Max Horn fingolfin at users.sourceforge.net
Tue May 20 16:06:07 CEST 2003


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

Modified Files:
	actor.cpp script_v5.cpp script_v6.cpp 
Log Message:
cleanup

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- actor.cpp	20 May 2003 20:58:24 -0000	1.102
+++ actor.cpp	20 May 2003 23:05:33 -0000	1.103
@@ -625,11 +625,12 @@
 		bestDist = (uint) 0xFFFF;
 		bestBox = kInvalidBox;
 
-		// We iterate (backwards) over all boxes, searching the one closes
+		// We iterate (backwards) over all boxes, searching the one closest
 		// to the desired coordinates.
 		for (box = numBoxes; box >= firstValidBox; box--) {
 			flags = _vm->getBoxFlags(box);
 
+			// Skip over invisible boxes
 			if (flags & kBoxInvisible && !(flags & kBoxPlayerOnly && !isInClass(kObjectClassPlayer)))
 				continue;
 			

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- script_v5.cpp	20 May 2003 20:58:25 -0000	1.89
+++ script_v5.cpp	20 May 2003 23:05:33 -0000	1.90
@@ -401,8 +401,10 @@
 	Actor *a;
 	int i, j;
 
-	if (act == 0)
+	if (act == 0) {
 		act = 1;
+		warning("o5_actorSet: act = 0, setting to 1 as a workaround");
+	}
 
 	a = derefActorSafe(act, "actorSet");
 
@@ -536,17 +538,16 @@
 	while ((_opcode = fetchScriptByte()) != 0xFF) {
 		newClass = getVarOrDirectWord(0x80);
 		if (newClass == 0) {
+			// Class '0' means: clean all class data
 			_classData[obj] = 0;
 			if ((_features & GF_SMALL_HEADER) && obj <= _numActors) {
 				Actor *a;
 				a = derefActorSafe(obj, "setClass");
-				a->ignoreBoxes = 0;
+				a->ignoreBoxes = false;
 				a->forceClip = 0;
 			}
-			continue;
-		}
-
-		putClass(obj, newClass, (newClass & 0x80) ? true : false);
+		} else
+			putClass(obj, newClass, (newClass & 0x80) ? true : false);
 	}
 }
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- script_v6.cpp	20 May 2003 20:58:25 -0000	1.121
+++ script_v6.cpp	20 May 2003 23:05:34 -0000	1.122
@@ -1686,21 +1686,22 @@
 		break;
 	case 95:
 		a->ignoreBoxes = 1;
-		if (_features & GF_AFTER_V7)	// yazoo: I don't know if it's supposed to be 100 in other games too...
+		if (_features & GF_AFTER_V7)
 			a->forceClip = 100;
 		else
 			a->forceClip = 0;
-	FixRooms:;
 		if (a->isInCurrentRoom())
 			a->putActor(a->x, a->y, a->room);
 		break;
 	case 96:
 		a->ignoreBoxes = 0;
-		if (_features & GF_AFTER_V7)	// yazoo: I don't know if it's supposed to be 100 in other games too...
+		if (_features & GF_AFTER_V7)
 			a->forceClip = 100;
 		else
 			a->forceClip = 0;
-		goto FixRooms;
+		if (a->isInCurrentRoom())
+			a->putActor(a->x, a->y, a->room);
+		break;
 	case 97:
 		a->animSpeed = pop();
 		a->animProgress = 0;





More information about the Scummvm-git-logs mailing list