[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.142,2.143

Max Horn fingolfin at users.sourceforge.net
Wed Jul 2 07:22:06 CEST 2003


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

Modified Files:
	script_v2.cpp 
Log Message:
fix o2_loadRoomWithEgo regression (this bug was uncovered by my previous adjustXYToBeInBox improvment)

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.142
retrieving revision 2.143
diff -u -d -r2.142 -r2.143
--- script_v2.cpp	2 Jul 2003 11:26:13 -0000	2.142
+++ script_v2.cpp	2 Jul 2003 14:21:13 -0000	2.143
@@ -1134,8 +1134,8 @@
 	a->putActor(0, 0, room);
 	_egoPositioned = false;
 
-	x = (int16)fetchScriptByte() * 8;
-	y = (int16)fetchScriptByte() * 2;
+	x = (int8)fetchScriptByte() * 8;
+	y = (int8)fetchScriptByte() * 2;
 
 	startScene(a->room, a, obj);
 
@@ -1147,7 +1147,7 @@
 
 	resetSentence();
 
-	if (x != -1) {
+	if (x >= 0 && y >= 0) {
 		a->startWalkActor(x, y, -1);
 	}
 	runScript(5, 0, 0, 0);
@@ -1217,7 +1217,7 @@
 	//warning("TODO o2_cutscene()");
 
 	vm.cutSceneData[0] = _userState;
-	vm.cutSceneData[1] = (int16) VAR(VAR_CURSORSTATE);
+	vm.cutSceneData[1] = (int16)VAR(VAR_CURSORSTATE);
 	vm.cutSceneData[2] = _currentRoom;
 	vm.cutSceneData[3] = camera._mode;
 	





More information about the Scummvm-git-logs mailing list