mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-01-11 19:21:50 +00:00
chore: generalize IAssetDumper interface
This commit is contained in:
@@ -6,7 +6,12 @@ using namespace IW4;
|
||||
|
||||
namespace shader
|
||||
{
|
||||
void PixelShaderDumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<MaterialPixelShader>& asset)
|
||||
PixelShaderDumperIW4::PixelShaderDumperIW4(const AssetPool<AssetPixelShader::Type>& pool)
|
||||
: AbstractAssetDumper(pool)
|
||||
{
|
||||
}
|
||||
|
||||
void PixelShaderDumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetPixelShader::Type>& asset)
|
||||
{
|
||||
const auto* pixelShader = asset.Asset();
|
||||
const auto shaderFile = context.OpenAssetFile(shader::GetFileNameForPixelShaderAssetName(asset.m_name));
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
|
||||
namespace shader
|
||||
{
|
||||
class PixelShaderDumperIW4 final : public AbstractAssetDumper<IW4::MaterialPixelShader>
|
||||
class PixelShaderDumperIW4 final : public AbstractAssetDumper<IW4::AssetPixelShader>
|
||||
{
|
||||
public:
|
||||
explicit PixelShaderDumperIW4(const AssetPool<IW4::AssetPixelShader::Type>& pool);
|
||||
|
||||
protected:
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::MaterialPixelShader>& asset) override;
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::AssetPixelShader::Type>& asset) override;
|
||||
};
|
||||
} // namespace shader
|
||||
|
||||
@@ -6,7 +6,12 @@ using namespace IW4;
|
||||
|
||||
namespace shader
|
||||
{
|
||||
void VertexShaderDumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<MaterialVertexShader>& asset)
|
||||
VertexShaderDumperIW4::VertexShaderDumperIW4(const AssetPool<AssetVertexShader::Type>& pool)
|
||||
: AbstractAssetDumper(pool)
|
||||
{
|
||||
}
|
||||
|
||||
void VertexShaderDumperIW4::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetVertexShader::Type>& asset)
|
||||
{
|
||||
const auto* vertexShader = asset.Asset();
|
||||
const auto shaderFile = context.OpenAssetFile(shader::GetFileNameForVertexShaderAssetName(asset.m_name));
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
|
||||
namespace shader
|
||||
{
|
||||
class VertexShaderDumperIW4 final : public AbstractAssetDumper<IW4::MaterialVertexShader>
|
||||
class VertexShaderDumperIW4 final : public AbstractAssetDumper<IW4::AssetVertexShader>
|
||||
{
|
||||
public:
|
||||
explicit VertexShaderDumperIW4(const AssetPool<IW4::AssetVertexShader::Type>& pool);
|
||||
|
||||
protected:
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::MaterialVertexShader>& asset) override;
|
||||
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<IW4::AssetVertexShader::Type>& asset) override;
|
||||
};
|
||||
} // namespace shader
|
||||
|
||||
Reference in New Issue
Block a user