aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-05-20 15:41:07 +0000
committerMax Horn2003-05-20 15:41:07 +0000
commit93d29f2f9aa3c951aab75a0ce71af714aebbc54e (patch)
tree6aa3873a70ec54d4107dd99c779af72d8b7f3bd1
parentc20a5f8c06278157534a175e2304a5d1319dfd70 (diff)
downloadscummvm-rg350-93d29f2f9aa3c951aab75a0ce71af714aebbc54e.tar.gz
scummvm-rg350-93d29f2f9aa3c951aab75a0ce71af714aebbc54e.tar.bz2
scummvm-rg350-93d29f2f9aa3c951aab75a0ce71af714aebbc54e.zip
cleanup
svn-id: r7738
-rw-r--r--scumm/script.cpp41
1 files changed, 16 insertions, 25 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp
index e8c3af7b74..0c7a2c437b 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -692,40 +692,31 @@ void Scumm::killAllScriptsExceptCurrent() {
}
}
-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)
+ if (objectA == objectB)
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)
- 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;
}