Rename AssetLoading from Linker to ZoneCreation

This commit is contained in:
Jan
2021-03-12 11:20:02 +01:00
parent 43966e8e00
commit a57201d78d
10 changed files with 102 additions and 67 deletions

View 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;
};

View 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))
{
}

View 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);
};