Skip to content

Commit

Permalink
Merge pull request cocos2d#10269 from CocosRobot/update_lua_bindings_…
Browse files Browse the repository at this point in the history
…1422498336

[AUTO]: updating luabinding automatically
  • Loading branch information
minggo committed Jan 29, 2015
2 parents de3e9be + fcf0a22 commit cb72f35
Show file tree
Hide file tree
Showing 9 changed files with 406 additions and 85 deletions.
26 changes: 26 additions & 0 deletions cocos/scripting/lua-bindings/auto/api/AsyncTaskPool.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

--------------------------------
-- @module AsyncTaskPool
-- @parent_module cc

--------------------------------
-- stop tasks<br>
-- param type task type you want to stop
-- @function [parent=#AsyncTaskPool] stopTasks
-- @param self
-- @param #int type
-- @return AsyncTaskPool#AsyncTaskPool self (return value: cc.AsyncTaskPool)

--------------------------------
-- destroy instance
-- @function [parent=#AsyncTaskPool] destoryInstance
-- @param self
-- @return AsyncTaskPool#AsyncTaskPool self (return value: cc.AsyncTaskPool)

--------------------------------
-- get instance
-- @function [parent=#AsyncTaskPool] getInstance
-- @param self
-- @return AsyncTaskPool#AsyncTaskPool ret (return value: cc.AsyncTaskPool)

return nil
11 changes: 0 additions & 11 deletions cocos/scripting/lua-bindings/auto/api/Sprite3D.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@
-- @param #string texturePath
-- @return Sprite3D#Sprite3D ret (return value: cc.Sprite3D)

--------------------------------
-- @overload self, string, string, function, void
-- @overload self, string, function, void
-- @function [parent=#Sprite3D] createAsync
-- @param self
-- @param #string modelPath
-- @param #string texturePath
-- @param #function callback
-- @param #void callbackparam
-- @return Sprite3D#Sprite3D self (return value: cc.Sprite3D)

--------------------------------
-- Returns 2d bounding-box<br>
-- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate.
Expand Down
31 changes: 31 additions & 0 deletions cocos/scripting/lua-bindings/auto/api/Sprite3DCache.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

--------------------------------
-- @module Sprite3DCache
-- @parent_module cc

--------------------------------
--
-- @function [parent=#Sprite3DCache] removeSprite3DData
-- @param self
-- @param #string key
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)

--------------------------------
--
-- @function [parent=#Sprite3DCache] removeAllSprite3DData
-- @param self
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)

--------------------------------
--
-- @function [parent=#Sprite3DCache] destroyInstance
-- @param self
-- @return Sprite3DCache#Sprite3DCache self (return value: cc.Sprite3DCache)

--------------------------------
-- get & destroy
-- @function [parent=#Sprite3DCache] getInstance
-- @param self
-- @return Sprite3DCache#Sprite3DCache ret (return value: cc.Sprite3DCache)

return nil
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
-- @field [parent=#cc] Sprite3D#Sprite3D Sprite3D preloaded module


--------------------------------------------------------
-- the cc Sprite3DCache
-- @field [parent=#cc] Sprite3DCache#Sprite3DCache Sprite3DCache preloaded module


--------------------------------------------------------
-- the cc Mesh
-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1246,4 +1246,9 @@
-- @field [parent=#cc] Component#Component Component preloaded module


--------------------------------------------------------
-- the cc AsyncTaskPool
-- @field [parent=#cc] AsyncTaskPool#AsyncTaskPool AsyncTaskPool preloaded module


return nil
263 changes: 189 additions & 74 deletions cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1267,79 +1267,6 @@ int lua_cocos2dx_3d_Sprite3D_create(lua_State* tolua_S)
#endif
return 0;
}
int lua_cocos2dx_3d_Sprite3D_createAsync(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S)-1;

do
{
if (argc == 4)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:createAsync");
if (!ok) { break; }
std::string arg1;
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:createAsync");
if (!ok) { break; }
std::function<void (cocos2d::Sprite3D *, void *)> arg2;
do {
// Lambda binding for lua is not supported.
assert(false);
} while(0)
;
if (!ok) { break; }
void* arg3;
#pragma warning NO CONVERSION TO NATIVE FOR void*
ok = false;
if (!ok) { break; }
cocos2d::Sprite3D::createAsync(arg0, arg1, arg2, arg3);
lua_settop(tolua_S, 1);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 3)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:createAsync");
if (!ok) { break; }
std::function<void (cocos2d::Sprite3D *, void *)> arg1;
do {
// Lambda binding for lua is not supported.
assert(false);
} while(0)
;
if (!ok) { break; }
void* arg2;
#pragma warning NO CONVERSION TO NATIVE FOR void*
ok = false;
if (!ok) { break; }
cocos2d::Sprite3D::createAsync(arg0, arg1, arg2);
lua_settop(tolua_S, 1);
return 1;
}
} while (0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:createAsync",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_createAsync'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Sprite3D)");
Expand Down Expand Up @@ -1370,14 +1297,201 @@ int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S)
tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName);
tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode);
tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create);
tolua_function(tolua_S,"createAsync", lua_cocos2dx_3d_Sprite3D_createAsync);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Sprite3D).name();
g_luaType[typeName] = "cc.Sprite3D";
g_typeCast["Sprite3D"] = "cc.Sprite3D";
return 1;
}

int lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Sprite3DCache* 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.Sprite3DCache",0,&tolua_err)) goto tolua_lerror;
#endif

cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0);

#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", nullptr);
return 0;
}
#endif

argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
std::string arg0;

ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3DCache:removeSprite3DData");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'", nullptr);
return 0;
}
cobj->removeSprite3DData(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeSprite3DData",argc, 1);
return 0;

#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData'.",&tolua_err);
#endif

return 0;
}
int lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Sprite3DCache* 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.Sprite3DCache",0,&tolua_err)) goto tolua_lerror;
#endif

cobj = (cocos2d::Sprite3DCache*)tolua_tousertype(tolua_S,1,0);

#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'", 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_3d_Sprite3DCache_removeAllSprite3DData'", nullptr);
return 0;
}
cobj->removeAllSprite3DData();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3DCache:removeAllSprite3DData",argc, 0);
return 0;

#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData'.",&tolua_err);
#endif

return 0;
}
int lua_cocos2dx_3d_Sprite3DCache_destroyInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;

#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_destroyInstance'", nullptr);
return 0;
}
cocos2d::Sprite3DCache::destroyInstance();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:destroyInstance",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_destroyInstance'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Sprite3DCache_getInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;

#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Sprite3DCache",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Sprite3DCache_getInstance'", nullptr);
return 0;
}
cocos2d::Sprite3DCache* ret = cocos2d::Sprite3DCache::getInstance();
object_to_luaval<cocos2d::Sprite3DCache>(tolua_S, "cc.Sprite3DCache",(cocos2d::Sprite3DCache*)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Sprite3DCache:getInstance",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3DCache_getInstance'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_3d_Sprite3DCache_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Sprite3DCache)");
return 0;
}

int lua_register_cocos2dx_3d_Sprite3DCache(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.Sprite3DCache");
tolua_cclass(tolua_S,"Sprite3DCache","cc.Sprite3DCache","",nullptr);

tolua_beginmodule(tolua_S,"Sprite3DCache");
tolua_function(tolua_S,"removeSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeSprite3DData);
tolua_function(tolua_S,"removeAllSprite3DData",lua_cocos2dx_3d_Sprite3DCache_removeAllSprite3DData);
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_3d_Sprite3DCache_destroyInstance);
tolua_function(tolua_S,"getInstance", lua_cocos2dx_3d_Sprite3DCache_getInstance);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Sprite3DCache).name();
g_luaType[typeName] = "cc.Sprite3DCache";
g_typeCast["Sprite3DCache"] = "cc.Sprite3DCache";
return 1;
}

int lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount(lua_State* tolua_S)
{
int argc = 0;
Expand Down Expand Up @@ -2881,6 +2995,7 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S)
lua_register_cocos2dx_3d_Animate3D(tolua_S);
lua_register_cocos2dx_3d_Sprite3D(tolua_S);
lua_register_cocos2dx_3d_AttachNode(tolua_S);
lua_register_cocos2dx_3d_Sprite3DCache(tolua_S);
lua_register_cocos2dx_3d_BillBoard(tolua_S);
lua_register_cocos2dx_3d_Animation3D(tolua_S);
lua_register_cocos2dx_3d_Skeleton3D(tolua_S);
Expand Down
Loading

0 comments on commit cb72f35

Please sign in to comment.