[AUTO]: updating luabinding automatically

This commit is contained in:
CocosRobot 2014-09-12 08:15:54 +00:00
parent 35a481f36b
commit 29f9cbfd6a
4 changed files with 729 additions and 112 deletions

View File

@ -5,13 +5,59 @@
-- @parent_module cc
--------------------------------
-- draw a quadratic bezier curve with color and number of segments
-- @function [parent=#DrawNode] drawQuadraticBezier
--
-- @function [parent=#DrawNode] drawLine
-- @param self
-- @param #vec2_table origin
-- @param #vec2_table destination
-- @param #color4f_table color
--------------------------------
-- @overload self, vec2_table, vec2_table, vec2_table, vec2_table, color4f_table
-- @overload self, vec2_table, vec2_table, color4f_table
-- @function [parent=#DrawNode] drawRect
-- @param self
-- @param #vec2_table lb
-- @param #vec2_table lt
-- @param #vec2_table rt
-- @param #vec2_table rb
-- @param #color4f_table color
--------------------------------
-- @overload self, vec2_table, float, float, unsigned int, color4f_table
-- @overload self, vec2_table, float, float, unsigned int, float, float, color4f_table
-- @function [parent=#DrawNode] drawSolidCircle
-- @param self
-- @param #vec2_table center
-- @param #float radius
-- @param #float angle
-- @param #unsigned int segments
-- @param #float scaleX
-- @param #float scaleY
-- @param #color4f_table color
--------------------------------
--
-- @function [parent=#DrawNode] onDrawGLPoint
-- @param self
-- @param #mat4_table transform
-- @param #unsigned int flags
--------------------------------
-- draw a dot at a position, with a given radius and color
-- @function [parent=#DrawNode] drawDot
-- @param self
-- @param #vec2_table pos
-- @param #float radius
-- @param #color4f_table color
--------------------------------
-- draw a segment with a radius and color
-- @function [parent=#DrawNode] drawSegment
-- @param self
-- @param #vec2_table from
-- @param #vec2_table control
-- @param #vec2_table to
-- @param #unsigned int segments
-- @param #float radius
-- @param #color4f_table color
--------------------------------
@ -22,9 +68,35 @@
-- @param #unsigned int flags
--------------------------------
-- Clear the geometry in the node's buffer.
-- @function [parent=#DrawNode] clear
-- @overload self, vec2_table, float, float, unsigned int, bool, color4f_table
-- @overload self, vec2_table, float, float, unsigned int, bool, float, float, color4f_table
-- @function [parent=#DrawNode] drawCircle
-- @param self
-- @param #vec2_table center
-- @param #float radius
-- @param #float angle
-- @param #unsigned int segments
-- @param #bool drawLineToCenter
-- @param #float scaleX
-- @param #float scaleY
-- @param #color4f_table color
--------------------------------
--
-- @function [parent=#DrawNode] drawQuadBezier
-- @param self
-- @param #vec2_table origin
-- @param #vec2_table control
-- @param #vec2_table destination
-- @param #unsigned int segments
-- @param #color4f_table color
--------------------------------
--
-- @function [parent=#DrawNode] onDrawGLLine
-- @param self
-- @param #mat4_table transform
-- @param #unsigned int flags
--------------------------------
-- draw a triangle with color
@ -36,33 +108,37 @@
-- @param #color4f_table color
--------------------------------
-- draw a dot at a position, with a given radius and color
-- @function [parent=#DrawNode] drawDot
-- Clear the geometry in the node's buffer.
-- @function [parent=#DrawNode] clear
-- @param self
-- @param #vec2_table pos
-- @param #float radius
--------------------------------
--
-- @function [parent=#DrawNode] drawSolidRect
-- @param self
-- @param #vec2_table origin
-- @param #vec2_table destination
-- @param #color4f_table color
--------------------------------
--
-- @function [parent=#DrawNode] drawPoint
-- @param self
-- @param #vec2_table point
-- @param #float pointSize
-- @param #color4f_table color
--------------------------------
-- draw a cubic bezier curve with color and number of segments
-- @function [parent=#DrawNode] drawCubicBezier
-- @param self
-- @param #vec2_table from
-- @param #vec2_table origin
-- @param #vec2_table control1
-- @param #vec2_table control2
-- @param #vec2_table to
-- @param #vec2_table destination
-- @param #unsigned int segments
-- @param #color4f_table color
--------------------------------
-- draw a segment with a radius and color
-- @function [parent=#DrawNode] drawSegment
-- @param self
-- @param #vec2_table from
-- @param #vec2_table to
-- @param #float radius
-- @param #color4f_table color
--------------------------------
-- creates and initialize a DrawNode node
-- @function [parent=#DrawNode] create

View File

@ -33971,7 +33971,7 @@ int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_DrawNode_drawQuadraticBezier(lua_State* tolua_S)
int lua_cocos2dx_DrawNode_drawLine(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
@ -33991,40 +33991,360 @@ int lua_cocos2dx_DrawNode_drawQuadraticBezier(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawQuadraticBezier'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawLine'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 5)
if (argc == 3)
{
cocos2d::Vec2 arg0;
cocos2d::Vec2 arg1;
cocos2d::Vec2 arg2;
unsigned int arg3;
cocos2d::Color4F arg4;
cocos2d::Color4F arg2;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawQuadraticBezier");
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawLine");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawQuadraticBezier");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawLine");
ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.DrawNode:drawQuadraticBezier");
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawQuadraticBezier");
ok &=luaval_to_color4f(tolua_S, 6, &arg4, "cc.DrawNode:drawQuadraticBezier");
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawLine");
if(!ok)
return 0;
cobj->drawQuadraticBezier(arg0, arg1, arg2, arg3, arg4);
cobj->drawLine(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawQuadraticBezier",argc, 5);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawLine",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawQuadraticBezier'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawLine'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawRect(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawRect'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 5) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Vec2 arg1;
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Vec2 arg2;
ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Vec2 arg3;
ok &= luaval_to_vec2(tolua_S, 5, &arg3, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Color4F arg4;
ok &=luaval_to_color4f(tolua_S, 6, &arg4, "cc.DrawNode:drawRect");
if (!ok) { break; }
cobj->drawRect(arg0, arg1, arg2, arg3, arg4);
return 0;
}
}while(0);
ok = true;
do{
if (argc == 3) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Vec2 arg1;
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawRect");
if (!ok) { break; }
cocos2d::Color4F arg2;
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawRect");
if (!ok) { break; }
cobj->drawRect(arg0, arg1, arg2);
return 0;
}
}while(0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawRect",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawRect'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawSolidCircle(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawSolidCircle'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 5) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg1;
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg2;
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
unsigned int arg3;
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
cocos2d::Color4F arg4;
ok &=luaval_to_color4f(tolua_S, 6, &arg4, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
cobj->drawSolidCircle(arg0, arg1, arg2, arg3, arg4);
return 0;
}
}while(0);
ok = true;
do{
if (argc == 7) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg1;
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg2;
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
unsigned int arg3;
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg4;
ok &= luaval_to_number(tolua_S, 6,&arg4, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
double arg5;
ok &= luaval_to_number(tolua_S, 7,&arg5, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
cocos2d::Color4F arg6;
ok &=luaval_to_color4f(tolua_S, 8, &arg6, "cc.DrawNode:drawSolidCircle");
if (!ok) { break; }
cobj->drawSolidCircle(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
return 0;
}
}while(0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawSolidCircle",argc, 7);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawSolidCircle'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_onDrawGLPoint(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_onDrawGLPoint'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
cocos2d::Mat4 arg0;
unsigned int arg1;
ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.DrawNode:onDrawGLPoint");
ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.DrawNode:onDrawGLPoint");
if(!ok)
return 0;
cobj->onDrawGLPoint(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:onDrawGLPoint",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_onDrawGLPoint'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawDot(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawDot'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 3)
{
cocos2d::Vec2 arg0;
double arg1;
cocos2d::Color4F arg2;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawDot");
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawDot");
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawDot");
if(!ok)
return 0;
cobj->drawDot(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawDot",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawDot'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawSegment(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawSegment'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 4)
{
cocos2d::Vec2 arg0;
cocos2d::Vec2 arg1;
double arg2;
cocos2d::Color4F arg3;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawSegment");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawSegment");
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawSegment");
ok &=luaval_to_color4f(tolua_S, 5, &arg3, "cc.DrawNode:drawSegment");
if(!ok)
return 0;
cobj->drawSegment(arg0, arg1, arg2, arg3);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawSegment",argc, 4);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawSegment'.",&tolua_err);
#endif
return 0;
@ -34078,7 +34398,108 @@ int lua_cocos2dx_DrawNode_onDraw(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_DrawNode_clear(lua_State* tolua_S)
int lua_cocos2dx_DrawNode_drawCircle(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawCircle'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 6) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg1;
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg2;
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawCircle");
if (!ok) { break; }
unsigned int arg3;
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawCircle");
if (!ok) { break; }
bool arg4;
ok &= luaval_to_boolean(tolua_S, 6,&arg4, "cc.DrawNode:drawCircle");
if (!ok) { break; }
cocos2d::Color4F arg5;
ok &=luaval_to_color4f(tolua_S, 7, &arg5, "cc.DrawNode:drawCircle");
if (!ok) { break; }
cobj->drawCircle(arg0, arg1, arg2, arg3, arg4, arg5);
return 0;
}
}while(0);
ok = true;
do{
if (argc == 8) {
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg1;
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg2;
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawCircle");
if (!ok) { break; }
unsigned int arg3;
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawCircle");
if (!ok) { break; }
bool arg4;
ok &= luaval_to_boolean(tolua_S, 6,&arg4, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg5;
ok &= luaval_to_number(tolua_S, 7,&arg5, "cc.DrawNode:drawCircle");
if (!ok) { break; }
double arg6;
ok &= luaval_to_number(tolua_S, 8,&arg6, "cc.DrawNode:drawCircle");
if (!ok) { break; }
cocos2d::Color4F arg7;
ok &=luaval_to_color4f(tolua_S, 9, &arg7, "cc.DrawNode:drawCircle");
if (!ok) { break; }
cobj->drawCircle(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
return 0;
}
}while(0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawCircle",argc, 8);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawCircle'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawQuadBezier(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
@ -34098,25 +34519,89 @@ int lua_cocos2dx_DrawNode_clear(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_clear'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawQuadBezier'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
if (argc == 5)
{
cocos2d::Vec2 arg0;
cocos2d::Vec2 arg1;
cocos2d::Vec2 arg2;
unsigned int arg3;
cocos2d::Color4F arg4;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawQuadBezier");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawQuadBezier");
ok &= luaval_to_vec2(tolua_S, 4, &arg2, "cc.DrawNode:drawQuadBezier");
ok &= luaval_to_uint32(tolua_S, 5,&arg3, "cc.DrawNode:drawQuadBezier");
ok &=luaval_to_color4f(tolua_S, 6, &arg4, "cc.DrawNode:drawQuadBezier");
if(!ok)
return 0;
cobj->clear();
cobj->drawQuadBezier(arg0, arg1, arg2, arg3, arg4);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:clear",argc, 0);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawQuadBezier",argc, 5);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_clear'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawQuadBezier'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_onDrawGLLine(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_onDrawGLLine'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
cocos2d::Mat4 arg0;
unsigned int arg1;
ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.DrawNode:onDrawGLLine");
ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.DrawNode:onDrawGLLine");
if(!ok)
return 0;
cobj->onDrawGLLine(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:onDrawGLLine",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_onDrawGLLine'.",&tolua_err);
#endif
return 0;
@ -34176,7 +34661,7 @@ int lua_cocos2dx_DrawNode_drawTriangle(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_DrawNode_drawDot(lua_State* tolua_S)
int lua_cocos2dx_DrawNode_clear(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
@ -34196,7 +34681,102 @@ int lua_cocos2dx_DrawNode_drawDot(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawDot'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_clear'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cobj->clear();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:clear",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_clear'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawSolidRect(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawSolidRect'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 3)
{
cocos2d::Vec2 arg0;
cocos2d::Vec2 arg1;
cocos2d::Color4F arg2;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawSolidRect");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawSolidRect");
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawSolidRect");
if(!ok)
return 0;
cobj->drawSolidRect(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawSolidRect",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawSolidRect'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_drawPoint(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawPoint'", nullptr);
return 0;
}
#endif
@ -34208,22 +34788,22 @@ int lua_cocos2dx_DrawNode_drawDot(lua_State* tolua_S)
double arg1;
cocos2d::Color4F arg2;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawDot");
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawPoint");
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawDot");
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.DrawNode:drawPoint");
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawDot");
ok &=luaval_to_color4f(tolua_S, 4, &arg2, "cc.DrawNode:drawPoint");
if(!ok)
return 0;
cobj->drawDot(arg0, arg1, arg2);
cobj->drawPoint(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawDot",argc, 3);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawPoint",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawDot'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawPoint'.",&tolua_err);
#endif
return 0;
@ -34289,61 +34869,6 @@ int lua_cocos2dx_DrawNode_drawCubicBezier(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_DrawNode_drawSegment(lua_State* tolua_S)
{
int argc = 0;
cocos2d::DrawNode* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.DrawNode",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::DrawNode*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_DrawNode_drawSegment'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 4)
{
cocos2d::Vec2 arg0;
cocos2d::Vec2 arg1;
double arg2;
cocos2d::Color4F arg3;
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.DrawNode:drawSegment");
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.DrawNode:drawSegment");
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.DrawNode:drawSegment");
ok &=luaval_to_color4f(tolua_S, 5, &arg3, "cc.DrawNode:drawSegment");
if(!ok)
return 0;
cobj->drawSegment(arg0, arg1, arg2, arg3);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.DrawNode:drawSegment",argc, 4);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_DrawNode_drawSegment'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_DrawNode_create(lua_State* tolua_S)
{
int argc = 0;
@ -34387,13 +34912,21 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S)
tolua_cclass(tolua_S,"DrawNode","cc.DrawNode","cc.Node",nullptr);
tolua_beginmodule(tolua_S,"DrawNode");
tolua_function(tolua_S,"drawQuadraticBezier",lua_cocos2dx_DrawNode_drawQuadraticBezier);
tolua_function(tolua_S,"onDraw",lua_cocos2dx_DrawNode_onDraw);
tolua_function(tolua_S,"clear",lua_cocos2dx_DrawNode_clear);
tolua_function(tolua_S,"drawTriangle",lua_cocos2dx_DrawNode_drawTriangle);
tolua_function(tolua_S,"drawLine",lua_cocos2dx_DrawNode_drawLine);
tolua_function(tolua_S,"drawRect",lua_cocos2dx_DrawNode_drawRect);
tolua_function(tolua_S,"drawSolidCircle",lua_cocos2dx_DrawNode_drawSolidCircle);
tolua_function(tolua_S,"onDrawGLPoint",lua_cocos2dx_DrawNode_onDrawGLPoint);
tolua_function(tolua_S,"drawDot",lua_cocos2dx_DrawNode_drawDot);
tolua_function(tolua_S,"drawCubicBezier",lua_cocos2dx_DrawNode_drawCubicBezier);
tolua_function(tolua_S,"drawSegment",lua_cocos2dx_DrawNode_drawSegment);
tolua_function(tolua_S,"onDraw",lua_cocos2dx_DrawNode_onDraw);
tolua_function(tolua_S,"drawCircle",lua_cocos2dx_DrawNode_drawCircle);
tolua_function(tolua_S,"drawQuadBezier",lua_cocos2dx_DrawNode_drawQuadBezier);
tolua_function(tolua_S,"onDrawGLLine",lua_cocos2dx_DrawNode_onDrawGLLine);
tolua_function(tolua_S,"drawTriangle",lua_cocos2dx_DrawNode_drawTriangle);
tolua_function(tolua_S,"clear",lua_cocos2dx_DrawNode_clear);
tolua_function(tolua_S,"drawSolidRect",lua_cocos2dx_DrawNode_drawSolidRect);
tolua_function(tolua_S,"drawPoint",lua_cocos2dx_DrawNode_drawPoint);
tolua_function(tolua_S,"drawCubicBezier",lua_cocos2dx_DrawNode_drawCubicBezier);
tolua_function(tolua_S,"create", lua_cocos2dx_DrawNode_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::DrawNode).name();

View File

@ -1553,6 +1553,14 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -1429,7 +1429,7 @@ int lua_cocos2dx_ui_Widget_getVirtualRendererSize(lua_State* tolua_S)
{
if(!ok)
return 0;
const cocos2d::Size& ret = cobj->getVirtualRendererSize();
cocos2d::Size ret = cobj->getVirtualRendererSize();
size_to_luaval(tolua_S, ret);
return 1;
}