ported to cocos2d-x platform