aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-16 23:59:13 +0200
committerEugene Sandulenko2019-09-03 17:17:21 +0200
commitdda8c8137579b007d1aaeebc426bd4f942054b35 (patch)
tree1f40914981e8037c50c3714268c32a67746f58b5 /engines/hdb/lua-script.cpp
parent6d83d2ea724801ef5661f79bdec5e48eff5ada30 (diff)
downloadscummvm-rg350-dda8c8137579b007d1aaeebc426bd4f942054b35.tar.gz
scummvm-rg350-dda8c8137579b007d1aaeebc426bd4f942054b35.tar.bz2
scummvm-rg350-dda8c8137579b007d1aaeebc426bd4f942054b35.zip
HDB: Added (commented out) debug case for _use functions
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index c930d48a61..797e030af7 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -1885,8 +1885,26 @@ void LuaScript::invokeLuaFunction(char *luaFunc, int x, int y, int value1, int v
lua_getglobal(_state, luaFunc);
type = lua_type(_state, 1);
+
+#if 0
+ if (!strcmp(luaFunc, "ferretbed_use")) {
+ const char *t = lua_typename(_state, type);
+ warning("type: %s", t);
+ Common::String a("print(ferretbed_init(50, 30, 0, 0))");
+
+ executeChunk(a, "debug");
+
+// a = "print('woo') for i,v in pairs(_G) do if type(v) == 'function' then print(i) end end";
+// a = "print(ferretbed_use())";
+
+ executeChunk(a, "debug");
+
+ lua_printstack(_state);
+ }
+#endif
+
if (type != LUA_TFUNCTION) {
- warning("Function '%s' doesn't exist", luaFunc);
+ warning("Function '%s' doesn't exist (%d)", luaFunc, type);
} else {
lua_pushnumber(_state, x);
lua_pushnumber(_state, y);