mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Make asset dumpers not provide different implementations for dumping to gdt and raw so any dumper can decide itself how many raw files and gdt entries it wants to make use of
This commit is contained in:
@ -7,18 +7,14 @@ bool AssetDumperRawFile::ShouldDump(XAssetInfo<RawFile>* asset)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AssetDumperRawFile::CanDumpAsRaw()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string AssetDumperRawFile::GetFileNameForAsset(Zone* zone, XAssetInfo<RawFile>* asset)
|
||||
{
|
||||
return asset->m_name;
|
||||
}
|
||||
|
||||
void AssetDumperRawFile::DumpRaw(AssetDumpingContext& context, XAssetInfo<RawFile>* asset, std::ostream& stream)
|
||||
void AssetDumperRawFile::DumpAsset(AssetDumpingContext& context, XAssetInfo<RawFile>* asset)
|
||||
{
|
||||
const auto* rawFile = asset->Asset();
|
||||
const auto assetFile = context.OpenAssetFile(asset->m_name);
|
||||
|
||||
if (!assetFile)
|
||||
return;
|
||||
|
||||
auto& stream = *assetFile;
|
||||
stream.write(rawFile->buffer, rawFile->len);
|
||||
}
|
Reference in New Issue
Block a user