[Scummvm-cvs-logs] CVS: residual lua.cpp,1.13,1.14
James Brown
ender at users.sourceforge.net
Wed Aug 20 10:21:05 CEST 2003
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv30067
Modified Files:
lua.cpp
Log Message:
Stick in some basic code to let conversations 'work'. I don't know enough about LUA to work out how to typecast the userdata to a usable set of fields yet...
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- lua.cpp 20 Aug 2003 14:29:59 -0000 1.13
+++ lua.cpp 20 Aug 2003 16:01:58 -0000 1.14
@@ -646,6 +646,28 @@
}
}
+// Text functions
+static void MakeTextObject() {
+ char *line = lua_getstring(lua_getparam(1));
+ std::string text = Localizer::instance()->localize(line);
+// TextObject *textObj = check_textobject(2);
+
+ warning("STUB: MakeTextObject(%s, <textObject>) = %s", line, text.c_str());
+}
+
+static void ChangeTextObject() {
+ char *line = lua_getstring(lua_getparam(1));
+// TextObject *text = check_textobject(2);
+
+ warning("STUB: ChangeTextObject(%s, <textObject>)", line);
+}
+
+static void GetTextObjectDimensions() {
+ warning("STUB: GetTextObjectDimensions()");
+ lua_pushnumber(100); // Dummy X
+ lua_pushnumber(100); // Dummy Y
+}
+
// Stub function for builtin functions not yet implemented
static void stubWarning() {
@@ -846,9 +868,6 @@
"ExpireText",
"BlastText",
"KillTextObject",
- "ChangeTextObject",
- "GetTextObjectDimensions",
- "MakeTextObject",
"PrintLine",
"SetSayLineDefaults",
"PurgePrimitiveQueue",
@@ -1079,7 +1098,10 @@
{ "EnableControl", EnableControl },
{ "DisableControl", DisableControl },
{ "GetControlState", GetControlState },
- { "InputDialog", InputDialog }
+ { "InputDialog", InputDialog },
+ { "ChangeTextObject", ChangeTextObject },
+ { "GetTextObjectDimensions", GetTextObjectDimensions },
+ { "MakeTextObject", MakeTextObject }
};
void register_lua() {
More information about the Scummvm-git-logs
mailing list