[Scummvm-cvs-logs] SF.net SVN: scummvm: [22475] residual/trunk

aquadran at users.sourceforge.net aquadran at users.sourceforge.net
Sun May 14 11:56:09 CEST 2006


Revision: 22475
Author:   aquadran
Date:     2006-05-14 11:42:09 -0700 (Sun, 14 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22475&view=rev

Log Message:
-----------
enabled smush subtitles passthrough

Modified Paths:
--------------
    residual/trunk/actor.cpp
    residual/trunk/lua.cpp
Modified: residual/trunk/actor.cpp
===================================================================
--- residual/trunk/actor.cpp	2006-05-14 16:18:54 UTC (rev 22474)
+++ residual/trunk/actor.cpp	2006-05-14 18:42:09 UTC (rev 22475)
@@ -296,9 +296,6 @@
 	std::string textName = msgId;
 	textName += ".txt";
 
-	if (msg[0] != '/')
-		warning("Actor::sayLine: Invalid source message (should be /xxxx/, is: %s)!", msg);
-
 	if (msgId[0] == 0) {
 		error("Actor::sayLine: No message ID for text!");
 		return;

Modified: residual/trunk/lua.cpp
===================================================================
--- residual/trunk/lua.cpp	2006-05-14 16:18:54 UTC (rev 22474)
+++ residual/trunk/lua.cpp	2006-05-14 18:42:09 UTC (rev 22475)
@@ -1502,40 +1502,35 @@
 
 static void SayLine() {
 	int pan = 64, param_number = 2;
-	char msgId[32], *str = NULL;
+	char msgId[32];
+	std::string msg = "";
 	lua_Object param2;
 	Actor *act;
-	
+
 	DEBUG_FUNCTION();
-	act = check_actor(1);
 	param2 = lua_getparam(param_number++);
+	act = check_actor(1);
 	if (!lua_isnil(param2)) {
 		do {
 			if (lua_isstring(param2)) {
 				char *tmpstr = lua_getstring(param2);
-				
-				// Fix so Police Chief Bogen's text is interpretted correctly,
-				// Bogen has a second text item that's just "1" which previously
-				// over-wrote the actual message
-				if (tmpstr[0] == '/' && tmpstr[strlen(tmpstr)-1] == '/') {
-					parseMsgText(tmpstr, msgId);
-					str = tmpstr;
-				}
+				msg = parseMsgText(tmpstr, msgId);
 			} else if (lua_isnumber(param2)) {
 				pan = 64;
 			} else if (lua_istable(param2)) {
+				warning("SayLine() param is table");
 			} else {
 				error("SayLine() unknown type of param");
 			}
 			param2 = lua_getparam(param_number++);
 		} while (!lua_isnil(param2));
-		if (str == NULL) {
+		if (msg.empty()) {
 			if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
 				warning("SayLine: Did not find a message ID!");
 			stubWarning("ERROR: SayLine");
 			return;
 		}
-		act->sayLine(str, msgId);
+		act->sayLine(msg.c_str(), msgId);
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list