[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.283,2.284 string.cpp,1.271,1.272

Max Horn fingolfin at users.sourceforge.net
Wed Mar 30 09:33:32 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23807

Modified Files:
	script_v8.cpp string.cpp 
Log Message:
In V7/V8 games, just always call translateText, it'll check for the '/' prefix anyway (this allows us to perform additional magic in it, should we need to, e.g. to fix bug #1172655)

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.283
retrieving revision 2.284
diff -u -d -r2.283 -r2.284
--- script_v8.cpp	11 Mar 2005 01:10:02 -0000	2.283
+++ script_v8.cpp	30 Mar 2005 17:30:42 -0000	2.284
@@ -1483,11 +1483,8 @@
 	// Skip to the next instruction
 	_scriptPointer += resStrLen(_scriptPointer) + 1;
 
-	if (msg[0] == '/') {
-		translateText(msg, transBuf);
-		msg = transBuf;
-	} 
-
+	translateText(msg, transBuf);
+	msg = transBuf;
 
 	// Temporary set the specified charset id
 	_charset->setCurID(_string[charset].charset);

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -d -r1.271 -r1.272
--- string.cpp	18 Mar 2005 23:31:58 -0000	1.271
+++ string.cpp	30 Mar 2005 17:30:47 -0000	1.272
@@ -569,7 +569,7 @@
 		return 0;
 	}
 
-	if (_version >= 7 && msg[0] == '/') {
+	if (_version >= 7) {
 		translateText(msg, transBuf);
 		src = transBuf;
 	} else {
@@ -649,7 +649,7 @@
 			error("addMessageToStack: buffer overflow!");
 	}
 	*dst = 0;
-	
+
 	return dstSize - (end - dst);
 }
 
@@ -896,6 +896,8 @@
 	
 				// That was another index entry
 				_languageIndexSize++;
+			} else {
+				error("Unknwon languag.bnd entry found: '%s'\n", ptr);
 			}
 
 			// Skip over newlines (and turn them into null bytes)
@@ -955,6 +957,9 @@
 	LangIndexNode *found = NULL;
 	int i;
 	
+	trans_buff[0] = 0;
+	_lastStringTag[0] = 0;
+	
 	if (_version >= 7 && text[0] == '/') {
 		// Extract the string tag from the text: /..../
 		for (i = 0; (i < 12) && (text[i + 1] != '/'); i++)





More information about the Scummvm-git-logs mailing list