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

@ -1620,7 +1620,7 @@ std::string AssetDumperWeapon::GetFileNameForAsset(Zone* zone, XAssetInfo<Weapon
return "weapons/" + asset->m_name;
}
void AssetDumperWeapon::DumpAsset(Zone* zone, XAssetInfo<WeaponVariantDef>* asset, FileAPI::File* out)
void AssetDumperWeapon::DumpAsset(Zone* zone, XAssetInfo<WeaponVariantDef>* asset, std::ostream& stream)
{
auto* fullDef = new WeaponFullDef;
memset(fullDef, 0, sizeof WeaponFullDef);
@ -1637,7 +1637,7 @@ void AssetDumperWeapon::DumpAsset(Zone* zone, XAssetInfo<WeaponVariantDef>* asse
const auto infoString = converter.Convert();
const auto stringValue = infoString.ToString("WEAPONFILE");
out->Write(stringValue.c_str(), 1, stringValue.length());
stream.write(stringValue.c_str(), stringValue.size());
delete fullDef;
}