mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 23:38:09 -05:00
feat: add post processors compiling iwds and ipaks
This commit is contained in:
17
src/ObjCompiling/Iwd/IwdCreator.cpp
Normal file
17
src/ObjCompiling/Iwd/IwdCreator.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "IwdCreator.h"
|
||||
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
void IwdCreator::AddFile(std::string filePath)
|
||||
{
|
||||
m_file_paths.emplace_back(std::move(filePath));
|
||||
}
|
||||
|
||||
void IwdCreator::Finalize(ISearchPath& searchPath, const std::filesystem::path& outPath)
|
||||
{
|
||||
std::cout << std::format("Creating iwd with {} entries:\n", m_file_paths.size());
|
||||
|
||||
for (const auto& filePath : m_file_paths)
|
||||
std::cout << std::format(" {}\n", filePath);
|
||||
}
|
16
src/ObjCompiling/Iwd/IwdCreator.h
Normal file
16
src/ObjCompiling/Iwd/IwdCreator.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/IZoneAssetLoaderState.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
class IwdCreator : public IZoneAssetLoaderState
|
||||
{
|
||||
public:
|
||||
void AddFile(std::string filePath);
|
||||
void Finalize(ISearchPath& searchPath, const std::filesystem::path& outPath);
|
||||
|
||||
private:
|
||||
std::vector<std::string> m_file_paths;
|
||||
};
|
Reference in New Issue
Block a user