Пример #1
0
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;
}
Пример #2
0
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;
}