mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-17 18:52:06 +00:00
Merge pull request #507 from Laupetin/refactor/use-game-ids
refactor: only refer to game id in zone
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GameLanguage.h"
|
#include "GameLanguage.h"
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class Zone;
|
|
||||||
|
|
||||||
enum class GameId
|
enum class GameId
|
||||||
{
|
{
|
||||||
IW3,
|
IW3,
|
||||||
@@ -39,9 +38,6 @@ public:
|
|||||||
[[nodiscard]] virtual GameId GetId() const = 0;
|
[[nodiscard]] virtual GameId GetId() const = 0;
|
||||||
[[nodiscard]] virtual const std::string& GetFullName() const = 0;
|
[[nodiscard]] virtual const std::string& GetFullName() const = 0;
|
||||||
[[nodiscard]] virtual const std::string& GetShortName() const = 0;
|
[[nodiscard]] virtual const std::string& GetShortName() const = 0;
|
||||||
virtual void AddZone(Zone* zone) = 0;
|
|
||||||
virtual void RemoveZone(Zone* zone) = 0;
|
|
||||||
[[nodiscard]] virtual const std::vector<Zone*>& GetZones() const = 0;
|
|
||||||
[[nodiscard]] virtual const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const = 0;
|
[[nodiscard]] virtual const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const = 0;
|
||||||
|
|
||||||
static IGame* GetGameById(GameId gameId);
|
static IGame* GetGameById(GameId gameId);
|
||||||
|
|||||||
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
|
|||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::AddZone(Zone* zone)
|
|
||||||
{
|
|
||||||
m_zones.push_back(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::RemoveZone(Zone* zone)
|
|
||||||
{
|
|
||||||
const auto foundEntry = std::ranges::find(m_zones, zone);
|
|
||||||
|
|
||||||
if (foundEntry != m_zones.end())
|
|
||||||
m_zones.erase(foundEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<Zone*>& Game::GetZones() const
|
|
||||||
{
|
|
||||||
return m_zones;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
||||||
{
|
{
|
||||||
static std::vector<GameLanguagePrefix> prefixes;
|
static std::vector<GameLanguagePrefix> prefixes;
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ namespace IW3
|
|||||||
[[nodiscard]] GameId GetId() const override;
|
[[nodiscard]] GameId GetId() const override;
|
||||||
[[nodiscard]] const std::string& GetFullName() const override;
|
[[nodiscard]] const std::string& GetFullName() const override;
|
||||||
[[nodiscard]] const std::string& GetShortName() const override;
|
[[nodiscard]] const std::string& GetShortName() const override;
|
||||||
void AddZone(Zone* zone) override;
|
|
||||||
void RemoveZone(Zone* zone) override;
|
|
||||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
|
||||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<Zone*> m_zones;
|
|
||||||
};
|
};
|
||||||
} // namespace IW3
|
} // namespace IW3
|
||||||
|
|||||||
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
|
|||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::AddZone(Zone* zone)
|
|
||||||
{
|
|
||||||
m_zones.push_back(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::RemoveZone(Zone* zone)
|
|
||||||
{
|
|
||||||
const auto foundEntry = std::ranges::find(m_zones, zone);
|
|
||||||
|
|
||||||
if (foundEntry != m_zones.end())
|
|
||||||
m_zones.erase(foundEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<Zone*>& Game::GetZones() const
|
|
||||||
{
|
|
||||||
return m_zones;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
||||||
{
|
{
|
||||||
static std::vector<GameLanguagePrefix> prefixes;
|
static std::vector<GameLanguagePrefix> prefixes;
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ namespace IW4
|
|||||||
[[nodiscard]] GameId GetId() const override;
|
[[nodiscard]] GameId GetId() const override;
|
||||||
[[nodiscard]] const std::string& GetFullName() const override;
|
[[nodiscard]] const std::string& GetFullName() const override;
|
||||||
[[nodiscard]] const std::string& GetShortName() const override;
|
[[nodiscard]] const std::string& GetShortName() const override;
|
||||||
void AddZone(Zone* zone) override;
|
|
||||||
void RemoveZone(Zone* zone) override;
|
|
||||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
|
||||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<Zone*> m_zones;
|
|
||||||
};
|
};
|
||||||
} // namespace IW4
|
} // namespace IW4
|
||||||
|
|||||||
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
|
|||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::AddZone(Zone* zone)
|
|
||||||
{
|
|
||||||
m_zones.push_back(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::RemoveZone(Zone* zone)
|
|
||||||
{
|
|
||||||
const auto foundEntry = std::ranges::find(m_zones, zone);
|
|
||||||
|
|
||||||
if (foundEntry != m_zones.end())
|
|
||||||
m_zones.erase(foundEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<Zone*>& Game::GetZones() const
|
|
||||||
{
|
|
||||||
return m_zones;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
||||||
{
|
{
|
||||||
static std::vector<GameLanguagePrefix> prefixes;
|
static std::vector<GameLanguagePrefix> prefixes;
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ namespace IW5
|
|||||||
[[nodiscard]] GameId GetId() const override;
|
[[nodiscard]] GameId GetId() const override;
|
||||||
[[nodiscard]] const std::string& GetFullName() const override;
|
[[nodiscard]] const std::string& GetFullName() const override;
|
||||||
[[nodiscard]] const std::string& GetShortName() const override;
|
[[nodiscard]] const std::string& GetShortName() const override;
|
||||||
void AddZone(Zone* zone) override;
|
|
||||||
void RemoveZone(Zone* zone) override;
|
|
||||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
|
||||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<Zone*> m_zones;
|
|
||||||
};
|
};
|
||||||
} // namespace IW5
|
} // namespace IW5
|
||||||
|
|||||||
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
|
|||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::AddZone(Zone* zone)
|
|
||||||
{
|
|
||||||
m_zones.push_back(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::RemoveZone(Zone* zone)
|
|
||||||
{
|
|
||||||
const auto foundEntry = std::ranges::find(m_zones, zone);
|
|
||||||
|
|
||||||
if (foundEntry != m_zones.end())
|
|
||||||
m_zones.erase(foundEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<Zone*>& Game::GetZones() const
|
|
||||||
{
|
|
||||||
return m_zones;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
||||||
{
|
{
|
||||||
static std::vector<GameLanguagePrefix> prefixes{
|
static std::vector<GameLanguagePrefix> prefixes{
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ namespace T5
|
|||||||
[[nodiscard]] GameId GetId() const override;
|
[[nodiscard]] GameId GetId() const override;
|
||||||
[[nodiscard]] const std::string& GetFullName() const override;
|
[[nodiscard]] const std::string& GetFullName() const override;
|
||||||
[[nodiscard]] const std::string& GetShortName() const override;
|
[[nodiscard]] const std::string& GetShortName() const override;
|
||||||
void AddZone(Zone* zone) override;
|
|
||||||
void RemoveZone(Zone* zone) override;
|
|
||||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
|
||||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<Zone*> m_zones;
|
|
||||||
};
|
};
|
||||||
} // namespace T5
|
} // namespace T5
|
||||||
|
|||||||
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
|
|||||||
return shortName;
|
return shortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::AddZone(Zone* zone)
|
|
||||||
{
|
|
||||||
m_zones.push_back(zone);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Game::RemoveZone(Zone* zone)
|
|
||||||
{
|
|
||||||
const auto foundEntry = std::ranges::find(m_zones, zone);
|
|
||||||
|
|
||||||
if (foundEntry != m_zones.end())
|
|
||||||
m_zones.erase(foundEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<Zone*>& Game::GetZones() const
|
|
||||||
{
|
|
||||||
return m_zones;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
|
||||||
{
|
{
|
||||||
static std::vector<GameLanguagePrefix> prefixes{
|
static std::vector<GameLanguagePrefix> prefixes{
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ namespace T6
|
|||||||
[[nodiscard]] GameId GetId() const override;
|
[[nodiscard]] GameId GetId() const override;
|
||||||
[[nodiscard]] const std::string& GetFullName() const override;
|
[[nodiscard]] const std::string& GetFullName() const override;
|
||||||
[[nodiscard]] const std::string& GetShortName() const override;
|
[[nodiscard]] const std::string& GetShortName() const override;
|
||||||
void AddZone(Zone* zone) override;
|
|
||||||
void RemoveZone(Zone* zone) override;
|
|
||||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
|
||||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<Zone*> m_zones;
|
|
||||||
};
|
};
|
||||||
} // namespace T6
|
} // namespace T6
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace
|
|||||||
{
|
{
|
||||||
std::unique_ptr<Zone> CreateZone(const ZoneCreationContext& context, const GameId gameId)
|
std::unique_ptr<Zone> CreateZone(const ZoneCreationContext& context, const GameId gameId)
|
||||||
{
|
{
|
||||||
return std::make_unique<Zone>(context.m_definition->m_name, 0, IGame::GetGameById(gameId));
|
return std::make_unique<Zone>(context.m_definition->m_name, 0, gameId);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Gdt*> CreateGdtList(const ZoneCreationContext& context)
|
std::vector<Gdt*> CreateGdtList(const ZoneCreationContext& context)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ std::unique_ptr<XAssetInfoGeneric> GenericAssetRegistration::CreateXAssetInfo()
|
|||||||
AssetCreationContext::AssetCreationContext(Zone& zone, const AssetCreatorCollection* creators, const IgnoredAssetLookup* ignoredAssetLookup)
|
AssetCreationContext::AssetCreationContext(Zone& zone, const AssetCreatorCollection* creators, const IgnoredAssetLookup* ignoredAssetLookup)
|
||||||
: ZoneAssetCreationStateContainer(zone),
|
: ZoneAssetCreationStateContainer(zone),
|
||||||
m_zone(zone),
|
m_zone(zone),
|
||||||
m_forced_asset_pools(ZoneAssetPools::CreateForGame(zone.m_game->GetId(), &zone, zone.m_priority)),
|
m_forced_asset_pools(ZoneAssetPools::CreateForGame(zone.m_game_id, &zone, zone.m_priority)),
|
||||||
m_creators(creators),
|
m_creators(creators),
|
||||||
m_ignored_asset_lookup(ignoredAssetLookup),
|
m_ignored_asset_lookup(ignoredAssetLookup),
|
||||||
m_forced_load_depth(0u)
|
m_forced_load_depth(0u)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Game/IW3/GameAssetPoolIW3.h"
|
#include "Game/IW3/GameAssetPoolIW3.h"
|
||||||
#include "Game/IW3/GameIW3.h"
|
#include "Game/IW3/GameIW3.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
namespace IW3
|
namespace IW3
|
||||||
{
|
{
|
||||||
@@ -199,7 +200,7 @@ namespace IW3
|
|||||||
|
|
||||||
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
||||||
{
|
{
|
||||||
for (const auto* zone : IGame::GetGameById(GameId::IW3)->GetZones())
|
for (const auto* zone : ZoneRegistry::GetRegistryForGame(GameId::IW3)->Zones())
|
||||||
{
|
{
|
||||||
const auto* assetPools = dynamic_cast<const GameAssetPoolIW3*>(zone->m_pools.get());
|
const auto* assetPools = dynamic_cast<const GameAssetPoolIW3*>(zone->m_pools.get());
|
||||||
if (!assetPools)
|
if (!assetPools)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Game/IW4/GameAssetPoolIW4.h"
|
#include "Game/IW4/GameAssetPoolIW4.h"
|
||||||
#include "Game/IW4/GameIW4.h"
|
#include "Game/IW4/GameIW4.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
namespace IW4
|
namespace IW4
|
||||||
{
|
{
|
||||||
@@ -199,7 +200,7 @@ namespace IW4
|
|||||||
|
|
||||||
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
||||||
{
|
{
|
||||||
for (const auto* zone : IGame::GetGameById(GameId::IW4)->GetZones())
|
for (const auto* zone : ZoneRegistry::GetRegistryForGame(GameId::IW4)->Zones())
|
||||||
{
|
{
|
||||||
const auto* assetPools = dynamic_cast<const GameAssetPoolIW4*>(zone->m_pools.get());
|
const auto* assetPools = dynamic_cast<const GameAssetPoolIW4*>(zone->m_pools.get());
|
||||||
if (!assetPools)
|
if (!assetPools)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Game/IW5/GameAssetPoolIW5.h"
|
#include "Game/IW5/GameAssetPoolIW5.h"
|
||||||
#include "Game/IW5/GameIW5.h"
|
#include "Game/IW5/GameIW5.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
namespace IW5
|
namespace IW5
|
||||||
{
|
{
|
||||||
@@ -199,7 +200,7 @@ namespace IW5
|
|||||||
|
|
||||||
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
||||||
{
|
{
|
||||||
for (const auto* zone : IGame::GetGameById(GameId::IW5)->GetZones())
|
for (const auto* zone : ZoneRegistry::GetRegistryForGame(GameId::IW5)->Zones())
|
||||||
{
|
{
|
||||||
const auto* iw5AssetPools = dynamic_cast<const GameAssetPoolIW5*>(zone->m_pools.get());
|
const auto* iw5AssetPools = dynamic_cast<const GameAssetPoolIW5*>(zone->m_pools.get());
|
||||||
if (!iw5AssetPools)
|
if (!iw5AssetPools)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Game/T5/GameAssetPoolT5.h"
|
#include "Game/T5/GameAssetPoolT5.h"
|
||||||
#include "Game/T5/GameT5.h"
|
#include "Game/T5/GameT5.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
namespace T5
|
namespace T5
|
||||||
{
|
{
|
||||||
@@ -473,7 +474,7 @@ namespace T5
|
|||||||
|
|
||||||
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
||||||
{
|
{
|
||||||
for (const auto* zone : IGame::GetGameById(GameId::T6)->GetZones())
|
for (const auto* zone : ZoneRegistry::GetRegistryForGame(GameId::T5)->Zones())
|
||||||
{
|
{
|
||||||
const auto* assetPools = dynamic_cast<const GameAssetPoolT5*>(zone->m_pools.get());
|
const auto* assetPools = dynamic_cast<const GameAssetPoolT5*>(zone->m_pools.get());
|
||||||
if (!assetPools)
|
if (!assetPools)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Game/T6/GameAssetPoolT6.h"
|
#include "Game/T6/GameAssetPoolT6.h"
|
||||||
#include "Game/T6/GameT6.h"
|
#include "Game/T6/GameT6.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
namespace T6
|
namespace T6
|
||||||
{
|
{
|
||||||
@@ -473,7 +474,7 @@ namespace T6
|
|||||||
|
|
||||||
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
void MaterialConstantZoneState::ExtractNamesFromZoneInternal()
|
||||||
{
|
{
|
||||||
for (const auto* zone : IGame::GetGameById(GameId::T6)->GetZones())
|
for (const auto* zone : ZoneRegistry::GetRegistryForGame(GameId::T6)->Zones())
|
||||||
{
|
{
|
||||||
const auto* t6AssetPools = dynamic_cast<const GameAssetPoolT6*>(zone->m_pools.get());
|
const auto* t6AssetPools = dynamic_cast<const GameAssetPoolT6*>(zone->m_pools.get());
|
||||||
if (!t6AssetPools)
|
if (!t6AssetPools)
|
||||||
|
|||||||
@@ -7,13 +7,14 @@
|
|||||||
#include "Game/T6/SoundConstantsT6.h"
|
#include "Game/T6/SoundConstantsT6.h"
|
||||||
#include "ObjContainer/SoundBank/SoundBank.h"
|
#include "ObjContainer/SoundBank/SoundBank.h"
|
||||||
#include "Sound/WavWriter.h"
|
#include "Sound/WavWriter.h"
|
||||||
#include "nlohmann/json.hpp"
|
#include "Zone/ZoneRegistry.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <format>
|
#include <format>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <nlohmann/json.hpp>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
@@ -201,7 +202,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
for (const auto& zone : IGame::GetGameById(GameId::T6)->GetZones())
|
for (const auto& zone : ZoneRegistry::GetRegistryForGame(GameId::T6)->Zones())
|
||||||
{
|
{
|
||||||
auto& sndBankPool = *dynamic_cast<GameAssetPoolT6*>(zone->m_pools.get())->m_sound_bank;
|
auto& sndBankPool = *dynamic_cast<GameAssetPoolT6*>(zone->m_pools.get())->m_sound_bank;
|
||||||
for (auto* entry : sndBankPool)
|
for (auto* entry : sndBankPool)
|
||||||
|
|||||||
@@ -562,7 +562,8 @@ namespace
|
|||||||
if (!mtlFile)
|
if (!mtlFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto writer = obj::CreateMtlWriter(*mtlFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||||
|
const auto writer = obj::CreateMtlWriter(*mtlFile, game->GetShortName(), context.m_zone.m_name);
|
||||||
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
||||||
|
|
||||||
writer->Write(common);
|
writer->Write(common);
|
||||||
@@ -576,8 +577,9 @@ namespace
|
|||||||
if (!assetFile)
|
if (!assetFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||||
const auto writer =
|
const auto writer =
|
||||||
obj::CreateObjWriter(*assetFile, std::format("{}.mtl", model->name), context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
obj::CreateObjWriter(*assetFile, std::format("{}.mtl", model->name), game->GetShortName(), context.m_zone.m_name);
|
||||||
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
DistinctMapper<Material*> materialMapper(model->numsurfs);
|
||||||
|
|
||||||
writer->Write(common);
|
writer->Write(common);
|
||||||
@@ -591,7 +593,8 @@ namespace
|
|||||||
if (!assetFile)
|
if (!assetFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto writer = xmodel_export::CreateWriterForVersion6(*assetFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||||
|
const auto writer = xmodel_export::CreateWriterForVersion6(*assetFile, game->GetShortName(), context.m_zone.m_name);
|
||||||
writer->Write(common);
|
writer->Write(common);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,7 +606,8 @@ namespace
|
|||||||
if (!assetFile)
|
if (!assetFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto writer = xmodel_bin::CreateWriterForVersion7(*assetFile, context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||||
|
const auto writer = xmodel_bin::CreateWriterForVersion7(*assetFile, game->GetShortName(), context.m_zone.m_name);
|
||||||
writer->Write(common);
|
writer->Write(common);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,8 +621,9 @@ namespace
|
|||||||
if (!assetFile)
|
if (!assetFile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const auto* game = IGame::GetGameById(context.m_zone.m_game_id);
|
||||||
const auto output = std::make_unique<T>(*assetFile);
|
const auto output = std::make_unique<T>(*assetFile);
|
||||||
const auto writer = gltf::Writer::CreateWriter(output.get(), context.m_zone.m_game->GetShortName(), context.m_zone.m_name);
|
const auto writer = gltf::Writer::CreateWriter(output.get(), game->GetShortName(), context.m_zone.m_name);
|
||||||
|
|
||||||
writer->Write(common);
|
writer->Write(common);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ ContentPrinter::ContentPrinter(const Zone& zone)
|
|||||||
void ContentPrinter::PrintContent() const
|
void ContentPrinter::PrintContent() const
|
||||||
{
|
{
|
||||||
const auto* pools = m_zone.m_pools.get();
|
const auto* pools = m_zone.m_pools.get();
|
||||||
std::cout << std::format("Zone '{}' ({})\n", m_zone.m_name, m_zone.m_game->GetShortName());
|
const auto* game = IGame::GetGameById(m_zone.m_game_id);
|
||||||
|
std::cout << std::format("Zone '{}' ({})\n", m_zone.m_name, game->GetShortName());
|
||||||
std::cout << "Content:\n";
|
std::cout << "Content:\n";
|
||||||
|
|
||||||
for (const auto& asset : *pools)
|
for (const auto& asset : *pools)
|
||||||
|
|||||||
@@ -28,9 +28,10 @@ const IZoneDefWriter* IZoneDefWriter::GetZoneDefWriterForGame(GameId game)
|
|||||||
void AbstractZoneDefWriter::WriteZoneDef(std::ostream& stream, const UnlinkerArgs& args, const Zone& zone) const
|
void AbstractZoneDefWriter::WriteZoneDef(std::ostream& stream, const UnlinkerArgs& args, const Zone& zone) const
|
||||||
{
|
{
|
||||||
ZoneDefinitionOutputStream out(stream);
|
ZoneDefinitionOutputStream out(stream);
|
||||||
|
const auto* game = IGame::GetGameById(zone.m_game_id);
|
||||||
|
|
||||||
out.WriteComment(zone.m_game->GetFullName());
|
out.WriteComment(game->GetFullName());
|
||||||
out.WriteMetaData(META_DATA_KEY_GAME, zone.m_game->GetShortName());
|
out.WriteMetaData(META_DATA_KEY_GAME, game->GetShortName());
|
||||||
out.EmptyLine();
|
out.EmptyLine();
|
||||||
|
|
||||||
if (args.m_use_gdt)
|
if (args.m_use_gdt)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto* zoneDefWriter = IZoneDefWriter::GetZoneDefWriterForGame(zone.m_game->GetId());
|
const auto* zoneDefWriter = IZoneDefWriter::GetZoneDefWriterForGame(zone.m_game_id);
|
||||||
zoneDefWriter->WriteZoneDef(zoneDefinitionFile, m_args, zone);
|
zoneDefWriter->WriteZoneDef(zoneDefinitionFile, m_args, zone);
|
||||||
|
|
||||||
zoneDefinitionFile.close();
|
zoneDefinitionFile.close();
|
||||||
@@ -186,13 +186,16 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
auto gdt = std::make_unique<GdtOutputStream>(gdtStream);
|
auto gdt = std::make_unique<GdtOutputStream>(gdtStream);
|
||||||
gdt->BeginStream();
|
gdt->BeginStream();
|
||||||
gdt->WriteVersion(GdtVersion(zone.m_game->GetShortName(), 1));
|
|
||||||
|
const auto* game = IGame::GetGameById(zone.m_game_id);
|
||||||
|
gdt->WriteVersion(GdtVersion(game->GetShortName(), 1));
|
||||||
|
|
||||||
context.m_gdt = std::move(gdt);
|
context.m_gdt = std::move(gdt);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateAssetIncludesAndExcludes(context);
|
UpdateAssetIncludesAndExcludes(context);
|
||||||
|
|
||||||
const auto* objWriter = IObjWriter::GetObjWriterForGame(zone.m_game->GetId());
|
const auto* objWriter = IObjWriter::GetObjWriterForGame(zone.m_game_id);
|
||||||
|
|
||||||
auto result = objWriter->DumpZone(context);
|
auto result = objWriter->DumpZone(context);
|
||||||
|
|
||||||
@@ -237,7 +240,7 @@ private:
|
|||||||
|
|
||||||
if (ShouldLoadObj())
|
if (ShouldLoadObj())
|
||||||
{
|
{
|
||||||
const auto* objLoader = IObjLoader::GetObjLoaderForGame(zone->m_game->GetId());
|
const auto* objLoader = IObjLoader::GetObjLoaderForGame(zone->m_game_id);
|
||||||
objLoader->LoadReferencedContainersForZone(*searchPathsForZone, *zone);
|
objLoader->LoadReferencedContainersForZone(*searchPathsForZone, *zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +261,7 @@ private:
|
|||||||
|
|
||||||
if (ShouldLoadObj())
|
if (ShouldLoadObj())
|
||||||
{
|
{
|
||||||
const auto* objLoader = IObjLoader::GetObjLoaderForGame(loadedZone->m_game->GetId());
|
const auto* objLoader = IObjLoader::GetObjLoaderForGame(loadedZone->m_game_id);
|
||||||
objLoader->UnloadContainersOfZone(*loadedZone);
|
objLoader->UnloadContainersOfZone(*loadedZone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +302,7 @@ private:
|
|||||||
if (m_args.m_verbose)
|
if (m_args.m_verbose)
|
||||||
std::cout << std::format("Loaded zone \"{}\"\n", zoneName);
|
std::cout << std::format("Loaded zone \"{}\"\n", zoneName);
|
||||||
|
|
||||||
const auto* objLoader = IObjLoader::GetObjLoaderForGame(zone->m_game->GetId());
|
const auto* objLoader = IObjLoader::GetObjLoaderForGame(zone->m_game_id);
|
||||||
if (ShouldLoadObj())
|
if (ShouldLoadObj())
|
||||||
objLoader->LoadReferencedContainersForZone(*searchPathsForZone, *zone);
|
objLoader->LoadReferencedContainersForZone(*searchPathsForZone, *zone);
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
#include "Zone.h"
|
#include "Zone.h"
|
||||||
|
|
||||||
Zone::Zone(std::string name, const zone_priority_t priority, IGame* game)
|
#include "ZoneRegistry.h"
|
||||||
|
|
||||||
|
Zone::Zone(std::string name, const zone_priority_t priority, GameId gameId)
|
||||||
: m_name(std::move(name)),
|
: m_name(std::move(name)),
|
||||||
m_priority(priority),
|
m_priority(priority),
|
||||||
m_language(GameLanguage::LANGUAGE_NONE),
|
m_language(GameLanguage::LANGUAGE_NONE),
|
||||||
m_game(game),
|
m_game_id(gameId),
|
||||||
m_pools(ZoneAssetPools::CreateForGame(game->GetId(), this, priority)),
|
m_pools(ZoneAssetPools::CreateForGame(gameId, this, priority)),
|
||||||
m_memory(std::make_unique<ZoneMemory>()),
|
m_memory(std::make_unique<ZoneMemory>())
|
||||||
m_registered(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ Zone::~Zone()
|
|||||||
{
|
{
|
||||||
if (m_registered)
|
if (m_registered)
|
||||||
{
|
{
|
||||||
m_game->RemoveZone(this);
|
ZoneRegistry::GetRegistryForGame(m_game_id)->RemoveZone(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ void Zone::Register()
|
|||||||
{
|
{
|
||||||
if (!m_registered)
|
if (!m_registered)
|
||||||
{
|
{
|
||||||
m_game->AddZone(this);
|
ZoneRegistry::GetRegistryForGame(m_game_id)->AddZone(this);
|
||||||
m_registered = true;
|
m_registered = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,20 +10,12 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class IGame;
|
|
||||||
class ZoneAssetPools;
|
class ZoneAssetPools;
|
||||||
|
|
||||||
class Zone
|
class Zone
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::string m_name;
|
Zone(std::string name, zone_priority_t priority, GameId gameId);
|
||||||
zone_priority_t m_priority;
|
|
||||||
GameLanguage m_language;
|
|
||||||
IGame* m_game;
|
|
||||||
ZoneScriptStrings m_script_strings;
|
|
||||||
std::unique_ptr<ZoneAssetPools> m_pools;
|
|
||||||
|
|
||||||
Zone(std::string name, zone_priority_t priority, IGame* game);
|
|
||||||
~Zone();
|
~Zone();
|
||||||
Zone(const Zone& other) = delete;
|
Zone(const Zone& other) = delete;
|
||||||
Zone(Zone&& other) noexcept = default;
|
Zone(Zone&& other) noexcept = default;
|
||||||
@@ -34,6 +26,13 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] ZoneMemory& Memory() const;
|
[[nodiscard]] ZoneMemory& Memory() const;
|
||||||
|
|
||||||
|
std::string m_name;
|
||||||
|
zone_priority_t m_priority;
|
||||||
|
GameLanguage m_language;
|
||||||
|
GameId m_game_id;
|
||||||
|
ZoneScriptStrings m_script_strings;
|
||||||
|
std::unique_ptr<ZoneAssetPools> m_pools;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<ZoneMemory> m_memory;
|
std::unique_ptr<ZoneMemory> m_memory;
|
||||||
|
|
||||||
|
|||||||
38
src/ZoneCommon/Zone/ZoneRegistry.cpp
Normal file
38
src/ZoneCommon/Zone/ZoneRegistry.cpp
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#include "ZoneRegistry.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
ZoneRegistry::ZoneRegistry() = default;
|
||||||
|
|
||||||
|
void ZoneRegistry::AddZone(Zone* zone)
|
||||||
|
{
|
||||||
|
assert(zone);
|
||||||
|
|
||||||
|
m_zones.emplace_back(zone);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZoneRegistry::RemoveZone(Zone* zone)
|
||||||
|
{
|
||||||
|
assert(zone);
|
||||||
|
|
||||||
|
std::erase_if(m_zones,
|
||||||
|
[zone](const Zone* existingZone)
|
||||||
|
{
|
||||||
|
return existingZone == zone;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<Zone*>& ZoneRegistry::Zones() const
|
||||||
|
{
|
||||||
|
return m_zones;
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoneRegistry* ZoneRegistry::GetRegistryForGame(GameId gameId)
|
||||||
|
{
|
||||||
|
static ZoneRegistry registries[static_cast<unsigned>(GameId::COUNT)];
|
||||||
|
|
||||||
|
assert(static_cast<unsigned>(gameId) < static_cast<unsigned>(GameId::COUNT));
|
||||||
|
return ®istries[static_cast<unsigned>(gameId)];
|
||||||
|
}
|
||||||
22
src/ZoneCommon/Zone/ZoneRegistry.h
Normal file
22
src/ZoneCommon/Zone/ZoneRegistry.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Game/IGame.h"
|
||||||
|
#include "Zone.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class ZoneRegistry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void AddZone(Zone* zone);
|
||||||
|
void RemoveZone(Zone* zone);
|
||||||
|
|
||||||
|
const std::vector<Zone*>& Zones() const;
|
||||||
|
|
||||||
|
static ZoneRegistry* GetRegistryForGame(GameId gameId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ZoneRegistry();
|
||||||
|
|
||||||
|
std::vector<Zone*> m_zones;
|
||||||
|
};
|
||||||
@@ -68,7 +68,7 @@ std::unique_ptr<ZoneLoader> ZoneLoaderFactory::CreateLoaderForHeader(ZoneHeader&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Create new zone
|
// Create new zone
|
||||||
auto zone = std::make_unique<Zone>(fileName, 0, IGame::GetGameById(GameId::IW3));
|
auto zone = std::make_unique<Zone>(fileName, 0, GameId::IW3);
|
||||||
auto* zonePtr = zone.get();
|
auto* zonePtr = zone.get();
|
||||||
zone->m_pools = std::make_unique<GameAssetPoolIW3>(zonePtr, 0);
|
zone->m_pools = std::make_unique<GameAssetPoolIW3>(zonePtr, 0);
|
||||||
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ std::unique_ptr<ZoneLoader> ZoneLoaderFactory::CreateLoaderForHeader(ZoneHeader&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Create new zone
|
// Create new zone
|
||||||
auto zone = std::make_unique<Zone>(fileName, 0, IGame::GetGameById(GameId::IW4));
|
auto zone = std::make_unique<Zone>(fileName, 0, GameId::IW4);
|
||||||
auto* zonePtr = zone.get();
|
auto* zonePtr = zone.get();
|
||||||
zone->m_pools = std::make_unique<GameAssetPoolIW4>(zonePtr, 0);
|
zone->m_pools = std::make_unique<GameAssetPoolIW4>(zonePtr, 0);
|
||||||
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ std::unique_ptr<ZoneLoader> ZoneLoaderFactory::CreateLoaderForHeader(ZoneHeader&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Create new zone
|
// Create new zone
|
||||||
auto zone = std::make_unique<Zone>(fileName, 0, IGame::GetGameById(GameId::IW5));
|
auto zone = std::make_unique<Zone>(fileName, 0, GameId::IW5);
|
||||||
auto* zonePtr = zone.get();
|
auto* zonePtr = zone.get();
|
||||||
zone->m_pools = std::make_unique<GameAssetPoolIW5>(zonePtr, 0);
|
zone->m_pools = std::make_unique<GameAssetPoolIW5>(zonePtr, 0);
|
||||||
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ std::unique_ptr<ZoneLoader> ZoneLoaderFactory::CreateLoaderForHeader(ZoneHeader&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Create new zone
|
// Create new zone
|
||||||
auto zone = std::make_unique<Zone>(fileName, 0, IGame::GetGameById(GameId::T5));
|
auto zone = std::make_unique<Zone>(fileName, 0, GameId::T5);
|
||||||
auto* zonePtr = zone.get();
|
auto* zonePtr = zone.get();
|
||||||
zone->m_pools = std::make_unique<GameAssetPoolT5>(zonePtr, 0);
|
zone->m_pools = std::make_unique<GameAssetPoolT5>(zonePtr, 0);
|
||||||
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
zone->m_language = GameLanguage::LANGUAGE_NONE;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ std::unique_ptr<ZoneLoader> ZoneLoaderFactory::CreateLoaderForHeader(ZoneHeader&
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// Create new zone
|
// Create new zone
|
||||||
auto zone = std::make_unique<Zone>(fileName, 0, IGame::GetGameById(GameId::T6));
|
auto zone = std::make_unique<Zone>(fileName, 0, GameId::T6);
|
||||||
auto* zonePtr = zone.get();
|
auto* zonePtr = zone.get();
|
||||||
zone->m_pools = std::make_unique<GameAssetPoolT6>(zonePtr, 0);
|
zone->m_pools = std::make_unique<GameAssetPoolT6>(zonePtr, 0);
|
||||||
zone->m_language = GetZoneLanguage(fileName);
|
zone->m_language = GetZoneLanguage(fileName);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ bool ZoneWriting::WriteZone(std::ostream& stream, const Zone& zone)
|
|||||||
{
|
{
|
||||||
const auto start = std::chrono::high_resolution_clock::now();
|
const auto start = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
const auto factory = IZoneWriterFactory::GetZoneWriterFactoryForGame(zone.m_game->GetId());
|
const auto factory = IZoneWriterFactory::GetZoneWriterFactoryForGame(zone.m_game_id);
|
||||||
|
|
||||||
const auto zoneWriter = factory->CreateWriter(zone);
|
const auto zoneWriter = factory->CreateWriter(zone);
|
||||||
if (zoneWriter == nullptr)
|
if (zoneWriter == nullptr)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
TestContext()
|
TestContext()
|
||||||
: m_memory(),
|
: m_memory(),
|
||||||
m_zone("test", 0, IGame::GetGameById(GameId::T6)),
|
m_zone("test", 0, GameId::T6),
|
||||||
m_zone_definition(),
|
m_zone_definition(),
|
||||||
m_zone_states(m_zone),
|
m_zone_states(m_zone),
|
||||||
m_creators(m_zone),
|
m_creators(m_zone),
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestContext()
|
TestContext()
|
||||||
: m_zone("test", 0, IGame::GetGameById(GameId::T6)),
|
: m_zone("test", 0, GameId::T6),
|
||||||
m_zone_states(m_zone),
|
m_zone_states(m_zone),
|
||||||
m_out_dir()
|
m_out_dir()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestContext()
|
TestContext()
|
||||||
: m_zone("test", 0, IGame::GetGameById(GameId::T6)),
|
: m_zone("test", 0, GameId::T6),
|
||||||
m_zone_definition(),
|
m_zone_definition(),
|
||||||
m_zone_definition_context(m_zone_definition),
|
m_zone_definition_context(m_zone_definition),
|
||||||
m_zone_states(m_zone),
|
m_zone_states(m_zone),
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestContext()
|
TestContext()
|
||||||
: m_zone("test", 0, IGame::GetGameById(GameId::T6)),
|
: m_zone("test", 0, GameId::T6),
|
||||||
m_zone_definition(),
|
m_zone_definition(),
|
||||||
m_zone_definition_context(m_zone_definition),
|
m_zone_definition_context(m_zone_definition),
|
||||||
m_zone_states(m_zone),
|
m_zone_states(m_zone),
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TestContext()
|
TestContext()
|
||||||
: m_zone("test", 0, IGame::GetGameById(GameId::T6)),
|
: m_zone("test", 0, GameId::T6),
|
||||||
m_zone_states(m_zone),
|
m_zone_states(m_zone),
|
||||||
m_out_dir()
|
m_out_dir()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW3));
|
Zone zone("MockZone", 0, GameId::IW3);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace
|
|||||||
"test,data,lol\n"
|
"test,data,lol\n"
|
||||||
"lorem,ipsum");
|
"lorem,ipsum");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW3));
|
Zone zone("MockZone", 0, GameId::IW3);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace
|
|||||||
"test,data,lol\n"
|
"test,data,lol\n"
|
||||||
"lorem,ipsum");
|
"lorem,ipsum");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW4));
|
Zone zone("MockZone", 0, GameId::IW4);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW4));
|
Zone zone("MockZone", 0, GameId::IW4);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace test::game::iw4::menu::parsing::it
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
MenuParsingItHelper()
|
MenuParsingItHelper()
|
||||||
: m_zone("MockZone", 0, IGame::GetGameById(GameId::IW4)),
|
: m_zone("MockZone", 0, GameId::IW4),
|
||||||
m_creator_collection(m_zone),
|
m_creator_collection(m_zone),
|
||||||
m_ignored_asset_lookup(),
|
m_ignored_asset_lookup(),
|
||||||
m_context(m_zone, &m_creator_collection, &m_ignored_asset_lookup)
|
m_context(m_zone, &m_creator_collection, &m_ignored_asset_lookup)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace
|
|||||||
"test,data,lol\n"
|
"test,data,lol\n"
|
||||||
"lorem,ipsum");
|
"lorem,ipsum");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW5));
|
Zone zone("MockZone", 0, GameId::IW5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW5));
|
Zone zone("MockZone", 0, GameId::IW5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace
|
|||||||
"test,data,lol\n"
|
"test,data,lol\n"
|
||||||
"lorem,ipsum");
|
"lorem,ipsum");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T5));
|
Zone zone("MockZone", 0, GameId::T5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T5));
|
Zone zone("MockZone", 0, GameId::T5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace
|
|||||||
"test,data,lol\n"
|
"test,data,lol\n"
|
||||||
"lorem,ipsum");
|
"lorem,ipsum");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T6));
|
Zone zone("MockZone", 0, GameId::T6);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})FONT_ICON");
|
})FONT_ICON");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T6));
|
Zone zone("MockZone", 0, GameId::T6);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T6));
|
Zone zone("MockZone", 0, GameId::T6);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
AssetCreatorCollection creatorCollection(zone);
|
AssetCreatorCollection creatorCollection(zone);
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW3));
|
Zone zone("MockZone", 0, GameId::IW3);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
@@ -532,7 +532,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW4));
|
Zone zone("MockZone", 0, GameId::IW4);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::IW5));
|
Zone zone("MockZone", 0, GameId::IW5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T5));
|
Zone zone("MockZone", 0, GameId::T5);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})FONT_ICON");
|
})FONT_ICON");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T6));
|
Zone zone("MockZone", 0, GameId::T6);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ namespace
|
|||||||
]
|
]
|
||||||
})MATERIAL");
|
})MATERIAL");
|
||||||
|
|
||||||
Zone zone("MockZone", 0, IGame::GetGameById(GameId::T6));
|
Zone zone("MockZone", 0, GameId::T6);
|
||||||
|
|
||||||
MemoryManager memory;
|
MemoryManager memory;
|
||||||
MockSearchPath mockObjPath;
|
MockSearchPath mockObjPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user