mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-16 09:48:00 -05:00
Make AbstractAssetDumper use the XAssetInfo instead of the raw asset pointer to be able to access dependencies and scriptstrings
This commit is contained in:
@ -31,17 +31,19 @@ AssetDumperGfxImage::~AssetDumperGfxImage()
|
||||
m_writer = nullptr;
|
||||
}
|
||||
|
||||
bool AssetDumperGfxImage::ShouldDump(GfxImage* asset)
|
||||
bool AssetDumperGfxImage::ShouldDump(XAssetInfo<GfxImage>* asset)
|
||||
{
|
||||
return asset->loadedSize > 0;
|
||||
const auto* image = asset->Asset();
|
||||
return image->loadedSize > 0;
|
||||
}
|
||||
|
||||
std::string AssetDumperGfxImage::GetFileNameForAsset(Zone* zone, GfxImage* asset)
|
||||
std::string AssetDumperGfxImage::GetFileNameForAsset(Zone* zone, XAssetInfo<GfxImage>* asset)
|
||||
{
|
||||
return "images/" + std::string(asset->name) + m_writer->GetFileExtension();
|
||||
return "images/" + asset->m_name + m_writer->GetFileExtension();
|
||||
}
|
||||
|
||||
void AssetDumperGfxImage::DumpAsset(Zone* zone, GfxImage* asset, FileAPI::File* out)
|
||||
void AssetDumperGfxImage::DumpAsset(Zone* zone, XAssetInfo<GfxImage>* asset, FileAPI::File* out)
|
||||
{
|
||||
m_writer->DumpImage(out, asset->texture.texture);
|
||||
const auto* image = asset->Asset();
|
||||
m_writer->DumpImage(out, image->texture.texture);
|
||||
}
|
||||
|
Reference in New Issue
Block a user