mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 16:45:44 +00:00
40 lines
967 B
C++
40 lines
967 B
C++
#pragma once
|
|
|
|
#include "Asset/IZoneAssetCreationState.h"
|
|
#include "KeyValuePairs/KeyValuePairsCreator.h"
|
|
#include "SearchPath/ISearchPath.h"
|
|
|
|
#include <filesystem>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
class IPakToCreate
|
|
{
|
|
public:
|
|
explicit IPakToCreate(std::string name);
|
|
|
|
void AddImage(std::string imageName);
|
|
void Build(ISearchPath& searchPath, const std::filesystem::path& outPath);
|
|
|
|
private:
|
|
std::string m_name;
|
|
std::vector<std::string> m_image_names;
|
|
};
|
|
|
|
class IPakCreator : public IZoneAssetCreationState
|
|
{
|
|
public:
|
|
IPakCreator();
|
|
|
|
void Inject(ZoneAssetCreationInjection& inject) override;
|
|
|
|
IPakToCreate* GetOrAddIPak(const std::string& ipakName);
|
|
void Finalize(ISearchPath& searchPath, const std::filesystem::path& outPath);
|
|
|
|
private:
|
|
KeyValuePairsCreator* m_kvp_creator;
|
|
std::unordered_map<std::string, IPakToCreate*> m_ipak_lookup;
|
|
std::vector<std::unique_ptr<IPakToCreate>> m_ipaks;
|
|
};
|