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
+3 -3
View File
@@ -29,7 +29,7 @@ namespace box2d
World *luax_checkworld(lua_State *L, int idx)
{
World *w = luax_checktype<World>(L, idx, "World", PHYSICS_WORLD_T);
World *w = luax_checktype<World>(L, idx, PHYSICS_WORLD_ID);
if (!w->isValid())
luaL_error(L, "Attempt to use destroyed world.");
return w;
@@ -191,7 +191,7 @@ int w_World_destroy(lua_State *L)
int w_World_isDestroyed(lua_State *L)
{
World *w = luax_checktype<World>(L, 1, "World", PHYSICS_WORLD_T);
World *w = luax_checktype<World>(L, 1, PHYSICS_WORLD_ID);
luax_pushboolean(L, !w->isValid());
return 1;
}
@@ -225,7 +225,7 @@ static const luaL_Reg functions[] =
extern "C" int luaopen_world(lua_State *L)
{
return luax_register_type(L, "World", functions);
return luax_register_type(L, PHYSICS_WORLD_ID, functions);
}
} // box2d