[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.9,1.10 gfx.cpp,1.22,1.23 saveload.cpp,1.9,1.10 script.cpp,1.4,1.5 script_v1.cpp,1.9,1.10 script_v2.cpp,1.13,1.14 scumm.h,1.25,1.26 scummvm.cpp,1.32,1.33 sound.cpp,1.13,1.14 string.cpp,1.20,1.21 verbs.cpp,1.1.1.1,1.2

Max Horn fingolfin at users.sourceforge.net
Sat Sep 21 18:18:04 CEST 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv12717/scumm

Modified Files:
	actor.cpp gfx.cpp saveload.cpp script.cpp script_v1.cpp 
	script_v2.cpp scumm.h scummvm.cpp sound.cpp string.cpp 
	verbs.cpp 
Log Message:
renamec string -> _string and sentence -> _sentence in class Scumm (I originally reworked StringTab, but then noticed the save game format depends on it <sigh>)

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- actor.cpp	21 Sep 2002 00:23:45 -0000	1.9
+++ actor.cpp	22 Sep 2002 01:17:53 -0000	1.10
@@ -1038,7 +1038,7 @@
 			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 @@
 		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;

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gfx.cpp	21 Sep 2002 16:20:52 -0000	1.22
+++ gfx.cpp	22 Sep 2002 01:17:53 -0000	1.23
@@ -1729,8 +1729,8 @@
 		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)

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- saveload.cpp	21 Sep 2002 13:48:02 -0000	1.9
+++ saveload.cpp	22 Sep 2002 01:17:53 -0000	1.10
@@ -621,8 +621,9 @@
 	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++)

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- script.cpp	8 Sep 2002 01:08:12 -0000	1.4
+++ script.cpp	22 Sep 2002 01:17:53 -0000	1.5
@@ -567,7 +567,7 @@
 	}
 
 	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 @@
 	}
 
 	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 @@
 				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::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;
 }

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v1.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- script_v1.cpp	13 Sep 2002 11:54:59 -0000	1.9
+++ script_v1.cpp	22 Sep 2002 01:17:53 -0000	1.10
@@ -968,7 +968,7 @@
 	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 @@
 		return;
 	}
 
-	st = &sentence[_sentenceNum++];
+	st = &_sentence[_sentenceNum++];
 
 	st->unk5 = a;
 	st->unk4 = getVarOrDirectWord(0x40);
@@ -2009,6 +2009,7 @@
 		break;
 
 	case 13:{										/* save-string */
+			// TODO - use class File instead of fopen/fwrite/fclose
 			char buf[256], *s;
 			FILE *out;
 
@@ -2030,6 +2031,7 @@
 			break;
 		}
 	case 14:{										/* load-string */
+			// TODO - use class File instead of fopen/fread/fclose
 			char buf[256], *s;
 			FILE *in;
 
@@ -2473,7 +2475,7 @@
 			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 @@
 		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 @@
 		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 @@
 		}
 	}
 
-	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()

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- script_v2.cpp	21 Sep 2002 17:51:52 -0000	1.13
+++ script_v2.cpp	22 Sep 2002 01:17:53 -0000	1.14
@@ -1161,7 +1161,7 @@
 	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 @@
 		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 @@
 	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 @@
 
 	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 @@
 			_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");

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- scumm.h	21 Sep 2002 13:48:02 -0000	1.25
+++ scumm.h	22 Sep 2002 01:17:53 -0000	1.26
@@ -238,10 +238,13 @@
 	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 @@
 	/* Actor talking stuff */
 	byte _actorToPrintStrFor;
 	int _sentenceNum;
-	SentenceTab sentence[6];
-	StringTab string[6];
+	SentenceTab _sentence[6];
+	StringTab _string[6];
 	void actorTalk();
 	void stopTalk();	
 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- scummvm.cpp	22 Sep 2002 00:38:02 -0000	1.32
+++ scummvm.cpp	22 Sep 2002 01:17:53 -0000	1.33
@@ -282,16 +282,16 @@
 
 	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 @@
 
 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;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- sound.cpp	22 Sep 2002 00:04:04 -0000	1.13
+++ sound.cpp	22 Sep 2002 01:17:53 -0000	1.14
@@ -403,7 +403,7 @@
 			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;

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- string.cpp	22 Sep 2002 00:04:04 -0000	1.20
+++ string.cpp	22 Sep 2002 01:17:53 -0000	1.21
@@ -167,8 +167,8 @@
 	_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 @@
 	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 @@
 		return;
 	}
 
-	if (a && !string[0].no_talk_anim) {
+	if (a && !_string[0].no_talk_anim) {
 		has_anim = true;
 		_useTalkAnims = true;
 	}
@@ -282,19 +282,19 @@
 
 	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 @@
 				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 @@
 
 	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;
+	_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._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 @@
 	_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 @@
 				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 @@
 		} 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 @@
 	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)

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- verbs.cpp	21 Aug 2002 16:07:36 -0000	1.1.1.1
+++ verbs.cpp	22 Sep 2002 01:17:53 -0000	1.2
@@ -130,18 +130,18 @@
 		}
 		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
 		/*





More information about the Scummvm-git-logs mailing list