mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 13:12:06 +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:
@@ -72,7 +72,7 @@ namespace zone_creator
|
||||
OutputPathFilesystem cacheDir(context.m_cache_dir);
|
||||
objCompiler->ConfigureCreatorCollection(
|
||||
creatorCollection, *zone, zoneDefinitionContext, *context.m_asset_search_path, lookup, creationContext, outDir, cacheDir);
|
||||
objLoader->ConfigureCreatorCollection(creatorCollection, *zone, *context.m_asset_search_path, lookup);
|
||||
objLoader->ConfigureCreatorCollection(creatorCollection, *zone, *context.m_asset_search_path, lookup, *context.m_definition);
|
||||
|
||||
for (const auto& assetEntry : context.m_definition->m_assets)
|
||||
{
|
||||
|
||||
@@ -118,7 +118,8 @@ namespace
|
||||
}
|
||||
} // 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);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IW3
|
||||
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;
|
||||
};
|
||||
} // namespace IW3
|
||||
|
||||
@@ -159,7 +159,8 @@ namespace
|
||||
}
|
||||
} // 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);
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace IW4
|
||||
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;
|
||||
};
|
||||
} // namespace IW4
|
||||
|
||||
@@ -165,7 +165,8 @@ namespace
|
||||
}
|
||||
} // 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);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IW5
|
||||
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;
|
||||
};
|
||||
} // namespace IW5
|
||||
|
||||
@@ -135,7 +135,8 @@ namespace
|
||||
}
|
||||
} // 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);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace T5
|
||||
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;
|
||||
};
|
||||
} // namespace T5
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "ObjLoaderT6.h"
|
||||
|
||||
#include "Asset/GlobalAssetPoolsLoader.h"
|
||||
#include "BSP/LoaderBSP_T6.h"
|
||||
#include "FontIcon/CsvLoaderFontIconT6.h"
|
||||
@@ -16,7 +18,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"
|
||||
@@ -381,7 +382,7 @@ namespace T6
|
||||
collection.AddAssetCreator(std::make_unique<GlobalAssetPoolsLoader<AssetZBarrier>>(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();
|
||||
|
||||
@@ -441,14 +442,16 @@ namespace T6
|
||||
collection.AddAssetCreator(z_barrier::CreateRawLoaderT6(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(z_barrier::CreateGdtLoaderT6(memory, searchPath, gdt, 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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Asset/AssetCreatorCollection.h"
|
||||
#include "Gdt/IGdtQueryable.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
#include "Zone/Definition/ZoneDefinition.h"
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
class IObjLoader
|
||||
@@ -28,7 +29,8 @@ public:
|
||||
*/
|
||||
virtual void UnloadContainersOfZone(Zone& zone) const = 0;
|
||||
|
||||
virtual void ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt) const = 0;
|
||||
virtual void ConfigureCreatorCollection(
|
||||
AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt, ZoneDefinition& definition) const = 0;
|
||||
|
||||
static const IObjLoader* GetObjLoaderForGame(GameId game);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user