Merge dynamiccore2 into minor

Instead of a global type enum and bitfield, all types now have their own
love::Type static member. This means they automatically assign their ids, build
their bitsets, etc. As a bonus, it simplifies wrapper code since most functions
already know which type they're pushing to or getting from lua, so they can
directly get the static member (if it's called 'type').

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2016-11-30 22:38:30 +01:00
204 changed files with 944 additions and 669 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ namespace opengl
Canvas *luax_checkcanvas(lua_State *L, int idx)
{
return luax_checktype<Canvas>(L, idx, GRAPHICS_CANVAS_ID);
return luax_checktype<Canvas>(L, idx);
}
int w_Canvas_getFormat(lua_State *L)
@@ -61,7 +61,7 @@ static const luaL_Reg w_Canvas_functions[] =
extern "C" int luaopen_canvas(lua_State *L)
{
return luax_register_type(L, GRAPHICS_CANVAS_ID, "Canvas", w_Texture_functions, w_Canvas_functions, nullptr);
return luax_register_type(L, &Canvas::type, w_Texture_functions, w_Canvas_functions, nullptr);
}
} // opengl