VERSIÓ 1.3.11

- [NEW] surf.loadex()
This commit is contained in:
2025-11-27 11:22:52 +01:00
parent a7cbdea4c5
commit 33d7cc3b6d
6 changed files with 53 additions and 240 deletions

View File

@@ -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");