axmol/tools/tojs/cocos2dx.ini

193 lines
13 KiB
INI

[cocos2d-x]
# the prefix to be added to the generated functions. You might or might not use this in your own
# templates
prefix = cocos2dx
# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`)
# all classes will be embedded in that namespace
target_namespace = cc
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include
android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/%(clang_version)s/include
clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external
cocos_flags = -DANDROID
cxxgenerator_headers =
# extra arguments for clang
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
# what headers to parse
headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h %(cocosdir)s/cocos/scripting/js-bindings/manual/component/CCComponentJS.h
replace_headers = CCComponentJS.h::component/CCComponentJS.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = New.* Sprite SpriteBatchNode SpriteFrame SpriteFrameCache Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc CallFuncN RenderTexture GridAction Grid3DAction Grid3D TiledGrid3D GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Lens3D Ripple3D PageTurn3D ShakyTiles3D ShatteredTiles3D WavesTiles3D JumpTiles3D Speed ActionManager Set SimpleAudioEngine Scheduler Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram GLProgramCache Application ClippingNode MotionStreak TextFieldTTF GLViewProtocol GLView Component ComponentContainer __NodeRGBA __LayerRGBA SAXParser Event(?!.*(Physics).*).* Device Configuration ProtectedNode GLProgramState Image .*Light$ AsyncTaskPool Properties Material Technique RenderState Pass ComponentJS
classes_need_extend = Node __NodeRGBA Layer.* Sprite SpriteBatchNode SpriteFrame Menu MenuItem.* Scene DrawNode Component .*Action.* GridBase Grid3D TiledGrid3D MotionStreak ParticleBatchNode ParticleSystem TextFieldTTF RenderTexture TileMapAtlas TMXLayer TMXTiledMap TMXMapInfo TransitionScene ProgressTimer ParallaxNode Label.* GLProgram Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn ReverseTime Animate AnimationFrame Animation AnimationCache Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* Orbit.* Follow.* Bezier.* Hide CallFunc CallFuncN
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just
# add a single "*" as functions. See bellow for several examples. A special class name is "*", which
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
# functions from all classes.
skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserData getGLServerState .*schedule setContentSize setAnchorPoint setColor pause resume setAdditionalTransform convertToWorldSpace],
Sprite::[getQuad ^setPosition$ create setPolygonInfo initWithPolygon getPolygonInfo],
SpriteFrame::[setPolygonInfo getPolygonInfo hasPolygonInfo],
NodeGrid::[setGrid],
SpriteBatchNode::[getDescendants],
MotionStreak::[draw update],
DrawNode::[drawPoly$ listenBackToForeground],
Director::[getAccelerometer getProjection getFrustum getRenderer getConsole getCocos2dThreadId],
Layer.*::[didAccelerate keyPressed keyReleased],
Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
MenuItemToggle::[initWithCallback],
Copying::[*],
LabelProtocol::[*],
LabelTextFormatProtocol::[*],
Label::[getLettersInfo createWithTTF setTTFConfig getFontAtlas listenToBackground listenToFontAtlasPurge],
.*Delegate::[*],
PoolManager::[*],
Texture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData getPixelFormatInfoMap updateWithData],
Set::[begin end acceptVisitor],
IMEDispatcher::[*],
Thread::[*],
Profiler::[*],
ProfilingTimer::[*],
CallFunc::[create initWithFunction (g|s)etTargetCallback],
CallFuncN::[create initWithFunction],
SAXParser::[(?!(init))],
SAXDelegator::[*],
Color3bObject::[*],
TouchDispatcher::[*],
EGLTouchDelegate::[*],
ScriptEngineManager::[*],
KeypadHandler::[*],
Invocation::[*],
GLView::[end swapBuffers getAllTouches],
GLViewProtocol::[pollInputEvents handleTouches.* setScissorInPoints getScissorRect isScissorEnabled swapBuffers],
SchedulerScriptHandlerEntry::[*],
Size::[*],
Point::[*],
PointArray::[*],
Rect::[*],
String::[*],
Data::[*],
Dictionary::[*],
Array::[*],
Range::[*],
NotificationObserver::[*],
Image::[initWithString initWithImageData],
Sequence::[create],
Spawn::[create],
RotateTo::[calculateAngles],
GLProgram::[getProgram setUniformLocationWith(1|2|3|4)fv setUniformLocationWith(2|3|4)iv setUniformLocationWithMatrix(2|3|4)fv],
GLProgramState::[setUniformVec4 setVertexAttribPointer],
Grid3DAction::[create actionWith.* vertex originalVertex (g|s)etVertex getOriginalVertex],
Grid3D::[vertex originalVertex (g|s)etVertex getOriginalVertex],
TiledGrid3DAction::[create actionWith.* tile originalTile getOriginalTile (g|s)etTile],
TiledGrid3D::[tile originalTile getOriginalTile (g|s)etTile],
TMXLayer::[getTiles],
TMXMapInfo::[startElement endElement textHandler],
ParticleSystemQuad::[postStep setBatchNode draw setTexture$ setTotalParticles updateQuadWithParticle setupIndices listenBackToForeground initWithTotalParticles particleWithFile node],
LayerMultiplex::[create layerWith.* initWithLayers],
CatmullRom.*::[create actionWithDuration initWithDuration],
Bezier.*::[create actionWithDuration initWithDuration],
CardinalSpline.*::[create actionWithDuration setPoints initWithDuration],
Scheduler::[pause resume ^unschedule$ unscheduleUpdate unscheduleAllForTarget schedule isTargetPaused isScheduled],
TextureCache::[addPVRTCImage],
*::[copyWith.* ^cleanup$ onEnter.* onExit.* ^description$ getObjectType onTouch.* onAcc.* onKey.* onRegisterTouchListener operator.+],
FileUtils::[getFileData getDataFromFile writeDataToFile setFilenameLookupDictionary destroyInstance getFullPathCache],
Application::[^application.* ^run$ getCurrentLanguageCode setAnimationInterval],
Camera::[getEyeXYZ getCenterXYZ getUpXYZ],
ccFontDefinition::[*],
NewTextureAtlas::[*],
RenderTexture::[listenToBackground listenToForeground saveToFile],
TextFieldTTF::[(g|s)etDelegate],
EventListenerVector::[*],
EventListener(Touch|Keyboard|Mouse|Focus).*::[create],
EventTouch::[(s|g)etTouches],
EventKeyboard::[*],
Device::[getTextureDataForText],
EventDispatcher::[dispatchCustomEvent],
EventCustom::[getUserData setUserData],
Component::[serialize onAdd onRemove update],
EventListenerCustom::[init],
EventListener::[init],
Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld getPhysics3DWorld setPhysics3DDebugCamera setNavMesh getNavMesh setNavMeshDebugCamera],
Animate3D::[*],
Sprite3D::[*],
AttachNode::[*],
Animation3D::[*],
Skeleton3D::[*],
Mesh::[*],
Animation3DCache::[*],
Sprite3DMaterialCache::[*],
Sprite3DMaterial::[*],
Sprite3DCache::[*],
Bone3D::[*],
Device::[getTextureDataForText],
BillBoard::[*],
Camera::[unproject isVisibleInFrustum],
ClippingNode::[init],
RenderState::[setStateBlock],
ComponentJS::[create getScriptObject update]
rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame],
MenuItemFont::[setFontNameObj=setFontName setFontSizeObj=setFontSize getFontSizeObj=getFontSize getFontNameObj=getFontName],
ProgressTimer::[setReverseProgress=setReverseDirection],
Animation::[create=createWithAnimationFrames],
AnimationCache::[addAnimationsWithFile=addAnimations],
GLProgram::[initWithByteArrays=initWithString initWithFilenames=init setUniformLocationWith1i=setUniformLocationI32 bindAttribLocation=addAttribute],
Node::[getGLProgram=getShaderProgram setGLProgram=setShaderProgram getPositionZ=getVertexZ setPositionZ=setVertexZ removeFromParentAndCleanup=removeFromParent removeAllChildrenWithCleanup=removeAllChildren setRotationSkewX=setRotationX setRotationSkewY=setRotationY getRotationSkewX=getRotationX getRotationSkewY=getRotationY getNodeToParentTransform=getNodeToParentTransform3D getParentToNodeTransform=getParentToNodeTransform3D getNodeToWorldTransform=getNodeToWorldTransform3D getWorldToNodeTransform=getWorldToNodeTransform3D getNodeToWorldAffineTransform=getNodeToWorldTransform getNodeToParentAffineTransform=getNodeToParentTransform getParentToNodeAffineTransform=getParentToNodeTransform getWorldToNodeAffineTransform=getWorldToNodeTransform],
LabelAtlas::[create=_create],
Sprite::[getPositionZ=getVertexZ setPositionZ=setVertexZ],
SpriteBatchNode::[removeAllChildrenWithCleanup=removeAllChildren],
DrawNode::[drawQuadraticBezier=drawQuadBezier],
FileUtils::[loadFilenameLookupDictionaryFromFile=loadFilenameLookup],
SimpleAudioEngine::[preloadBackgroundMusic=preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic],
EventDispatcher::[addCustomEventListener=addCustomListener removeEventListener=removeListener removeEventListenersForType=removeListeners removeEventListenersForTarget=removeListeners removeCustomEventListeners=removeCustomListeners removeAllEventListeners=removeAllListeners pauseEventListenersForTarget=pauseTarget resumeEventListenersForTarget=resumeTarget],
EventMouse::[getMouseButton=getButton setMouseButton=setButton setCursorPosition=setLocation getCursorX=getLocationX getCursorY=getLocationY],
Configuration::[getInfo=dumpInfo],
ComponentContainer::[get=getComponent],
LayerColor::[initWithColor=init],
GLProgramCache::[getGLProgram=getProgram addGLProgram=addProgram reloadDefaultGLPrograms=reloadDefaultShaders loadDefaultGLPrograms=loadDefaultShaders],
TextFieldTTF::[textFieldWithPlaceHolder=create],
Texture2D::[getGLProgram=getShaderProgram setGLProgram=setShaderProgram],
Speed::[setSpeed=_setSpeed getSpeed=_getSpeed]
rename_classes = ParticleSystemQuad::ParticleSystem,
SimpleAudioEngine::AudioEngine,
__NodeRGBA::NodeRGBA,
__LayerRGBA::LayerRGBA,
SAXParser::PlistParser,
GLProgramCache::ShaderCache,
CallFunc::_CallFunc,
CallFuncN::CallFunc
# for all class names, should we remove something when registering in the target VM?
remove_prefix =
# classes for which there will be no "parent" lookup
classes_have_no_parents = Node Director SimpleAudioEngine FileUtils TMXMapInfo Application GLViewProtocol SAXParser Configuration
# base classes which will be skipped when their sub-classes found them.
base_classes_to_skip = Ref 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 SimpleAudioEngine FileUtils Application GLViewProtocol GLView ComponentContainer SAXParser Configuration EventListener BaseLight AsyncTaskPool ComponentJS
# 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