aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/script_v8.cpp5
-rw-r--r--scumm/scumm.cpp1
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/smush/smush_player.cpp5
4 files changed, 6 insertions, 6 deletions
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index a8963164b4..92ef66d155 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1559,13 +1559,14 @@ void ScummEngine_v8::o8_getStringWidth() {
int oldID = _charset->getCurID();
int width;
const byte *msg = _scriptPointer;
+ byte transBuf[512];
// Skip to the next instruction
_scriptPointer += resStrLen(_scriptPointer) + 1;
if (msg[0] == '/') {
- translateText(msg, _transText);
- msg = _transText;
+ translateText(msg, transBuf);
+ msg = transBuf;
}
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 7bcda7ea83..b3110f762d 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -511,7 +511,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_existLanguageFile = false;
_languageBuffer = NULL;
_languageIndex = NULL;
- memset(_transText, 0, sizeof(_transText));
_costumeRenderer = NULL;
_2byteFontPtr = 0;
_V1_talkingActor = 0;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 3fbbff5a4d..40ea703584 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1079,7 +1079,6 @@ protected:
LangIndexNode *_languageIndex;
int _languageIndexSize;
char _lastStringTag[12+1];
- byte _transText[512];
void loadLanguageBundle();
void playSpeech(const byte *ptr);
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 6ebbfbe4ae..1f21053950 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -512,11 +512,12 @@ void SmushPlayer::handleTextResource(Chunk &b) {
str++; // For Full Throttle text resources
}
+ byte transBuf[512];
if (_vm->_gameId == GID_CMI) {
- _vm->translateText((const byte *)str - 1, _vm->_transText);
+ _vm->translateText((const byte *)str - 1, _transText);
while (*str++ != '/')
;
- string2 = (char *)_vm->_transText;
+ string2 = (char *)transBuf;
// If string2 contains formatting information there probably
// wasn't any translation for it in the language.tab file. In