mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Restored the destroy method for objects in love.physics.
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static_d.lib libFLAC++_static_d.lib"
|
AdditionalDependencies="lua.lib d/SDLmain.lib d/SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static_d.lib libFLAC++_static_d.lib"
|
||||||
AdditionalLibraryDirectories="lib;Debug"
|
AdditionalLibraryDirectories="lib;Debug"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static.lib libFLAC++_static.lib"
|
AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static.lib libFLAC++_static.lib"
|
||||||
AdditionalLibraryDirectories="lib;Release"
|
AdditionalLibraryDirectories="lib;lib/r;Release"
|
||||||
GenerateDebugInformation="false"
|
GenerateDebugInformation="false"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
|
|||||||
@@ -398,6 +398,13 @@ namespace box2d
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_Body_destroy(lua_State * L)
|
||||||
|
{
|
||||||
|
Body * t = luax_checkbody(L, 1);
|
||||||
|
t->release();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const luaL_Reg functions[] = {
|
static const luaL_Reg functions[] = {
|
||||||
{ "getX", w_Body_getX },
|
{ "getX", w_Body_getX },
|
||||||
{ "getY", w_Body_getY },
|
{ "getY", w_Body_getY },
|
||||||
@@ -439,6 +446,7 @@ namespace box2d
|
|||||||
{ "setAllowSleeping", w_Body_setAllowSleeping },
|
{ "setAllowSleeping", w_Body_setAllowSleeping },
|
||||||
{ "putToSleep", w_Body_putToSleep },
|
{ "putToSleep", w_Body_putToSleep },
|
||||||
{ "wakeUp", w_Body_wakeUp },
|
{ "wakeUp", w_Body_wakeUp },
|
||||||
|
{ "destroy", w_Body_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ namespace box2d
|
|||||||
int w_Body_setAllowSleeping(lua_State * L);
|
int w_Body_setAllowSleeping(lua_State * L);
|
||||||
int w_Body_putToSleep(lua_State * L);
|
int w_Body_putToSleep(lua_State * L);
|
||||||
int w_Body_wakeUp(lua_State * L);
|
int w_Body_wakeUp(lua_State * L);
|
||||||
|
int w_Body_destroy(lua_State * L);
|
||||||
int luaopen_body(lua_State * L);
|
int luaopen_body(lua_State * L);
|
||||||
|
|
||||||
} // box2d
|
} // box2d
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace box2d
|
|||||||
{ "setData", w_Shape_setData },
|
{ "setData", w_Shape_setData },
|
||||||
{ "getData", w_Shape_getData },
|
{ "getData", w_Shape_getData },
|
||||||
{ "getBoundingBox", w_Shape_getBoundingBox },
|
{ "getBoundingBox", w_Shape_getBoundingBox },
|
||||||
|
{ "destroy", w_Shape_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,13 @@ namespace box2d
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_Joint_destroy(lua_State * L)
|
||||||
|
{
|
||||||
|
Joint * t = luax_checkjoint(L, 1);
|
||||||
|
t->release();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const luaL_Reg functions[] = {
|
static const luaL_Reg functions[] = {
|
||||||
{ "getType", w_Joint_getType },
|
{ "getType", w_Joint_getType },
|
||||||
{ "getAnchors", w_Joint_getAnchors },
|
{ "getAnchors", w_Joint_getAnchors },
|
||||||
@@ -85,6 +92,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ namespace box2d
|
|||||||
int w_Joint_getReactionTorque(lua_State * L);
|
int w_Joint_getReactionTorque(lua_State * L);
|
||||||
int w_Joint_setCollideConnected(lua_State * L);
|
int w_Joint_setCollideConnected(lua_State * L);
|
||||||
int w_Joint_getCollideConnected(lua_State * L);
|
int w_Joint_getCollideConnected(lua_State * L);
|
||||||
|
int w_Joint_destroy(lua_State * L);
|
||||||
int luaopen_joint(lua_State * L);
|
int luaopen_joint(lua_State * L);
|
||||||
|
|
||||||
} // box2d
|
} // box2d
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace box2d
|
|||||||
{ "setData", w_Shape_setData },
|
{ "setData", w_Shape_setData },
|
||||||
{ "getData", w_Shape_getData },
|
{ "getData", w_Shape_getData },
|
||||||
{ "getBoundingBox", w_Shape_getBoundingBox },
|
{ "getBoundingBox", w_Shape_getBoundingBox },
|
||||||
|
{ "destroy", w_Shape_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ namespace box2d
|
|||||||
{ "getReactionTorque", w_Joint_getReactionTorque },
|
{ "getReactionTorque", w_Joint_getReactionTorque },
|
||||||
{ "setCollideConnected", w_Joint_setCollideConnected },
|
{ "setCollideConnected", w_Joint_setCollideConnected },
|
||||||
{ "getCollideConnected", w_Joint_getCollideConnected },
|
{ "getCollideConnected", w_Joint_getCollideConnected },
|
||||||
|
{ "destroy", w_Joint_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -198,6 +198,13 @@ namespace box2d
|
|||||||
return t->getBoundingBox(L);
|
return t->getBoundingBox(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_Shape_destroy(lua_State * L)
|
||||||
|
{
|
||||||
|
Shape * t = luax_checkshape(L, 1);
|
||||||
|
t->release();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const luaL_Reg functions[] = {
|
static const luaL_Reg functions[] = {
|
||||||
{ "getType", w_Shape_getType },
|
{ "getType", w_Shape_getType },
|
||||||
{ "setFriction", w_Shape_setFriction },
|
{ "setFriction", w_Shape_setFriction },
|
||||||
@@ -219,6 +226,7 @@ namespace box2d
|
|||||||
{ "setData", w_Shape_setData },
|
{ "setData", w_Shape_setData },
|
||||||
{ "getData", w_Shape_getData },
|
{ "getData", w_Shape_getData },
|
||||||
{ "getBoundingBox", w_Shape_getBoundingBox },
|
{ "getBoundingBox", w_Shape_getBoundingBox },
|
||||||
|
{ "destroy", w_Shape_destroy },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ namespace box2d
|
|||||||
int w_Shape_setData(lua_State * L);
|
int w_Shape_setData(lua_State * L);
|
||||||
int w_Shape_getData(lua_State * L);
|
int w_Shape_getData(lua_State * L);
|
||||||
int w_Shape_getBoundingBox(lua_State * L);
|
int w_Shape_getBoundingBox(lua_State * L);
|
||||||
|
int w_Shape_destroy(lua_State * L);
|
||||||
int luaopen_shape(lua_State * L);
|
int luaopen_shape(lua_State * L);
|
||||||
|
|
||||||
} // box2d
|
} // box2d
|
||||||
|
|||||||
Reference in New Issue
Block a user