2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-04 18:21:49 +00:00

Replace FileAPI with c++ streams and std::filesystem

This commit is contained in:
Jan
2021-03-03 14:04:35 +01:00
parent b6b0a57232
commit 1cd06668e0
96 changed files with 1355 additions and 1061 deletions

View File

@ -86,7 +86,7 @@ std::string AssetDumperPhysPreset::GetFileNameForAsset(Zone* zone, XAssetInfo<Ph
return "physic/" + asset->m_name;
}
void AssetDumperPhysPreset::DumpAsset(Zone* zone, XAssetInfo<PhysPreset>* asset, FileAPI::File* out)
void AssetDumperPhysPreset::DumpAsset(Zone* zone, XAssetInfo<PhysPreset>* asset, std::ostream& stream)
{
auto* physPresetInfo = new PhysPresetInfo;
CopyToPhysPresetInfo(asset->Asset(), physPresetInfo);
@ -102,7 +102,7 @@ void AssetDumperPhysPreset::DumpAsset(Zone* zone, XAssetInfo<PhysPreset>* asset,
const auto infoString = converter.Convert();
const auto stringValue = infoString.ToString("PHYSIC");
out->Write(stringValue.c_str(), 1, stringValue.length());
stream.write(stringValue.c_str(), stringValue.size());
delete physPresetInfo;
}