CCTextureAtlas * CCTextureAtlas::textureAtlasWithFile(const char* file, unsigned int capacity) { CCTextureAtlas * pTextureAtlas = new CCTextureAtlas(); if(pTextureAtlas && pTextureAtlas->initWithFile(file, capacity)) { pTextureAtlas->autorelease(); return pTextureAtlas; } CC_SAFE_DELETE(pTextureAtlas); return NULL; }
CCTextureAtlas* CCTextureAtlas::create ( const KDchar* szFilePath, KDuint uCapacity ) { CCTextureAtlas* pRet = new CCTextureAtlas ( ); if ( pRet && pRet->initWithFile ( szFilePath, uCapacity ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }