mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-09 10:07:28 +00:00
chore: refactor IW4 asset loaders
This commit is contained in:
30
src/ObjLoading/Game/IW4/Techset/LoaderTechsetIW4.h
Normal file
30
src/ObjLoading/Game/IW4/Techset/LoaderTechsetIW4.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/IAssetCreator.h"
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "StateMap/StateMapDefinition.h"
|
||||
#include "Techset/TechsetDefinition.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace IW4
|
||||
{
|
||||
[[nodiscard]] std::string GetTechsetFileName(const std::string& techsetAssetName);
|
||||
[[nodiscard]] std::string GetTechniqueFileName(const std::string& techniqueName);
|
||||
[[nodiscard]] std::string GetStateMapFileName(const std::string& stateMapName);
|
||||
|
||||
class ITechsetCreator : public AssetCreator<AssetTechniqueSet>
|
||||
{
|
||||
public:
|
||||
ITechsetCreator() = default;
|
||||
virtual ~ITechsetCreator() = default;
|
||||
|
||||
virtual techset::TechsetDefinition* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) = 0;
|
||||
virtual const state_map::StateMapDefinition* LoadStateMapDefinition(const std::string& stateMapName, AssetCreationContext& context) = 0;
|
||||
};
|
||||
|
||||
std::unique_ptr<ITechsetCreator> CreateTechsetLoader(MemoryManager& memory, ISearchPath& searchPath);
|
||||
} // namespace IW4
|
Reference in New Issue
Block a user