Some code for cocos2dx