aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2006-10-15 01:26:23 +0000
committerMax Horn2006-10-15 01:26:23 +0000
commit1ee9304012a162a418d5f030ee32dae82b80d2d7 (patch)
tree547d3b7be1c4bc7a1f7654ed19a65d90ab93bd69 /engines/scumm/script_v2.cpp
parent2888110b3ccea294bed469aa2a3dbb522ddc909b (diff)
downloadscummvm-rg350-1ee9304012a162a418d5f030ee32dae82b80d2d7.tar.gz
scummvm-rg350-1ee9304012a162a418d5f030ee32dae82b80d2d7.tar.bz2
scummvm-rg350-1ee9304012a162a418d5f030ee32dae82b80d2d7.zip
Replaced function level static variable (YUCK) called 'sentence' by ScummEngine_v2:_sentenceBuf
svn-id: r24324
Diffstat (limited to 'engines/scumm/script_v2.cpp')
-rw-r--r--engines/scumm/script_v2.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 5fb6956a3a..675626645b 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -976,7 +976,6 @@ void ScummEngine_v2::o2_doSentence() {
void ScummEngine_v2::o2_drawSentence() {
Common::Rect sentenceline;
- static char sentence[256];
const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB), 0);
@@ -984,15 +983,15 @@ void ScummEngine_v2::o2_drawSentence() {
return;
if (getResourceAddress(rtVerb, slot))
- strcpy(sentence, (char*)getResourceAddress(rtVerb, slot));
+ strcpy(_sentenceBuf, (char*)getResourceAddress(rtVerb, slot));
else
return;
if (VAR(VAR_SENTENCE_OBJECT1) > 0) {
temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT1));
if (temp) {
- strcat(sentence, " ");
- strcat(sentence, (const char*)temp);
+ strcat(_sentenceBuf, " ");
+ strcat(_sentenceBuf, (const char*)temp);
}
// For V1 games, the engine must compute the preposition.
@@ -1037,16 +1036,16 @@ void ScummEngine_v2::o2_drawSentence() {
}
if (_game.platform == Common::kPlatformNES) {
- strcat(sentence, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
+ strcat(_sentenceBuf, (const char *)(getResourceAddress(rtCostume, 78) + VAR(VAR_SENTENCE_PREPOSITION) * 8 + 2));
} else
- strcat(sentence, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]);
+ strcat(_sentenceBuf, prepositions[lang][VAR(VAR_SENTENCE_PREPOSITION)]);
}
if (VAR(VAR_SENTENCE_OBJECT2) > 0) {
temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT2));
if (temp) {
- strcat(sentence, " ");
- strcat(sentence, (const char*)temp);
+ strcat(_sentenceBuf, " ");
+ strcat(_sentenceBuf, (const char*)temp);
}
}
@@ -1063,7 +1062,7 @@ void ScummEngine_v2::o2_drawSentence() {
_string[2].color = 13;
byte string[80];
- char *ptr = sentence;
+ char *ptr = _sentenceBuf;
int i = 0, len = 0;
// Maximum length of printable characters