void GAFAsset::getResourceReferencesFromBundle(const std::string& zipfilePath, const std::string& entryFile, std::vector<GAFResourcesInfo*>& dest) { GAFAsset * asset = new GAFAsset(); asset->m_state = State::DryRun; if (asset && asset->initWithGAFBundle(zipfilePath, entryFile, nullptr)) { asset->parseReferences(dest); } CC_SAFE_RELEASE(asset); return; }
GAFAsset* GAFAsset::createWithBundle(const std::string& zipfilePath, const std::string& entryFile, GAFTextureLoadDelegate_t delegate, GAFLoader* customLoader /*= nullptr*/) { GAFAsset * ret = new GAFAsset(); if (ret && ret->initWithGAFBundle(zipfilePath, entryFile, delegate, customLoader)) { ret->autorelease(); return ret; } CC_SAFE_RELEASE(ret); return nullptr; }