mirror of https://github.com/axmolengine/axmol.git
Merge pull request #11633 from CocosRobot/update_lua_bindings_1430223523
[AUTO]: updating luabinding automatically
This commit is contained in:
commit
cb00588d46
|
@ -0,0 +1,61 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module SpritePolygon
|
||||
-- @extend Node
|
||||
-- @parent_module ccexp
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.Texture2D
|
||||
-- @overload self, string
|
||||
-- @function [parent=#SpritePolygon] setTexture
|
||||
-- @param self
|
||||
-- @param #string filename
|
||||
-- @return experimental::SpritePolygon#experimental::SpritePolygon self (return value: cc.experimental::SpritePolygon)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] initWithTexture
|
||||
-- @param self
|
||||
-- @param #cc.Texture2D texture
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] showDebug
|
||||
-- @param self
|
||||
-- @param #bool val
|
||||
-- @return experimental::SpritePolygon#experimental::SpritePolygon self (return value: cc.experimental::SpritePolygon)
|
||||
|
||||
--------------------------------
|
||||
-- returns the Texture2D object used by the sprite
|
||||
-- @function [parent=#SpritePolygon] getTexture
|
||||
-- @param self
|
||||
-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getArea
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] initWithCache
|
||||
-- @param self
|
||||
-- @param #string file
|
||||
-- @param #cc._SpritePolygonInfo info
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getVertCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygon] getTrianglesCount
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
return nil
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module SpritePolygonCache
|
||||
-- @extend Ref
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] isSpritePolygonCachExist
|
||||
-- @param self
|
||||
-- @param #string filePath
|
||||
-- @param #rect_table rect
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] removeAllSpritePolygonCache
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] removeSpritePolygonCache
|
||||
-- @param self
|
||||
-- @param #string filePath
|
||||
-- @param #rect_table rect
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] destroyInstance
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] printInfo
|
||||
-- @param self
|
||||
-- @param #cc._SpritePolygonInfo info
|
||||
-- @return SpritePolygonCache#SpritePolygonCache self (return value: cc.SpritePolygonCache)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#SpritePolygonCache] getInstance
|
||||
-- @param self
|
||||
-- @return SpritePolygonCache#SpritePolygonCache ret (return value: cc.SpritePolygonCache)
|
||||
|
||||
return nil
|
|
@ -1251,4 +1251,9 @@
|
|||
-- @field [parent=#cc] AsyncTaskPool#AsyncTaskPool AsyncTaskPool preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc SpritePolygonCache
|
||||
-- @field [parent=#cc] SpritePolygonCache#SpritePolygonCache SpritePolygonCache preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -11,4 +11,9 @@
|
|||
-- @field [parent=#ccexp] TMXTiledMap#TMXTiledMap TMXTiledMap preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the ccexp SpritePolygon
|
||||
-- @field [parent=#ccexp] SpritePolygon#SpritePolygon SpritePolygon preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "cocos2d.h"
|
||||
#include "CCProtectedNode.h"
|
||||
#include "CCAsyncTaskPool.h"
|
||||
#include "SpritePolygonCache.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
@ -72675,6 +72676,303 @@ int lua_register_cocos2dx_AsyncTaskPool(lua_State* tolua_S)
|
|||
g_typeCast["AsyncTaskPool"] = "cc.AsyncTaskPool";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::SpritePolygonCache* 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.SpritePolygonCache",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::SpritePolygonCache*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::Rect arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.SpritePolygonCache:isSpritePolygonCachExist");
|
||||
|
||||
ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.SpritePolygonCache:isSpritePolygonCachExist");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->isSpritePolygonCachExist(arg0, arg1);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpritePolygonCache:isSpritePolygonCachExist",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::SpritePolygonCache* 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.SpritePolygonCache",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::SpritePolygonCache*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache'", 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_SpritePolygonCache_removeAllSpritePolygonCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->removeAllSpritePolygonCache();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpritePolygonCache:removeAllSpritePolygonCache",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::SpritePolygonCache* 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.SpritePolygonCache",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::SpritePolygonCache*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache'", 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.SpritePolygonCache:removeSpritePolygonCache");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->removeSpritePolygonCache(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
const cocos2d::Rect* arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.SpritePolygonCache:removeSpritePolygonCache");
|
||||
|
||||
ok &= luaval_to_object<const cocos2d::Rect>(tolua_S, 3, "cc.Rect",&arg1);
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->removeSpritePolygonCache(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.SpritePolygonCache:removeSpritePolygonCache",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_SpritePolygonCache_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.SpritePolygonCache",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_SpritePolygonCache_destroyInstance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::SpritePolygonCache::destroyInstance();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.SpritePolygonCache:destroyInstance",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_destroyInstance'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_SpritePolygonCache_printInfo(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.SpritePolygonCache",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::_SpritePolygonInfo arg0;
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR _SpritePolygonInfo
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_SpritePolygonCache_printInfo'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::SpritePolygonCache::printInfo(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.SpritePolygonCache:printInfo",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_printInfo'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_SpritePolygonCache_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.SpritePolygonCache",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_SpritePolygonCache_getInstance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::SpritePolygonCache* ret = cocos2d::SpritePolygonCache::getInstance();
|
||||
object_to_luaval<cocos2d::SpritePolygonCache>(tolua_S, "cc.SpritePolygonCache",(cocos2d::SpritePolygonCache*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.SpritePolygonCache:getInstance",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_SpritePolygonCache_getInstance'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_SpritePolygonCache_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (SpritePolygonCache)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_SpritePolygonCache(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.SpritePolygonCache");
|
||||
tolua_cclass(tolua_S,"SpritePolygonCache","cc.SpritePolygonCache","cc.Ref",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"SpritePolygonCache");
|
||||
tolua_function(tolua_S,"isSpritePolygonCachExist",lua_cocos2dx_SpritePolygonCache_isSpritePolygonCachExist);
|
||||
tolua_function(tolua_S,"removeAllSpritePolygonCache",lua_cocos2dx_SpritePolygonCache_removeAllSpritePolygonCache);
|
||||
tolua_function(tolua_S,"removeSpritePolygonCache",lua_cocos2dx_SpritePolygonCache_removeSpritePolygonCache);
|
||||
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_SpritePolygonCache_destroyInstance);
|
||||
tolua_function(tolua_S,"printInfo", lua_cocos2dx_SpritePolygonCache_printInfo);
|
||||
tolua_function(tolua_S,"getInstance", lua_cocos2dx_SpritePolygonCache_getInstance);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::SpritePolygonCache).name();
|
||||
g_luaType[typeName] = "cc.SpritePolygonCache";
|
||||
g_typeCast["SpritePolygonCache"] = "cc.SpritePolygonCache";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -72870,6 +73168,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_TransitionSlideInL(tolua_S);
|
||||
lua_register_cocos2dx_TransitionSlideInT(tolua_S);
|
||||
lua_register_cocos2dx_Grid3D(tolua_S);
|
||||
lua_register_cocos2dx_SpritePolygonCache(tolua_S);
|
||||
lua_register_cocos2dx_EaseCircleActionOut(tolua_S);
|
||||
lua_register_cocos2dx_TransitionProgressInOut(tolua_S);
|
||||
lua_register_cocos2dx_EaseCubicActionInOut(tolua_S);
|
||||
|
|
|
@ -1632,6 +1632,13 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "lua_cocos2dx_experimental_auto.hpp"
|
||||
#include "CCFastTMXLayer.h"
|
||||
#include "CCFastTMXTiledMap.h"
|
||||
#include "SpritePolygon.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
|
||||
|
@ -1868,6 +1869,430 @@ int lua_register_cocos2dx_experimental_TMXTiledMap(lua_State* tolua_S)
|
|||
g_typeCast["TMXTiledMap"] = "ccexp.TMXTiledMap";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_experimental_SpritePolygon_setTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_setTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::Texture2D* arg0;
|
||||
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0);
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTexture(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.SpritePolygon:setTexture");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->setTexture(arg0);
|
||||
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 \n", "ccexp.SpritePolygon:setTexture",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_setTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_initWithTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Texture2D* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0);
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initWithTexture(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:initWithTexture",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_initWithTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_showDebug(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccexp.SpritePolygon:showDebug");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->showDebug(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:showDebug",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_showDebug'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getTexture'", 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_experimental_SpritePolygon_getTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::Texture2D* ret = cobj->getTexture();
|
||||
object_to_luaval<cocos2d::Texture2D>(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:getTexture",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getArea(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getArea'", 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_experimental_SpritePolygon_getArea'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const float ret = cobj->getArea();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:getArea",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getArea'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_initWithCache(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
cocos2d::_SpritePolygonInfo* arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.SpritePolygon:initWithCache");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR _SpritePolygonInfo*
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->initWithCache(arg0, arg1);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:initWithCache",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_initWithCache'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getVertCount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getVertCount'", 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_experimental_SpritePolygon_getVertCount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const ssize_t ret = cobj->getVertCount();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:getVertCount",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getVertCount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::SpritePolygon* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.SpritePolygon",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::SpritePolygon*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount'", 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_experimental_SpritePolygon_getTrianglesCount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
const ssize_t ret = cobj->getTrianglesCount();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.SpritePolygon:getTrianglesCount",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_experimental_SpritePolygon_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (SpritePolygon)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_experimental_SpritePolygon(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.SpritePolygon");
|
||||
tolua_cclass(tolua_S,"SpritePolygon","ccexp.SpritePolygon","cc.Node",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"SpritePolygon");
|
||||
tolua_function(tolua_S,"setTexture",lua_cocos2dx_experimental_SpritePolygon_setTexture);
|
||||
tolua_function(tolua_S,"initWithTexture",lua_cocos2dx_experimental_SpritePolygon_initWithTexture);
|
||||
tolua_function(tolua_S,"showDebug",lua_cocos2dx_experimental_SpritePolygon_showDebug);
|
||||
tolua_function(tolua_S,"getTexture",lua_cocos2dx_experimental_SpritePolygon_getTexture);
|
||||
tolua_function(tolua_S,"getArea",lua_cocos2dx_experimental_SpritePolygon_getArea);
|
||||
tolua_function(tolua_S,"initWithCache",lua_cocos2dx_experimental_SpritePolygon_initWithCache);
|
||||
tolua_function(tolua_S,"getVertCount",lua_cocos2dx_experimental_SpritePolygon_getVertCount);
|
||||
tolua_function(tolua_S,"getTrianglesCount",lua_cocos2dx_experimental_SpritePolygon_getTrianglesCount);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::SpritePolygon).name();
|
||||
g_luaType[typeName] = "ccexp.SpritePolygon";
|
||||
g_typeCast["SpritePolygon"] = "ccexp.SpritePolygon";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_experimental(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -1876,6 +2301,7 @@ TOLUA_API int register_all_cocos2dx_experimental(lua_State* tolua_S)
|
|||
tolua_beginmodule(tolua_S,"ccexp");
|
||||
|
||||
lua_register_cocos2dx_experimental_TMXTiledMap(tolua_S);
|
||||
lua_register_cocos2dx_experimental_SpritePolygon(tolua_S);
|
||||
lua_register_cocos2dx_experimental_TMXLayer(tolua_S);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
|
|
|
@ -41,6 +41,15 @@ int register_all_cocos2dx_experimental(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue