From 91b297b08507d84c002f05e57ebe51c4c0f560f4 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Thu, 7 Aug 2014 02:40:46 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/FileUtils.lua | 7 + .../auto/api/SpriteFrameCache.lua | 11 ++ .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 148 ++++++++++++++++++ .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 3 + 4 files changed, 169 insertions(+) diff --git a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua index e2563f35d0..465eafc67b 100644 --- a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua +++ b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua @@ -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 diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua index 0d8ee97edf..33e686b786 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua @@ -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 diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 0314fc723c..ff6c78de1a 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -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(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); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 9ab13f76f6..d38bcfdf91 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1561,6 +1561,9 @@ int register_all_cocos2dx(lua_State* tolua_S); + + +