aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2006-02-25 18:16:24 +0000
committerMax Horn2006-02-25 18:16:24 +0000
commit779028dcd2e01ff57333d03512e66676da4169d4 (patch)
tree56817bb3dafc4462d33cf278aee9a89a3cbdcf90 /engines
parent2ae0f79de375527e30bef7e49839cacee770d8e9 (diff)
downloadscummvm-rg350-779028dcd2e01ff57333d03512e66676da4169d4.tar.gz
scummvm-rg350-779028dcd2e01ff57333d03512e66676da4169d4.tar.bz2
scummvm-rg350-779028dcd2e01ff57333d03512e66676da4169d4.zip
Modified the workaround for bug #1407789 to not depend on MD5 detection
svn-id: r20880
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script.cpp23
-rw-r--r--engines/scumm/scumm.cpp27
2 files changed, 25 insertions, 25 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index f91a72b91d..f9871ec190 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -600,6 +600,29 @@ void ScummEngine::writeVar(uint var, int value) {
if (!(var & 0xF000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
+ if (var == VAR_SENTENCE_SCRIPT && _game.id == GID_FT && _defaultFTSentenceScript == -1) {
+ // 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 Mac 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 we assume that the very first time VAR_SENTENCE_SCRIPT
+ // is set, it is set to the default value (this happens in script 1).
+ // We furtermore assume that both scripts, if their IDs are shifted,
+ // are shifted by the same amount.
+
+ _defaultFTSentenceScript = value;
+ _buggyFTSentenceScript = 103 + (_defaultFTSentenceScript - 28);
+ }
+
if (VAR_SUBTITLES != 0xFF && var == VAR_SUBTITLES) {
// Ignore default setting in HE72-73 games
if (_game.heversion <= 73 && vm.slot[_currentScript].number == 1)
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 2da56f6e5a..9ecbc004e3 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1230,31 +1230,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
if (!elem)
printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str);
- if (_game.id == 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;
- }
- }
+ _defaultFTSentenceScript = -1;
+ _buggyFTSentenceScript = -1;
// Add default file directories.
if (((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) && (_game.version <= 4)) {