merge from cocos2d-x