axmol/tools/tolua++
minggo 022e2b9998 issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
..
CCAccelerometer.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAccelerometerDelegate.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAction.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionCamera.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionEase.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionGrid.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionGrid3D.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionInstant.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCActionInterval.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionManager.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionPageTurn3D.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionProgressTimer.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCActionTiledGrid.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAffineTransform.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAnimation.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAnimationCache.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCApplication.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCArray.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAtlasNode.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCAutoreleasePool.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCCamera.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCCommon.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCData.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCDirector.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCDrawingPrimitives.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCEGLView.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCGL.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCGeometry.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCIMEDelegate.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCIMEDispatcher.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCKeypadDelegate.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCKeypadDispatcher.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCLabelAtlas.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCLabelBMFont.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCLabelTTF.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCLayer.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCMenu.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCMenuItem.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCMotionStreak.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCMutableArray.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCMutableDictionary.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCNode.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCObject.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCParallaxNode.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCPointExtension.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCProgressTimer.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCProtocols.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCRenderTexture.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCRibbon.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCScene.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCScheduler.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCSet.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCSprite.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCSpriteBatchNode.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCSpriteFrame.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCSpriteFrameCache.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCSpriteSheet.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCString.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTMXLayer.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTMXObjectGroup.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTMXTiledMap.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTMXXMLParser.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTextFieldTTF.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTexture2D.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTextureAtlas.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTextureCache.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTileMapAtlas.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTouch.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTouchDelegateProtocol.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCTouchDispatcher.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00
CCTransition.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTransitionPageTurn.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCTransitionRadial.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
CCUserDefault.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
Cocos2d.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
README add extensions & tools directory 2011-06-14 14:31:25 +08:00
ccConfig.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
ccTypes.pkg add extensions & tools directory 2011-06-14 14:31:25 +08:00
selector_protocol.pkg issue #528: refactor ok on win32 2011-06-20 17:31:38 +08:00

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