Merge pull request #7694 from CocosRobot/update_lua_bindings_1407379142

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-08-07 10:56:04 +08:00
commit 1ece703945
4 changed files with 169 additions and 0 deletions

View File

@ -74,6 +74,13 @@
-- @param #string str
-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- @function [parent=#FileUtils] getValueMapFromData
-- @param self
-- @param #char char
-- @param #int int
-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- @function [parent=#FileUtils] removeDirectory
-- @param self

View File

@ -4,6 +4,12 @@
-- @extend Ref
-- @parent_module cc
--------------------------------
-- @function [parent=#SpriteFrameCache] addSpriteFramesWithFileContent
-- @param self
-- @param #string str
-- @param #cc.Texture2D texture2d
--------------------------------
-- @overload self, string, string
-- @overload self, string
@ -48,6 +54,11 @@
-- @param self
-- @param #cc.Texture2D texture2d
--------------------------------
-- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFileContent
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#SpriteFrameCache] removeSpriteFrameByName
-- @param self

View File

@ -16898,6 +16898,56 @@ int lua_cocos2dx_FileUtils_getValueMapFromFile(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_FileUtils_getValueMapFromData(lua_State* tolua_S)
{
int argc = 0;
cocos2d::FileUtils* 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.FileUtils",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::FileUtils*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_FileUtils_getValueMapFromData'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
const char* arg0;
int arg1;
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.FileUtils:getValueMapFromData"); arg0 = arg0_tmp.c_str();
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.FileUtils:getValueMapFromData");
if(!ok)
return 0;
cocos2d::ValueMap ret = cobj->getValueMapFromData(arg0, arg1);
ccvaluemap_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.FileUtils:getValueMapFromData",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_FileUtils_getValueMapFromData'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_FileUtils_removeDirectory(lua_State* tolua_S)
{
int argc = 0;
@ -17655,6 +17705,7 @@ int lua_register_cocos2dx_FileUtils(lua_State* tolua_S)
tolua_function(tolua_S,"getSearchPaths",lua_cocos2dx_FileUtils_getSearchPaths);
tolua_function(tolua_S,"writeToFile",lua_cocos2dx_FileUtils_writeToFile);
tolua_function(tolua_S,"getValueMapFromFile",lua_cocos2dx_FileUtils_getValueMapFromFile);
tolua_function(tolua_S,"getValueMapFromData",lua_cocos2dx_FileUtils_getValueMapFromData);
tolua_function(tolua_S,"removeDirectory",lua_cocos2dx_FileUtils_removeDirectory);
tolua_function(tolua_S,"setSearchPaths",lua_cocos2dx_FileUtils_setSearchPaths);
tolua_function(tolua_S,"getFileSize",lua_cocos2dx_FileUtils_getFileSize);
@ -57139,6 +57190,55 @@ int lua_register_cocos2dx_AnimationCache(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::SpriteFrameCache* 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.SpriteFrameCache",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::SpriteFrameCache*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
std::string arg0;
cocos2d::Texture2D* arg1;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.SpriteFrameCache:addSpriteFramesWithFileContent");
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 3, "cc.Texture2D",&arg1);
if(!ok)
return 0;
cobj->addSpriteFramesWithFileContent(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpriteFrameCache:addSpriteFramesWithFileContent",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile(lua_State* tolua_S)
{
int argc = 0;
@ -57529,6 +57629,52 @@ int lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromTexture(lua_State* tolua
return 0;
}
int lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromFileContent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::SpriteFrameCache* 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.SpriteFrameCache",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::SpriteFrameCache*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromFileContent'", 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.SpriteFrameCache:removeSpriteFramesFromFileContent");
if(!ok)
return 0;
cobj->removeSpriteFramesFromFileContent(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpriteFrameCache:removeSpriteFramesFromFileContent",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromFileContent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_SpriteFrameCache_removeSpriteFrameByName(lua_State* tolua_S)
{
int argc = 0;
@ -57648,6 +57794,7 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S)
tolua_cclass(tolua_S,"SpriteFrameCache","cc.SpriteFrameCache","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"SpriteFrameCache");
tolua_function(tolua_S,"addSpriteFramesWithFileContent",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent);
tolua_function(tolua_S,"addSpriteFrames",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile);
tolua_function(tolua_S,"addSpriteFrame",lua_cocos2dx_SpriteFrameCache_addSpriteFrame);
tolua_function(tolua_S,"removeUnusedSpriteFrames",lua_cocos2dx_SpriteFrameCache_removeUnusedSpriteFrames);
@ -57656,6 +57803,7 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S)
tolua_function(tolua_S,"init",lua_cocos2dx_SpriteFrameCache_init);
tolua_function(tolua_S,"removeSpriteFrames",lua_cocos2dx_SpriteFrameCache_removeSpriteFrames);
tolua_function(tolua_S,"removeSpriteFramesFromTexture",lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromTexture);
tolua_function(tolua_S,"removeSpriteFramesFromFileContent",lua_cocos2dx_SpriteFrameCache_removeSpriteFramesFromFileContent);
tolua_function(tolua_S,"removeSpriteFrameByName",lua_cocos2dx_SpriteFrameCache_removeSpriteFrameByName);
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_SpriteFrameCache_destroyInstance);
tolua_function(tolua_S,"getInstance", lua_cocos2dx_SpriteFrameCache_getInstance);

View File

@ -1561,6 +1561,9 @@ int register_all_cocos2dx(lua_State* tolua_S);