mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
move particles to gfx.particles
This commit is contained in:
parent
48add86120
commit
fdbe8ca9c6
3 changed files with 19 additions and 2 deletions
|
|
@ -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
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue