2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-11 03:01:49 +00:00

chore: generalize IAssetDumper interface

This commit is contained in:
Jan Laupetin
2025-10-15 20:06:01 +01:00
parent c6e9cbedda
commit 6a84d1ea68
152 changed files with 1051 additions and 586 deletions

View File

@@ -10,7 +10,12 @@ using namespace IW4;
namespace phys_collmap
{
void DumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<PhysCollmap>& asset)
DumperIW4::DumperIW4(const AssetPool<AssetPhysCollMap::Type>& pool)
: AbstractAssetDumper(pool)
{
}
void DumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetPhysCollMap::Type>& asset)
{
const auto* physCollmap = asset.Asset();
const auto assetFile = context.OpenAssetFile(phys_collmap::GetFileNameForAssetName(asset.m_name));

View File

@@ -5,9 +5,12 @@
namespace phys_collmap
{
class DumperIW4 final : public AbstractAssetDumper<IW4::PhysCollmap>
class DumperIW4 final : public AbstractAssetDumper<IW4::AssetPhysCollMap>
{
public:
explicit DumperIW4(const AssetPool<IW4::AssetPhysCollMap::Type>& pool);
protected:
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::PhysCollmap>& asset) override;
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::AssetPhysCollMap::Type>& asset) override;
};
} // namespace phys_collmap