mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
to replace some missing subtitles with hard-coded ones. svn-id: r38923
This commit is contained in:
parent
c053ef8c87
commit
349fce7454
@ -108,8 +108,13 @@ char *ObjectMan::lockText(uint32 textId) {
|
|||||||
}
|
}
|
||||||
uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1)* 4);
|
uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1)* 4);
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
|
// Workaround bug for missing sentence in some langages in Syria (see bug #1977094).
|
||||||
|
// We use the hardcoded text in this case.
|
||||||
|
if (textId == 2950145)
|
||||||
|
return const_cast<char*>(_translationId2950145[lang]);
|
||||||
|
|
||||||
warning("ObjectMan::lockText(%d): text number has no text lines", textId);
|
warning("ObjectMan::lockText(%d): text number has no text lines", textId);
|
||||||
return _errorStr;
|
return _missingSubTitleStr;
|
||||||
}
|
}
|
||||||
return addr + offset;
|
return addr + offset;
|
||||||
}
|
}
|
||||||
@ -161,6 +166,26 @@ void ObjectMan::saveLiveList(uint16 *dest) {
|
|||||||
memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16));
|
memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16));
|
||||||
}
|
}
|
||||||
|
|
||||||
char ObjectMan::_errorStr[] = "Error: Text not found.";
|
// String displayed when a subtitle sentence is missing in the cluster file.
|
||||||
|
// It happens with at least one sentence in Syria in some langages (see bug
|
||||||
|
// #1977094).
|
||||||
|
// Note: an empty string or a null pointer causes a crash.
|
||||||
|
|
||||||
|
char ObjectMan::_missingSubTitleStr[] = " ";
|
||||||
|
|
||||||
|
// Missing translation for textId 2950145 (see bug #1977094).
|
||||||
|
// Currently text is missing for Portuguese languages. (It's possible that it
|
||||||
|
// is not needed. The English version of the game does not include Portuguese
|
||||||
|
// so I cannot check.)
|
||||||
|
|
||||||
|
const char *ObjectMan::_translationId2950145[7] = {
|
||||||
|
"Oh?", // English (not needed)
|
||||||
|
"Quoi?", // French
|
||||||
|
"Oh?", // German
|
||||||
|
"Eh?", // Italian
|
||||||
|
"\277Eh?", // Spanish
|
||||||
|
"Ano?", // Czech
|
||||||
|
" " // Portuguese
|
||||||
|
};
|
||||||
|
|
||||||
} // End of namespace Sword1
|
} // End of namespace Sword1
|
||||||
|
@ -61,7 +61,8 @@ private:
|
|||||||
static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files
|
static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files
|
||||||
uint16 _liveList[TOTAL_SECTIONS]; //which sections are active
|
uint16 _liveList[TOTAL_SECTIONS]; //which sections are active
|
||||||
uint8 *_cptData[TOTAL_SECTIONS];
|
uint8 *_cptData[TOTAL_SECTIONS];
|
||||||
static char _errorStr[];
|
static char _missingSubTitleStr[];
|
||||||
|
static const char *_translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Sword1
|
} // End of namespace Sword1
|
||||||
|
Loading…
Reference in New Issue
Block a user