mirror of https://github.com/axmolengine/axmol.git
022e2b9998 | ||
---|---|---|
.. | ||
CCAccelerometer.pkg | ||
CCAccelerometerDelegate.pkg | ||
CCAction.pkg | ||
CCActionCamera.pkg | ||
CCActionEase.pkg | ||
CCActionGrid.pkg | ||
CCActionGrid3D.pkg | ||
CCActionInstant.pkg | ||
CCActionInterval.pkg | ||
CCActionManager.pkg | ||
CCActionPageTurn3D.pkg | ||
CCActionProgressTimer.pkg | ||
CCActionTiledGrid.pkg | ||
CCAffineTransform.pkg | ||
CCAnimation.pkg | ||
CCAnimationCache.pkg | ||
CCApplication.pkg | ||
CCArray.pkg | ||
CCAtlasNode.pkg | ||
CCAutoreleasePool.pkg | ||
CCCamera.pkg | ||
CCCommon.pkg | ||
CCData.pkg | ||
CCDirector.pkg | ||
CCDrawingPrimitives.pkg | ||
CCEGLView.pkg | ||
CCGL.pkg | ||
CCGeometry.pkg | ||
CCIMEDelegate.pkg | ||
CCIMEDispatcher.pkg | ||
CCKeypadDelegate.pkg | ||
CCKeypadDispatcher.pkg | ||
CCLabelAtlas.pkg | ||
CCLabelBMFont.pkg | ||
CCLabelTTF.pkg | ||
CCLayer.pkg | ||
CCMenu.pkg | ||
CCMenuItem.pkg | ||
CCMotionStreak.pkg | ||
CCMutableArray.pkg | ||
CCMutableDictionary.pkg | ||
CCNode.pkg | ||
CCObject.pkg | ||
CCParallaxNode.pkg | ||
CCPointExtension.pkg | ||
CCProgressTimer.pkg | ||
CCProtocols.pkg | ||
CCRenderTexture.pkg | ||
CCRibbon.pkg | ||
CCScene.pkg | ||
CCScheduler.pkg | ||
CCSet.pkg | ||
CCSprite.pkg | ||
CCSpriteBatchNode.pkg | ||
CCSpriteFrame.pkg | ||
CCSpriteFrameCache.pkg | ||
CCSpriteSheet.pkg | ||
CCString.pkg | ||
CCTMXLayer.pkg | ||
CCTMXObjectGroup.pkg | ||
CCTMXTiledMap.pkg | ||
CCTMXXMLParser.pkg | ||
CCTextFieldTTF.pkg | ||
CCTexture2D.pkg | ||
CCTextureAtlas.pkg | ||
CCTextureCache.pkg | ||
CCTileMapAtlas.pkg | ||
CCTouch.pkg | ||
CCTouchDelegateProtocol.pkg | ||
CCTouchDispatcher.pkg | ||
CCTransition.pkg | ||
CCTransitionPageTurn.pkg | ||
CCTransitionRadial.pkg | ||
CCUserDefault.pkg | ||
Cocos2d.pkg | ||
README | ||
ccConfig.pkg | ||
ccTypes.pkg | ||
selector_protocol.pkg |
README
1. The usage of tolua++ You can use the command to generate the LuaCocos2d.cpp: tolua++.exe -tCocos2d -o LuaCocos2d.cpp Cocos2d.pkg 2. Modify the generated file After you run the command, the generated file under the directory the same as tolua++.exe. cocos2dx/lua_support/LuaCocos2d.cpp is generate by this way. But here are some differents between them, because tolua++.exe generates some error codes about the template. The errors are: ------------------------------------------------------------------------------------------- genereated code | correct code | ------------------------------------------------------------------------------------------- CCMutableArray<cocos2d::CCSpriteFrame*> | cocos2d::CCMutableArray<CCSpriteFrame*> | ------------------------------------------------------------------------------------------- CCMutableArray<cocos2d::CCFiniteTimeAction*> | cocos2d::CCMutableArray<CCFiniteTimeAction*>| -------------------------------------------------------------------------------------------- CCMutableArray<cocos2d::CCObject*> | cocos2d::CCMutableArray<CCObject*> | -------------------------------------------------------------------------------------------- 3. The regular to write .pkg 1) enum keeps the same 2) remove CC_DLL for the class defines, pay attention to multi inherites 3) remove inline keyword for declaration and implementation 4) remove public protect and private 5) remove the decalration of class member variable 6) keep static keyword 7) remove memeber functions that declared as private or protected