2012-09-15 08:29:38 +08:00
[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.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include
android_flags = -D_SIZE_T_DEFINED_
clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include
clang_flags = -nostdinc -x c++
2013-03-11 16:39:28 +08:00
cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include
2012-09-15 08:29:38 +08:00
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common
# extra arguments for clang
2013-03-17 14:11:15 +08:00
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
2012-09-15 08:29:38 +08:00
# what headers to parse
2013-03-11 16:39:28 +08:00
headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/include/SimpleAudioEngine.h
2012-09-15 08:29:38 +08:00
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^CCMenu*$".
2013-05-29 08:06:41 +08:00
classes = CCSprite.* CCScene CCNode.* CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCGridBase$ CC.+Grid CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet CCData SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$ CCFileUtils$ CCGLProgram CCShaderCache CCApplication
2012-09-15 08:29:38 +08:00
# 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.
2012-10-12 09:43:40 +08:00
2013-04-18 13:53:43 +08:00
skip = CCNode::[convertToWindowSpace ^setPosition$ getGrid setGLServerState description getUserObject .*UserData getGLServerState .*schedule],
2013-03-01 10:45:07 +08:00
CCSprite::[getQuad displayFrame getBlendFunc ^setPosition$ setBlendFunc setSpriteBatchNode getSpriteBatchNode],
CCSpriteBatchNode::[getBlendFunc setBlendFunc],
CCMotionStreak::[getBlendFunc setBlendFunc],
CCAtlasNode::[getBlendFunc setBlendFunc],
CCParticleBatchNode::[getBlendFunc setBlendFunc],
CCLayerColor::[getBlendFunc setBlendFunc],
CCParticleSystem::[getBlendFunc setBlendFunc],
CCDrawNode::[getBlendFunc setBlendFunc drawPolygon],
CCDirector::[getAccelerometer getKeypadDispatcher getTouchDispatcher setWatcherCallbackFun getOpenGLView getProjection getClassTypeInfo],
CCLayer.*::[didAccelerate (g|s)etBlendFunc],
CCMenu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
CCMenuItem.*::[create],
CCCopying::[*],
CC.*Protocol::[*],
CC.*Delegate::[*],
CCPoolManager::[*],
CCTexture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData],
2013-05-21 14:52:54 +08:00
CCSet::[begin end acceptVisitor],
2013-03-01 10:45:07 +08:00
CCIMEDispatcher::[*],
CCSAXParser::[*],
CCThread::[*],
CCProfiler::[*],
CCProfilingTimer::[*],
CCCallFunc::[create],
CCSAXDelegator::[*],
CCColor3bObject::[*],
CCTouchDispatcher::[*],
EGLTouchDelegate::[*],
CCScriptEngineManager::[*],
CCKeypadHandler::[*],
CCInvocation::[*],
CCEGLView::[*],
CCSchedulerScriptHandlerEntry::[*],
CCSize::[*],
CCPoint::[*],
CCPointArray::[*],
CCRect::[*],
CCString::[*],
2013-05-29 08:06:41 +08:00
CCData::[*],
2013-03-01 10:45:07 +08:00
CCDictionary::[*],
CCArray::[*],
CCRange::[*],
CCNotificationObserver::[*],
CCImage::[initWithString initWithImageData],
CCSequence::[create],
CCSpawn::[create],
CCAnimation::[create],
2013-04-19 17:23:39 +08:00
CCGLProgram::[getProgram setUniformLocationWith2f.* setUniformLocationWith1f.* setUniformLocationWith3f.* setUniformLocationWith4f.*],
2013-03-01 10:45:07 +08:00
CCGrid3DAction::[create actionWith.*],
CCTiledGrid3DAction::[create actionWith.*],
2013-04-19 17:23:39 +08:00
CCTMXLayer::[getTiles],
2013-03-01 10:45:07 +08:00
CCTMXMapInfo::[startElement endElement textHandler],
CCParticleSystemQuad::[postStep setBatchNode draw setTexture$ setTotalParticles updateQuadWithParticle setupIndices listenBackToForeground initWithTotalParticles particleWithFile node],
CCLayerMultiplex::[create layerWith.* initWithLayers],
CCCatmullRom.*::[create actionWithDuration],
CCBezier.*::[create actionWithDuration],
CCCardinalSpline.*::[create actionWithDuration setPoints],
2013-03-18 15:29:53 +08:00
CCScheduler::[pause resume unschedule schedule update isTargetPaused],
2013-03-01 10:45:07 +08:00
CCTextureCache::[addPVRTCImage],
CCTimer::[getSelector],
2013-03-15 11:53:56 +08:00
*::[copyWith.* onEnter.* onExit.* ^description$ getObjectType],
2013-03-01 10:45:07 +08:00
CCFileUtils::[(g|s)etSearchResolutionsOrder$ (g|s)etSearchPaths$ getClassTypeInfo],
2013-04-09 14:42:12 +08:00
SimpleAudioEngine::[getClassTypeInfo],
2013-05-08 08:22:25 +08:00
CCApplication::[^application.* ^run$],
ccFontDefinition::[*]
2012-09-15 08:29:38 +08:00
2012-09-21 05:49:14 +08:00
rename_functions = CCDirector::[sharedDirector=getInstance],
2013-03-01 10:45:07 +08:00
CCSpriteFrameCache::[sharedSpriteFrameCache = getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY],
CCMenuItemFont::[setFontNameObj = setFontName setFontSizeObj=setFontSize fontSizeObj=fontSize fontNameObj=fontName],
CCProgressTimer::[setReverseProgress = setReverseDirection],
CCTextureCache::[sharedTextureCache = getInstance],
CCAnimation::[addSpriteFrameWithFileName = addSpriteFrameWithFile],
CCAnimationCache::[sharedAnimationCache = getInstance addAnimationsWithFile=addAnimations animationByName=getAnimation removeAnimationByName=removeAnimation],
CCLayerGradient::[initWithColor = init],
CCLayerColor::[initWithColor = init],
2013-03-28 14:59:17 +08:00
CCGLProgram::[fragmentShaderLog = getFragmentShaderLog initWithVertexShaderByteArray=initWithString initWithVertexShaderFilename=init programLog=getProgramLog setUniformLocationWith1i=setUniformLocationI32 vertexShaderLog=getVertexShaderLog],
2013-03-01 10:45:07 +08:00
CCNode::[boundingBox = getBoundingBox removeFromParentAndCleanup=removeFromParent removeAllChildrenWithCleanup=removeAllChildren],
CCLabelAtlas::[create = _create],
2013-05-21 18:20:49 +08:00
CCTMXLayer::[tileAt = getTileAt tileGIDAt=getTileGIDAt propertyNamed=getProperty positionAt=getPositionAt],
2013-03-01 10:45:07 +08:00
CCTileMapAtlas::[tileAt = getTileAt],
2013-03-20 18:30:25 +08:00
CCSprite::[isFlipX = isFlippedX isFlipY=isFlippedY initWithFile=init],
CCSpriteBatchNode::[initWithFile = init],
2013-03-01 10:45:07 +08:00
CCTouch::[getID = getId],
SimpleAudioEngine::[sharedEngine = getInstance preloadBackgroundMusic=preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic],
2013-03-20 18:30:25 +08:00
CCCamera::[setUpXYZ = setUp getUpXYZ=getUp setEyeXYZ=setEye getEyeXYZ=getEye setCenterXYZ=setCenter getCenterXYZ=getCenter],
2013-03-01 10:45:07 +08:00
CCTMXTiledMap::[layerNamed = getLayer objectGroupNamed=getObjectGroup propertyNamed=getProperty],
CCTexture2D::[defaultAlphaPixelFormat = getDefaultAlphaPixelFormat],
2013-03-28 14:59:17 +08:00
CCShaderCache::[programForKey = getProgram sharedShaderCache=getInstance],
2013-04-09 14:42:12 +08:00
CCFileUtils::[sharedFileUtils = getInstance loadFilenameLookupDictionaryFromFile=loadFilenameLookup],
CCApplication::[sharedApplication = getInstance]
2012-11-07 03:04:02 +08:00
2012-10-23 02:08:56 +08:00
rename_classes = CCParticleSystemQuad::CCParticleSystem,
2013-03-11 16:39:28 +08:00
SimpleAudioEngine::AudioEngine
2012-09-21 05:49:14 +08:00
2012-09-15 08:29:38 +08:00
# for all class names, should we remove something when registering in the target VM?
remove_prefix = CC
2013-03-10 13:55:29 +08:00
# classes for which there will be no "parent" lookup
2013-04-09 14:42:12 +08:00
classes_have_no_parents = CCNode CCDirector SimpleAudioEngine CCFileUtils CCTMXMapInfo CCApplication
2013-03-10 13:55:29 +08:00
# base classes which will be skipped when their sub-classes found them.
base_classes_to_skip = CCObject
2012-09-15 08:29:38 +08:00
# classes that create no constructor
2012-09-21 13:14:09 +08:00
# CCSet is special and we will use a hand-written constructor
2013-04-09 14:42:12 +08:00
abstract_classes = CCDirector CCSpriteFrameCache CCTransitionEaseScene CCSet SimpleAudioEngine CCFileUtils CCApplication
2013-03-10 14:00:30 +08:00
# 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