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++
|
|
|
|
|
2012-10-23 02:08:56 +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 -I%(cocosdir)s/extensions -I%(cocosdir)s/extensions/CCBReader
|
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
|
2012-09-25 07:16:50 +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
|
2012-09-15 08:29:38 +08:00
|
|
|
|
|
|
|
# what headers to parse
|
2012-10-23 02:08:56 +08:00
|
|
|
headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/include/SimpleAudioEngine.h %(cocosdir)s/extensions/cocos-ext.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*$".
|
2012-12-27 13:38:48 +08:00
|
|
|
classes = CCSprite.* CCScene CCNode CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCSequence 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 CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCBReader.* CCBAnimationManager.* CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCControlButton.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$
|
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
|
|
|
|
2012-12-25 09:52:30 +08:00
|
|
|
skip = CCNode::[.*Transform convertToWindowSpace getChildren ^setPosition$ getGrid setGLServerState description getShaderProgram getUserObject .*UserData getGLServerState unscheduleAllSelectors],
|
|
|
|
CCSprite::[getQuad displayFrame getBlendFunc ^setPosition$ setBlendFunc setSpriteBatchNode getSpriteBatchNode],
|
2012-10-10 15:23:13 +08:00
|
|
|
CCSpriteBatchNode::[getBlendFunc setBlendFunc],
|
|
|
|
CCMotionStreak::[getBlendFunc setBlendFunc],
|
|
|
|
CCAtlasNode::[getBlendFunc setBlendFunc],
|
|
|
|
CCParticleBatchNode::[getBlendFunc setBlendFunc],
|
|
|
|
CCLayerColor::[getBlendFunc setBlendFunc],
|
|
|
|
CCParticleSystem::[getBlendFunc setBlendFunc],
|
2012-11-22 15:35:42 +08:00
|
|
|
CCDrawNode::[getBlendFunc setBlendFunc drawPolygon],
|
2012-11-06 14:19:27 +08:00
|
|
|
CCDirector::[getAccelerometer getKeypadDispatcher getTouchDispatcher setWatcherCallbackFun getOpenGLView getProjection],
|
2012-09-15 08:29:38 +08:00
|
|
|
CCLayer.*::[didAccelerate (g|s)etBlendFunc],
|
2012-10-12 09:43:40 +08:00
|
|
|
CCMenu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
|
2012-09-15 08:29:38 +08:00
|
|
|
CCMenuItem.*::[create],
|
|
|
|
CCRGBAProtocol::[*],
|
|
|
|
CCCopying::[*],
|
|
|
|
CC.*Protocol::[*],
|
|
|
|
CC.*Delegate::[*],
|
|
|
|
CCPoolManager::[*],
|
2012-11-06 14:19:27 +08:00
|
|
|
CCTexture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData],
|
2012-09-21 13:14:09 +08:00
|
|
|
CCSet::[begin end],
|
2012-09-15 08:29:38 +08:00
|
|
|
CCIMEDispatcher::[*],
|
|
|
|
CCSAXParser::[*],
|
|
|
|
CCThread::[*],
|
|
|
|
CCProfiler::[*],
|
|
|
|
CCProfilingTimer::[*],
|
|
|
|
CCCallFunc::[create],
|
|
|
|
CCSAXDelegator::[*],
|
|
|
|
CCColor3bObject::[*],
|
|
|
|
CCTouchDispatcher::[*],
|
|
|
|
EGLTouchDelegate::[*],
|
|
|
|
CCScriptEngineManager::[*],
|
|
|
|
CCKeypadHandler::[*],
|
|
|
|
CCInvocation::[*],
|
|
|
|
CCEGLView::[*],
|
|
|
|
CCSchedulerScriptHandlerEntry::[*],
|
|
|
|
CCSize::[*],
|
|
|
|
CCPoint::[*],
|
2013-01-15 10:17:01 +08:00
|
|
|
CCPointArray::[*],
|
2012-09-15 08:29:38 +08:00
|
|
|
CCRect::[*],
|
|
|
|
CCString::[*],
|
|
|
|
CCDictionary::[*],
|
|
|
|
CCArray::[*],
|
|
|
|
CCRange::[*],
|
|
|
|
CCNotificationObserver::[*],
|
|
|
|
CCListView.*::[*],
|
|
|
|
CCImage::[initWithString initWithImageData],
|
|
|
|
CCSequence::[create],
|
|
|
|
CCSpawn::[create],
|
|
|
|
CCAnimation::[create],
|
|
|
|
CCGrid3DAction::[create actionWith.*],
|
|
|
|
CCTiledGrid3DAction::[create actionWith.*],
|
|
|
|
CCTMXMapInfo::[startElement endElement textHandler],
|
2012-09-21 05:49:14 +08:00
|
|
|
CCParticleSystemQuad::[postStep setBatchNode draw setTexture$ setTotalParticles updateQuadWithParticle setupIndices listenBackToForeground initWithTotalParticles particleWithFile node],
|
2012-11-30 21:16:34 +08:00
|
|
|
CCLayerMultiplex::[create layerWith.* initWithLayers],
|
2012-10-12 09:43:40 +08:00
|
|
|
CCCatmullRom.*::[create actionWithDuration],
|
|
|
|
CCBezier.*::[create actionWithDuration],
|
2012-11-07 03:04:02 +08:00
|
|
|
CCBReader::[^CCBReader$ addOwnerCallbackName isJSControlled readByte getCCBMemberVariableAssigner readFloat getCCBSelectorResolver toLowerCase lastPathComponent deletePathExtension endsWith concat getResolutionScale getAnimatedProperties readBool readInt addOwnerCallbackNode addDocumentCallbackName readCachedString readNodeGraphFromData addDocumentCallbackNode getLoadedSpriteSheet initWithData readFileWithCleanUp getOwner$ readNodeGraphFromFile createSceneWithNodeGraphFromFile getAnimationManagers$ setAnimationManagers],
|
2012-11-01 02:08:37 +08:00
|
|
|
CCBAnimationManager::[setAnimationCompletedCallback],
|
2012-10-12 09:43:40 +08:00
|
|
|
CCCardinalSpline.*::[create actionWithDuration setPoints],
|
2012-11-07 03:04:02 +08:00
|
|
|
CCScheduler::[pause resume unscheduleAllSelectorsForTarget],
|
2012-10-12 09:43:40 +08:00
|
|
|
CCTextureCache::[addPVRTCImage],
|
2012-11-22 15:15:30 +08:00
|
|
|
CCTimer::[getSelector],
|
2012-10-23 02:08:56 +08:00
|
|
|
CC.*Loader$::[*],
|
2012-09-15 08:29:38 +08:00
|
|
|
*::[copyWith.* onEnter.* onExit.* description getObjectType .*RGB.* .*HSV.*]
|
|
|
|
|
2012-09-21 05:49:14 +08:00
|
|
|
rename_functions = CCDirector::[sharedDirector=getInstance],
|
2012-10-10 05:59:16 +08:00
|
|
|
CCSpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY],
|
2012-09-15 08:29:38 +08:00
|
|
|
CCMenuItemFont::[setFontNameObj=setFontName setFontSizeObj=setFontSize fontSizeObj=fontSize fontNameObj=fontName],
|
|
|
|
CCProgressTimer::[setReverseProgress=setReverseDirection],
|
|
|
|
CCTextureCache::[sharedTextureCache=getInstance],
|
2012-11-05 18:45:39 +08:00
|
|
|
CCAnimation::[addSpriteFrameWithFileName=addSpriteFrameWithFile],
|
|
|
|
CCAnimationCache::[sharedAnimationCache=getInstance addAnimationsWithFile=addAnimations animationByName=getAnimation removeAnimationByName=removeAnimation],
|
2012-09-28 04:16:04 +08:00
|
|
|
CCLayerGradient::[initWithColor=init],
|
2012-11-05 18:45:39 +08:00
|
|
|
CCLayerColor::[initWithColor=init],
|
2012-11-07 03:04:02 +08:00
|
|
|
CCNode::[boundingBox=getBoundingBox removeFromParentAndCleanup=removeFromParent removeAllChildrenWithCleanup=removeAllChildren],
|
2012-11-05 18:45:39 +08:00
|
|
|
CCLabelAtlas::[create=_create],
|
|
|
|
CCTMXLayer::[tileAt=getTileAt tileGIDAt=getTileGIDAt propertyNamed=getProperty],
|
2012-11-02 15:13:12 +08:00
|
|
|
CCTileMapAtlas::[tileAt=getTileAt],
|
2012-11-06 14:19:27 +08:00
|
|
|
CCSprite::[isFlipX=isFlippedX isFlipY=isFlippedY],
|
|
|
|
CCTouch::[getID=getId],
|
issue #1581: JSBinding bug fixes.
Some fixes of JSBinding codes:
[1] Check whether the proxy was already added in JS_NEW_PROXY
[2] In struct schedFunc_proxy_t, JSScheduleWrapper* --> CCArray*
Reason: One js function may correspond to many targets. To debug this, you could refer to JSScheduleWrapper::dump function. It will prove that i'm right. :)
[3] In ScriptingCore::cleanupSchedulesAndActions function, we must invoke unschedule for all targets and remove the proxy both in _schedFunc_target_ht and _schedTarget_native_ht, otherwise the hash tables will grow bigger and bigger, so I added a new function JSScheduleWrapper::removeAllTargetsForNatiaveNode to make this things easier.
[4] To easily find out the bugs of binding codes, I add JS_SetGCZeal in ScriptingCore::createGlobalContext, it only works in DEBUG mode.
[5] In js_cocos2dx_CCNode_getChildren, we should add the generated array to root to avoid gc happen when invoking JS_SetElement.
[6] The JSCallFuncWrapper isn't needed since an action will be run by a cc.Node and it will be released at the CCNode::cleanup.
[7] Some improvements of JSScheduleWrapper class.
[8] Added a new function JSScheduleWrapper::setTarget, it's for js_CCNode_unschedule to find out which target need to be unscheduled.
[9] Commented JS_SetReservedSlot in js_CCNode_scheduleOnce and js_CCNode_schedule.
Reason:
For js_CCNode_scheduleOnce: Don't add the callback function to the reserved slot of this js object.Since the class of js object may be inherited from cocos class(e.g. cc.Sprite). The subclass will not contain reserved slots. It will crash if invoking this.
For js_CCNode_schedule: Don't add js callback function to the reserved slot of scheduler js object. Since the scheduler is an object always rooted.
So the callback function might not be released when gc comes.I looked inside the implementation of cc.Node.schedule, and it doesn't use JS_SetReservedSlot there.
2012-11-28 22:04:55 +08:00
|
|
|
CCScheduler::[unscheduleAllSelectorsForTarget=unscheduleAllCallbacksForTarget unscheduleAll=unscheduleAllCallbacks],
|
2012-11-05 18:45:39 +08:00
|
|
|
SimpleAudioEngine::[sharedEngine=getInstance preloadBackgroundMusic=preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic],
|
2012-10-23 02:08:56 +08:00
|
|
|
CCCamera.*::[setUpXYZ=setUp getUpXYZ=getUp setEyeXYZ=setEye getEyeXYZ=getEye setCenterXYZ=setCenter getCenterXYZ=getCenter],
|
2012-11-07 03:04:02 +08:00
|
|
|
CCBReader::[getAnimationManager=getActionManager setAnimationManager=setActionManager],
|
|
|
|
CCTMXTiledMap::[layerNamed=getLayer objectGroupNamed=getObjectGroup propertyNamed=getProperty],
|
2013-01-15 10:17:01 +08:00
|
|
|
CCTexture2D::[defaultAlphaPixelFormat=getDefaultAlphaPixelFormat]
|
2012-11-07 03:04:02 +08:00
|
|
|
|
2012-10-23 02:08:56 +08:00
|
|
|
rename_classes = CCParticleSystemQuad::CCParticleSystem,
|
|
|
|
SimpleAudioEngine::AudioEngine,
|
|
|
|
CCBReader::CC_Reader,
|
2012-11-22 17:19:15 +08:00
|
|
|
CCBAnimationManager::CCAnimationManager
|
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
|
|
|
|
|
|
|
|
# objects for which there will be no "parent" lookup
|
2012-09-28 04:16:04 +08:00
|
|
|
base_objects = CCNode CCDirector SimpleAudioEngine
|
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
|
2012-09-28 04:16:04 +08:00
|
|
|
abstract_classes = CCDirector CCSpriteFrameCache CCTransitionEaseScene CCSet SimpleAudioEngine
|