optimizations, refactor, fixes

This commit is contained in:
MihailRis
2024-05-05 04:14:24 +03:00
parent 3f12d4389d
commit 92f6fd2226
4 changed files with 340 additions and 292 deletions
+17
View File
@@ -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;
}