mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
chore: initialize KeyValuePairsCompiler for T6 as obj compiler
This commit is contained in:
parent
e92797e0b8
commit
41d97c0954
@ -1,4 +1,4 @@
|
||||
#include "KeyValuePairsCreator.h"
|
||||
#include "KeyValuePairsCompiler.h"
|
||||
|
||||
#include "Game/T6/CommonT6.h"
|
||||
#include "Game/T6/T6.h"
|
||||
@ -8,18 +8,23 @@
|
||||
|
||||
using namespace T6;
|
||||
|
||||
KeyValuePairsCreator::KeyValuePairsCreator(const Zone& zone, const ZoneDefinition& zoneDefinition)
|
||||
KeyValuePairsCompiler::KeyValuePairsCompiler(const Zone& zone, const ZoneDefinition& zoneDefinition)
|
||||
: m_zone(zone),
|
||||
m_zone_definition(zoneDefinition)
|
||||
{
|
||||
}
|
||||
|
||||
AssetCreationResult KeyValuePairsCreator::CreateAsset(const std::string& assetName, AssetCreationContext& context)
|
||||
std::optional<asset_type_t> KeyValuePairsCompiler::GetHandlingAssetType() const
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
AssetCreationResult KeyValuePairsCompiler::CreateAsset(const std::string& assetName, AssetCreationContext& context)
|
||||
{
|
||||
return AssetCreationResult::NoAction();
|
||||
}
|
||||
|
||||
void KeyValuePairsCreator::FinalizeZone(AssetCreationContext& context)
|
||||
void KeyValuePairsCompiler::FinalizeZone(AssetCreationContext& context)
|
||||
{
|
||||
std::vector<KeyValuePair> kvpList;
|
||||
auto& memory = *m_zone.GetMemory();
|
@ -6,11 +6,12 @@
|
||||
|
||||
namespace T6
|
||||
{
|
||||
class KeyValuePairsCreator : public AssetCreator<AssetKeyValuePairs>
|
||||
class KeyValuePairsCompiler final : public IAssetCreator
|
||||
{
|
||||
public:
|
||||
KeyValuePairsCreator(const Zone& zone, const ZoneDefinition& zoneDefinition);
|
||||
KeyValuePairsCompiler(const Zone& zone, const ZoneDefinition& zoneDefinition);
|
||||
|
||||
[[nodiscard]] std::optional<asset_type_t> GetHandlingAssetType() const override;
|
||||
AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override;
|
||||
void FinalizeZone(AssetCreationContext& context) override;
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "Game/T6/T6.h"
|
||||
#include "Image/ImageIPakPostProcessor.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
#include "KeyValuePairs/KeyValuePairsCompiler.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -11,11 +12,11 @@ namespace fs = std::filesystem;
|
||||
|
||||
namespace
|
||||
{
|
||||
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath)
|
||||
void ConfigureCompilers(AssetCreatorCollection& collection, Zone& zone, const ZoneDefinitionContext& zoneDefinition, ISearchPath& searchPath)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
// No compilers yet
|
||||
collection.AddAssetCreator(std::make_unique<KeyValuePairsCompiler>(zone, zoneDefinition.m_zone_definition));
|
||||
}
|
||||
|
||||
void ConfigurePostProcessors(
|
||||
@ -39,5 +40,6 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
const fs::path& outDir,
|
||||
const fs::path& cacheDir) const
|
||||
{
|
||||
ConfigureCompilers(collection, zone, zoneDefinition, searchPath);
|
||||
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, outDir);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user