[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.182,1.183 script_v2.cpp,2.197,2.198

Max Horn fingolfin at users.sourceforge.net
Thu Sep 11 08:32:56 CEST 2003


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

Modified Files:
	script_v5.cpp script_v2.cpp 
Log Message:
hum, why was this not commited by CVS?

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -d -r1.182 -r1.183
--- script_v5.cpp	11 Sep 2003 10:32:14 -0000	1.182
+++ script_v5.cpp	11 Sep 2003 14:11:30 -0000	1.183
@@ -1452,19 +1452,13 @@
 	if (!(_features & GF_SMALL_HEADER) || room != _currentRoom)
 		startScene(room, 0, 0);
 
-	// FIXME: Incredibly nasty evil hack to fix bug #770699 (During meeting
-	// with Guru, script 42 changes between room 0 and room 19 to create
-	// 'some time later' effects. On switching back to room 19, the camera
-	// reverts to 0,0 - Added for 0.5.0, should be fixed properly
-	if (_gameId == GID_ZAK && (vm.slot[_currentScript].number == 42) && (room == 19))
-		setCameraAt(480, 0);
-
 	_fullRedraw = 1;
 }
 
 void Scumm_v5::o5_loadRoomWithEgo() {
 	Actor *a;
 	int obj, room, x, y;
+	int x2, y2, dir, oldDir;
 
 	obj = getVarOrDirectWord(0x80);
 	room = getVarOrDirectByte(0x40);
@@ -1472,6 +1466,7 @@
 	a = derefActor(VAR(VAR_EGO), "o5_loadRoomWithEgo");
 
 	a->putActor(0, 0, room);
+	oldDir = a->getFacing();
 	_egoPositioned = false;
 
 	x = (int16)fetchScriptWord();
@@ -1480,6 +1475,18 @@
 	VAR(VAR_WALKTO_OBJ) = obj;
 	startScene(a->room, a, obj);
 	VAR(VAR_WALKTO_OBJ) = 0;
+
+	if (_version <= 3) {
+		// FIXME: Maybe this should also cover V4 games. See also startScene().
+		// More investigation (ASM) needed.
+		if (!_egoPositioned) {
+			getObjectXYPos(obj, x2, y2, dir);
+			a->putActor(x2, y2, _currentRoom);
+			if (a->getFacing() == oldDir)
+				a->setDirection(dir);	// TODO: Original seems to "flip" dir here, need to investigate?
+		}
+		a->moving = 0;
+	}
 
 	// FIXME: Can this be removed?
 	camera._cur.x = a->x;

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.197
retrieving revision 2.198
diff -u -d -r2.197 -r2.198
--- script_v2.cpp	11 Sep 2003 12:48:02 -0000	2.197
+++ script_v2.cpp	11 Sep 2003 14:11:31 -0000	2.198
@@ -1272,7 +1272,7 @@
 
 void Scumm_v2::o2_loadRoomWithEgo() {
 	Actor *a;
-	int obj, room, x, y;
+	int obj, room, x, y, x2, y2, dir;
 
 	obj = getVarOrDirectWord(0x80);
 	room = getVarOrDirectByte(0x40);
@@ -1286,6 +1286,10 @@
 	y = (int8)fetchScriptByte() * 2;
 
 	startScene(a->room, a, obj);
+
+	getObjectXYPos(obj, x2, y2, dir);
+	a->putActor(x2, y2, _currentRoom);
+	a->setDirection(dir);	// TODO: Original seems to "flip" dir here, need to investigate?
 
 	camera._dest.x = camera._cur.x = a->x;
 	setCameraAt(a->x, a->y);





More information about the Scummvm-git-logs mailing list