mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations)
This commit is contained in:
@@ -573,7 +573,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_body(lua_State * L)
|
||||
extern "C" int luaopen_body(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "Body", functions);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace box2d
|
||||
int w_Body_isFixedRotation(lua_State * L);
|
||||
int w_Body_getFixtureList(lua_State * L);
|
||||
int w_Body_destroy(lua_State * L);
|
||||
int luaopen_body(lua_State * L);
|
||||
extern "C" int luaopen_body(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_chainshape(lua_State * L)
|
||||
extern "C" int luaopen_chainshape(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "ChainShape", functions);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace box2d
|
||||
int w_ChainShape_getPoint(lua_State * L);
|
||||
int w_ChainShape_getPoints(lua_State * L);
|
||||
|
||||
int luaopen_chainshape(lua_State * L);
|
||||
extern "C" int luaopen_chainshape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace box2d
|
||||
}
|
||||
|
||||
int w_CircleShape_setRadius(lua_State * L)
|
||||
{
|
||||
{
|
||||
CircleShape * c = luax_checkcircleshape(L, 1);
|
||||
float r = (float)luaL_checknumber(L, 2);
|
||||
c->setRadius(r);
|
||||
@@ -61,7 +61,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_circleshape(lua_State * L)
|
||||
extern "C" int luaopen_circleshape(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "CircleShape", functions);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace box2d
|
||||
CircleShape * luax_checkcircleshape(lua_State * L, int idx);
|
||||
int w_CircleShape_getRadius(lua_State * L);
|
||||
int w_CircleShape_setRadius(lua_State * L);
|
||||
int luaopen_circleshape(lua_State * L);
|
||||
extern "C" int luaopen_circleshape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace box2d
|
||||
return 0;
|
||||
}
|
||||
|
||||
int luaopen_contact(lua_State * L)
|
||||
extern "C" int luaopen_contact(lua_State * L)
|
||||
{
|
||||
static const luaL_Reg functions[] = {
|
||||
{ "getPositions", w_Contact_getPositions },
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace box2d
|
||||
int w_Contact_setEnabled(lua_State * L);
|
||||
int w_Contact_resetFriction(lua_State * L);
|
||||
int w_Contact_resetRestitution(lua_State * L);
|
||||
int luaopen_contact(lua_State * L);
|
||||
extern "C" int luaopen_contact(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_distancejoint(lua_State * L)
|
||||
extern "C" int luaopen_distancejoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "DistanceJoint", functions);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace box2d
|
||||
int w_DistanceJoint_getFrequency(lua_State * L);
|
||||
int w_DistanceJoint_setDampingRatio(lua_State * L);
|
||||
int w_DistanceJoint_getDampingRatio(lua_State * L);
|
||||
int luaopen_distancejoint(lua_State * L);
|
||||
extern "C" int luaopen_distancejoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_edgeshape(lua_State * L)
|
||||
extern "C" int luaopen_edgeshape(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "EdgeShape", functions);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace box2d
|
||||
{
|
||||
EdgeShape * luax_checkedgeshape(lua_State * L, int idx);
|
||||
int w_EdgeShape_getPoints(lua_State * L);
|
||||
int luaopen_edgeshape(lua_State * L);
|
||||
extern "C" int luaopen_edgeshape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_fixture(lua_State * L)
|
||||
extern "C" int luaopen_fixture(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "Fixture", functions);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace box2d
|
||||
int w_Fixture_getGroupIndex(lua_State * L);
|
||||
int w_Fixture_setGroupIndex(lua_State * L);
|
||||
int w_Fixture_destroy(lua_State * L);
|
||||
int luaopen_fixture(lua_State * L);
|
||||
extern "C" int luaopen_fixture(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_frictionjoint(lua_State * L)
|
||||
extern "C" int luaopen_frictionjoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "FrictionJoint", functions);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace box2d
|
||||
int w_FrictionJoint_getMaxForce(lua_State * L);
|
||||
int w_FrictionJoint_setMaxTorque(lua_State * L);
|
||||
int w_FrictionJoint_getMaxTorque(lua_State * L);
|
||||
int luaopen_frictionjoint(lua_State * L);
|
||||
extern "C" int luaopen_frictionjoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_gearjoint(lua_State * L)
|
||||
extern "C" int luaopen_gearjoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "GearJoint", functions);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace box2d
|
||||
GearJoint * luax_checkgearjoint(lua_State * L, int idx);
|
||||
int w_GearJoint_setRatio(lua_State * L);
|
||||
int w_GearJoint_getRatio(lua_State * L);
|
||||
int luaopen_gearjoint(lua_State * L);
|
||||
extern "C" int luaopen_gearjoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_joint(lua_State * L)
|
||||
extern "C" int luaopen_joint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "Joint", functions);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace box2d
|
||||
int w_Joint_getReactionTorque(lua_State * L);
|
||||
int w_Joint_getCollideConnected(lua_State * L);
|
||||
int w_Joint_destroy(lua_State * L);
|
||||
int luaopen_joint(lua_State * L);
|
||||
extern "C" int luaopen_joint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_mousejoint(lua_State * L)
|
||||
extern "C" int luaopen_mousejoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "MouseJoint", functions);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace box2d
|
||||
int w_MouseJoint_getFrequency(lua_State * L);
|
||||
int w_MouseJoint_setDampingRatio(lua_State * L);
|
||||
int w_MouseJoint_getDampingRatio(lua_State * L);
|
||||
int luaopen_mousejoint(lua_State * L);
|
||||
extern "C" int luaopen_mousejoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace box2d
|
||||
0
|
||||
};
|
||||
|
||||
int luaopen_love_physics(lua_State * L)
|
||||
extern "C" int luaopen_love_physics(lua_State * L)
|
||||
{
|
||||
if (instance == 0)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_polygonshape(lua_State * L)
|
||||
extern "C" int luaopen_polygonshape(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "PolygonShape", functions);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace box2d
|
||||
{
|
||||
PolygonShape * luax_checkpolygonshape(lua_State * L, int idx);
|
||||
int w_PolygonShape_getPoints(lua_State * L);
|
||||
int luaopen_polygonshape(lua_State * L);
|
||||
extern "C" int luaopen_polygonshape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_prismaticjoint(lua_State * L)
|
||||
extern "C" int luaopen_prismaticjoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "PrismaticJoint", functions);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace box2d
|
||||
int w_PrismaticJoint_getLowerLimit(lua_State * L);
|
||||
int w_PrismaticJoint_getUpperLimit(lua_State * L);
|
||||
int w_PrismaticJoint_getLimits(lua_State * L);
|
||||
int luaopen_prismaticjoint(lua_State * L);
|
||||
extern "C" int luaopen_prismaticjoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_pulleyjoint(lua_State * L)
|
||||
extern "C" int luaopen_pulleyjoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "PulleyJoint", functions);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace box2d
|
||||
int w_PulleyJoint_getLengthA(lua_State * L);
|
||||
int w_PulleyJoint_getLengthB(lua_State * L);
|
||||
int w_PulleyJoint_getRatio(lua_State * L);
|
||||
int luaopen_pulleyjoint(lua_State * L);
|
||||
extern "C" int luaopen_pulleyjoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_revolutejoint(lua_State * L)
|
||||
extern "C" int luaopen_revolutejoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "RevoluteJoint", functions);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace box2d
|
||||
int w_RevoluteJoint_getLowerLimit(lua_State * L);
|
||||
int w_RevoluteJoint_getUpperLimit(lua_State * L);
|
||||
int w_RevoluteJoint_getLimits(lua_State * L);
|
||||
int luaopen_revolutejoint(lua_State * L);
|
||||
extern "C" int luaopen_revolutejoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_ropejoint(lua_State * L)
|
||||
extern "C" int luaopen_ropejoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "RopeJoint", functions);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace box2d
|
||||
{
|
||||
RopeJoint * luax_checkropejoint(lua_State * L, int idx);
|
||||
int w_RopeJoint_getMaxLength(lua_State * L);
|
||||
int luaopen_ropejoint(lua_State * L);
|
||||
extern "C" int luaopen_ropejoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_shape(lua_State * L)
|
||||
extern "C" int luaopen_shape(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "Shape", functions);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace box2d
|
||||
int w_Shape_computeMass(lua_State * L);
|
||||
|
||||
int w_Shape_destroy(lua_State * L);
|
||||
int luaopen_shape(lua_State * L);
|
||||
extern "C" int luaopen_shape(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_weldjoint(lua_State * L)
|
||||
extern "C" int luaopen_weldjoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "WeldJoint", functions);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace box2d
|
||||
int w_WeldJoint_setDampingRatio(lua_State * L);
|
||||
int w_WeldJoint_getDampingRatio(lua_State * L);
|
||||
|
||||
int luaopen_weldjoint(lua_State * L);
|
||||
extern "C" int luaopen_weldjoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_wheeljoint(lua_State * L)
|
||||
extern "C" int luaopen_wheeljoint(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "WheelJoint", functions);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace box2d
|
||||
int w_WheelJoint_getSpringFrequencyHz(lua_State * L);
|
||||
int w_WheelJoint_setSpringDampingRatio(lua_State * L);
|
||||
int w_WheelJoint_getSpringDampingRatio(lua_State * L);
|
||||
int luaopen_wheeljoint(lua_State * L);
|
||||
extern "C" int luaopen_wheeljoint(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace box2d
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int luaopen_world(lua_State * L)
|
||||
extern "C" int luaopen_world(lua_State * L)
|
||||
{
|
||||
return luax_register_type(L, "World", functions);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace box2d
|
||||
int w_World_getContactList(lua_State * L);
|
||||
int w_World_queryBoundingBox(lua_State * L);
|
||||
int w_World_rayCast(lua_State * L);
|
||||
int luaopen_world(lua_State * L);
|
||||
extern "C" int luaopen_world(lua_State * L);
|
||||
|
||||
} // box2d
|
||||
} // physics
|
||||
|
||||
Reference in New Issue
Block a user