mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-23 05:07:53 -05:00
Rename AssetLoading from Linker to ZoneCreation
This commit is contained in:
20
src/Linker/ZoneCreation/IZoneCreator.h
Normal file
20
src/Linker/ZoneCreation/IZoneCreator.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "ZoneCreationContext.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
class IZoneCreator
|
||||
{
|
||||
public:
|
||||
IZoneCreator() = default;
|
||||
virtual ~IZoneCreator() = default;
|
||||
IZoneCreator(const IZoneCreator& other) = default;
|
||||
IZoneCreator(IZoneCreator&& other) noexcept = default;
|
||||
IZoneCreator& operator=(const IZoneCreator& other) = default;
|
||||
IZoneCreator& operator=(IZoneCreator&& other) noexcept = default;
|
||||
|
||||
_NODISCARD virtual bool SupportsGame(const std::string& gameName) const = 0;
|
||||
_NODISCARD virtual std::unique_ptr<Zone> CreateZoneForDefinition(ZoneCreationContext& context) const = 0;
|
||||
};
|
12
src/Linker/ZoneCreation/ZoneCreationContext.cpp
Normal file
12
src/Linker/ZoneCreation/ZoneCreationContext.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "ZoneCreationContext.h"
|
||||
|
||||
ZoneCreationContext::ZoneCreationContext()
|
||||
: m_asset_search_path(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
ZoneCreationContext::ZoneCreationContext(std::string zoneName, ISearchPath* assetSearchPath)
|
||||
: m_asset_search_path(assetSearchPath),
|
||||
m_zone_name(std::move(zoneName))
|
||||
{
|
||||
}
|
19
src/Linker/ZoneCreation/ZoneCreationContext.h
Normal file
19
src/Linker/ZoneCreation/ZoneCreationContext.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Obj/Gdt/Gdt.h"
|
||||
|
||||
class ZoneCreationContext
|
||||
{
|
||||
public:
|
||||
ISearchPath* m_asset_search_path;
|
||||
std::string m_zone_name;
|
||||
std::string m_game_name;
|
||||
std::vector<std::unique_ptr<Gdt>> m_gdt_files;
|
||||
|
||||
ZoneCreationContext();
|
||||
ZoneCreationContext(std::string zoneName, ISearchPath* assetSearchPath);
|
||||
};
|
Reference in New Issue
Block a user