More Quad code cleanup

This commit is contained in:
Alex Szpakowski
2013-03-11 22:46:25 -03:00
parent 17bcab4f32
commit 94f140454f
4 changed files with 6 additions and 9 deletions
@@ -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,
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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