[Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.79,1.80

James Brown ender at users.sourceforge.net
Thu Jan 16 03:28:02 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv32075/scumm

Modified Files:
	string.cpp 
Log Message:
Add translate for the ComI map text


Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- string.cpp	16 Jan 2003 00:40:19 -0000	1.79
+++ string.cpp	16 Jan 2003 11:27:02 -0000	1.80
@@ -741,7 +741,22 @@
 
 	num = readVar(var);
 	if (num) {
-		addMessageToStack(getObjOrActorName(num));
+		byte *ptr = getObjOrActorName(num);
+		if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) {
+			char pointer[20];
+			int i, j;
+
+			translateText(ptr, _transText);
+			for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) {
+				if (ptr[i] != '/')
+					pointer[j++] = ptr[i];
+			}
+			pointer[j] = 0;
+
+			addMessageToStack(_transText);
+		} else {
+			addMessageToStack(ptr);
+		}
 	} else {
 		addMessageToStack((byte *)"");
 	}
@@ -768,7 +783,7 @@
 								pointer[j++] = ptr[i];
 				}
 				pointer[j] = 0;
-				_sound->_talkChannel = _sound->playBundleSound(pointer);
+
 				addMessageToStack(_transText);
 			} else {
 				addMessageToStack(ptr);





More information about the Scummvm-git-logs mailing list