Added many comments, and changed function names for wrapper functions.

This commit is contained in:
rude
2009-08-09 21:08:55 +02:00
parent f2adfd53f2
commit ba1a75e547
103 changed files with 2608 additions and 2391 deletions
+26 -27
View File
@@ -28,42 +28,41 @@ namespace box2d
{
CircleShape * luax_checkcircleshape(lua_State * L, int idx)
{
return luax_checktype<CircleShape>(L, idx, "CircleShape", LOVE_PHYSICS_CIRCLE_SHAPE_BITS);
return luax_checktype<CircleShape>(L, idx, "CircleShape", PHYSICS_CIRCLE_SHAPE_T);
}
int _wrap_CircleShape_getRadius(lua_State * L)
int w_CircleShape_getRadius(lua_State * L)
{
CircleShape * c = luax_checkcircleshape(L, 1);
lua_pushnumber(L, c->getRadius());
return 1;
}
static const luaL_Reg wrap_CircleShape_functions[] = {
{ "getRadius", _wrap_CircleShape_getRadius },
// From Shape.
{ "getType", _wrap_Shape_getType },
{ "setFriction", _wrap_Shape_setFriction },
{ "setRestitution", _wrap_Shape_setRestitution },
{ "setDensity", _wrap_Shape_setDensity },
{ "setSensor", _wrap_Shape_setSensor },
{ "getFriction", _wrap_Shape_getFriction },
{ "getRestituion", _wrap_Shape_getRestituion },
{ "getDensity", _wrap_Shape_getDensity },
{ "isSensor", _wrap_Shape_isSensor },
{ "testPoint", _wrap_Shape_testPoint },
{ "testSegment", _wrap_Shape_testSegment },
{ "setFilterData", _wrap_Shape_setFilterData },
{ "getFilterData", _wrap_Shape_getFilterData },
{ "setData", _wrap_Shape_setData },
{ "getData", _wrap_Shape_getData },
{ "getBoundingBox", _wrap_Shape_getBoundingBox },
{ 0, 0 }
};
int wrap_CircleShape_open(lua_State * L)
int luaopen_circleshape(lua_State * L)
{
luax_register_type(L, "CircleShape", wrap_CircleShape_functions);
return 0;
static const luaL_Reg functions[] = {
{ "getRadius", w_CircleShape_getRadius },
// From Shape.
{ "getType", w_Shape_getType },
{ "setFriction", w_Shape_setFriction },
{ "setRestitution", w_Shape_setRestitution },
{ "setDensity", w_Shape_setDensity },
{ "setSensor", w_Shape_setSensor },
{ "getFriction", w_Shape_getFriction },
{ "getRestituion", w_Shape_getRestituion },
{ "getDensity", w_Shape_getDensity },
{ "isSensor", w_Shape_isSensor },
{ "testPoint", w_Shape_testPoint },
{ "testSegment", w_Shape_testSegment },
{ "setFilterData", w_Shape_setFilterData },
{ "getFilterData", w_Shape_getFilterData },
{ "setData", w_Shape_setData },
{ "getData", w_Shape_getData },
{ "getBoundingBox", w_Shape_getBoundingBox },
{ 0, 0 }
};
return luax_register_type(L, "CircleShape", functions);
}
} // box2d