move particles to gfx.particles
This commit is contained in:
@@ -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
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user