[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.139,1.140

Max Horn fingolfin at users.sourceforge.net
Thu Aug 15 13:19:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv21448

Modified Files:
	script_v1.cpp 
Log Message:
fix for bug #590067 (similar to a recent fix in script_v2) - but I am not sure that this will really break nothing... we'll see. Note that just the setCameraAt doesn't work correctly either; also some general clenaup

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- script_v1.cpp	15 Aug 2002 16:46:29 -0000	1.139
+++ script_v1.cpp	15 Aug 2002 20:18:47 -0000	1.140
@@ -809,16 +809,12 @@
 			a->forceClip = getVarOrDirectByte(0x80);
 			break;
 		case 20:										/* ignoreboxes */
-			a->ignoreBoxes = 1;
+		case 21:										/* followboxes */
+			a->ignoreBoxes = !(_opcode & 1);
 			a->forceClip = 0;
-		FixRoom:
 			if (a->isInCurrentRoom())
 				a->putActor(a->x, a->y, a->room);
 			break;
-		case 21:										/* followboxes */
-			a->ignoreBoxes = 0;
-			a->forceClip = 0;
-			goto FixRoom;
 
 		case 22:										/* animspeed */
 			a->animSpeed = getVarOrDirectByte(0x80);
@@ -1571,27 +1567,26 @@
 
 void Scumm::o5_loadRoomWithEgo()
 {
-	int obj, room, x, y;
 	Actor *a;
+	int obj, room, x, y;
 
 	obj = getVarOrDirectWord(0x80);
 	room = getVarOrDirectByte(0x40);
 
 	a = derefActorSafe(_vars[VAR_EGO], "o5_loadRoomWithEgo");
 
-	/* Warning: used previously _xPos, _yPos from a previous update of those */
-	a->putActor(a->x, a->y, room);
+	a->putActor(0, 0, room);
+	_egoPositioned = false;
 
 	x = (int16)fetchScriptWord();
 	y = (int16)fetchScriptWord();
 
-	_egoPositioned = false;
-
 	_vars[VAR_WALKTO_OBJ] = obj;
 	startScene(a->room, a, obj);
 	_vars[VAR_WALKTO_OBJ] = 0;
 
 	camera._dest.x = camera._cur.x = a->x;
+	setCameraAt(a->x, a->y);
 	setCameraFollows(a);
 
 	_fullRedraw = 1;
@@ -2775,7 +2770,7 @@
 
 	// FIXME: Zak256 (Zaire): Why does this happen at all?
 	if (obj < 1) {
-		warning("pickupObjectOld received negative index");
+		warning("pickupObjectOld received negative index %d (0x%02x)", obj, obj);
 		return;
 	}
 





More information about the Scummvm-git-logs mailing list