[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
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.63,1.64 simon.cpp,1.193,1.194 simon.h,1.61,1.62 vga.cpp,1.44,1.45
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.89,2.90 object.cpp,1.98,1.99 script_v2.cpp,2.83,2.84 script_v5.cpp,1.86,1.87
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.63,1.64 simon.cpp,1.193,1.194 simon.h,1.61,1.62 vga.cpp,1.44,1.45
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.89,2.90 object.cpp,1.98,1.99 script_v2.cpp,2.83,2.84 script_v5.cpp,1.86,1.87
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list