mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-06 19:21:52 +00:00
feat: add post processors compiling iwds and ipaks
This commit is contained in:
@ -1,5 +1,37 @@
|
||||
#include "ObjCompilerIW3.h"
|
||||
|
||||
using namespace IW3;
|
||||
#include "Game/IW3/IW3.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const {}
|
||||
#include <memory>
|
||||
|
||||
using namespace IW3;
|
||||
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, ISearchPath& searchPath, const fs::path& outDir)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(searchPath, outDir));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigurePostProcessors(collection, zone, searchPath, outDir);
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ namespace IW3
|
||||
class ObjCompiler final : public IObjCompiler
|
||||
{
|
||||
public:
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const override;
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const std::filesystem::path& outDir,
|
||||
const std::filesystem::path& cacheDir) const override;
|
||||
};
|
||||
} // namespace IW3
|
||||
|
@ -1,5 +1,37 @@
|
||||
#include "ObjCompilerIW4.h"
|
||||
|
||||
using namespace IW4;
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const {}
|
||||
#include <memory>
|
||||
|
||||
using namespace IW4;
|
||||
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, ISearchPath& searchPath, const fs::path& outDir)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(searchPath, outDir));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigurePostProcessors(collection, zone, searchPath, outDir);
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ namespace IW4
|
||||
class ObjCompiler final : public IObjCompiler
|
||||
{
|
||||
public:
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const override;
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const std::filesystem::path& outDir,
|
||||
const std::filesystem::path& cacheDir) const override;
|
||||
};
|
||||
} // namespace IW4
|
||||
|
@ -1,5 +1,37 @@
|
||||
#include "ObjCompilerIW5.h"
|
||||
|
||||
using namespace IW5;
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const {}
|
||||
#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, ISearchPath& searchPath, const fs::path& outDir)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(searchPath, outDir));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigurePostProcessors(collection, zone, searchPath, outDir);
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ namespace IW5
|
||||
class ObjCompiler final : public IObjCompiler
|
||||
{
|
||||
public:
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const override;
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const std::filesystem::path& outDir,
|
||||
const std::filesystem::path& cacheDir) const override;
|
||||
};
|
||||
} // namespace IW5
|
||||
|
@ -1,5 +1,37 @@
|
||||
#include "ObjCompilerT5.h"
|
||||
|
||||
using namespace T5;
|
||||
#include "Game/T5/T5.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const {}
|
||||
#include <memory>
|
||||
|
||||
using namespace T5;
|
||||
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, ISearchPath& searchPath, const fs::path& outDir)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(searchPath, outDir));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigurePostProcessors(collection, zone, searchPath, outDir);
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ namespace T5
|
||||
class ObjCompiler final : public IObjCompiler
|
||||
{
|
||||
public:
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const override;
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const std::filesystem::path& outDir,
|
||||
const std::filesystem::path& cacheDir) const override;
|
||||
};
|
||||
} // namespace T5
|
||||
|
@ -1,7 +1,37 @@
|
||||
#include "ObjCompilerT6.h"
|
||||
|
||||
#include "Game/T6/T6.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace T6;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const {}
|
||||
namespace
|
||||
{
|
||||
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
// No compilers yet
|
||||
}
|
||||
|
||||
void ConfigurePostProcessors(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, const fs::path& outDir)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
collection.AddAssetPostProcessor(std::make_unique<ImageIwdPostProcessor<AssetImage>>(searchPath, outDir));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigurePostProcessors(collection, zone, searchPath, outDir);
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ namespace T6
|
||||
class ObjCompiler final : public IObjCompiler
|
||||
{
|
||||
public:
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinition& zoneDefinition) const override;
|
||||
void ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
Zone& zone,
|
||||
const ZoneDefinition& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
IGdtQueryable& gdt,
|
||||
const std::filesystem::path& outDir,
|
||||
const std::filesystem::path& cacheDir) const override;
|
||||
};
|
||||
} // namespace T6
|
||||
|
Reference in New Issue
Block a user