[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.61,1.62 logic.cpp,1.175,1.176

Gregory Montoir cyx at users.sourceforge.net
Fri Jan 16 06:16:03 CET 2004


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv11221/queen

Modified Files:
	command.cpp logic.cpp 
Log Message:
it seems entryObj can be <0, check for it

Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- command.cpp	14 Jan 2004 14:34:04 -0000	1.61
+++ command.cpp	16 Jan 2004 14:15:44 -0000	1.62
@@ -434,18 +434,19 @@
 
 	if (v == VERB_WALK_TO) {
 		_vm->logic()->entryObj(objData->entryObj);
-		if (objData->entryObj != 0) {
-			_vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room);
-			// because this is an exit object, see if there is
-			// a walk off point and set (x,y) accordingly
-			WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum);
-			if (wod != NULL) {
-				x = wod->x;
-				y = wod->y;
-			}
-		}
 	} else {
 		_vm->logic()->entryObj(0);
+	}
+	if (objData->entryObj > 0 && v != VERB_CLOSE) {
+		_vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room);
+		// because this is an exit object, see if there is
+		// a walk off point and set (x,y) accordingly
+		WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum);
+		if (wod != NULL) {
+			x = wod->x;
+			y = wod->y;
+		}
+	} else {
 		_vm->logic()->newRoom(0);
 	}
 

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- logic.cpp	14 Jan 2004 14:34:04 -0000	1.175
+++ logic.cpp	16 Jan 2004 14:15:44 -0000	1.176
@@ -608,9 +608,6 @@
 	debug(9, "Logic::setupJoeInRoom(%d, %d) joe.x=%d joe.y=%d", autoPosition, scale, _joe.x, _joe.y);
 	WalkOffData *pwo = NULL;
 	ObjectData *pod = objectData(_entryObj);
-	if (pod == NULL) {
-		error("Logic::setupJoeInRoom() - No object data for obj %d", _entryObj);
-	}
 
 	uint16 oldx, oldy;
 	if (!autoPosition || joeX() != 0 || joeY() != 0) {





More information about the Scummvm-git-logs mailing list