[Scummvm-cvs-logs] CVS: residual lua.cpp,1.65,1.66
Jonathan Gray
khalek at users.sourceforge.net
Fri Jun 4 08:13:02 CEST 2004
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2823
Modified Files:
lua.cpp
Log Message:
add font to list of keys MakeTextObject looks for, create BlastText stub so I can see the text telling me to switch cds when I try jump sets
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- lua.cpp 16 Apr 2004 12:01:36 -0000 1.65
+++ lua.cpp 4 Jun 2004 15:12:16 -0000 1.66
@@ -1008,6 +1008,8 @@
width = atoi(lua_getstring(lua_getresult(2)));
else if (strstr(key_text, "center"))
warning("MakeTextObject key center not implemented");
+ else if (strstr(key_text, "font"))
+ warning("MakeTextObject key font not implemented");
else
error("Unknown MakeTextObject key %s\n", key_text);
}
@@ -1234,6 +1236,44 @@
#endif
}
+static void BlastText() {
+ char * str = luaL_check_string(1), *key_text = NULL;
+ lua_Object table_obj = lua_getparam(2), key;
+ int x = 0, y = 0, height = 0, width = 0;
+ Color *fgColor = NULL;
+
+ while(1) {
+ lua_pushobject(table_obj);
+ if (key_text)
+ lua_pushobject(key);
+ else
+ lua_pushnil();
+
+ lua_call("next");
+ key=lua_getresult(1);
+ if (lua_isnil(key))
+ break;
+
+ key_text=lua_getstring(key);
+ //val_text=lua_getstring(lua_getresult(2));
+ if (strstr(key_text, "x"))
+ x = atoi(lua_getstring(lua_getresult(2)));
+ else if (strstr(key_text, "y"))
+ y = atoi(lua_getstring(lua_getresult(2)));
+ else if (strstr(key_text, "fgcolor"))
+ fgColor = check_color(2);
+ else if (strstr(key_text, "font"))
+ lua_getresult(2);
+ else if (strstr(key_text, "center")) // TRUE or FALSE
+ lua_getresult(2);
+ else
+ error("Unknown BlastText key %s\n", key_text);
+ }
+
+ warning("STUB: BlastText(\"%s\", x = %d, y = %d)\n",
+ Localizer::instance()->localize(str).c_str(), x, y);
+}
+
static char *stubFuncs[] = {
"RestoreIMuse",
"SaveIMuse",
@@ -1358,7 +1398,6 @@
"GetTranslationMode",
"SetTranslationMode",
"ExpireText",
- "BlastText",
"PrintLine",
"SetSayLineDefaults",
"PurgePrimitiveQueue",
@@ -1538,6 +1577,7 @@
{ "dofile", new_dofile },
{ "PrintDebug", PrintDebug },
{ "PrintWarning", PrintWarning },
+ { "BlastText", BlastText },
{ "FunctionName", FunctionName },
{ "CheckForFile", CheckForFile },
{ "MakeColor", MakeColor },
More information about the Scummvm-git-logs
mailing list