diff options
author | James Brown | 2003-01-16 11:27:02 +0000 |
---|---|---|
committer | James Brown | 2003-01-16 11:27:02 +0000 |
commit | 0a4a8af0f2bfb6b85ea7f3ae1180631e9d2c23e7 (patch) | |
tree | 1be74dc6c82e0427406070c0382121f70251c1fc | |
parent | 7433ab604f54ad07debd4cda08115850ecf5e9e9 (diff) | |
download | scummvm-rg350-0a4a8af0f2bfb6b85ea7f3ae1180631e9d2c23e7.tar.gz scummvm-rg350-0a4a8af0f2bfb6b85ea7f3ae1180631e9d2c23e7.tar.bz2 scummvm-rg350-0a4a8af0f2bfb6b85ea7f3ae1180631e9d2c23e7.zip |
Add translate for the ComI map text
svn-id: r6478
-rw-r--r-- | scumm/string.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index a044ecf0e7..9c18d0dc29 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -741,7 +741,22 @@ void Scumm::addNameToStack(int var) num = readVar(var); if (num) { - addMessageToStack(getObjOrActorName(num)); + byte *ptr = getObjOrActorName(num); + if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) { + char pointer[20]; + int i, j; + + translateText(ptr, _transText); + for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) { + if (ptr[i] != '/') + pointer[j++] = ptr[i]; + } + pointer[j] = 0; + + addMessageToStack(_transText); + } else { + addMessageToStack(ptr); + } } else { addMessageToStack((byte *)""); } @@ -768,7 +783,7 @@ void Scumm::addStringToStack(int var) pointer[j++] = ptr[i]; } pointer[j] = 0; - _sound->_talkChannel = _sound->playBundleSound(pointer); + addMessageToStack(_transText); } else { addMessageToStack(ptr); |