CCTMXMapInfo * CCTMXMapInfo::formatWithXML(const char* tmxString, const char* resourcePath) { CCTMXMapInfo *pRet = new CCTMXMapInfo(); if(pRet->initWithXML(tmxString, resourcePath)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCTMXMapInfo * CCTMXMapInfo::formatWithTMXFile(const char *tmxFile) { CCTMXMapInfo *pRet = new CCTMXMapInfo(); if(pRet->initWithTMXFile(tmxFile)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }