2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-02-14 19:33:02 +00:00

refactor: only refer to game id in zone

This commit is contained in:
Jan Laupetin
2025-08-30 16:49:09 +02:00
parent 495e85f945
commit 734173066b
56 changed files with 145 additions and 193 deletions

View File

@@ -4,6 +4,7 @@
#include "Game/T6/GameAssetPoolT6.h"
#include "Game/T6/GameT6.h"
#include "ObjWriting.h"
#include "Zone/ZoneRegistry.h"
namespace T6
{
@@ -473,7 +474,7 @@ namespace T6
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());
if (!t6AssetPools)

View File

@@ -7,13 +7,14 @@
#include "Game/T6/SoundConstantsT6.h"
#include "ObjContainer/SoundBank/SoundBank.h"
#include "Sound/WavWriter.h"
#include "nlohmann/json.hpp"
#include "Zone/ZoneRegistry.h"
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <format>
#include <fstream>
#include <nlohmann/json.hpp>
#include <sstream>
#include <unordered_set>
@@ -201,7 +202,7 @@ namespace
public:
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;
for (auto* entry : sndBankPool)