mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-16 17:57:57 -05:00
Replace FileAPI with c++ streams and std::filesystem
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user