Browse Source

More Quad code cleanup

Alex Szpakowski 12 years ago
parent
commit
94f140454f

+ 3 - 6
src/modules/graphics/opengl/wrap_Graphics.cpp

@@ -309,12 +309,9 @@ int w_newQuad(lua_State *L)
 	float sw = (float) luaL_checknumber(L, 5);
 	float sw = (float) luaL_checknumber(L, 5);
 	float sh = (float) luaL_checknumber(L, 6);
 	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;
 	return 1;
 }
 }
 
 
@@ -1385,7 +1382,7 @@ static const lua_CFunction types[] =
 {
 {
 	luaopen_font,
 	luaopen_font,
 	luaopen_image,
 	luaopen_image,
-	luaopen_frame,
+	luaopen_quad,
 	luaopen_spritebatch,
 	luaopen_spritebatch,
 	luaopen_particlesystem,
 	luaopen_particlesystem,
 	luaopen_canvas,
 	luaopen_canvas,

+ 1 - 1
src/modules/graphics/opengl/wrap_Graphics.h

@@ -58,7 +58,7 @@ int w_defineMask(lua_State *L);
 int w_setMask(lua_State *L);
 int w_setMask(lua_State *L);
 int w_newImage(lua_State *L);
 int w_newImage(lua_State *L);
 int w_newQuad(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_newFont(lua_State *L);
 int w_newImageFont(lua_State *L);
 int w_newImageFont(lua_State *L);
 int w_newSpriteBatch(lua_State *L);
 int w_newSpriteBatch(lua_State *L);

+ 1 - 1
src/modules/graphics/opengl/wrap_Quad.cpp

@@ -71,7 +71,7 @@ static const luaL_Reg w_Quad_functions[] =
 	{ 0, 0 }
 	{ 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);
 	return luax_register_type(L, "Quad", w_Quad_functions);
 }
 }

+ 1 - 1
src/modules/graphics/opengl/wrap_Quad.h

@@ -36,7 +36,7 @@ Quad *luax_checkquad(lua_State *L, int idx);
 int w_Quad_flip(lua_State *L);
 int w_Quad_flip(lua_State *L);
 int w_Quad_setViewport(lua_State *L);
 int w_Quad_setViewport(lua_State *L);
 int w_Quad_getViewport(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
 } // opengl
 } // graphics
 } // graphics