chore: move AddAsset function shortcuts to interface

This commit is contained in:
Jan
2024-04-22 18:52:13 +02:00
parent 7ddba36dcd
commit 04b80b5208
5 changed files with 35 additions and 85 deletions

View File

@ -20,26 +20,6 @@ XAssetInfoGeneric* MockAssetLoadingManager::AddAsset(std::unique_ptr<XAssetInfoG
return assetInfoPtr;
}
XAssetInfoGeneric* MockAssetLoadingManager::AddAsset(const asset_type_t assetType,
const std::string& assetName,
void* asset,
std::vector<XAssetInfoGeneric*> dependencies,
std::vector<scr_string_t> usedScriptStrings)
{
return AddAsset(std::make_unique<XAssetInfoGeneric>(assetType, assetName, asset, std::move(dependencies), std::move(usedScriptStrings)));
}
XAssetInfoGeneric* MockAssetLoadingManager::AddAsset(asset_type_t assetType,
const std::string& assetName,
void* asset,
std::vector<XAssetInfoGeneric*> dependencies,
std::vector<scr_string_t> usedScriptStrings,
std::vector<IndirectAssetReference> indirectAssetReferences)
{
return AddAsset(std::make_unique<XAssetInfoGeneric>(
assetType, assetName, asset, std::move(dependencies), std::move(usedScriptStrings), std::move(indirectAssetReferences)));
}
XAssetInfoGeneric* MockAssetLoadingManager::LoadDependency(const asset_type_t assetType, const std::string& assetName)
{
auto foundDependencies = m_available_dependencies.find(assetName);