VERSIÓ 1.3.11
- [NEW] surf.loadex()
This commit is contained in:
7
lua.cpp
7
lua.cpp
@@ -26,6 +26,12 @@ extern "C" {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cpp_surf_loadex(lua_State *L) {
|
||||
const char* str = luaL_checkstring(L, 1);
|
||||
lua_pushinteger(L, loadsurf(str, true));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cpp_surf_save(lua_State *L) {
|
||||
uint8_t surface = luaL_checkinteger(L, 1);
|
||||
const char* str = luaL_checkstring(L, 2);
|
||||
@@ -877,6 +883,7 @@ void push_lua_funcs() {
|
||||
lua_newtable(L);
|
||||
lua_pushcfunction(L,cpp_surf_new); lua_setfield(L, -2, "new");
|
||||
lua_pushcfunction(L,cpp_surf_load); lua_setfield(L, -2, "load");
|
||||
lua_pushcfunction(L,cpp_surf_loadex); lua_setfield(L, -2, "loadex");
|
||||
lua_pushcfunction(L,cpp_surf_save); lua_setfield(L, -2, "save");
|
||||
lua_pushcfunction(L,cpp_surf_free); lua_setfield(L, -2, "free");
|
||||
lua_pushcfunction(L,cpp_surf_size); lua_setfield(L, -2, "size");
|
||||
|
||||
Reference in New Issue
Block a user