merge cocos2d code