CCTexture2D * CCTextureCache::addPVRTCImage(const char* fileimage) { CCAssert(fileimage != NULL, "TextureCache: fileimage MUST not be nill"); CCTexture2D * texture; std::string key(fileimage); if( (texture = m_pTextures->objectForKey(key)) ) { return texture; } texture = new CCTexture2D(); texture = texture->initWithPVRTCFile(fileimage); if( texture ) { m_pTextures-> setObject( texture, key); texture->autorelease(); } else { CCLOG("cocos2d: Couldn't add PVRTCImage:%s in CCTextureCache",fileimage); } return texture; }