mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-06 08:42:35 +00:00
chore: fix loading and writing code for IW5
This commit is contained in:
@@ -3,8 +3,19 @@
|
||||
#include "Asset/GlobalAssetPoolsLoader.h"
|
||||
#include "Game/IW5/GameIW5.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "Localize/AssetLoaderLocalizeIW5.h"
|
||||
#include "Game/IW5/XModel/LoaderXModelIW5.h"
|
||||
#include "Image/LoaderImageIW5.h"
|
||||
#include "Leaderboard/LoaderLeaderboardIW5.h"
|
||||
#include "Localize/LoaderLocalizeIW5.h"
|
||||
#include "Material/LoaderMaterialIW5.h"
|
||||
#include "Menu/LoaderMenuListIW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "RawFile/LoaderRawFileIW5.h"
|
||||
#include "Script/LoaderScriptFileIW5.h"
|
||||
#include "StringTable/LoaderStringTableIW5.h"
|
||||
#include "Weapon/GdtLoaderWeaponIW5.h"
|
||||
#include "Weapon/LoaderAttachmentIW5.h"
|
||||
#include "Weapon/RawLoaderWeaponIW5.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -106,7 +117,7 @@ namespace
|
||||
collection.AddAssetCreator(std::make_unique<GlobalAssetPoolsLoader<AssetAddonMapEnts>>(zone));
|
||||
}
|
||||
|
||||
void ConfigureLoaders(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath)
|
||||
void ConfigureLoaders(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt)
|
||||
{
|
||||
auto& memory = *zone.GetMemory();
|
||||
|
||||
@@ -114,13 +125,13 @@ namespace
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderPhysCollMap>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderXAnim>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderXModelSurfs>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderXModel>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderMaterial>(memory));
|
||||
collection.AddAssetCreator(CreateXModelLoader(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(CreateMaterialLoader(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderPixelShader>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderVertexShader>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderVertexDecl>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderTechniqueSet>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderImage>(memory));
|
||||
collection.AddAssetCreator(CreateImageLoader(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderSound>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderSoundCurve>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderLoadedSound>(memory));
|
||||
@@ -134,18 +145,19 @@ namespace
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderGfxWorld>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderLightDef>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderFont>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderMenuList>(memory));
|
||||
collection.AddAssetCreator(CreateMenuListLoader(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderMenu>(memory));
|
||||
collection.AddAssetCreator(std::make_unique<AssetLoaderLocalize>(memory, searchPath, zone));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderAttachment>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderWeapon>(memory));
|
||||
collection.AddAssetCreator(CreateLocalizeLoader(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(CreateAttachmentLoader(memory, searchPath));
|
||||
collection.AddAssetCreator(CreateRawWeaponLoader(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(CreateGdtWeaponLoader(memory, searchPath, gdt, zone));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderFx>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderImpactFx>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderSurfaceFx>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderRawFile>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderScript>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderStringTable>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderLeaderboard>(memory));
|
||||
collection.AddAssetCreator(CreateRawFileLoader(memory, searchPath));
|
||||
collection.AddAssetCreator(CreateScriptLoader(memory, searchPath));
|
||||
collection.AddAssetCreator(CreateStringTableLoader(memory, searchPath));
|
||||
collection.AddAssetCreator(CreateLeaderboardLoader(memory, searchPath));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderStructuredDataDef>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderTracer>(memory));
|
||||
// collection.AddAssetCreator(std::make_unique<AssetLoaderVehicle>(memory));
|
||||
@@ -153,9 +165,9 @@ namespace
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void ObjLoader::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath) const
|
||||
void ObjLoader::ConfigureCreatorCollection(AssetCreatorCollection& collection, Zone& zone, ISearchPath& searchPath, IGdtQueryable& gdt) const
|
||||
{
|
||||
ConfigureDefaultCreators(collection, zone);
|
||||
ConfigureLoaders(collection, zone, searchPath);
|
||||
ConfigureLoaders(collection, zone, searchPath, gdt);
|
||||
ConfigureGlobalAssetPoolsLoaders(collection, zone);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user