From 6b3454e9c69b512d1a50fd601f837f0484ee7696 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 27 Jul 2016 20:38:57 +0000 Subject: [PATCH] [ci skip][AUTO]: updating luabinding & jsbinding automatically --- .../auto/api/jsb_cocos2dx_auto_api.js | 8 + .../js-bindings/auto/jsb_cocos2dx_auto.cpp | 17 ++ .../js-bindings/auto/jsb_cocos2dx_auto.hpp | 1 + .../scripting/lua-bindings/auto/api/Node.lua | 37 +++-- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 150 ++++++++++++------ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 6 files changed, 150 insertions(+), 64 deletions(-) diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js index d82425bde6..7ea2aae113 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js @@ -2058,6 +2058,14 @@ getScale : function ( return 0; }, +/** + * @method updateOrderOfArrival + */ +updateOrderOfArrival : function ( +) +{ +}, + /** * @method getNormalizedPosition * @return {vec2_object} diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index 265a0200c1..c0554f7f0f 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -5019,6 +5019,22 @@ bool js_cocos2dx_Node_getScale(JSContext *cx, uint32_t argc, jsval *vp) JS_ReportError(cx, "js_cocos2dx_Node_getScale : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_Node_updateOrderOfArrival(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_updateOrderOfArrival : Invalid Native Object"); + if (argc == 0) { + cobj->updateOrderOfArrival(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_Node_updateOrderOfArrival : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_Node_getNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -5394,6 +5410,7 @@ void js_register_cocos2dx_Node(JSContext *cx, JS::HandleObject global) { JS_FN("sortAllChildren", js_cocos2dx_Node_sortAllChildren, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getWorldToNodeTransform", js_cocos2dx_Node_getWorldToNodeAffineTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getScale", js_cocos2dx_Node_getScale, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("updateOrderOfArrival", js_cocos2dx_Node_updateOrderOfArrival, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNormalizedPosition", js_cocos2dx_Node_getNormalizedPosition, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getParentToNodeTransform3D", js_cocos2dx_Node_getParentToNodeTransform, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("convertToNodeSpace", js_cocos2dx_Node_convertToNodeSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp index 5349fbfcb8..6d60348369 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp @@ -253,6 +253,7 @@ bool js_cocos2dx_Node_update(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_sortAllChildren(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getWorldToNodeAffineTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getScale(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_Node_updateOrderOfArrival(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getNormalizedPosition(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_getParentToNodeTransform(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Node_convertToNodeSpace(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 7fbac60eb7..d03c173265 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -559,6 +559,19 @@ -- @param self -- @return Node#Node self (return value: cc.Node) +-------------------------------- +-- Sets the shader program for this node
+-- Since v2.0, each rendering node must set its shader program.
+-- It should be set in initialize phase.
+-- code
+-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
+-- endcode
+-- param glprogram The shader program. +-- @function [parent=#Node] setGLProgram +-- @param self +-- @param #cc.GLProgram glprogram +-- @return Node#Node self (return value: cc.Node) + -------------------------------- -- Determines if the node is visible.
-- see `setVisible(bool)`
@@ -1088,19 +1101,6 @@ -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) --------------------------------- --- Sets the shader program for this node
--- Since v2.0, each rendering node must set its shader program.
--- It should be set in initialize phase.
--- code
--- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
--- endcode
--- param glprogram The shader program. --- @function [parent=#Node] setGLProgram --- @param self --- @param #cc.GLProgram glprogram --- @return Node#Node self (return value: cc.Node) - -------------------------------- -- Gets the scale factor of the node, when X and Y have the same scale factor.
-- warning Assert when `_scaleX != _scaleY`
@@ -1110,6 +1110,17 @@ -- @param self -- @return float#float ret (return value: float) +-------------------------------- +-- !!! ONLY FOR INTERNAL USE
+-- Sets the arrival order when this node has a same ZOrder with other children.
+-- A node which called addChild subsequently will take a larger arrival order,
+-- If two children have the same Z order, the child with larger arrival order will be drawn later.
+-- warning This method is used internally for localZOrder sorting, don't change this manually
+-- param orderOfArrival The arrival order. +-- @function [parent=#Node] updateOrderOfArrival +-- @param self +-- @return Node#Node self (return value: cc.Node) + -------------------------------- -- Returns the normalized position.
-- return The normalized position. diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 734522cdb8..6c0eeeebbc 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -7213,6 +7213,56 @@ int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) 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(tolua_S, 2, "cc.GLProgram",&arg0, "cc.Node:setGLProgram"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); + return 0; + } + cobj->setGLProgram(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%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 argc = 0; @@ -10279,56 +10329,6 @@ int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S) 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(tolua_S, 2, "cc.GLProgram",&arg0, "cc.Node:setGLProgram"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); - return 0; - } - cobj->setGLProgram(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%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 argc = 0; @@ -10376,6 +10376,53 @@ int lua_cocos2dx_Node_getScale(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_updateOrderOfArrival(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_updateOrderOfArrival'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_updateOrderOfArrival'", nullptr); + return 0; + } + cobj->updateOrderOfArrival(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateOrderOfArrival",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateOrderOfArrival'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_getNormalizedPosition(lua_State* tolua_S) { int argc = 0; @@ -10857,6 +10904,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); 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,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); @@ -10919,8 +10967,8 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); 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,"updateOrderOfArrival",lua_cocos2dx_Node_updateOrderOfArrival); tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); tolua_function(tolua_S,"getRotationSkewY",lua_cocos2dx_Node_getRotationSkewY); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 5a73605a94..8190e7645f 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -2211,6 +2211,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__