2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-06 19:21:52 +00:00

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

@ -1,16 +1,16 @@
#include "AssetLoaderIW4.h"
#include "ZoneCreatorIW4.h"
#include "Game/IW4/GameIW4.h"
#include "Game/IW4/GameAssetPoolIW4.h"
using namespace IW4;
bool AssetLoader::SupportsGame(const std::string& gameName) const
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameIW4.GetShortName();
}
std::unique_ptr<Zone> AssetLoader::CreateZoneForDefinition(AssetLoadingContext& context) const
std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext& context) const
{
auto zone = std::make_unique<Zone>(context.m_zone_name, 0, &g_GameIW4);
zone->m_pools = std::make_unique<GameAssetPoolIW4>(zone.get(), zone->m_priority);

View File

@ -1,12 +1,12 @@
#pragma once
#include "AssetLoading/IAssetLoader.h"
#include "ZoneCreation/IZoneCreator.h"
namespace IW4
{
class AssetLoader final : public IAssetLoader
class ZoneCreator final : public IZoneCreator
{
public:
_NODISCARD bool SupportsGame(const std::string& gameName) const override;
_NODISCARD std::unique_ptr<Zone> CreateZoneForDefinition(AssetLoadingContext& context) const override;
_NODISCARD std::unique_ptr<Zone> CreateZoneForDefinition(ZoneCreationContext& context) const override;
};
}