sync with cocos2d-x