Merge pull request #7966 from CocosRobot/update_lua_bindings_1410231097

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-09-09 14:20:16 +08:00
commit 2ba6e73212
3 changed files with 70 additions and 124 deletions

View File

@ -181,9 +181,9 @@
-------------------------------- --------------------------------
-- --
-- @function [parent=#Node] _setLocalZOrder -- @function [parent=#Node] getOpacity
-- @param self -- @param self
-- @param #int z -- @return unsigned char#unsigned char ret (return value: unsigned char)
-------------------------------- --------------------------------
-- --
@ -275,12 +275,6 @@
-- @param self -- @param self
-- @param #function callback -- @param #function callback
--------------------------------
--
-- @function [parent=#Node] getOpacity
-- @param self
-- @return unsigned char#unsigned char ret (return value: unsigned char)
-------------------------------- --------------------------------
-- Sets the position (x,y) using values between 0 and 1.<br> -- Sets the position (x,y) using values between 0 and 1.<br>
-- The positions in pixels is calculated like the following:<br> -- The positions in pixels is calculated like the following:<br>
@ -486,18 +480,6 @@
-- @function [parent=#Node] updateTransform -- @function [parent=#Node] updateTransform
-- @param self -- @param self
--------------------------------
-- Sets the shader program for this node<br>
-- Since v2.0, each rendering node must set its shader program.<br>
-- It should be set in initialize phase.<br>
-- code<br>
-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));<br>
-- endcode<br>
-- param shaderProgram The shader program
-- @function [parent=#Node] setGLProgram
-- @param self
-- @param #cc.GLProgram glprogram
-------------------------------- --------------------------------
-- Determines if the node is visible<br> -- Determines if the node is visible<br>
-- see `setVisible(bool)`<br> -- see `setVisible(bool)`<br>
@ -977,6 +959,18 @@
-- @param self -- @param self
-- @return mat4_table#mat4_table ret (return value: mat4_table) -- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
-- Sets the shader program for this node<br>
-- Since v2.0, each rendering node must set its shader program.<br>
-- It should be set in initialize phase.<br>
-- code<br>
-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));<br>
-- endcode<br>
-- param shaderProgram The shader program
-- @function [parent=#Node] setGLProgram
-- @param self
-- @param #cc.GLProgram glprogram
-------------------------------- --------------------------------
-- Gets the scale factor of the node, when X and Y have the same scale factor.<br> -- Gets the scale factor of the node, when X and Y have the same scale factor.<br>
-- warning Assert when `_scaleX != _scaleY`<br> -- warning Assert when `_scaleX != _scaleY`<br>

View File

@ -3683,7 +3683,7 @@ int lua_cocos2dx_Node_removeAllComponents(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
cocos2d::Node* cobj = nullptr; cocos2d::Node* cobj = nullptr;
@ -3703,28 +3703,26 @@ int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node__setLocalZOrder'", nullptr); tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr);
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) if (argc == 0)
{ {
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:_setLocalZOrder");
if(!ok) if(!ok)
return 0; return 0;
cobj->_setLocalZOrder(arg0); uint16_t ret = cobj->getOpacity();
return 0; tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
} }
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_lerror: tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err);
#endif #endif
return 0; return 0;
@ -4300,50 +4298,6 @@ int lua_cocos2dx_Node_setOnEnterCallback(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
uint16_t ret = cobj->getOpacity();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S) int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -5542,52 +5496,6 @@ int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::GLProgram* arg0;
ok &= luaval_to_object<cocos2d::GLProgram>(tolua_S, 2, "cc.GLProgram",&arg0);
if(!ok)
return 0;
cobj->setGLProgram(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Node_isVisible(lua_State* tolua_S) int lua_cocos2dx_Node_isVisible(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -8498,6 +8406,52 @@ int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::GLProgram* arg0;
ok &= luaval_to_object<cocos2d::GLProgram>(tolua_S, 2, "cc.GLProgram",&arg0);
if(!ok)
return 0;
cobj->setGLProgram(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Node_getScale(lua_State* tolua_S) int lua_cocos2dx_Node_getScale(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -8922,7 +8876,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX);
tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback);
tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents);
tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity);
tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask);
tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag);
tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram);
@ -8935,7 +8889,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX);
tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState);
tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback);
tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity);
tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition);
tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback);
tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace);
@ -8962,7 +8915,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint);
tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions);
tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform);
tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram);
tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible);
tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount);
tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR);
@ -9026,6 +8978,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); tolua_function(tolua_S,"update",lua_cocos2dx_Node_update);
tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren);
tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform);
tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram);
tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale);
tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition);
tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX);

View File

@ -1560,7 +1560,6 @@ int register_all_cocos2dx(lua_State* tolua_S);
#endif // __cocos2dx_h__ #endif // __cocos2dx_h__