From 22e1d69f9f24aca88292e990a91f569bb8f6d47f Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 17 Jun 2014 13:24:08 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../scripting/lua-bindings/auto/api/Mesh.lua | 16 ++- .../lua-bindings/auto/api/Sprite3D.lua | 5 + .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 114 +++++++++++++++--- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 4 files changed, 113 insertions(+), 23 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua index 5d2de87cff..f28783eee3 100644 --- a/cocos/scripting/lua-bindings/auto/api/Mesh.lua +++ b/cocos/scripting/lua-bindings/auto/api/Mesh.lua @@ -55,12 +55,18 @@ -- @return bool#bool ret (return value: bool) -------------------------------- --- @function [parent=#Mesh] create +-- overload function: create(array_table, int, array_table, int, array_table, int) +-- +-- overload function: create(array_table, array_table, array_table, array_table) +-- +-- @function [parent=#Mesh] create -- @param self -- @param #array_table array --- @param #array_table array --- @param #array_table array +-- @param #int int -- @param #array_table vector > --- @return Mesh#Mesh ret (return value: cc.Mesh) - +-- @param #int int +-- @param #array_table array +-- @param #int int +-- @return Mesh#Mesh ret (retunr value: cc.Mesh) + return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index 5031415719..ef8c7c61f1 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -3,6 +3,11 @@ -- @module Sprite3D -- @extend Node,BlendProtocol +-------------------------------- +-- @function [parent=#Sprite3D] getSkin +-- @param self +-- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin) + -------------------------------- -- overload function: setTexture(cc.Texture2D) -- diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 09b4fc384e..708cc163db 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -64940,6 +64940,50 @@ int lua_register_cocos2dx_Component(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Sprite3D_getSkin(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Sprite3D_getSkin'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::MeshSkin* ret = cobj->getSkin(); + object_to_luaval(tolua_S, "cc.MeshSkin",(cocos2d::MeshSkin*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getSkin",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Sprite3D_getSkin'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Sprite3D_setTexture(lua_State* tolua_S) { int argc = 0; @@ -65190,6 +65234,7 @@ int lua_register_cocos2dx_Sprite3D(lua_State* tolua_S) tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); tolua_beginmodule(tolua_S,"Sprite3D"); + tolua_function(tolua_S,"getSkin",lua_cocos2dx_Sprite3D_getSkin); tolua_function(tolua_S,"setTexture",lua_cocos2dx_Sprite3D_setTexture); tolua_function(tolua_S,"getMesh",lua_cocos2dx_Sprite3D_getMesh); tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_Sprite3D_getBlendFunc); @@ -65651,7 +65696,6 @@ int lua_cocos2dx_Mesh_create(lua_State* tolua_S) { int argc = 0; bool ok = true; - #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif @@ -65660,25 +65704,59 @@ int lua_cocos2dx_Mesh_create(lua_State* tolua_S) if (!tolua_isusertable(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S) - 1; + argc = lua_gettop(tolua_S)-1; - if (argc == 4) + do { - std::vector > arg0; - std::vector > arg1; - std::vector > arg2; - std::vector > arg3; - ok &= luaval_to_std_vector_float(tolua_S, 2, &arg0); - ok &= luaval_to_std_vector_float(tolua_S, 3, &arg1); - ok &= luaval_to_std_vector_float(tolua_S, 4, &arg2); - ok &= luaval_to_std_vector_ushort(tolua_S, 5, &arg3); - if(!ok) - return 0; - cocos2d::Mesh* ret = cocos2d::Mesh::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "create",argc, 4); + if (argc == 6) + { + std::vector > arg0; + ok &= luaval_to_std_vector_float(tolua_S, 2, &arg0); + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1); + if (!ok) { break; } + std::vector > arg2; + ok &= luaval_to_std_vector_ushort(tolua_S, 4, &arg2); + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3); + if (!ok) { break; } + std::vector > arg4; + ok &= luaval_to_object >>(tolua_S, 6, "std::vector >",&arg4); + if (!ok) { break; } + int arg5; + ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5); + if (!ok) { break; } + cocos2d::Mesh* ret = cocos2d::Mesh::create(arg0, arg1, arg2, arg3, arg4, arg5); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 4) + { + std::vector > arg0; + ok &= luaval_to_std_vector_float(tolua_S, 2, &arg0); + if (!ok) { break; } + std::vector > arg1; + ok &= luaval_to_std_vector_float(tolua_S, 3, &arg1); + if (!ok) { break; } + std::vector > arg2; + ok &= luaval_to_std_vector_float(tolua_S, 4, &arg2); + if (!ok) { break; } + std::vector > arg3; + ok &= luaval_to_std_vector_ushort(tolua_S, 5, &arg3); + if (!ok) { break; } + cocos2d::Mesh* ret = cocos2d::Mesh::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "create",argc, 4); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index b5e9e6cccd..9c0e2da3c7 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1614,6 +1614,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__