mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
optimizations, refactor, fixes
This commit is contained in:
parent
3f12d4389d
commit
92f6fd2226
4 changed files with 340 additions and 292 deletions
|
|
@ -260,6 +260,11 @@ int lua::LuaState::pushglobals() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua::LuaState::pushcfunction(lua_CFunction function) {
|
||||
lua_pushcfunction(L, function);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void lua::LuaState::pop(int n) {
|
||||
lua_pop(L, n);
|
||||
}
|
||||
|
|
@ -294,6 +299,14 @@ lua::luanumber lua::LuaState::tonumber(int idx) {
|
|||
return lua_tonumber(L, idx);
|
||||
}
|
||||
|
||||
glm::vec2 lua::LuaState::tovec2(int idx) {
|
||||
return lua::tovec2(L, idx);
|
||||
}
|
||||
|
||||
glm::vec4 lua::LuaState::tocolor(int idx) {
|
||||
return lua::tocolor(L, idx);
|
||||
}
|
||||
|
||||
const char* lua::LuaState::tostring(int idx) {
|
||||
return lua_tostring(L, idx);
|
||||
}
|
||||
|
|
@ -462,3 +475,7 @@ void lua::LuaState::dumpStack() {
|
|||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
lua_State* lua::LuaState::getLua() const {
|
||||
return L;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue