CCAtlasNode * CCAtlasNode::atlasWithTileFile(const char *tile, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender) { CCAtlasNode * pRet = new CCAtlasNode(); if (pRet->initWithTileFile(tile, tileWidth, tileHeight, itemsToRender)) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CCAtlasNode* CCAtlasNode::create ( const KDchar* szFilePath, KDuint uTileWidth, KDuint uTileHeight, KDuint uItemsToRender ) { CCAtlasNode* pRet = new CCAtlasNode ( ); if ( pRet && pRet->initWithTileFile ( szFilePath, uTileWidth, uTileHeight, uItemsToRender ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }