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

@ -183,7 +183,7 @@ std::string AssetDumperZBarrier::GetFileNameForAsset(Zone* zone, XAssetInfo<ZBar
return "zbarrier/" + asset->m_name;
}
void AssetDumperZBarrier::DumpAsset(Zone* zone, XAssetInfo<ZBarrierDef>* asset, FileAPI::File* out)
void AssetDumperZBarrier::DumpAsset(Zone* zone, XAssetInfo<ZBarrierDef>* asset, std::ostream& stream)
{
InfoStringFromZBarrierConverter converter(asset->Asset(), zbarrier_fields, _countof(zbarrier_fields), [asset](const scr_string_t scrStr) -> std::string
{
@ -196,7 +196,7 @@ void AssetDumperZBarrier::DumpAsset(Zone* zone, XAssetInfo<ZBarrierDef>* asset,
const auto infoString = converter.Convert();
const auto stringValue = infoString.ToString("ZBARRIER");
out->Write(stringValue.c_str(), 1, stringValue.length());
stream.write(stringValue.c_str(), stringValue.size());
}
//void AssetDumperZBarrier::CheckFields()