In V7/V8 games, just always call translateText, it'll check for the '/' prefix anyway (this allows us to perform additional magic in it, should we need to, e.g. to fix bug #1172655)
svn-id: r17297
This commit is contained in:
parent
b5eb59dff1
commit
ebb49d5cfe
2 changed files with 9 additions and 7 deletions
|
@ -569,7 +569,7 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (_version >= 7 && msg[0] == '/') {
|
||||
if (_version >= 7) {
|
||||
translateText(msg, transBuf);
|
||||
src = transBuf;
|
||||
} else {
|
||||
|
@ -649,7 +649,7 @@ int ScummEngine::addMessageToStack(const byte *msg, byte *dst, int dstSize) {
|
|||
error("addMessageToStack: buffer overflow!");
|
||||
}
|
||||
*dst = 0;
|
||||
|
||||
|
||||
return dstSize - (end - dst);
|
||||
}
|
||||
|
||||
|
@ -896,6 +896,8 @@ void ScummEngine::loadLanguageBundle() {
|
|||
|
||||
// That was another index entry
|
||||
_languageIndexSize++;
|
||||
} else {
|
||||
error("Unknwon languag.bnd entry found: '%s'\n", ptr);
|
||||
}
|
||||
|
||||
// Skip over newlines (and turn them into null bytes)
|
||||
|
@ -955,6 +957,9 @@ void ScummEngine::translateText(const byte *text, byte *trans_buff) {
|
|||
LangIndexNode *found = NULL;
|
||||
int i;
|
||||
|
||||
trans_buff[0] = 0;
|
||||
_lastStringTag[0] = 0;
|
||||
|
||||
if (_version >= 7 && text[0] == '/') {
|
||||
// Extract the string tag from the text: /..../
|
||||
for (i = 0; (i < 12) && (text[i + 1] != '/'); i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue