aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-09-22 01:17:53 +0000
committerMax Horn2002-09-22 01:17:53 +0000
commita681eb029e7fc5b0383d5cdfce2c561e8fa221d2 (patch)
tree62c79d406f1fdd730eb8000e25a42ecd557a990d /scumm
parent45ce1d111312ec413d6d680092f98a4f49e31556 (diff)
downloadscummvm-rg350-a681eb029e7fc5b0383d5cdfce2c561e8fa221d2.tar.gz
scummvm-rg350-a681eb029e7fc5b0383d5cdfce2c561e8fa221d2.tar.bz2
scummvm-rg350-a681eb029e7fc5b0383d5cdfce2c561e8fa221d2.zip
renamec string -> _string and sentence -> _sentence in class Scumm (I originally reworked StringTab, but then noticed the save game format depends on it <sigh>)
svn-id: r4995
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp4
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/saveload.cpp5
-rw-r--r--scumm/script.cpp47
-rw-r--r--scumm/script_v1.cpp52
-rw-r--r--scumm/script_v2.cpp46
-rw-r--r--scumm/scumm.h9
-rw-r--r--scumm/scummvm.cpp18
-rw-r--r--scumm/sound.cpp2
-rw-r--r--scumm/string.cpp114
-rw-r--r--scumm/verbs.cpp16
11 files changed, 157 insertions, 160 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index d62d20f7d7..7e762a9314 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1038,7 +1038,7 @@ void Scumm::actorTalk()
if (!_keepText)
stopTalk();
_vars[VAR_TALK_ACTOR] = a->number;
- if (!string[0].no_talk_anim) {
+ if (!_string[0].no_talk_anim) {
a->startAnimActor(a->talkFrame1);
_useTalkAnims = true;
}
@@ -1049,7 +1049,7 @@ void Scumm::actorTalk()
return;
if (_vars[VAR_TALK_ACTOR] > 0x7F) {
- _charsetColor = (byte)string[0].color;
+ _charsetColor = (byte)_string[0].color;
} else {
a = derefActorSafe(_vars[VAR_TALK_ACTOR], "actorTalk(2)");
_charsetColor = a->talkColor;
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index a476556e8f..ce8e06c8af 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1729,8 +1729,8 @@ void Scumm::restoreCharsetBg()
charset._left = -1;
}
- charset._xpos2 = string[0].xpos;
- charset._ypos2 = string[0].ypos;
+ charset._xpos2 = _string[0].xpos;
+ charset._ypos2 = _string[0].ypos;
}
void Scumm::restoreBG(int left, int top, int right, int bottom)
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 80542caf0f..0db7174bc9 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -621,8 +621,9 @@ void Scumm::saveOrLoad(Serializer *s)
s->saveLoadArrayOf(_objs, _numLocalObjects, sizeof(_objs[0]), objectEntries);
s->saveLoadArrayOf(_verbs, _numVerbs, sizeof(_verbs[0]), verbEntries);
s->saveLoadArrayOf(vm.nest, 16, sizeof(vm.nest[0]), nestedScriptEntries);
- s->saveLoadArrayOf(sentence, 6, sizeof(sentence[0]), sentenceTabEntries);
- s->saveLoadArrayOf(string, 6, sizeof(string[0]), stringTabEntries);
+ s->saveLoadArrayOf(_sentence, 6, sizeof(_sentence[0]), sentenceTabEntries);
+ /* XXX: next time save game format changes, Fingolfin wants to revise StringTab - contact him */
+ s->saveLoadArrayOf(_string, 6, sizeof(_string[0]), stringTabEntries);
s->saveLoadArrayOf(_colorCycle, 16, sizeof(_colorCycle[0]), colorCycleEntries);
for (i = rtFirst; i <= rtLast; i++)
diff --git a/scumm/script.cpp b/scumm/script.cpp
index e28fa2395e..ee3d536183 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -567,7 +567,7 @@ void Scumm::freezeScripts(int flag)
}
for (i = 0; i < 6; i++)
- sentence[i].unk++;
+ _sentence[i].unk++;
if (vm.cutSceneScriptIndex != 0xFF) {
vm.slot[vm.cutSceneScriptIndex].status &= 0x7F;
@@ -587,8 +587,8 @@ void Scumm::unfreezeScripts()
}
for (i = 0; i < 6; i++) {
- if (((int8)--sentence[i].unk) < 0)
- sentence[i].unk = 0;
+ if (_sentence[i].unk > 0)
+ _sentence[i].unk--;
}
}
@@ -703,18 +703,18 @@ void Scumm::checkAndRunVar33()
return;
}
- if (!_sentenceNum || sentence[_sentenceNum - 1].unk)
+ if (!_sentenceNum || _sentence[_sentenceNum - 1].unk)
return;
_sentenceNum--;
if (!(_features & GF_AFTER_V7))
- if (sentence[_sentenceNum].unk2 && sentence[_sentenceNum].unk3 == sentence[_sentenceNum].unk4)
+ if (_sentence[_sentenceNum].unk2 && _sentence[_sentenceNum].unk3 == _sentence[_sentenceNum].unk4)
return;
- _localParamList[0] = sentence[_sentenceNum].unk5;
- _localParamList[1] = sentence[_sentenceNum].unk4;
- _localParamList[2] = sentence[_sentenceNum].unk3;
+ _localParamList[0] = _sentence[_sentenceNum].unk5;
+ _localParamList[1] = _sentence[_sentenceNum].unk4;
+ _localParamList[2] = _sentence[_sentenceNum].unk3;
_currentScript = 0xFF;
if (_vars[VAR_SENTENCE_SCRIPT])
runScript(_vars[VAR_SENTENCE_SCRIPT], 0, 0, _localParamList);
@@ -1079,42 +1079,39 @@ void Scumm::exitCutscene()
}
void Scumm::doSentence(int c, int b, int a)
{
+ SentenceTab *st;
+
if (_features & GF_AFTER_V7) {
- SentenceTab *st;
if (b == a)
return;
- st = &sentence[_sentenceNum - 1];
-
+ st = &_sentence[_sentenceNum - 1];
+
+
+ // Check if this doSentence request is identical to the previous one;
+ // if yes, ignore this invocation.
if (_sentenceNum && st->unk5 == c && st->unk4 == b && st->unk3 == a)
return;
_sentenceNum++;
st++;
- st->unk5 = c;
- st->unk4 = b;
- st->unk3 = a;
- st->unk = 0;
-
- warning("dosentence(%d,%d,%d)", c, b, a);
+ warning("doSentence(%d,%d,%d)", c, b, a);
} else {
- SentenceTab *st;
-
- st = &sentence[_sentenceNum++];
-
- st->unk5 = c;
- st->unk4 = b;
- st->unk3 = a;
+ st = &_sentence[_sentenceNum++];
if (!(st->unk3 & 0xFF00))
st->unk2 = 0;
else
st->unk2 = 1;
- st->unk = 0;
}
+
+ st->unk5 = c;
+ st->unk4 = b;
+ st->unk3 = a;
+ st->unk = 0;
}
diff --git a/scumm/script_v1.cpp b/scumm/script_v1.cpp
index c33114c97b..6663683e77 100644
--- a/scumm/script_v1.cpp
+++ b/scumm/script_v1.cpp
@@ -968,7 +968,7 @@ void Scumm::o5_cursorCommand()
case 14: /* unk */
getWordVararg(table);
for (i = 0; i < 16; i++)
- charset._colorMap[i] = _charsetData[string[1].t_charset][i] = (unsigned char)table[i];
+ charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)table[i];
break;
}
@@ -1042,7 +1042,7 @@ void Scumm::o5_doSentence()
return;
}
- st = &sentence[_sentenceNum++];
+ st = &_sentence[_sentenceNum++];
st->unk5 = a;
st->unk4 = getVarOrDirectWord(0x40);
@@ -2009,6 +2009,7 @@ void Scumm::o5_roomOps()
break;
case 13:{ /* save-string */
+ // TODO - use class File instead of fopen/fwrite/fclose
char buf[256], *s;
FILE *out;
@@ -2030,6 +2031,7 @@ void Scumm::o5_roomOps()
break;
}
case 14:{ /* load-string */
+ // TODO - use class File instead of fopen/fread/fclose
char buf[256], *s;
FILE *in;
@@ -2473,7 +2475,7 @@ void Scumm::o5_verbOps()
vs->hicolor = 0;
vs->dimcolor = 8;
vs->type = 0;
- vs->charset_nr = string[0].t_charset;
+ vs->charset_nr = _string[0].t_charset;
vs->curmode = 0;
vs->saveid = 0;
vs->key = 0;
@@ -2550,7 +2552,7 @@ void Scumm::o5_wait()
return;
case 4: /* wait for sentence */
if (_sentenceNum) {
- if (sentence[_sentenceNum - 1].unk && !isScriptInUse(_vars[VAR_SENTENCE_SCRIPT]))
+ if (_sentence[_sentenceNum - 1].unk && !isScriptInUse(_vars[VAR_SENTENCE_SCRIPT]))
return;
break;
}
@@ -2684,37 +2686,31 @@ void Scumm::decodeParseString()
textSlot = 0;
}
- string[textSlot].xpos = string[textSlot].t_xpos;
- string[textSlot].ypos = string[textSlot].t_ypos;
- string[textSlot].center = string[textSlot].t_center;
- string[textSlot].overhead = string[textSlot].t_overhead;
- string[textSlot].right = string[textSlot].t_right;
- string[textSlot].color = string[textSlot].t_color;
- string[textSlot].charset = string[textSlot].t_charset;
+ setStringVars(textSlot);
while ((_opcode = fetchScriptByte()) != 0xFF) {
switch (_opcode & 0xF) {
case 0: /* set string xy */
- string[textSlot].xpos = getVarOrDirectWord(0x80);
- string[textSlot].ypos = getVarOrDirectWord(0x40);
- string[textSlot].overhead = false;
+ _string[textSlot].xpos = getVarOrDirectWord(0x80);
+ _string[textSlot].ypos = getVarOrDirectWord(0x40);
+ _string[textSlot].overhead = false;
break;
case 1: /* color */
- string[textSlot].color = getVarOrDirectByte(0x80);
+ _string[textSlot].color = getVarOrDirectByte(0x80);
break;
case 2: /* right */
- string[textSlot].right = getVarOrDirectWord(0x80);
+ _string[textSlot].right = getVarOrDirectWord(0x80);
break;
case 4: /* center */
- string[textSlot].center = true;
- string[textSlot].overhead = false;
+ _string[textSlot].center = true;
+ _string[textSlot].overhead = false;
break;
case 6: /* left */
- string[textSlot].center = false;
- string[textSlot].overhead = false;
+ _string[textSlot].center = false;
+ _string[textSlot].overhead = false;
break;
case 7: /* overhead */
- string[textSlot].overhead = true;
+ _string[textSlot].overhead = true;
break;
case 8:{ /* play loom talkie sound - use in other games ? */
int x = getVarOrDirectWord(0x80);
@@ -2761,13 +2757,13 @@ void Scumm::decodeParseString()
}
}
- string[textSlot].t_xpos = string[textSlot].xpos;
- string[textSlot].t_ypos = string[textSlot].ypos;
- string[textSlot].t_center = string[textSlot].center;
- string[textSlot].t_overhead = string[textSlot].overhead;
- string[textSlot].t_right = string[textSlot].right;
- string[textSlot].t_color = string[textSlot].color;
- string[textSlot].t_charset = string[textSlot].charset;
+ _string[textSlot].t_xpos = _string[textSlot].xpos;
+ _string[textSlot].t_ypos = _string[textSlot].ypos;
+ _string[textSlot].t_center = _string[textSlot].center;
+ _string[textSlot].t_overhead = _string[textSlot].overhead;
+ _string[textSlot].t_right = _string[textSlot].right;
+ _string[textSlot].t_color = _string[textSlot].color;
+ _string[textSlot].t_charset = _string[textSlot].charset;
}
void Scumm::o5_oldRoomEffect()
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 99f9ea76f0..ac542d4ff7 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -1161,7 +1161,7 @@ void Scumm::o6_cursorCommand()
case 0x9D: /* set charset colors */
getStackList(args, sizeof(args) / sizeof(args[0]));
for (i = 0; i < 16; i++)
- charset._colorMap[i] = _charsetData[string[1].t_charset][i] = (unsigned char)args[i];
+ charset._colorMap[i] = _charsetData[_string[1].t_charset][i] = (unsigned char)args[i];
break;
case 0xD6:
makeCursorColorTransparent(pop());
@@ -2135,7 +2135,7 @@ void Scumm::o6_verbOps()
vs->hicolor = 0;
vs->dimcolor = 8;
vs->type = 0;
- vs->charset_nr = string[0].t_charset;
+ vs->charset_nr = _string[0].t_charset;
vs->curmode = 0;
vs->saveid = 0;
vs->key = 0;
@@ -2363,7 +2363,7 @@ void Scumm::o6_wait()
case 171:
printf("wait for sentence");
if (_sentenceNum) {
- if (sentence[_sentenceNum - 1].unk && !isScriptInUse(_vars[VAR_SENTENCE_SCRIPT]))
+ if (_sentence[_sentenceNum - 1].unk && !isScriptInUse(_vars[VAR_SENTENCE_SCRIPT]))
return;
break;
}
@@ -3058,33 +3058,33 @@ void Scumm::decodeParseString2(int m, int n)
switch (b) {
case 65:
- string[m].ypos = pop();
- string[m].xpos = pop();
- string[m].overhead = false;
+ _string[m].ypos = pop();
+ _string[m].xpos = pop();
+ _string[m].overhead = false;
break;
case 66:
- string[m].color = pop();
+ _string[m].color = pop();
break;
case 67:
- string[m].right = pop();
+ _string[m].right = pop();
break;
case 69:
- string[m].center = true;
- string[m].overhead = false;
+ _string[m].center = true;
+ _string[m].overhead = false;
break;
case 71:
- string[m].center = false;
- string[m].overhead = false;
+ _string[m].center = false;
+ _string[m].overhead = false;
break;
case 72:
- string[m].overhead = true;
- string[m].no_talk_anim = false;
+ _string[m].overhead = true;
+ _string[m].no_talk_anim = false;
break;
case 73:
error("decodeParseString2: case 73");
break;
case 74:
- string[m].no_talk_anim = true;
+ _string[m].no_talk_anim = true;
break;
case 75:{
_messagePtr = _scriptPointer;
@@ -3133,14 +3133,14 @@ void Scumm::decodeParseString2(int m, int n)
_actorToPrintStrFor = pop();
return;
case 0xFF:
- string[m].t_xpos = string[m].xpos;
- string[m].t_ypos = string[m].ypos;
- string[m].t_center = string[m].center;
- string[m].t_overhead = string[m].overhead;
- string[m].t_no_talk_anim = string[m].no_talk_anim;
- string[m].t_right = string[m].right;
- string[m].t_color = string[m].color;
- string[m].t_charset = string[m].charset;
+ _string[m].t_xpos = _string[m].xpos;
+ _string[m].t_ypos = _string[m].ypos;
+ _string[m].t_center = _string[m].center;
+ _string[m].t_overhead = _string[m].overhead;
+ _string[m].t_no_talk_anim = _string[m].no_talk_anim;
+ _string[m].t_right = _string[m].right;
+ _string[m].t_color = _string[m].color;
+ _string[m].t_charset = _string[m].charset;
return;
default:
error("decodeParseString: default case");
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 384f8ca1b2..4a7537f92f 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -238,10 +238,13 @@ struct SentenceTab {
byte unk2;
uint16 unk4;
uint16 unk3;
- byte unk;
+ int8 unk;
byte pad;
};
+// TODO / FIXME: next time save game format changes, Fingolfin would like to
+// revise StringTab. In particular, all t_* fields can be removed, making some
+// code a bit cleaner & easier to understand.
struct StringTab {
int16 t_xpos, t_ypos;
int16 t_right;
@@ -721,8 +724,8 @@ public:
/* Actor talking stuff */
byte _actorToPrintStrFor;
int _sentenceNum;
- SentenceTab sentence[6];
- StringTab string[6];
+ SentenceTab _sentence[6];
+ StringTab _string[6];
void actorTalk();
void stopTalk();
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index a95ed7c34c..55516d47f6 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -282,16 +282,16 @@ void Scumm::scummInit()
for (i = 0; i < 6; i++) {
if (_features & GF_OLD256) {
- string[i].t_xpos = 0;
- string[i].t_ypos = 0;
+ _string[i].t_xpos = 0;
+ _string[i].t_ypos = 0;
} else {
- string[i].t_xpos = 2;
- string[i].t_ypos = 5;
+ _string[i].t_xpos = 2;
+ _string[i].t_ypos = 5;
}
- string[i].t_right = _realWidth - 1;
- string[i].t_color = 0xF;
- string[i].t_center = 0;
- string[i].t_charset = 0;
+ _string[i].t_right = _realWidth - 1;
+ _string[i].t_color = 0xF;
+ _string[i].t_center = 0;
+ _string[i].t_charset = 0;
}
_numInMsgStack = 0;
@@ -1104,7 +1104,7 @@ Actor *Scumm::derefActorSafe(int id, const char *errmsg)
void Scumm::setStringVars(int slot)
{
- StringTab *st = &string[slot];
+ StringTab *st = &_string[slot];
st->xpos = st->t_xpos;
st->ypos = st->t_ypos;
st->center = st->t_center;
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 27a57d3224..e77b076f17 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -403,7 +403,7 @@ void Sound::processSfxQueues() {
finished = false;
- if (act != 0 && (uint) act < 0x80 && !_scumm->string[0].no_talk_anim) {
+ if (act != 0 && (uint) act < 0x80 && !_scumm->_string[0].no_talk_anim) {
a = _scumm->derefActorSafe(act, "processSfxQueues");
if (a->room == _scumm->_currentRoom && (finished || !_endOfMouthSync)) {
b = true;
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 7bfd834f1d..52747c1ca7 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -167,8 +167,8 @@ void Scumm::unkMessage2()
_msgPtrToAdd = buf;
tmp = _messagePtr = addMessageToStack(_messagePtr);
- if (string[3].color == 0)
- string[3].color = 4;
+ if (_string[3].color == 0)
+ _string[3].color = 4;
warning("unkMessage2(\"%s\")", buf);
_messagePtr = tmp;
@@ -202,51 +202,51 @@ void Scumm::CHARSET_1()
if (_vars[VAR_TALK_ACTOR] != 0xFF)
a = derefActorSafe(_vars[VAR_TALK_ACTOR], "CHARSET_1");
- if (a && string[0].overhead != 0) {
+ if (a && _string[0].overhead != 0) {
if (!(_features & GF_AFTER_V6)) {
- string[0].xpos = a->x - camera._cur.x + (_realWidth / 2);
+ _string[0].xpos = a->x - camera._cur.x + (_realWidth / 2);
if (_vars[VAR_V5_TALK_STRING_Y] < 0) {
s = (a->scaley * (int)_vars[VAR_V5_TALK_STRING_Y]) / 0xFF;
- string[0].ypos = ((_vars[VAR_V5_TALK_STRING_Y] - s) >> 1) + s - a->elevation + a->y;
+ _string[0].ypos = ((_vars[VAR_V5_TALK_STRING_Y] - s) >> 1) + s - a->elevation + a->y;
} else {
- string[0].ypos = _vars[VAR_V5_TALK_STRING_Y];
+ _string[0].ypos = _vars[VAR_V5_TALK_STRING_Y];
}
- if (string[0].ypos < 1)
- string[0].ypos = 1;
+ if (_string[0].ypos < 1)
+ _string[0].ypos = 1;
- if (string[0].xpos < 80)
- string[0].xpos = 80;
- if (string[0].xpos > 240)
- string[0].xpos = 240;
+ if (_string[0].xpos < 80)
+ _string[0].xpos = 80;
+ if (_string[0].xpos > 240)
+ _string[0].xpos = 240;
} else {
s = a->scaley * a->new_1 / 0xFF;
- string[0].ypos = ((a->new_1 - s) >> 1) + s - a->elevation + a->y;
- if (string[0].ypos < 1)
- string[0].ypos = 1;
+ _string[0].ypos = ((a->new_1 - s) >> 1) + s - a->elevation + a->y;
+ if (_string[0].ypos < 1)
+ _string[0].ypos = 1;
- if (string[0].ypos < camera._cur.y - (_realHeight / 2))
- string[0].ypos = camera._cur.y - (_realHeight / 2);
+ if (_string[0].ypos < camera._cur.y - (_realHeight / 2))
+ _string[0].ypos = camera._cur.y - (_realHeight / 2);
s = a->scalex * a->new_2 / 0xFF;
- string[0].xpos = ((a->new_2 - s) >> 1) + s + a->x - camera._cur.x + (_realWidth / 2);
- if (string[0].xpos < 80)
- string[0].xpos = 80;
- if (string[0].xpos > 240)
- string[0].xpos = 240;
+ _string[0].xpos = ((a->new_2 - s) >> 1) + s + a->x - camera._cur.x + (_realWidth / 2);
+ if (_string[0].xpos < 80)
+ _string[0].xpos = 80;
+ if (_string[0].xpos > 240)
+ _string[0].xpos = 240;
}
}
- charset._top = string[0].ypos;
- charset._left = string[0].xpos;
- charset._left2 = string[0].xpos;
- charset._curId = string[0].charset;
+ charset._top = _string[0].ypos;
+ charset._left = _string[0].xpos;
+ charset._left2 = _string[0].xpos;
+ charset._curId = _string[0].charset;
if (a && a->charset)
charset._curId = a->charset;
- charset._center = string[0].center;
- charset._right = string[0].right;
+ charset._center = _string[0].center;
+ charset._right = _string[0].right;
charset._color = _charsetColor;
_bkColor = 0;
@@ -273,7 +273,7 @@ void Scumm::CHARSET_1()
return;
}
- if (a && !string[0].no_talk_anim) {
+ if (a && !_string[0].no_talk_anim) {
has_anim = true;
_useTalkAnims = true;
}
@@ -282,19 +282,19 @@ void Scumm::CHARSET_1()
if (!_keepText) {
if (_features & GF_OLD256) {
- gdi._mask_left = string[0].xpos;
- gdi._mask_top = string[0].ypos;
- gdi._mask_bottom = string[0].ypos + 8;
+ gdi._mask_left = _string[0].xpos;
+ gdi._mask_top = _string[0].ypos;
+ gdi._mask_bottom = _string[0].ypos + 8;
gdi._mask_right = _realWidth;
- if (string[0].ypos <= 16) // If we are cleaning the text line, clean 2 lines.
+ if (_string[0].ypos <= 16) // If we are cleaning the text line, clean 2 lines.
gdi._mask_bottom = 16;
}
restoreCharsetBg();
- charset._xpos2 = string[0].xpos;
- charset._ypos2 = string[0].ypos;
+ charset._xpos2 = _string[0].xpos;
+ charset._ypos2 = _string[0].ypos;
}
- t = charset._right - string[0].xpos - 1;
+ t = charset._right - _string[0].xpos - 1;
if (charset._center) {
if (t > charset._xpos2)
t = charset._xpos2;
@@ -329,7 +329,7 @@ void Scumm::CHARSET_1()
charset._xpos2 = 0;
continue;
} else {
- charset._xpos2 = string[0].xpos;
+ charset._xpos2 = _string[0].xpos;
if (charset._center) {
charset._xpos2 -= charset.getStringWidth(0, buffer, 0) >> 1;
}
@@ -459,17 +459,17 @@ void Scumm::description()
buffer = charset._buffer;
charset._bufPos = 0;
- string[0].ypos = camera._cur.y + 88;
- string[0].xpos = (_realWidth / 2) - (charset.getStringWidth(0, buffer, 0) >> 1);
- if (string[0].xpos < 0)
- string[0].xpos = 0;
-
- charset._top = string[0].ypos;
- charset._left = string[0].xpos;
- charset._left2 = string[0].xpos;
+ _string[0].ypos = camera._cur.y + 88;
+ _string[0].xpos = (_realWidth / 2) - (charset.getStringWidth(0, buffer, 0) >> 1);
+ if (_string[0].xpos < 0)
+ _string[0].xpos = 0;
+
+ charset._top = _string[0].ypos;
+ charset._left = _string[0].xpos;
+ charset._left2 = _string[0].xpos;
charset._right = _realWidth - 1;
- charset._xpos2 = string[0].xpos;
- charset._ypos2 = string[0].ypos;
+ charset._xpos2 = _string[0].xpos;
+ charset._ypos2 = _string[0].ypos;
charset._disableOffsX = charset._unk12 = 1;
charset._curId = 3;
charset._center = false;
@@ -515,12 +515,12 @@ void Scumm::drawString(int a)
_msgPtrToAdd = buf;
_messagePtr = addMessageToStack(_messagePtr);
- charset._left2 = charset._left = string[a].xpos;
- charset._top = string[a].ypos;
- charset._curId = string[a].charset;
- charset._center = string[a].center;
- charset._right = string[a].right;
- charset._color = string[a].color;
+ charset._left2 = charset._left = _string[a].xpos;
+ charset._top = _string[a].ypos;
+ charset._curId = _string[a].charset;
+ charset._center = _string[a].center;
+ charset._right = _string[a].right;
+ charset._color = _string[a].color;
_bkColor = 0;
charset._unk12 = 1;
charset._disableOffsX = 1;
@@ -592,7 +592,7 @@ void Scumm::drawString(int a)
color = buf[i] + (buf[i + 1] << 8);
i += 2;
if (color == 0xFF)
- charset._color = string[a].color;
+ charset._color = _string[a].color;
else
charset._color = color;
break;
@@ -600,7 +600,7 @@ void Scumm::drawString(int a)
} else {
if (a == 1 && (_features & GF_AFTER_V6))
- if (string[a].no_talk_anim == 0)
+ if (_string[a].no_talk_anim == 0)
charset._blitAlso = true;
if (_features & GF_OLD256)
charset.printCharOld(chr);
@@ -786,8 +786,8 @@ void Scumm::initCharset(int charsetno)
else if (!getResourceAddress(rtCharset, charsetno))
loadCharset(charsetno);
- string[0].t_charset = charsetno;
- string[1].t_charset = charsetno;
+ _string[0].t_charset = charsetno;
+ _string[1].t_charset = charsetno;
for (i = 0; i < 0x10; i++)
if (_features & GF_SMALL_HEADER)
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 131bde0312..f3b82cbf37 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -130,18 +130,18 @@ void Scumm::drawVerb(int vrb, int mode)
}
restoreVerbBG(vrb);
- string[4].charset = vs->charset_nr;
- string[4].xpos = vs->x;
- string[4].ypos = vs->y;
- string[4].right = 319;
- string[4].center = vs->center;
+ _string[4].charset = vs->charset_nr;
+ _string[4].xpos = vs->x;
+ _string[4].ypos = vs->y;
+ _string[4].right = 319;
+ _string[4].center = vs->center;
if (vs->curmode == 2)
- string[4].color = vs->dimcolor;
+ _string[4].color = vs->dimcolor;
else if (mode && vs->hicolor)
- string[4].color = vs->hicolor;
+ _string[4].color = vs->hicolor;
else
- string[4].color = vs->color;
+ _string[4].color = vs->color;
// FIXME For the future: Indy3 and under inv scrolling
/*