[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.243,1.244 scumm.cpp,1.707,1.708 scumm.h,1.673,1.674
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Wed Jan 25 07:07:03 CET 2006
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30493
Modified Files:
script.cpp scumm.cpp scumm.h
Log Message:
Extend the workaround for bug #1407789 in an attempt to deal with the
different versions of Full Throttle. This is partly guesswork, and may be
incorrect.
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -d -r1.243 -r1.244
--- script.cpp 23 Jan 2006 20:09:24 -0000 1.243
+++ script.cpp 25 Jan 2006 15:06:40 -0000 1.244
@@ -1082,12 +1082,12 @@
localParamList[1] = _sentence[_sentenceNum].objectA;
localParamList[2] = _sentence[_sentenceNum].objectB;
- // WORKAROUND for bug #1407789. The script clearly assumes that
- // one of the two objects is an actor. If that's not the case,
- // fall back on what appears to be the usual sentence script.
+ // WORKAROUND for bug #1407789. The buggy script clearly
+ // assumes that one of the two objects is an actor. If that's
+ // not the case, fall back on the default sentence script.
- if (_gameId == GID_FT && sentenceScript == 103 && !isValidActor(localParamList[1]) && !isValidActor(localParamList[2])) {
- sentenceScript = 28;
+ if (_gameId == GID_FT && sentenceScript == _buggyFTSentenceScript && !isValidActor(localParamList[1]) && !isValidActor(localParamList[2])) {
+ sentenceScript = _defaultFTSentenceScript;
}
}
_currentScript = 0xFF;
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.707
retrieving revision 1.708
diff -u -d -r1.707 -r1.708
--- scumm.cpp 24 Jan 2006 23:14:52 -0000 1.707
+++ scumm.cpp 25 Jan 2006 15:06:40 -0000 1.708
@@ -962,6 +962,32 @@
if (!elem)
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
+ if (_gameId == GID_FT) {
+ // WORKAROUND for bug #1407789. See checkAndRunSentenceScript()
+ // for the actual workaround.
+
+ // FIXME: We do not yet have all necessary information, but the
+ // following is known:
+ //
+ // * The US PC version uses scripts 28 and 103.
+ // * The French PC version uses scripts 29 and 104.
+ // * The German, Italian, Portuguese and Spanish PC versions
+ // use script 29. The other script is not currently known.
+ // * The US Mac demo uses script 28.
+ //
+ // For now, assume that the PC and Mac versions are the same,
+ // that all localized versions use scripts 29 and 104, and that
+ // any completely unknown version is localized.
+
+ if (elem && elem->language == Common::EN_USA) {
+ _defaultFTSentenceScript = 28;
+ _buggyFTSentenceScript = 103;
+ } else {
+ _defaultFTSentenceScript = 29;
+ _buggyFTSentenceScript = 104;
+ }
+ }
+
// Add default file directories.
if (((_platform == Common::kPlatformAmiga) || (_platform == Common::kPlatformAtariST)) && (_version <= 4)) {
// This is for the Amiga version of Indy3/Loom/Maniac/Zak
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.673
retrieving revision 1.674
diff -u -d -r1.673 -r1.674
--- scumm.h 23 Jan 2006 20:09:25 -0000 1.673
+++ scumm.h 25 Jan 2006 15:06:42 -0000 1.674
@@ -618,6 +618,9 @@
int _vmStack[150];
int _keyScriptKey, _keyScriptNo;
+ // See the ScummEngine constructor and checkAndRunSentenceScript()
+ int _defaultFTSentenceScript, _buggyFTSentenceScript;
+
virtual void setupOpcodes() = 0;
virtual void executeOpcode(byte i) = 0;
virtual const char *getOpcodeDesc(byte i) = 0;
More information about the Scummvm-git-logs
mailing list