mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-16 17:57:57 -05:00
chore: update usages of AddAsset for template asset struct api
This commit is contained in:
@ -127,7 +127,7 @@ bool AssetLoaderGfxImage::LoadFromRaw(
|
||||
}
|
||||
}
|
||||
|
||||
manager->AddAsset(ASSET_TYPE_IMAGE, assetName, image);
|
||||
manager->AddAsset<AssetImage>(assetName, image);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ bool AssetLoaderLocalizeEntry::LoadFromRaw(
|
||||
localizeEntry->name = memory->Dup(entry.m_key.c_str());
|
||||
localizeEntry->value = memory->Dup(entry.m_value.c_str());
|
||||
|
||||
manager->AddAsset(ASSET_TYPE_LOCALIZE_ENTRY, entry.m_key, localizeEntry);
|
||||
manager->AddAsset<AssetLocalize>(entry.m_key, localizeEntry);
|
||||
});
|
||||
|
||||
return commonLoader.LoadLocalizeAsset(assetName, searchPath, manager, zone);
|
||||
|
@ -38,7 +38,7 @@ bool AssetLoaderRawFile::LoadFromRaw(
|
||||
fileBuffer[rawFile->len] = '\0';
|
||||
|
||||
rawFile->buffer = fileBuffer;
|
||||
manager->AddAsset(ASSET_TYPE_RAWFILE, assetName, rawFile);
|
||||
manager->AddAsset<AssetRawFile>(assetName, rawFile);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ bool AssetLoaderStringTable::LoadFromRaw(
|
||||
string_table::StringTableLoaderV1<StringTable> loader;
|
||||
auto* stringTable = loader.LoadFromStream(assetName, *memory, *file.m_stream);
|
||||
|
||||
manager->AddAsset(ASSET_TYPE_STRINGTABLE, assetName, stringTable);
|
||||
manager->AddAsset<AssetStringTable>(assetName, stringTable);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user