12 #include "common/scummsys.h" 13 #include "common/str.h" 17 class SeekableReadStream;
24 #define LUA_VERSION "Lua 3.1 (alpha)" 25 #define LUA_COPYRIGHT "Copyright (C) 1994-1998 TeCGraf, PUC-Rio" 26 #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" 28 #define LUA_NOOBJECT 0 30 #define LUA_ANYTAG (-1) 32 typedef void (*lua_CFunction)();
33 typedef uint32 lua_Object;
48 bool _stdin, _stdout, _stderr;
56 uint32 read(
void *buf, uint32 len);
57 uint32 write(
const char *buf, uint32 len);
58 void seek(int32 pos,
int whence = 0);
65 void lua_removelibslists();
71 lua_Object lua_settagmethod(int32 tag,
const char *event);
72 lua_Object lua_gettagmethod(int32 tag,
const char *event);
73 lua_Object lua_seterrormethod();
76 int32 lua_copytagmethods(int32 tagto, int32 tagfrom);
77 void lua_settag(int32 tag);
79 void lua_error(
const char *s);
80 int32 lua_dostring(
const char *
string);
81 int32 lua_dobuffer(
const char *buff, int32 size,
const char *name);
82 int32 lua_callfunction(lua_Object f);
85 void lua_beginblock();
88 lua_Object lua_lua2C(int32 number);
90 #define lua_getparam(_) lua_lua2C(_) 91 #define lua_getresult(_) lua_lua2C(_) 93 int32 lua_isnil (lua_Object
object);
94 int32 lua_istable (lua_Object
object);
95 int32 lua_isuserdata (lua_Object
object);
96 int32 lua_iscfunction (lua_Object
object);
97 int32 lua_isnumber (lua_Object
object);
98 int32 lua_isstring (lua_Object
object);
99 int32 lua_isfunction (lua_Object
object);
101 float lua_getnumber (lua_Object
object);
102 const char *lua_getstring (lua_Object
object);
103 lua_CFunction lua_getcfunction (lua_Object
object);
104 int32 lua_getuserdata (lua_Object
object);
107 void lua_pushnumber(
float n);
108 void lua_pushstring(
const char *s);
109 void lua_pushCclosure(lua_CFunction fn, int32 n);
110 void lua_pushusertag(int32
id, int32 tag);
111 void lua_pushobject(lua_Object
object);
113 lua_Object lua_pop();
114 lua_Object lua_getglobal(
const char *name);
115 lua_Object lua_rawgetglobal(
const char *name);
116 void lua_setglobal(
const char *name);
117 void lua_rawsetglobal(
const char *name);
120 void lua_rawsettable();
121 lua_Object lua_gettable();
122 lua_Object lua_rawgettable();
124 int32 lua_tag(lua_Object
object);
126 int32 lua_ref(int32 lock);
127 lua_Object lua_getref(int32
ref);
128 void lua_unref(int32 ref);
130 lua_Object lua_createtable();
131 int32 lua_collectgarbage(int32 limit);
134 void current_script();
138 #define lua_call(name) lua_callfunction(lua_getglobal(name)) 140 #define lua_pushref(ref) lua_pushobject(lua_getref(ref)) 142 #define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) 144 #define lua_register(n, f) (lua_pushcfunction(f), lua_setglobal(n)) 146 #define lua_pushuserdata(u) lua_pushusertag(u, 0) 148 #define lua_pushcfunction(f) lua_pushCclosure(f, 0) 150 #define lua_clonetag(t) lua_copytagmethods(lua_newtag(), (t)) 156 #define LUA_COMPAT2_5 160 lua_Object lua_setfallback(
const char *event, lua_CFunction fallback);
162 #define lua_storeglobal lua_setglobal 163 #define lua_type lua_tag 165 #define lua_lockobject(o) lua_refobject(o,1) 166 #define lua_lock() lua_ref(1) 167 #define lua_getlocked lua_getref 168 #define lua_pushlocked lua_pushref 169 #define lua_unlock lua_unref 170 #define lua_pushliteral(o) lua_pushstring(o) 171 #define lua_getindexed(o, n) (lua_pushobject(o), lua_pushnumber(n), lua_gettable()) 172 #define lua_getfield(o, f) (lua_pushobject(o), lua_pushstring(f), lua_gettable()) 173 #define lua_copystring(o) (strdup(lua_getstring(o))) 174 #define lua_getsubscript lua_gettable 175 #define lua_storesubscript lua_settable
Definition: savegame.h:33
Definition: algorithm.h:29