Switch quads over to floats instead of ints (issue #285)

This commit is contained in:
Bart van Strien
2011-08-24 09:58:16 +02:00
parent ceab3f7a44
commit f0dad41f39
4 changed files with 32 additions and 32 deletions
+8 -8
View File
@@ -43,10 +43,10 @@ namespace opengl
{
Quad * quad = luax_checktype<Quad>(L, 1, "Quad", GRAPHICS_QUAD_T);
Quad::Viewport v;
v.x = luaL_checkint(L, 2);
v.y = luaL_checkint(L, 3);
v.w = luaL_checkint(L, 4);
v.h = luaL_checkint(L, 5);
v.x = luaL_checknumber(L, 2);
v.y = luaL_checknumber(L, 3);
v.w = luaL_checknumber(L, 4);
v.h = luaL_checknumber(L, 5);
quad->setViewport(v);
return 0;
}
@@ -55,10 +55,10 @@ namespace opengl
{
Quad * quad = luax_checktype<Quad>(L, 1, "Quad", GRAPHICS_QUAD_T);
Quad::Viewport v = quad->getViewport();
lua_pushinteger(L, v.x);
lua_pushinteger(L, v.y);
lua_pushinteger(L, v.w);
lua_pushinteger(L, v.h);
lua_pushnumber(L, v.x);
lua_pushnumber(L, v.y);
lua_pushnumber(L, v.w);
lua_pushnumber(L, v.h);
return 4;
}