Fixing some stuff

This commit is contained in:
Dynamitos
2024-07-19 10:42:59 +02:00
parent 3b6eb3ebcc
commit 819b541ff2
14 changed files with 225 additions and 238 deletions
+1 -9
View File
@@ -72,15 +72,7 @@ void FontLoader::import(FontImportArgs args, PFontAsset asset) {
FT_Done_FreeType(ft);
asset->setUsedTextures(std::move(usedTextures));
auto stream = AssetRegistry::createWriteStream(
(std::filesystem::path(asset->getFolderPath()) / asset->getName()).replace_extension("asset").string(), std::ios::binary);
ArchiveBuffer archive;
Serialization::save(archive, FontAsset::IDENTIFIER);
Serialization::save(archive, asset->getName());
Serialization::save(archive, asset->getFolderPath());
asset->save(archive);
archive.writeToStream(stream);
AssetRegistry::saveAsset(asset, FontAsset::IDENTIFIER, asset->getFolderPath(), asset->getName());
asset->setStatus(Asset::Status::Ready);
}