mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
More Quad code cleanup
This commit is contained in:
@@ -309,12 +309,9 @@ int w_newQuad(lua_State *L)
|
||||
float sw = (float) luaL_checknumber(L, 5);
|
||||
float sh = (float) luaL_checknumber(L, 6);
|
||||
|
||||
Quad *frame = instance->newQuad(x, y, w, h, sw, sh);
|
||||
Quad *quad = instance->newQuad(x, y, w, h, sw, sh);
|
||||
|
||||
if (frame == 0)
|
||||
return luaL_error(L, "Could not create frame.");
|
||||
|
||||
luax_newtype(L, "Quad", GRAPHICS_QUAD_T, (void *)frame);
|
||||
luax_newtype(L, "Quad", GRAPHICS_QUAD_T, (void *)quad);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1385,7 +1382,7 @@ static const lua_CFunction types[] =
|
||||
{
|
||||
luaopen_font,
|
||||
luaopen_image,
|
||||
luaopen_frame,
|
||||
luaopen_quad,
|
||||
luaopen_spritebatch,
|
||||
luaopen_particlesystem,
|
||||
luaopen_canvas,
|
||||
|
||||
@@ -58,7 +58,7 @@ int w_defineMask(lua_State *L);
|
||||
int w_setMask(lua_State *L);
|
||||
int w_newImage(lua_State *L);
|
||||
int w_newQuad(lua_State *L);
|
||||
int w_newFrame(lua_State *L);
|
||||
int w_newQuad(lua_State *L);
|
||||
int w_newFont(lua_State *L);
|
||||
int w_newImageFont(lua_State *L);
|
||||
int w_newSpriteBatch(lua_State *L);
|
||||
|
||||
@@ -71,7 +71,7 @@ static const luaL_Reg w_Quad_functions[] =
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
extern "C" int luaopen_frame(lua_State *L)
|
||||
extern "C" int luaopen_quad(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, "Quad", w_Quad_functions);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ Quad *luax_checkquad(lua_State *L, int idx);
|
||||
int w_Quad_flip(lua_State *L);
|
||||
int w_Quad_setViewport(lua_State *L);
|
||||
int w_Quad_getViewport(lua_State *L);
|
||||
extern "C" int luaopen_frame(lua_State *L);
|
||||
extern "C" int luaopen_quad(lua_State *L);
|
||||
|
||||
} // opengl
|
||||
} // graphics
|
||||
|
||||
Reference in New Issue
Block a user