[ZoneBuilder] Only mark assets once to speed up link step

This commit is contained in:
TheApadayo 2016-12-23 13:00:14 -05:00
parent 9945d15b90
commit 59196903de
2 changed files with 9 additions and 1 deletions

View File

@ -283,7 +283,15 @@ namespace Components
asset.header.data = ptr;
asset.type = type;
const auto& cmp = asset.header.data;
if(std::find_if(this->markedAssets.begin(), this->markedAssets.end(), [&cmp] (const Game::XAsset& s) { return cmp == s.header.data; } ) != this->markedAssets.end())
{
return; // don't re-mark assets
}
AssetHandler::ZoneMark(asset, this);
this->markedAssets.push_back(asset);
}
void ZoneBuilder::Zone::writeZone()

View File

@ -75,11 +75,11 @@ namespace Components
std::vector<Game::XAsset> loadedAssets;
std::vector<Game::XAssetHeader> savedAssets;
std::vector<Game::XAsset> markedAssets;
std::vector<std::string> scriptStrings;
std::map<unsigned short, unsigned int> scriptStringMap;
std::map<std::string, std::string> renameMap[Game::XAssetType::ASSET_TYPE_COUNT];
std::map<const void*, uint32_t> pointerMap;
std::vector<uint32_t> aliasBaseStack;
std::map<const void*, uint32_t> aliasMap;
Game::RawFile branding;