2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-02-10 17:43:03 +00:00

feat: add post processors compiling iwds and ipaks

This commit is contained in:
Jan
2025-01-02 12:48:57 +01:00
parent b5937ef975
commit a7254aa11c
26 changed files with 480 additions and 34 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include "Asset/IAssetPostProcessor.h"
#include <filesystem>
class AbstractImageIPakPostProcessor : public IAssetPostProcessor
{
public:
AbstractImageIPakPostProcessor(ISearchPath& searchPath, const std::filesystem::path& outDir);
void PostProcessAsset(XAssetInfoGeneric& assetInfo, AssetCreationContext& context) override;
void FinalizeZone(AssetCreationContext& context) override;
private:
ISearchPath& m_search_path;
const std::filesystem::path& m_out_dir;
};
template<typename AssetType> class ImageIPakPostProcessor final : public AbstractImageIPakPostProcessor
{
public:
static_assert(std::is_base_of_v<IAssetBase, AssetType>);
ImageIPakPostProcessor(ISearchPath& searchPath, const std::filesystem::path& outDir)
: AbstractImageIPakPostProcessor(searchPath, outDir)
{
}
[[nodiscard]] asset_type_t GetHandlingAssetType() const override
{
return AssetType::EnumEntry;
};
};