CCGridBase* CCGridBase::create(const ccGridSize& gridSize) { CCGridBase *pGridBase = new CCGridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }
CCGridBase* CCGridBase::create(const CCSize& gridSize, CAImage* texture, bool flipped) { CCGridBase *pGridBase = new CCGridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize, texture, flipped)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }
CCGridBase* CCGridBase::gridWithSize(ccGridSize gridSize, CCTexture2D *texture, bool flipped) { CCGridBase *pGridBase = new CCGridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize, texture, flipped)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }
NS_CC_BEGIN // implementation of CCGridBase CCGridBase* CCGridBase::create(const CCSize& gridSize) { CCGridBase *pGridBase = new CCGridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }