[Scummvm-cvs-logs] SF.net SVN: scummvm: [32337] scummvm/trunk/engines/scumm/string.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Wed May 28 15:00:41 CEST 2008
Revision: 32337
http://scummvm.svn.sourceforge.net/scummvm/?rev=32337&view=rev
Author: Kirben
Date: 2008-05-28 06:00:41 -0700 (Wed, 28 May 2008)
Log Message:
-----------
The hard coded string translations for The Dig only apply to subtitles, and not speech.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/string.cpp
Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp 2008-05-28 13:00:27 UTC (rev 32336)
+++ scummvm/trunk/engines/scumm/string.cpp 2008-05-28 13:00:41 UTC (rev 32337)
@@ -1439,10 +1439,14 @@
}
void ScummEngine_v7::playSpeech(const byte *ptr) {
+ printf("playSpeech: %s\n", (const char *) ptr);
+
if ((_game.id == GID_DIG || _game.id == GID_CMI) && ptr[0]) {
char pointer[20];
strcpy(pointer, (const char *)ptr);
+
+
// Play speech
if (!(_game.features & GF_DEMO) && (_game.id == GID_CMI)) // CMI demo does not have .IMX for voice
strcat(pointer, ".IMX");
@@ -1462,9 +1466,17 @@
trans_buff[0] = 0;
_lastStringTag[0] = 0;
+ if (_game.version >= 7 && text[0] == '/') {
+ // Extract the string tag from the text: /..../
+ for (i = 0; (i < 12) && (text[i + 1] != '/'); i++)
+ _lastStringTag[i] = toupper(text[i + 1]);
+ _lastStringTag[i] = 0;
+ }
+
// WORKAROUND for bug #1172655.
if (_game.id == GID_DIG) {
// Based on the second release of The Dig
+ // Only applies to the subtitles and not speech
if (!strcmp((const char *)text, "faint light"))
text = (const byte *)"/NEW.007/faint light";
else if (!strcmp((const char *)text, "glowing crystal"))
@@ -1501,8 +1513,8 @@
if (_game.version >= 7 && text[0] == '/') {
// Extract the string tag from the text: /..../
for (i = 0; (i < 12) && (text[i + 1] != '/'); i++)
- _lastStringTag[i] = target.tag[i] = toupper(text[i + 1]);
- _lastStringTag[i] = target.tag[i] = 0;
+ target.tag[i] = toupper(text[i + 1]);
+ target.tag[i] = 0;
text += i + 2;
// If a language file was loaded, try to find a translated version
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list