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:
Alex Szpakowski
2015-03-01 18:32:41 -04:00
parent 3830a0969c
commit 2f419c1c83
79 changed files with 601 additions and 566 deletions
@@ -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