[ZoneBuilder] Remove marking function, loading does that

This commit is contained in:
momo5502 2016-12-23 22:58:41 +01:00
parent 39f9c73a38
commit a1e2a1e790
3 changed files with 1 additions and 14 deletions

View File

@ -61,7 +61,7 @@ namespace Assets
case 0xA:
{
//builder->markAsset(Game::XAssetType::ASSET_TYPE_SOUND, visuals->soundName);
builder->loadAsset(Game::XAssetType::ASSET_TYPE_SOUND, visuals->soundName);
break;
}

View File

@ -293,18 +293,6 @@ namespace Components
return header;
}
void ZoneBuilder::Zone::markAsset(Game::XAssetType type, void* ptr)
{
Game::XAsset asset { type, { ptr } };
if(std::find_if(this->markedAssets.begin(), this->markedAssets.end(), [&] (const Game::XAsset& s) { return (asset.header.data == s.header.data && asset.type == s.type); } ) != this->markedAssets.end())
{
return; // don't re-mark assets
}
AssetHandler::ZoneMark(asset, this);
this->markedAssets.push_back(asset);
}
void ZoneBuilder::Zone::writeZone()
{
FILETIME fileTime;

View File

@ -33,7 +33,6 @@ namespace Components
Game::XAssetHeader saveSubAsset(Game::XAssetType type, void* ptr);
bool loadAsset(Game::XAssetType type, std::string name, bool isSubAsset = true);
bool loadAsset(Game::XAssetType type, void* data, bool isSubAsset = true);
void markAsset(Game::XAssetType type, void* ptr);
int addScriptString(unsigned short gameIndex);
int addScriptString(std::string str);