Modified the workaround for bug #1407789 to not depend on MD5 detection

svn-id: r20880
This commit is contained in:
Max Horn 2006-02-25 18:16:24 +00:00
parent 2ae0f79de3
commit 779028dcd2
2 changed files with 25 additions and 25 deletions

View File

@ -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)

View File

@ -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)) {