[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.93,1.94

Max Horn fingolfin at users.sourceforge.net
Tue May 20 08:44:06 CEST 2003


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

Modified Files:
	script.cpp 
Log Message:
cleanup

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- script.cpp	19 May 2003 11:31:34 -0000	1.93
+++ script.cpp	20 May 2003 15:41:07 -0000	1.94
@@ -692,40 +692,31 @@
 	}
 }
 
-void Scumm::doSentence(int c, int b, int a) {
+void Scumm::doSentence(int verb, int objectA, int objectB) {
 	SentenceTab *st;
 
 	if (_features & GF_AFTER_V7) {
 
-		if (b == a)
-			return;
-
-		st = &_sentence[_sentenceNum - 1];
-		
-		
-		// Check if this doSentence request is identical to the previous one;
-		// if yes, ignore this invocation.
-		if (_sentenceNum && st->verb == c && st->objectA == b && st->objectB == a)
+		if (objectA == objectB)
 			return;
 
-		_sentenceNum++;
-		st++;
-
-	} else {
-
-		st = &_sentence[_sentenceNum++];
-
-		// FIXME: this seems wrong, it accesses objectB before we ever set it!
-		if (!(st->objectB & 0xFF00))
-			st->unk2 = 0;
-		else
-			st->unk2 = 1;
+		if (_sentenceNum) {
+			st = &_sentence[_sentenceNum - 1];
+			
+			// Check if this doSentence request is identical to the previous one;
+			// if yes, ignore this invocation.
+			if (_sentenceNum && st->verb == verb && st->objectA == objectA && st->objectB == objectB)
+				return;
+		}
 
 	}
 
-	st->verb = c;
-	st->objectA = b;
-	st->objectB = a;
+	st = &_sentence[_sentenceNum++];
+
+	st->verb = verb;
+	st->objectA = objectA;
+	st->objectB = objectB;
+	st->unk2 = (objectB & 0xFF00) != 0;
 	st->freezeCount = 0;
 }
 





More information about the Scummvm-git-logs mailing list