mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
--HG-- branch : minor
This commit is contained in:
@@ -31,7 +31,7 @@ namespace box2d
|
||||
|
||||
ChainShape *luax_checkchainshape(lua_State *L, int idx)
|
||||
{
|
||||
return luax_checktype<ChainShape>(L, idx, "ChainShape", PHYSICS_CHAIN_SHAPE_T);
|
||||
return luax_checktype<ChainShape>(L, idx, PHYSICS_CHAIN_SHAPE_ID);
|
||||
}
|
||||
|
||||
int w_ChainShape_setNextVertex(lua_State *L)
|
||||
@@ -65,7 +65,7 @@ int w_ChainShape_getChildEdge(lua_State *L)
|
||||
int index = luaL_checkint(L, 2) - 1; // Convert from 1-based index
|
||||
EdgeShape *e = 0;
|
||||
luax_catchexcept(L, [&](){ e = c->getChildEdge(index); });
|
||||
luax_pushtype(L, "EdgeShape", PHYSICS_EDGE_SHAPE_T, e);
|
||||
luax_pushtype(L, PHYSICS_EDGE_SHAPE_ID, e);
|
||||
e->release();
|
||||
return 1;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ static const luaL_Reg functions[] =
|
||||
|
||||
extern "C" int luaopen_chainshape(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, "ChainShape", functions);
|
||||
return luax_register_type(L, PHYSICS_CHAIN_SHAPE_ID, functions);
|
||||
}
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user