mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
40 lines
1.4 KiB
C++
40 lines
1.4 KiB
C++
#include "ObjCompilerIW5.h"
|
|
|
|
#include "Game/IW5/IW5.h"
|
|
#include "Image/ImageIwdPostProcessor.h"
|
|
|
|
#include <memory>
|
|
|
|
using namespace IW5;
|
|
namespace fs = std::filesystem;
|
|
|
|
namespace
|
|
{
|
|
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath)
|
|
{
|
|
auto& memory = *zone.GetMemory();
|
|
|
|
// No compilers yet
|
|
}
|
|
|
|
void ConfigurePostProcessors(
|
|
AssetCreatorCollection& collection, Zone& zone, const ZoneDefinitionContext& zoneDefinition, ISearchPath& searchPath, const fs::path& outDir)
|
|
{
|
|
auto& memory = *zone.GetMemory();
|
|
|
|
if (ImageIwdPostProcessor<AssetImage>::AppliesToZoneDefinition(zoneDefinition))
|
|
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(zoneDefinition, searchPath, outDir));
|
|
}
|
|
} // namespace
|
|
|
|
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
|
Zone& zone,
|
|
const ZoneDefinitionContext& zoneDefinition,
|
|
ISearchPath& searchPath,
|
|
IGdtQueryable& gdt,
|
|
const fs::path& outDir,
|
|
const fs::path& cacheDir) const
|
|
{
|
|
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, outDir);
|
|
}
|