|
| 1 | +[cocos2d-x] |
| 2 | +# the prefix to be added to the generated functions. You might or might not use this in your own |
| 3 | +# templates |
| 4 | +prefix = cocos2dx |
| 5 | + |
| 6 | +# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) |
| 7 | +# all classes will be embedded in that namespace |
| 8 | +target_namespace = cc |
| 9 | + |
| 10 | +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 |
| 11 | +android_flags = -D_SIZE_T_DEFINED_ |
| 12 | + |
| 13 | +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include |
| 14 | +clang_flags = -nostdinc -x c++ -std=c++11 |
| 15 | + |
| 16 | +cocos_headers = -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath/include |
| 17 | +cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT |
| 18 | + |
| 19 | +cxxgenerator_headers = |
| 20 | + |
| 21 | +# extra arguments for clang |
| 22 | +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 |
| 23 | + |
| 24 | +# what headers to parse |
| 25 | +headers = %(cocosdir)s/cocos/2d/cocos2d.h %(cocosdir)s/cocos/audio/include/SimpleAudioEngine.h |
| 26 | + |
| 27 | +# what classes to produce code for. You can use regular expressions here. When testing the regular |
| 28 | +# expression, it will be enclosed in "^$", like this: "^Menu*$". |
| 29 | +classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set SimpleAudioEngine Scheduler Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak TextFieldTTF GLViewProtocol GLView Component __NodeRGBA __LayerRGBA SAXParser |
| 30 | + |
| 31 | + |
| 32 | +classes_need_extend = Node Layer.* Sprite MenuItemFont Scene DrawNode |
| 33 | + |
| 34 | +# what should we skip? in the format ClassName::[function function] |
| 35 | +# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also |
| 36 | +# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just |
| 37 | +# add a single "*" as functions. See bellow for several examples. A special class name is "*", which |
| 38 | +# will apply to all class names. This is a convenience wildcard to be able to skip similar named |
| 39 | +# functions from all classes. |
| 40 | + |
| 41 | +skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserData getGLServerState .*schedule setContentSize setAnchorPoint], |
| 42 | + Sprite::[getQuad getBlendFunc ^setPosition$ setBlendFunc], |
| 43 | + NodeGrid::[setGrid], |
| 44 | + SpriteBatchNode::[getBlendFunc setBlendFunc getDescendants], |
| 45 | + MotionStreak::[getBlendFunc setBlendFunc draw update], |
| 46 | + AtlasNode::[getBlendFunc setBlendFunc], |
| 47 | + ParticleBatchNode::[getBlendFunc setBlendFunc], |
| 48 | + LayerColor::[getBlendFunc setBlendFunc], |
| 49 | + ParticleSystem::[getBlendFunc setBlendFunc], |
| 50 | + DrawNode::[getBlendFunc setBlendFunc drawPolygon listenBackToForeground], |
| 51 | + Director::[getAccelerometer (g|s)et.*Dispatcher getOpenGLView getProjection getFrustum getRenderer getConsole], |
| 52 | + Layer.*::[didAccelerate (g|s)etBlendFunc keyPressed keyReleased], |
| 53 | + Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns], |
| 54 | + MenuItem.*::[create setCallback initWithCallback], |
| 55 | + Copying::[*], |
| 56 | + LabelProtocol::[*], |
| 57 | + LabelTextFormatProtocol::[*], |
| 58 | + Label::[getLettersInfo createWithTTF setTTFConfig getFontAtlas], |
| 59 | + .*Delegate::[*], |
| 60 | + PoolManager::[*], |
| 61 | + Texture2D::[initWithPVRTCData addPVRTCImage releaseData setTexParameters initWithData keepData getPixelFormatInfoMap], |
| 62 | + Set::[begin end acceptVisitor], |
| 63 | + IMEDispatcher::[*], |
| 64 | + Thread::[*], |
| 65 | + Profiler::[*], |
| 66 | + ProfilingTimer::[*], |
| 67 | + CallFunc::[create initWithFunction (g|s)etTargetCallback], |
| 68 | + SAXParser::[(?!(init))], |
| 69 | + SAXDelegator::[*], |
| 70 | + Color3bObject::[*], |
| 71 | + TouchDispatcher::[*], |
| 72 | + EGLTouchDelegate::[*], |
| 73 | + ScriptEngineManager::[*], |
| 74 | + KeypadHandler::[*], |
| 75 | + Invocation::[*], |
| 76 | + GLView::[end swapBuffers], |
| 77 | + GLViewProtocol::[(?!setDesignResolutionSize|getVisibleSize|getVisibleOrigin)], |
| 78 | + SchedulerScriptHandlerEntry::[*], |
| 79 | + Size::[*], |
| 80 | + Point::[*], |
| 81 | + PointArray::[*], |
| 82 | + Rect::[*], |
| 83 | + String::[*], |
| 84 | + Data::[*], |
| 85 | + Dictionary::[*], |
| 86 | + Array::[*], |
| 87 | + Range::[*], |
| 88 | + NotificationObserver::[*], |
| 89 | + Image::[initWithString initWithImageData], |
| 90 | + Sequence::[create], |
| 91 | + Spawn::[create], |
| 92 | + Animation::[create], |
| 93 | + GLProgram::[getProgram setUniformLocationWith2f.* setUniformLocationWith1f.* setUniformLocationWith3f.* setUniformLocationWith4f.*], |
| 94 | + Grid3DAction::[create actionWith.* vertex originalVertex (g|s)etVertex getOriginalVertex], |
| 95 | + Grid3D::[vertex originalVertex (g|s)etVertex getOriginalVertex], |
| 96 | + TiledGrid3DAction::[create actionWith.* tile originalTile getOriginalTile (g|s)etTile], |
| 97 | + TiledGrid3D::[tile originalTile getOriginalTile (g|s)etTile], |
| 98 | + TMXLayer::[getTiles], |
| 99 | + TMXMapInfo::[startElement endElement textHandler], |
| 100 | + ParticleSystemQuad::[postStep setBatchNode draw setTexture$ setTotalParticles updateQuadWithParticle setupIndices listenBackToForeground initWithTotalParticles particleWithFile node], |
| 101 | + LayerMultiplex::[create layerWith.* initWithLayers], |
| 102 | + CatmullRom.*::[create actionWithDuration], |
| 103 | + Bezier.*::[create actionWithDuration], |
| 104 | + CardinalSpline.*::[create actionWithDuration setPoints], |
| 105 | + Scheduler::[pause resume unschedule schedule update isTargetPaused], |
| 106 | + TextureCache::[addPVRTCImage addImageAsync], |
| 107 | + *::[copyWith.* onEnter.* onExit.* ^description$ getObjectType onTouch.* onAcc.* onKey.* onRegisterTouchListener], |
| 108 | + FileUtils::[(g|s)etSearchResolutionsOrder$ (g|s)etSearchPaths$ getFileData getDataFromFile getWritablePath setPopupNotify destroyInstance getFullPathCache], |
| 109 | + Application::[^application.* ^run$], |
| 110 | + Camera::[getEyeXYZ getCenterXYZ getUpXYZ], |
| 111 | + ccFontDefinition::[*], |
| 112 | + NewTextureAtlas::[*], |
| 113 | + RenderTexture::[listenToBackground listenToForeground], |
| 114 | + TextFieldTTF::[(g|s)etDelegate] |
| 115 | + |
| 116 | +rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames getSpriteFrameByName=getSpriteFrame], |
| 117 | + MenuItemFont::[setFontNameObj=setFontName setFontSizeObj=setFontSize getFontSizeObj=getFontSize getFontNameObj=getFontName], |
| 118 | + ProgressTimer::[setReverseProgress=setReverseDirection], |
| 119 | + AnimationCache::[addAnimationsWithFile=addAnimations], |
| 120 | + LayerGradient::[initWithColor=init], |
| 121 | + LayerColor::[initWithColor=init], |
| 122 | + GLProgram::[initWithVertexShaderByteArray=initWithString initWithVertexShaderFilename=init programLog=getProgramLog setUniformLocationWith1i=setUniformLocationI32], |
| 123 | + Node::[removeFromParentAndCleanup=removeFromParent removeAllChildrenWithCleanup=removeAllChildren getLocalZOrder=getZOrder setLocalZOrder=setZOrder], |
| 124 | + LabelAtlas::[create=_create], |
| 125 | + Sprite::[initWithFile=init], |
| 126 | + SpriteBatchNode::[initWithFile=init removeAllChildrenWithCleanup=removeAllChildren], |
| 127 | + Touch::[getID=getId], |
| 128 | + SimpleAudioEngine::[preloadBackgroundMusic=preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic], |
| 129 | + FileUtils::[loadFilenameLookupDictionaryFromFile=loadFilenameLookup] |
| 130 | + |
| 131 | +rename_classes = ParticleSystemQuad::ParticleSystem, |
| 132 | + SimpleAudioEngine::AudioEngine, |
| 133 | + __NodeRGBA::NodeRGBA, |
| 134 | + __LayerRGBA::LayerRGBA |
| 135 | + |
| 136 | +# for all class names, should we remove something when registering in the target VM? |
| 137 | +remove_prefix = |
| 138 | + |
| 139 | +# classes for which there will be no "parent" lookup |
| 140 | +classes_have_no_parents = Node Director SimpleAudioEngine FileUtils TMXMapInfo Application GLViewProtocol SAXParser |
| 141 | + |
| 142 | +# base classes which will be skipped when their sub-classes found them. |
| 143 | +base_classes_to_skip = Ref Clonable |
| 144 | + |
| 145 | +# classes that create no constructor |
| 146 | +# Set is special and we will use a hand-written constructor |
| 147 | +abstract_classes = Action FiniteTimeAction ActionInterval ActionEase EaseRateAction EaseElastic EaseBounce ActionInstant GridAction Grid3DAction TiledGrid3DAction Director SpriteFrameCache TransitionEaseScene Set SimpleAudioEngine FileUtils Application ClippingNode Label GLViewProtocol GLView Component SAXParser |
| 148 | + |
| 149 | +# 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'. |
| 150 | +script_control_cpp = no |
| 151 | + |
0 commit comments