[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.29,1.30 logic.cpp,1.112,1.113

Gregory Montoir cyx at users.sourceforge.net
Tue Dec 2 06:21:06 CET 2003


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

Modified Files:
	command.cpp logic.cpp 
Log Message:
fix bug in command code, letting a failed command being executed

Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- command.cpp	30 Nov 2003 20:41:01 -0000	1.29
+++ command.cpp	1 Dec 2003 22:16:31 -0000	1.30
@@ -263,9 +263,15 @@
 			if (_selCmd.action.value() == VERB_LOOK_AT) {
 				// Look At, do standard look at routine
 				look();
-				cleanupCurrentAction();
-				return;
 			}
+			else {
+				if (com->song < 0) {
+					_sound->playSong(-com->song);
+				}
+				clear(true);
+			}
+			cleanupCurrentAction();
+			return;
 		}
 		else if (cond == -2 && i == comMax) {
 			// only exit on a condition fail if at last command
@@ -424,7 +430,7 @@
 
 	// only play song if it's a PLAY AFTER type
 	if (com->song < 0) {
-		_sound->playSong(com->song);
+		_sound->playSong(-com->song);
 	}
 
 	clear(true);

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- logic.cpp	1 Dec 2003 20:48:40 -0000	1.112
+++ logic.cpp	1 Dec 2003 22:16:31 -0000	1.113
@@ -400,7 +400,7 @@
 
 
 ObjectData* Logic::objectData(int index) {
-	index = abs(index);
+	index = abs(index); // cyx: is that really necessary ?
 	if (index <= _numObjects)
 		return &_objectData[index];
 	else





More information about the Scummvm-git-logs mailing list