[Scummvm-cvs-logs] CVS: residual lua.cpp,1.2,1.3
Jonathan Gray
khalek at users.sourceforge.net
Sat Aug 16 03:06:02 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.82,2.83 imuse.h,1.40,1.41 imuse_internal.h,2.15,2.16 imuse_player.cpp,2.23,2.24 midiparser_ro.cpp,1.1,1.2 scummvm.cpp,2.340,2.341
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.339,2.340
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv2786
Modified Files:
lua.cpp
Log Message:
stderr/stdin based InputDialog implementation
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lua.cpp 16 Aug 2003 06:41:37 -0000 1.2
+++ lua.cpp 16 Aug 2003 09:48:53 -0000 1.3
@@ -418,6 +418,17 @@
act->sayLine(msg);
}
+static void InputDialog() {
+ int c, i = 0;
+ char buf[512];
+ fprintf(stderr, "%s %s: ", luaL_check_string(1), luaL_check_string(2));
+ while (i < 512 && (c = fgetc(stdin)) != EOF && c != '\n')
+ buf[i++] = c;
+ buf[i] = '\0';
+
+ lua_pushstring(buf);
+}
+
static void IsMessageGoing() {
Actor *act;
if (lua_getparam(1) == LUA_NOOBJECT)
@@ -731,7 +742,6 @@
"PreRender",
"MakeSectorActive",
"GetSectorOppositeEdge",
- "InputDialog",
"FileFindDispose",
"FileFindNext",
"FileFindFirst",
@@ -1028,7 +1038,8 @@
{ "PerSecond", PerSecond },
{ "EnableControl", EnableControl },
{ "DisableControl", DisableControl },
- { "GetControlState", GetControlState }
+ { "GetControlState", GetControlState },
+ { "InputDialog", InputDialog }
};
void register_lua() {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.82,2.83 imuse.h,1.40,1.41 imuse_internal.h,2.15,2.16 imuse_player.cpp,2.23,2.24 midiparser_ro.cpp,1.1,1.2 scummvm.cpp,2.340,2.341
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.339,2.340
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list