Esempio n. 1
0
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;
}
Esempio n. 2
0
CCTMXMapInfo * CCTMXMapInfo::formatWithTMXFile(const char *tmxFile)
{
    CCTMXMapInfo *pRet = new CCTMXMapInfo();
    if(pRet->initWithTMXFile(tmxFile))
    {
        pRet->autorelease();
        return pRet;
    }
    CC_SAFE_DELETE(pRet);
    return NULL;
}