fix conflicts

This commit is contained in:
muddmaker
2015-03-21 18:15:41 -07:00
481 changed files with 58747 additions and 67796 deletions
+10 -10
View File
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2006-2014 LOVE Development Team
* Copyright (c) 2006-2015 LOVE Development Team
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -30,7 +30,7 @@ namespace math
BezierCurve *luax_checkbeziercurve(lua_State *L, int idx)
{
return luax_checktype<BezierCurve>(L, idx, "BezierCurve", MATH_BEZIER_CURVE_T);
return luax_checktype<BezierCurve>(L, idx, MATH_BEZIER_CURVE_ID);
}
int w_BezierCurve_getDegree(lua_State *L)
@@ -44,7 +44,7 @@ int w_BezierCurve_getDerivative(lua_State *L)
{
BezierCurve *curve = luax_checkbeziercurve(L, 1);
BezierCurve *deriv = new BezierCurve(curve->getDerivative());
luax_pushtype(L, "BezierCurve", MATH_BEZIER_CURVE_T, deriv);
luax_pushtype(L, MATH_BEZIER_CURVE_ID, deriv);
deriv->release();
return 1;
}
@@ -52,7 +52,7 @@ int w_BezierCurve_getDerivative(lua_State *L)
int w_BezierCurve_getControlPoint(lua_State *L)
{
BezierCurve *curve = luax_checkbeziercurve(L, 1);
int idx = luaL_checkinteger(L, 2);
int idx = luaL_checkint(L, 2);
if (idx > 0) // 1-indexing
idx--;
@@ -69,7 +69,7 @@ int w_BezierCurve_getControlPoint(lua_State *L)
int w_BezierCurve_setControlPoint(lua_State *L)
{
BezierCurve *curve = luax_checkbeziercurve(L, 1);
int idx = luaL_checkinteger(L, 2);
int idx = luaL_checkint(L, 2);
float vx = (float) luaL_checknumber(L, 3);
float vy = (float) luaL_checknumber(L, 4);
@@ -85,7 +85,7 @@ int w_BezierCurve_insertControlPoint(lua_State *L)
BezierCurve *curve = luax_checkbeziercurve(L, 1);
float vx = (float) luaL_checknumber(L, 2);
float vy = (float) luaL_checknumber(L, 3);
int idx = luaL_optinteger(L, 4, -1);
int idx = luaL_optint(L, 4, -1);
if (idx > 0) // 1-indexing
idx--;
@@ -160,13 +160,13 @@ int w_BezierCurve_evaluate(lua_State *L)
int w_BezierCurve_render(lua_State *L)
{
BezierCurve *curve = luax_checkbeziercurve(L, 1);
int accuracy = luaL_optinteger(L, 2, 5);
int accuracy = luaL_optint(L, 2, 5);
std::vector<Vector> points;
luax_catchexcept(L, [&](){ points = curve->render(accuracy); });
lua_createtable(L, points.size()*2, 0);
for (size_t i = 0; i < points.size(); ++i)
lua_createtable(L, (int) points.size() * 2, 0);
for (int i = 0; i < (int) points.size(); ++i)
{
lua_pushnumber(L, points[i].x);
lua_rawseti(L, -2, 2*i+1);
@@ -219,7 +219,7 @@ static const luaL_Reg functions[] =
extern "C" int luaopen_beziercurve(lua_State *L)
{
return luax_register_type(L, "BezierCurve", functions);
return luax_register_type(L, MATH_BEZIER_CURVE_ID, functions);
}
} // math