mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-01 08:41:52 +00:00
feat: add post processors compiling iwds and ipaks
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
#include "ZoneCreationContext.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
ZoneCreationContext::ZoneCreationContext()
|
||||
: m_definition(nullptr),
|
||||
m_asset_search_path(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
ZoneCreationContext::ZoneCreationContext(ZoneDefinition* definition, ISearchPath* assetSearchPath)
|
||||
ZoneCreationContext::ZoneCreationContext(ZoneDefinition* definition, ISearchPath* assetSearchPath, fs::path outDir, fs::path cacheDir)
|
||||
: m_definition(definition),
|
||||
m_asset_search_path(assetSearchPath)
|
||||
m_asset_search_path(assetSearchPath),
|
||||
m_out_dir(std::move(outDir)),
|
||||
m_cache_dir(std::move(cacheDir))
|
||||
{
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "Zone/AssetList/AssetList.h"
|
||||
#include "Zone/Definition/ZoneDefinition.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
@ -12,9 +13,11 @@ class ZoneCreationContext
|
||||
public:
|
||||
ZoneDefinition* m_definition;
|
||||
ISearchPath* m_asset_search_path;
|
||||
std::filesystem::path m_out_dir;
|
||||
std::filesystem::path m_cache_dir;
|
||||
std::vector<std::unique_ptr<Gdt>> m_gdt_files;
|
||||
AssetList m_ignored_assets;
|
||||
|
||||
ZoneCreationContext();
|
||||
ZoneCreationContext(ZoneDefinition* definition, ISearchPath* assetSearchPath);
|
||||
ZoneCreationContext(ZoneDefinition* definition, ISearchPath* assetSearchPath, std::filesystem::path outDir, std::filesystem::path cacheDir);
|
||||
};
|
||||
|
@ -64,7 +64,8 @@ namespace zone_creator
|
||||
const auto* objLoader = IObjLoader::GetObjLoaderForGame(gameId);
|
||||
|
||||
AssetCreatorCollection creatorCollection(*zone);
|
||||
objCompiler->ConfigureCreatorCollection(creatorCollection, *zone, *context.m_definition);
|
||||
objCompiler->ConfigureCreatorCollection(
|
||||
creatorCollection, *zone, *context.m_definition, *context.m_asset_search_path, lookup, context.m_out_dir, context.m_cache_dir);
|
||||
objLoader->ConfigureCreatorCollection(creatorCollection, *zone, *context.m_asset_search_path, lookup);
|
||||
|
||||
AssetCreationContext creationContext(zone.get(), &creatorCollection, &ignoredAssetLookup);
|
||||
|
Reference in New Issue
Block a user