From f4b57511b080591ea39bd04d620f157b970676d6 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Thu, 30 Apr 2015 17:18:12 +0800 Subject: [PATCH] Update cocos2dx_3d.ini and cocos2dx.ini for generating Lua bindings code to support CC_CONSTRUCTOR_ACCESS equal to public --- cocos/base/ccConfig.h | 2 +- tools/tolua/cocos2dx.ini | 7 +++++-- tools/tolua/cocos2dx_3d.ini | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index 87f59cf931..f261e02570 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -305,7 +305,7 @@ THE SOFTWARE. * protected by default. */ #ifndef CC_CONSTRUCTOR_ACCESS -#define CC_CONSTRUCTOR_ACCESS protected +#define CC_CONSTRUCTOR_ACCESS public #endif /** @def CC_ENABLE_ALLOCATOR diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index bfdfcaa122..a4a584b03f 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -137,7 +137,10 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS Device::[getTextureDataForText], BillBoard::[*], Camera::[unproject], - SpritePolygonCache::[addSpritePolygonCache getSpritePolygonCache] + SpritePolygonCache::[addSpritePolygonCache getSpritePolygonCache], + EventListenerCustom::[init], + EventListener::[init], + RotateTo::[calculateAngles] rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], ProgressTimer::[setReverseProgress=setReverseDirection], @@ -162,7 +165,7 @@ base_classes_to_skip = Clonable # classes that create no constructor # Set is special and we will use a hand-written constructor -abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set FileUtils Application ClippingNode Label GLViewImpl GLView EventAcceleration DisplayLinkDirector Component Console +abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set FileUtils Application ClippingNode Label GLViewImpl GLView EventAcceleration DisplayLinkDirector Component Console EventListener BaseLight # Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. script_control_cpp = no diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index 8fc0bbfeb0..9670921a05 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -35,8 +35,8 @@ classes = Animate3D Sprite3D Animation3D Skeleton3D ^Mesh$ AttachNode BillBoard # will apply to all class names. This is a convenience wildcard to be able to skip similar named # functions from all classes. -skip = Mesh::[create getAABB getVertexBuffer hasVertexAttrib getSkin getMeshIndexData getGLProgramState getPrimitiveType getIndexCount getIndexFormat getIndexBuffer], - Sprite3D::[getSkin getAABB getMeshArrayByName createAsync], +skip = Mesh::[create getAABB getVertexBuffer hasVertexAttrib getSkin getMeshIndexData getGLProgramState getPrimitiveType getIndexCount getIndexFormat getIndexBuffer getMeshCommand getDefaultGLProgram], + Sprite3D::[getSkin getAABB getMeshArrayByName createAsync init initWithFile initFrom loadFromCache loadFromFile visit genGLProgramState createNode createAttachSprite3DNode createSprite3DNode getMeshIndexData addMesh onAABBDirty afterAsyncLoad], Skeleton3D::[create], Animation3D::[getBoneCurveByName getBoneCurves], BillBoard::[draw], @@ -59,7 +59,7 @@ base_classes_to_skip = Clonable # classes that create no constructor # Set is special and we will use a hand-written constructor -abstract_classes = +abstract_classes = Sprite3D # Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. script_control_cpp = no