2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-06 08:42:35 +00:00

Added the zone definition to the parameters of ConfigureCreatorCollection. ObjLoaderT6 has also been changed to conditionally add the BSP creator if the map type isn't NONE.

This commit is contained in:
LJW-Dev
2025-11-01 16:19:06 +08:00
committed by Jan Laupetin
parent c1c5a2c717
commit a64597c0fc
12 changed files with 30 additions and 16 deletions
+8 -5
View File
@@ -1,3 +1,5 @@
#include "ObjLoaderT6.h"
#include "Asset/GlobalAssetPoolsLoader.h"
#include "BSP/LoaderBSP_T6.h"
#include "FontIcon/CsvLoaderFontIconT6.h"
@@ -20,7 +22,6 @@
#include "Localize/LocalizeLoaderT6.h"
#include "Material/LoaderMaterialT6.h"
#include "ObjContainer/IPak/IPak.h"
#include "ObjLoaderT6.h"
#include "ObjLoading.h"
#include "PhysConstraints/GdtLoaderPhysConstraintsT6.h"
#include "PhysConstraints/RawLoaderPhysConstraintsT6.h"
@@ -379,7 +380,7 @@ namespace T6
// collection.AddAssetCreator(std::make_unique<GlobalAssetPoolsLoader<AssetCustomMap>>(zone));
}
void ConfigureLoaders(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt)
void ConfigureLoaders(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt, ZoneDefinition& definition)
{
auto& memory = zone.Memory();
@@ -444,14 +445,16 @@ namespace T6
collection.AddSubAssetCreator(techset::CreateVertexShaderLoaderT6(memory, searchPath));
collection.AddSubAssetCreator(techset::CreatePixelShaderLoaderT6(memory, searchPath));
collection.AddAssetCreator(BSP::CreateLoaderT6(memory, searchPath, zone));
if (definition.m_map_type != ZoneDefinitionMapType::NONE)
collection.AddAssetCreator(BSP::CreateLoaderT6(memory, searchPath, zone));
}
} // namespace
void ObjLoader::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt) const
void ObjLoader::ConfigureCreatorCollection(
AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt, ZoneDefinition& definition) const
{
ConfigureDefaultCreators(collection, zone);
ConfigureLoaders(collection, zone, searchPath, gdt);
ConfigureLoaders(collection, zone, searchPath, gdt, definition);
ConfigureGlobalAssetPoolsLoaders(collection, zone);
}
} // namespace T6
+2 -1
View File
@@ -18,7 +18,8 @@ namespace T6
void LoadReferencedContainersForZone(ISearchPath& searchPath, Zone& zone) const override;
void UnloadContainersOfZone(Zone& zone) const override;
void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt) const override;
void ConfigureCreatorCollection(
AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt, ZoneDefinition& definition) const override;
private:
static bool VerifySoundBankChecksum(const SoundBank& soundBank, const SndRuntimeAssetBank& sndRuntimeAssetBank);