diff --git a/engine/core/script/LuaFunctionBase.cpp b/engine/core/script/LuaFunctionBase.cpp index aef47829..801a2851 100644 --- a/engine/core/script/LuaFunctionBase.cpp +++ b/engine/core/script/LuaFunctionBase.cpp @@ -97,6 +97,10 @@ void LuaFunctionBase::push_value(lua_State *vm, long n){ lua_pushnumber(vm, n); } +void LuaFunctionBase::push_value(lua_State *vm, unsigned long n){ + lua_pushnumber(vm, n); +} + void LuaFunctionBase::push_value(lua_State *vm, bool b){ lua_pushboolean(vm, b); } @@ -109,10 +113,6 @@ void LuaFunctionBase::push_value(lua_State *vm, wchar_t s){ lua_pushstring(vm, StringUtils::toUTF8(s).c_str()); } -void LuaFunctionBase::push_value(lua_State *vm, size_t n){ - lua_pushnumber(vm, n); -} - void LuaFunctionBase::push_value(lua_State *vm, Vector3 o){ if (!luabridge::push(vm, o)) throw luabridge::makeErrorCode(luabridge::ErrorCode::LuaStackOverflow); diff --git a/engine/core/script/LuaFunctionBase.h b/engine/core/script/LuaFunctionBase.h index 49ef2a24..ea00a8d7 100644 --- a/engine/core/script/LuaFunctionBase.h +++ b/engine/core/script/LuaFunctionBase.h @@ -42,10 +42,10 @@ namespace Supernova{ void push_value(lua_State *vm, unsigned int n); void push_value(lua_State *vm, float n); void push_value(lua_State *vm, long n); + void push_value(lua_State *vm, unsigned long n); void push_value(lua_State *vm, bool b); void push_value(lua_State *vm, const std::string &s); void push_value(lua_State *vm, wchar_t s); - void push_value(lua_State *vm, size_t n); void push_value(lua_State *vm, Vector3 n); void push_value(lua_State *vm, Body2D o); void push_value(lua_State *vm, Contact2D o); diff --git a/engine/core/script/binding/CoreClassesLua.cpp b/engine/core/script/binding/CoreClassesLua.cpp index 240130a0..7ba1c627 100644 --- a/engine/core/script/binding/CoreClassesLua.cpp +++ b/engine/core/script/binding/CoreClassesLua.cpp @@ -233,10 +233,10 @@ void LuaBinding::registerCoreClasses(lua_State *L){ .endClass(); luabridge::getGlobalNamespace(L) - .beginClass>("FunctionSubscribe_B_B2SB2S") - .addFunction("__call", &FunctionSubscribe::call) - .addFunction("call", &FunctionSubscribe::call) - .addFunction("add", (bool (FunctionSubscribe::*)(const std::string&, lua_State*))&FunctionSubscribe::add) + .beginClass>("FunctionSubscribe_B_B2ULB2UL") + .addFunction("__call", &FunctionSubscribe::call) + .addFunction("call", &FunctionSubscribe::call) + .addFunction("add", (bool (FunctionSubscribe::*)(const std::string&, lua_State*))&FunctionSubscribe::add) .endClass(); luabridge::getGlobalNamespace(L) diff --git a/engine/core/subsystem/PhysicsSystem.h b/engine/core/subsystem/PhysicsSystem.h index 07db60ad..675ba116 100644 --- a/engine/core/subsystem/PhysicsSystem.h +++ b/engine/core/subsystem/PhysicsSystem.h @@ -77,7 +77,7 @@ namespace Supernova{ FunctionSubscribe preSolve2D; FunctionSubscribe postSolve2D; - FunctionSubscribe shouldCollide2D; + FunctionSubscribe shouldCollide2D; FunctionSubscribe onBodyActivated3D; FunctionSubscribe onBodyDeactivated3D; diff --git a/engine/core/util/Box2DAux.h b/engine/core/util/Box2DAux.h index cb992e5f..0c1b8687 100644 --- a/engine/core/util/Box2DAux.h +++ b/engine/core/util/Box2DAux.h @@ -24,11 +24,11 @@ namespace Supernova{ } bool ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB){ - size_t shapeIndexA = fixtureA->GetUserData().pointer; + unsigned long shapeIndexA = fixtureA->GetUserData().pointer; Entity entityA = fixtureA->GetBody()->GetUserData().pointer; Body2D bodyA(scene, entityA); - size_t shapeIndexB = fixtureB->GetUserData().pointer; + unsigned long shapeIndexB = fixtureB->GetUserData().pointer; Entity entityB = fixtureB->GetBody()->GetUserData().pointer; Body2D bodyB(scene, entityB);