diff --git a/librtt/Rtt_LuaLibPhysics.cpp b/librtt/Rtt_LuaLibPhysics.cpp index 46dde3db8..777a4089c 100644 --- a/librtt/Rtt_LuaLibPhysics.cpp +++ b/librtt/Rtt_LuaLibPhysics.cpp @@ -1041,9 +1041,11 @@ InitializeFixtureFromLua( lua_State *L, static const char kDistanceJointType[] = "distance"; static const char kPivotJointType[] = "pivot"; static const char kPistonJointType[] = "piston"; +static const char kPistonJointV2Type[] = "pistonV2"; static const char kFrictionJointType[] = "friction"; static const char kWeldJointType[] = "weld"; // note: has no type-specific methods static const char kWheelJointType[] = "wheel"; // combines a piston and a pivot joint, like a wheel on a shock absorber +static const char kWheelV2JointType[] = "wheelV2"; // wheel joint v2.4.2 static const char kPulleyJointType[] = "pulley"; static const char kTouchJointType[] = "touch"; static const char kGearJointType[] = "gear"; @@ -1257,6 +1259,29 @@ newJoint( lua_State *L ) result = CreateAndPushJoint( luaStateHandle, physics, jointDef ); } + else if (strcmp(kPistonJointV2Type, jointType) == 0) + { + b2Body* body1 = e1->GetBody(); + b2Body* body2 = e2->GetBody(); + + Real px = luaL_torealphysics(L, 4, scale); + Real py = luaL_torealphysics(L, 5, scale); + + // Don't scale the axis vector + Real axisX = luaL_toreal(L, 6); + Real axisY = luaL_toreal(L, 7); + + b2PrismaticJointDefV2 jointDef; + + b2Vec2 anchor(px, py); + b2Vec2 axis(axisX, axisY); + axis.Normalize(); + + jointDef.Initialize(body1, body2, anchor, axis); + + result = CreateAndPushJoint(luaStateHandle, physics, jointDef); + } + else if ( strcmp( kFrictionJointType, jointType ) == 0 ) { b2Body *body1 = e1->GetBody(); @@ -1318,6 +1343,29 @@ newJoint( lua_State *L ) result = CreateAndPushJoint( luaStateHandle, physics, jointDef ); } + else if (strcmp(kWheelV2JointType, jointType) == 0) + { + b2Body* body1 = e1->GetBody(); + b2Body* body2 = e2->GetBody(); + + Real px = luaL_torealphysics(L, 4, scale); + Real py = luaL_torealphysics(L, 5, scale); + + Real qx = luaL_torealphysics(L, 6, scale); + Real qy = luaL_torealphysics(L, 7, scale); + + b2WheelJointDefV2 jointDef; + + b2Vec2 point(px, py); + b2Vec2 axis(qx, qy); + + axis.Normalize(); + + jointDef.Initialize(body1, body2, point, axis); + + result = CreateAndPushJoint(luaStateHandle, physics, jointDef); + } + else if ( strcmp( kPulleyJointType, jointType ) == 0 ) { b2Body *body1 = e1->GetBody(); diff --git a/librtt/Rtt_PhysicsJoint.cpp b/librtt/Rtt_PhysicsJoint.cpp index 87bf5ac65..794ea04ae 100644 --- a/librtt/Rtt_PhysicsJoint.cpp +++ b/librtt/Rtt_PhysicsJoint.cpp @@ -103,8 +103,10 @@ ShouldGetLocalAnchor( b2JointType jointType ) case e_distanceJoint: case e_revoluteJoint: case e_prismaticJoint: + case e_prismaticJointV2: case e_frictionJoint: case e_wheelJoint: + case e_wheelJointV2: case e_weldJoint: case e_ropeJoint: result = true; @@ -149,12 +151,18 @@ GetLocalAnchorACallback( b2JointType jointType ) case e_prismaticJoint: result = & GetLocalAnchorA< b2PrismaticJoint >; break; + case e_prismaticJointV2: + result = &GetLocalAnchorA< b2PrismaticJointV2 >; + break; case e_frictionJoint: result = & GetLocalAnchorA< b2FrictionJoint >; break; case e_wheelJoint: result = & GetLocalAnchorA< b2WheelJoint >; break; + case e_wheelJointV2: + result = &GetLocalAnchorA< b2WheelJointV2 >; + break; case e_weldJoint: result = & GetLocalAnchorA< b2WeldJoint >; break; @@ -185,12 +193,18 @@ GetLocalAnchorBCallback( b2JointType jointType ) case e_prismaticJoint: result = & GetLocalAnchorB< b2PrismaticJoint >; break; + case e_prismaticJointV2: + result = &GetLocalAnchorB< b2PrismaticJointV2 >; + break; case e_frictionJoint: result = & GetLocalAnchorB< b2FrictionJoint >; break; case e_wheelJoint: result = & GetLocalAnchorB< b2WheelJoint >; break; + case e_wheelJointV2: + result = &GetLocalAnchorB< b2WheelJointV2 >; + break; case e_weldJoint: result = & GetLocalAnchorB< b2WeldJoint >; break; @@ -278,7 +292,9 @@ ShouldGetLocalAxis( b2JointType jointType ) switch ( jointType ) { case e_prismaticJoint: + case e_prismaticJointV2: case e_wheelJoint: + case e_wheelJointV2: result = true; break; @@ -309,9 +325,15 @@ GetLocalAxisACallback( b2JointType jointType ) case e_prismaticJoint: result = & GetLocalAxisA< b2PrismaticJoint >; break; + case e_prismaticJointV2: + result = &GetLocalAxisA< b2PrismaticJointV2 >; + break; case e_wheelJoint: result = & GetLocalAxisA< b2WheelJoint >; break; + case e_wheelJointV2: + result = &GetLocalAxisA< b2WheelJointV2 >; + break; default: break; @@ -425,9 +447,22 @@ PhysicsJoint::setLimits( lua_State *L ) "the lower and upper limits. We assume you meant to set the lower limit as " "%g and the upper limit as %g.\n", lowerLimit, upperLimit ) ); } + if (baseJoint->GetType() == e_wheelJointV2) + { + b2WheelJointV2* joint = (b2WheelJointV2*)baseJoint; + joint->SetLimits(Rtt_RealToFloat(lowerLimit), Rtt_RealToFloat(upperLimit)); + } + else if (baseJoint->GetType() == e_prismaticJointV2) + { + b2PrismaticJointV2* joint = (b2PrismaticJointV2*)baseJoint; + joint->SetLimits(Rtt_RealToFloat(lowerLimit), Rtt_RealToFloat(upperLimit)); + } + else if (baseJoint->GetType() == e_prismaticJoint) + { + b2PrismaticJoint* joint = (b2PrismaticJoint*)baseJoint; + joint->SetLimits(Rtt_RealToFloat(lowerLimit), Rtt_RealToFloat(upperLimit)); + } - b2PrismaticJoint *joint = (b2PrismaticJoint*)baseJoint; - joint->SetLimits( Rtt_RealToFloat( lowerLimit ), Rtt_RealToFloat( upperLimit ) ); } return 0; @@ -443,12 +478,30 @@ PhysicsJoint::getLimits( lua_State *L ) { const PhysicsWorld& physics = LuaContext::GetRuntime( L )->GetPhysicsWorld(); Real scale = physics.GetPixelsPerMeter(); + Rtt_Real lowerLimit = 0.0; + Rtt_Real upperLimit = 0.0; + if (baseJoint->GetType() == e_wheelJointV2) + { + b2WheelJointV2* joint = (b2WheelJointV2*)baseJoint; // assumption: this cast is OK for both cases (otherwise check type) - b2PrismaticJoint *joint = (b2PrismaticJoint*)baseJoint; // assumption: this cast is OK for both cases (otherwise check type) + lowerLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetLowerLimit()), scale); + upperLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetUpperLimit()), scale); + } + else if (baseJoint->GetType() == e_prismaticJoint) + { + b2PrismaticJoint* joint = (b2PrismaticJoint*)baseJoint; // assumption: this cast is OK for both cases (otherwise check type) + + lowerLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetLowerLimit()), scale); + upperLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetUpperLimit()), scale); + } + else if (baseJoint->GetType() == e_prismaticJointV2) + { + b2PrismaticJointV2* joint = (b2PrismaticJointV2*)baseJoint; // assumption: this cast is OK for both cases (otherwise check type) + + lowerLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetLowerLimit()), scale); + upperLimit = Rtt_RealMul(Rtt_FloatToReal(joint->GetUpperLimit()), scale); + } - Rtt_Real lowerLimit = Rtt_RealMul( Rtt_FloatToReal( joint->GetLowerLimit() ), scale ); - Rtt_Real upperLimit = Rtt_RealMul( Rtt_FloatToReal( joint->GetUpperLimit() ), scale ); - lua_pushnumber( L, lowerLimit ); lua_pushnumber( L, upperLimit ); } @@ -815,6 +868,76 @@ PhysicsJoint::ValueForKey( lua_State *L ) result = 0; } } + else if (jointType == e_prismaticJointV2) + { + ////////////////////////////////////////////////////////////////////////////// + // This is exposed as a "piston" joint in Corona (aka "prismaticV2" in Box2D terms) + + b2PrismaticJointV2* joint = (b2PrismaticJointV2*)baseJoint; + + if (0 == strcmp("isMotorEnabled", key)) + { + lua_pushboolean(L, joint->IsMotorEnabled()); + } + else if (0 == strcmp("motorSpeed", key)) + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetMotorSpeed()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("motorForce", key)) // read-only + { + Runtime& runtime = *LuaContext::GetRuntime(L); + float32 inverseDeltaTime = (float)runtime.GetFPS(); + + lua_pushnumber(L, joint->GetMotorForce(inverseDeltaTime)); + } + else if (0 == strcmp("maxMotorForce", key)) + { + lua_pushnumber(L, joint->GetMaxMotorForce()); + } + else if (strcmp("getLocalAxisA", key) == 0) + { + lua_pushlightuserdata(L, (void*)GetLocalAxisACallback(e_prismaticJoint)); + lua_pushcclosure(L, Self::getLocalAxis, 1); + } + else if (0 == strcmp("referenceAngle", key)) // read-only + { + Rtt_Real valueDegrees = Rtt_RealRadiansToDegrees(Rtt_FloatToReal(joint->GetReferenceAngle())); + lua_pushnumber(L, valueDegrees); + } + else if (0 == strcmp("jointTranslation", key)) // read-only + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetJointTranslation()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("jointSpeed", key)) // read-only + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetJointSpeed()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("isLimitEnabled", key)) + { + lua_pushboolean(L, joint->IsLimitEnabled()); + } + else if (strcmp("setLimits", key) == 0) + { + lua_pushcfunction(L, Self::setLimits); + } + else if (strcmp("getLimits", key) == 0) + { + lua_pushcfunction(L, Self::getLimits); + } + else + { + result = 0; + } + } else if ( jointType == e_frictionJoint ) { ////////////////////////////////////////////////////////////////////////////// @@ -894,6 +1017,88 @@ PhysicsJoint::ValueForKey( lua_State *L ) result = 0; } } + else if (jointType == e_wheelJointV2) + { + ////////////////////////////////////////////////////////////////////////////// + // This is exposed as a "wheel" joint in Corona (aka "line" in Box2D terms) + + b2WheelJointV2 *joint = (b2WheelJointV2*)baseJoint; + + if (0 == strcmp("isMotorEnabled", key)) + { + lua_pushboolean(L, joint->IsMotorEnabled()); + } + else if (0 == strcmp("motorSpeed", key)) + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetMotorSpeed()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("motorTorque", key)) // read-only + { + lua_pushnumber(L, joint->GetMaxMotorTorque()); + } + else if (0 == strcmp("maxMotorTorque", key)) + { + lua_pushnumber(L, joint->GetMaxMotorTorque()); + } + else if (strcmp("getLocalAxisA", key) == 0) + { + lua_pushlightuserdata(L, (void*)GetLocalAxisACallback(e_wheelJoint)); + lua_pushcclosure(L, Self::getLocalAxis, 1); + } + else if (0 == strcmp("jointTranslation", key)) // read-only + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetJointTranslation()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("jointLinearSpeed", key)) // read-only + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetJointLinearSpeed()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("jointAngularSpeed", key)) // read-only + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valuePixels = Rtt_RealMul(Rtt_FloatToReal(joint->GetJointAngularSpeed()), scale); + lua_pushnumber(L, valuePixels); + } + else if (0 == strcmp("jointAngle", key)) // read-only + { + Rtt_Real valueDegrees = Rtt_RealRadiansToDegrees(Rtt_FloatToReal(joint->GetJointAngle())); + lua_pushnumber(L, valueDegrees); + } + else if (strcmp("springStiffness", key) == 0) + { + lua_pushnumber(L, joint->GetStiffness()); + } + else if (strcmp("springDampingRatio", key) == 0) + { + lua_pushnumber(L, joint->GetDamping()); + } + else if (0 == strcmp("isLimitEnabled", key)) + { + lua_pushboolean(L, joint->IsLimitEnabled()); + } + else if (strcmp("setLimits", key) == 0) + { + lua_pushcfunction(L, Self::setLimits); + } + else if (strcmp("getLimits", key) == 0) + { + lua_pushcfunction(L, Self::getLimits); + } + else + { + result = 0; + } + } else if ( jointType == e_pulleyJoint ) { ////////////////////////////////////////////////////////////////////////////// @@ -1202,6 +1407,59 @@ PhysicsJoint::SetValueForKey( lua_State *L ) } } + + else if (jointType == e_prismaticJointV2) + { + ////////////////////////////////////////////////////////////////////////////// + // This is exposed as a "piston" joint in Corona (aka "prismatic" in Box2D terms) + + b2PrismaticJointV2* joint = (b2PrismaticJointV2*)baseJoint; + + if (0 == strcmp("isMotorEnabled", key)) + { + if (lua_isboolean(L, 3)) + { + joint->EnableMotor(lua_toboolean(L, 3)); + } + } + else if (0 == strcmp("motorSpeed", key)) + { + if (lua_isnumber(L, 3)) + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Real valueMeters = Rtt_RealDiv(luaL_toreal(L, 3), scale); + joint->SetMotorSpeed(Rtt_RealToFloat(valueMeters)); + } + } + else if (0 == strcmp("motorForce", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("maxMotorForce", key)) + { + if (lua_isnumber(L, 3)) + { + joint->SetMaxMotorForce(lua_tonumber(L, 3)); + } + } + else if (0 == strcmp("isLimitEnabled", key)) + { + if (lua_isboolean(L, 3)) + { + joint->EnableLimit(lua_toboolean(L, 3)); + } + } + else if (0 == strcmp("jointTranslation", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("jointSpeed", key)) + { + // No-op for read-only property + } + + } else if ( jointType == e_frictionJoint ) { @@ -1285,7 +1543,80 @@ PhysicsJoint::SetValueForKey( lua_State *L ) } } } + else if (jointType == e_wheelJointV2) + { + ////////////////////////////////////////////////////////////////////////////// + // This is exposed as a "wheel" joint in Corona (aka "line" in Box2D terms) + + b2WheelJointV2 *joint = (b2WheelJointV2*)baseJoint; + if (0 == strcmp("isMotorEnabled", key)) + { + if (lua_isboolean(L, 3)) + { + joint->EnableMotor(lua_toboolean(L, 3)); + } + } + else if (0 == strcmp("isLimitEnabled", key)) + { + if (lua_isboolean(L, 3)) + { + joint->EnableLimit(lua_toboolean(L, 3)); + } + } + else if (0 == strcmp("motorSpeed", key)) + { + if (lua_isnumber(L, 3)) + { + const PhysicsWorld& physics = LuaContext::GetRuntime(L)->GetPhysicsWorld(); + Real scale = physics.GetPixelsPerMeter(); + Rtt_Real valueMeters = Rtt_RealDiv(Rtt_FloatToReal(lua_tonumber(L, 3)), scale); + joint->SetMotorSpeed(Rtt_RealToFloat(valueMeters)); + + } + } + else if (0 == strcmp("motorTorque", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("maxMotorTorque", key)) + { + if (lua_isnumber(L, 3)) + { + joint->SetMaxMotorTorque(lua_tonumber(L, 3)); + } + } + else if (0 == strcmp("jointTranslation", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("jointLinearSpeed", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("jointAngularSpeed", key)) + { + // No-op for read-only property + } + else if (0 == strcmp("jointAngle", key)) + { + // No-op for read-only property + } + else if (strcmp("springStiffness", key) == 0) + { + if (lua_isnumber(L, 3)) + { + joint->SetStiffness(lua_tonumber(L, 3)); + } + } + else if (strcmp("springDampingRatio", key) == 0) + { + if (lua_isnumber(L, 3)) + { + joint->SetDamping(lua_tonumber(L, 3)); + } + } + } else if ( jointType == e_pulleyJoint ) { ////////////////////////////////////////////////////////////////////////////// diff --git a/platform/android/ndk/CMakeLists.txt b/platform/android/ndk/CMakeLists.txt index 4163e340d..9368d98d4 100644 --- a/platform/android/ndk/CMakeLists.txt +++ b/platform/android/ndk/CMakeLists.txt @@ -717,11 +717,13 @@ add_library( corona SHARED ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2MotorJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2MouseJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp + ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PrismaticJointV2.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PulleyJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2RopeJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WeldJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WheelJoint.cpp + ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WheelJointV2.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2Particle.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2ParticleAssembly.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2ParticleGroup.cpp diff --git a/platform/emscripten/gmake/Box2D.make b/platform/emscripten/gmake/Box2D.make index d8183b3a7..381063f00 100644 --- a/platform/emscripten/gmake/Box2D.make +++ b/platform/emscripten/gmake/Box2D.make @@ -110,11 +110,13 @@ OBJECTS := \ $(OBJDIR)/b2MotorJoint.o \ $(OBJDIR)/b2MouseJoint.o \ $(OBJDIR)/b2PrismaticJoint.o \ + $(OBJDIR)/b2PrismaticJointV2.o \ $(OBJDIR)/b2PulleyJoint.o \ $(OBJDIR)/b2RevoluteJoint.o \ $(OBJDIR)/b2RopeJoint.o \ $(OBJDIR)/b2WeldJoint.o \ $(OBJDIR)/b2WheelJoint.o \ + $(OBJDIR)/b2WheelJointV2.o \ $(OBJDIR)/b2Particle.o \ $(OBJDIR)/b2ParticleAssembly.o \ $(OBJDIR)/b2ParticleGroup.o \ @@ -348,6 +350,10 @@ $(OBJDIR)/b2PrismaticJoint.o: ../../../external/Box2D/Box2D/Dynamics/Joints/b2Pr @echo $(notdir $<) $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/b2PrismaticJointV2.o: ../../../external/Box2D/Box2D/Dynamics/Joints/b2PrismaticJointV2.cpp + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(OBJDIR)/b2PulleyJoint.o: ../../../external/Box2D/Box2D/Dynamics/Joints/b2PulleyJoint.cpp @echo $(notdir $<) $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" @@ -368,6 +374,10 @@ $(OBJDIR)/b2WheelJoint.o: ../../../external/Box2D/Box2D/Dynamics/Joints/b2WheelJ @echo $(notdir $<) $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/b2WheelJointV2.o: ../../../external/Box2D/Box2D/Dynamics/Joints/b2WheelJointV2.cpp + @echo $(notdir $<) + $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" + $(OBJDIR)/b2Particle.o: ../../../external/Box2D/Box2D/Particle/b2Particle.cpp @echo $(notdir $<) $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<" diff --git a/platform/linux/CMakeList.txt b/platform/linux/CMakeList.txt index ee1677998..c0058c487 100644 --- a/platform/linux/CMakeList.txt +++ b/platform/linux/CMakeList.txt @@ -779,11 +779,13 @@ SET( SOLAR2D_SOURCES ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2MotorJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2MouseJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp + ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PrismaticJointV2.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2PulleyJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2RopeJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WeldJoint.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WheelJoint.cpp + ${CORONA_ROOT}/external/Box2D/Box2D/Dynamics/Joints/b2WheelJointV2.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2Particle.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2ParticleAssembly.cpp ${CORONA_ROOT}/external/Box2D/Box2D/Particle/b2ParticleGroup.cpp diff --git a/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj b/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj index fbaa56b9e..96071a224 100644 --- a/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj +++ b/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj @@ -62,11 +62,13 @@ + + @@ -119,11 +121,13 @@ + + diff --git a/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj.filters b/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj.filters index d2465ee14..b0ab439d6 100644 --- a/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj.filters +++ b/platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj.filters @@ -176,6 +176,12 @@ Rope + + Dynamics\Joints + + + Dynamics + @@ -366,5 +372,11 @@ Rope + + Dynamics\Joints + + + Dynamics + \ No newline at end of file