Merge pull request #9698 from CocosRobot/update_lua_bindings_1419911433

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-12-30 13:51:43 +08:00
commit 69636dc8f5
7 changed files with 192 additions and 84 deletions

View File

@ -172,6 +172,13 @@
-- @param self
-- @param #cc.Scheduler scheduler
--------------------------------
--
-- @function [parent=#Director] getMatrix
-- @param self
-- @param #int type
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
-- The main loop is triggered again.<br>
-- Call this function only if [stopAnimation] was called earlier<br>
@ -288,11 +295,9 @@
-- @param self
--------------------------------
--
-- @function [parent=#Director] getMatrix
-- Restart the director
-- @function [parent=#Director] restart
-- @param self
-- @param #int type
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
-- Pops out a scene from the stack.<br>

View File

@ -40,4 +40,10 @@
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @brief Get the search paths list related to the Manifest.
-- @function [parent=#Manifest] getSearchPaths
-- @param self
-- @return array_table#array_table ret (return value: array_table)
return nil

View File

@ -525,6 +525,15 @@
-- @param #cc.Action action
-- @return Action#Action ret (return value: cc.Action)
--------------------------------
-- @overload self
-- @overload self, cc.Renderer, mat4_table, unsigned int
-- @function [parent=#Node] visit
-- @param self
-- @param #cc.Renderer renderer
-- @param #mat4_table parentTransform
-- @param #unsigned int parentFlags
--------------------------------
--
-- @function [parent=#Node] isOpacityModifyRGB
@ -548,15 +557,6 @@
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @overload self
-- @overload self, cc.Renderer, mat4_table, unsigned int
-- @function [parent=#Node] visit
-- @param self
-- @param #cc.Renderer renderer
-- @param #mat4_table parentTransform
-- @param #unsigned int parentFlags
--------------------------------
-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter<br>
-- param name A string that identifies a child node<br>

View File

@ -6160,6 +6160,63 @@ int lua_cocos2dx_Node_runAction(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Node_visit(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_visit'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 0) {
cobj->visit();
return 0;
}
}while(0);
ok = true;
do{
if (argc == 3) {
cocos2d::Renderer* arg0;
ok &= luaval_to_object<cocos2d::Renderer>(tolua_S, 2, "cc.Renderer",&arg0);
if (!ok) { break; }
cocos2d::Mat4 arg1;
ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit");
if (!ok) { break; }
unsigned int arg2;
ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit");
if (!ok) { break; }
cobj->visit(arg0, arg1, arg2);
return 0;
}
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Node_isOpacityModifyRGB(lua_State* tolua_S)
{
int argc = 0;
@ -6301,63 +6358,6 @@ int lua_cocos2dx_Node_getAnchorPointInPoints(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Node_visit(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_visit'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 0) {
cobj->visit();
return 0;
}
}while(0);
ok = true;
do{
if (argc == 3) {
cocos2d::Renderer* arg0;
ok &= luaval_to_object<cocos2d::Renderer>(tolua_S, 2, "cc.Renderer",&arg0);
if (!ok) { break; }
cocos2d::Mat4 arg1;
ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit");
if (!ok) { break; }
unsigned int arg2;
ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit");
if (!ok) { break; }
cobj->visit(arg0, arg1, arg2);
return 0;
}
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Node_removeChildByName(lua_State* tolua_S)
{
int argc = 0;
@ -9539,10 +9539,10 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR);
tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent);
tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction);
tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit);
tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB);
tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation);
tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints);
tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit);
tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName);
tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState);
tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Node_setScheduler);
@ -12600,6 +12600,56 @@ int lua_cocos2dx_Director_setScheduler(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Director* 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.Director",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getMatrix'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::MATRIX_STACK_TYPE arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:getMatrix");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_getMatrix'", nullptr);
return 0;
}
const cocos2d::Mat4& ret = cobj->getMatrix(arg0);
mat4_to_luaval(tolua_S, ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getMatrix",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getMatrix'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Director_startAnimation(lua_State* tolua_S)
{
int argc = 0;
@ -13405,7 +13455,7 @@ int lua_cocos2dx_Director_drawScene(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S)
int lua_cocos2dx_Director_restart(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Director* cobj = nullptr;
@ -13425,32 +13475,28 @@ int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_getMatrix'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_restart'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
if (argc == 0)
{
cocos2d::MATRIX_STACK_TYPE arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Director:getMatrix");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_getMatrix'", nullptr);
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Director_restart'", nullptr);
return 0;
}
const cocos2d::Mat4& ret = cobj->getMatrix(arg0);
mat4_to_luaval(tolua_S, ret);
return 1;
cobj->restart();
return 0;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:getMatrix",argc, 1);
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:restart",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_getMatrix'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_restart'.",&tolua_err);
#endif
return 0;
@ -14440,6 +14486,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S)
tolua_function(tolua_S,"setDefaultValues",lua_cocos2dx_Director_setDefaultValues);
tolua_function(tolua_S,"init",lua_cocos2dx_Director_init);
tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Director_setScheduler);
tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix);
tolua_function(tolua_S,"startAnimation",lua_cocos2dx_Director_startAnimation);
tolua_function(tolua_S,"getOpenGLView",lua_cocos2dx_Director_getOpenGLView);
tolua_function(tolua_S,"getRunningScene",lua_cocos2dx_Director_getRunningScene);
@ -14457,7 +14504,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S)
tolua_function(tolua_S,"runWithScene",lua_cocos2dx_Director_runWithScene);
tolua_function(tolua_S,"setNotificationNode",lua_cocos2dx_Director_setNotificationNode);
tolua_function(tolua_S,"drawScene",lua_cocos2dx_Director_drawScene);
tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix);
tolua_function(tolua_S,"restart",lua_cocos2dx_Director_restart);
tolua_function(tolua_S,"popScene",lua_cocos2dx_Director_popScene);
tolua_function(tolua_S,"loadIdentityMatrix",lua_cocos2dx_Director_loadIdentityMatrix);
tolua_function(tolua_S,"isDisplayStats",lua_cocos2dx_Director_isDisplayStats);

View File

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

View File

@ -12967,6 +12967,53 @@ int lua_cocos2dx_extension_Manifest_getVersionFileUrl(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_extension_Manifest_getSearchPaths(lua_State* tolua_S)
{
int argc = 0;
cocos2d::extension::Manifest* 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.Manifest",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::extension::Manifest*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Manifest_getSearchPaths'", 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_extension_Manifest_getSearchPaths'", nullptr);
return 0;
}
std::vector<std::string> ret = cobj->getSearchPaths();
ccvector_std_string_to_luaval(tolua_S, ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Manifest:getSearchPaths",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Manifest_getSearchPaths'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_extension_Manifest_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Manifest)");
@ -12985,6 +13032,7 @@ int lua_register_cocos2dx_extension_Manifest(lua_State* tolua_S)
tolua_function(tolua_S,"getPackageUrl",lua_cocos2dx_extension_Manifest_getPackageUrl);
tolua_function(tolua_S,"getVersion",lua_cocos2dx_extension_Manifest_getVersion);
tolua_function(tolua_S,"getVersionFileUrl",lua_cocos2dx_extension_Manifest_getVersionFileUrl);
tolua_function(tolua_S,"getSearchPaths",lua_cocos2dx_extension_Manifest_getSearchPaths);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::extension::Manifest).name();
g_luaType[typeName] = "cc.Manifest";

View File

@ -289,6 +289,7 @@ int register_all_cocos2dx_extension(lua_State* tolua_S);
#endif // __cocos2dx_extension_h__