move particles to gfx.particles

This commit is contained in:
MihailRis
2024-11-06 20:18:57 +03:00
parent 48add86120
commit fdbe8ca9c6
3 changed files with 19 additions and 2 deletions
+17
View File
@@ -599,6 +599,23 @@ namespace lua {
setglobal(L, name);
}
inline void openlib(
lua::State* L,
const std::string& package,
const std::string& name,
const luaL_Reg* libfuncs
) {
if (!hasglobal(L, package)) {
createtable(L, 0, 1);
setglobal(L, package);
}
getglobal(L, package);
createtable(L, 0, 0);
luaL_setfuncs(L, libfuncs, 0);
setfield(L, name);
pop(L);
}
inline const char* require_string_field(
lua::State* L, const std::string& name, int idx=-1
) {