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,22 @@
#include "ZoneCreatorIW4.h"
#include "Game/IW4/GameIW4.h"
#include "Game/IW4/GameAssetPoolIW4.h"
using namespace IW4;
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameIW4.GetShortName();
}
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);
for (auto assetType = 0; assetType < ASSET_TYPE_COUNT; assetType++)
zone->m_pools->InitPoolDynamic(assetType);
return zone;
}