diff options
author | Max Horn | 2005-04-28 22:17:23 +0000 |
---|---|---|
committer | Max Horn | 2005-04-28 22:17:23 +0000 |
commit | c5127d3c05ec1dccb8ead61d38727e3e98dce6d1 (patch) | |
tree | f78e52873c734ef65db64012c2de532035d4d8fd /scumm/string.cpp | |
parent | e8865cc596a19c8604f37432dd890138185b18f9 (diff) | |
download | scummvm-rg350-c5127d3c05ec1dccb8ead61d38727e3e98dce6d1.tar.gz scummvm-rg350-c5127d3c05ec1dccb8ead61d38727e3e98dce6d1.tar.bz2 scummvm-rg350-c5127d3c05ec1dccb8ead61d38727e3e98dce6d1.zip |
Moved bundle based localization code to ScummEngine_v7
svn-id: r17855
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r-- | scumm/string.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index c5cbc0df1e..e4cc689169 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -29,6 +29,7 @@ #include "scumm/charset.h" #include "scumm/dialogs.h" #include "scumm/imuse_digi/dimuse.h" +#include "scumm/intern.h" #include "scumm/verbs.h" #include "scumm/sound.h" #include "scumm/util.h" @@ -827,7 +828,7 @@ int indexCompare(const void *p1, const void *p2) { } // Create an index of the language file. -void ScummEngine::loadLanguageBundle() { +void ScummEngine_v7::loadLanguageBundle() { ScummFile file; int32 size; @@ -956,7 +957,7 @@ void ScummEngine::loadLanguageBundle() { qsort(_languageIndex, _languageIndexSize, sizeof(LangIndexNode), indexCompare); } -void ScummEngine::playSpeech(const byte *ptr) { +void ScummEngine_v7::playSpeech(const byte *ptr) { if ((_gameId == GID_DIG || _gameId == GID_CMI) && ptr[0]) { char pointer[20]; strcpy(pointer, (const char *)ptr); @@ -973,6 +974,11 @@ void ScummEngine::playSpeech(const byte *ptr) { } void ScummEngine::translateText(const byte *text, byte *trans_buff) { + // Default: just copy the string + memcpy(trans_buff, text, resStrLen(text) + 1); +} + +void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { LangIndexNode target; LangIndexNode *found = NULL; int i; |