mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
feat: add loader for creating empty assets for all remaining iw5 asset types
This commit is contained in:
parent
68022eee05
commit
15440e8d66
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderAddonMapEnts.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderAddonMapEnts::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* addonMapEnts = memory->Create<AddonMapEnts>();
|
||||
memset(addonMapEnts, 0, sizeof(AddonMapEnts));
|
||||
addonMapEnts->name = memory->Dup(assetName.c_str());
|
||||
return addonMapEnts;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderAddonMapEnts final : public BasicAssetLoader<ASSET_TYPE_ADDON_MAP_ENTS, AddonMapEnts>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderClipMap.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderClipMap.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderClipMap.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderClipMap::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* clipMap = memory->Create<clipMap_t>();
|
||||
memset(clipMap, 0, sizeof(clipMap_t));
|
||||
clipMap->name = memory->Dup(assetName.c_str());
|
||||
return clipMap;
|
||||
}
|
13
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderClipMap.h
Normal file
13
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderClipMap.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderClipMap : public BasicAssetLoader<ASSET_TYPE_CLIPMAP, clipMap_t>
|
||||
{
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderComWorld.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderComWorld.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderComWorld.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderComWorld::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* comWorld = memory->Create<ComWorld>();
|
||||
memset(comWorld, 0, sizeof(ComWorld));
|
||||
comWorld->name = memory->Dup(assetName.c_str());
|
||||
return comWorld;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderComWorld.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderComWorld.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderComWorld final : public BasicAssetLoader<ASSET_TYPE_COMWORLD, ComWorld>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderFont.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderFont::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* font = memory->Create<Font_s>();
|
||||
memset(font, 0, sizeof(Font_s));
|
||||
font->fontName = memory->Dup(assetName.c_str());
|
||||
return font;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFont.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderFont final : public BasicAssetLoader<ASSET_TYPE_FONT, Font_s>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFx.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFx.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderFx.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderFx::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* fx = memory->Create<FxEffectDef>();
|
||||
memset(fx, 0, sizeof(FxEffectDef));
|
||||
fx->name = memory->Dup(assetName.c_str());
|
||||
return fx;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFx.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFx.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderFx final : public BasicAssetLoader<ASSET_TYPE_FX, FxEffectDef>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderFxImpactTable.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderFxImpactTable::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* fxImpactTable = memory->Create<FxImpactTable>();
|
||||
memset(fxImpactTable, 0, sizeof(FxImpactTable));
|
||||
fxImpactTable->name = memory->Dup(assetName.c_str());
|
||||
return fxImpactTable;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderFxImpactTable final : public BasicAssetLoader<ASSET_TYPE_IMPACT_FX, FxImpactTable>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFxWorld.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFxWorld.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderFxWorld.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderFxWorld::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* fxWorld = memory->Create<FxWorld>();
|
||||
memset(fxWorld, 0, sizeof(FxWorld));
|
||||
fxWorld->name = memory->Dup(assetName.c_str());
|
||||
return fxWorld;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFxWorld.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderFxWorld.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderFxWorld final : public BasicAssetLoader<ASSET_TYPE_FXWORLD, FxWorld>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxImage.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxImage.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderGfxImage.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderGfxImage::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* image = memory->Create<GfxImage>();
|
||||
memset(image, 0, sizeof(GfxImage));
|
||||
image->name = memory->Dup(assetName.c_str());
|
||||
return image;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxImage.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxImage.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderGfxImage final : public BasicAssetLoader<ASSET_TYPE_IMAGE, GfxImage>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderGfxLightDef.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderGfxLightDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* lightDef = memory->Create<GfxLightDef>();
|
||||
memset(lightDef, 0, sizeof(GfxLightDef));
|
||||
lightDef->name = memory->Dup(assetName.c_str());
|
||||
return lightDef;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderGfxLightDef final : public BasicAssetLoader<ASSET_TYPE_LIGHT_DEF, GfxLightDef>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxWorld.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxWorld.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderGfxWorld.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderGfxWorld::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* gfxWorld = memory->Create<GfxWorld>();
|
||||
memset(gfxWorld, 0, sizeof(GfxWorld));
|
||||
gfxWorld->name = memory->Dup(assetName.c_str());
|
||||
return gfxWorld;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxWorld.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGfxWorld.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderGfxWorld final : public BasicAssetLoader<ASSET_TYPE_GFXWORLD, GfxWorld>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderGlassWorld.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderGlassWorld::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* glassWorld = memory->Create<GlassWorld>();
|
||||
memset(glassWorld, 0, sizeof(GlassWorld));
|
||||
glassWorld->name = memory->Dup(assetName.c_str());
|
||||
return glassWorld;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGlassWorld.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderGlassWorld.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderGlassWorld final : public BasicAssetLoader<ASSET_TYPE_GLASSWORLD, GlassWorld>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderLeaderboard.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderLeaderboard::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* leaderboard = memory->Create<LeaderboardDef>();
|
||||
memset(leaderboard, 0, sizeof(LeaderboardDef));
|
||||
leaderboard->name = memory->Dup(assetName.c_str());
|
||||
return leaderboard;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderLeaderboard final : public BasicAssetLoader<ASSET_TYPE_LEADERBOARD, LeaderboardDef>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderLoadedSound.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderLoadedSound::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* loadedSound = memory->Create<LoadedSound>();
|
||||
memset(loadedSound, 0, sizeof(LoadedSound));
|
||||
loadedSound->name = memory->Dup(assetName.c_str());
|
||||
return loadedSound;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderLoadedSound final : public BasicAssetLoader<ASSET_TYPE_LOADED_SOUND, LoadedSound>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderMapEnts.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderMapEnts.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderMapEnts.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderMapEnts::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* mapEnts = memory->Create<MapEnts>();
|
||||
memset(mapEnts, 0, sizeof(MapEnts));
|
||||
mapEnts->name = memory->Dup(assetName.c_str());
|
||||
return mapEnts;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderMapEnts.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderMapEnts.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderMapEnts final : public BasicAssetLoader<ASSET_TYPE_MAP_ENTS, MapEnts>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPathData.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPathData.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderPathData.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderPathData::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* pathData = memory->Create<PathData>();
|
||||
memset(pathData, 0, sizeof(PathData));
|
||||
pathData->name = memory->Dup(assetName.c_str());
|
||||
return pathData;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPathData.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPathData.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderPathData final : public BasicAssetLoader<ASSET_TYPE_PATHDATA, PathData>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderPhysCollmap.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderPhysCollmap::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* collmap = memory->Create<PhysCollmap>();
|
||||
memset(collmap, 0, sizeof(PhysCollmap));
|
||||
collmap->name = memory->Dup(assetName.c_str());
|
||||
return collmap;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderPhysCollmap final : public BasicAssetLoader<ASSET_TYPE_PHYSCOLLMAP, PhysCollmap>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderPhysPreset.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderPhysPreset::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* physPreset = memory->Create<PhysPreset>();
|
||||
memset(physPreset, 0, sizeof(PhysPreset));
|
||||
physPreset->name = memory->Dup(assetName.c_str());
|
||||
return physPreset;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPhysPreset.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderPhysPreset.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderPhysPreset final : public BasicAssetLoader<ASSET_TYPE_PHYSPRESET, PhysPreset>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderPixelShader.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderPixelShader::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* pixelShader = memory->Create<MaterialPixelShader>();
|
||||
memset(pixelShader, 0, sizeof(MaterialPixelShader));
|
||||
pixelShader->name = memory->Dup(assetName.c_str());
|
||||
return pixelShader;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderPixelShader final : public BasicAssetLoader<ASSET_TYPE_PIXELSHADER, MaterialPixelShader>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderSoundAliasList.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderSoundAliasList::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* sndAliasList = memory->Create<snd_alias_list_t>();
|
||||
memset(sndAliasList, 0, sizeof(snd_alias_list_t));
|
||||
sndAliasList->aliasName = memory->Dup(assetName.c_str());
|
||||
return sndAliasList;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderSoundAliasList final : public BasicAssetLoader<ASSET_TYPE_SOUND, snd_alias_list_t>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderSoundCurve.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderSoundCurve::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* sndCurve = memory->Create<SndCurve>();
|
||||
memset(sndCurve, 0, sizeof(SndCurve));
|
||||
sndCurve->filename = memory->Dup(assetName.c_str());
|
||||
return sndCurve;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderSoundCurve.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderSoundCurve.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderSoundCurve final : public BasicAssetLoader<ASSET_TYPE_SOUND_CURVE, SndCurve>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderStructuredDataDef.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderStructuredDataDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* structuredDataDefSet = memory->Create<StructuredDataDefSet>();
|
||||
memset(structuredDataDefSet, 0, sizeof(StructuredDataDefSet));
|
||||
structuredDataDefSet->name = memory->Dup(assetName.c_str());
|
||||
return structuredDataDefSet;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderStructuredDataDef final : public BasicAssetLoader<ASSET_TYPE_STRUCTURED_DATA_DEF, StructuredDataDefSet>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderSurfaceFxTable.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderSurfaceFxTable::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* surfaceFxTable = memory->Create<SurfaceFxTable>();
|
||||
memset(surfaceFxTable, 0, sizeof(SurfaceFxTable));
|
||||
surfaceFxTable->name = memory->Dup(assetName.c_str());
|
||||
return surfaceFxTable;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderSurfaceFxTable final : public BasicAssetLoader<ASSET_TYPE_SURFACE_FX, SurfaceFxTable>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderTechniqueSet.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderTechniqueSet::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* techniqueSet = memory->Create<MaterialTechniqueSet>();
|
||||
memset(techniqueSet, 0, sizeof(MaterialTechniqueSet));
|
||||
techniqueSet->name = memory->Dup(assetName.c_str());
|
||||
return techniqueSet;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderTechniqueSet final : public BasicAssetLoader<ASSET_TYPE_TECHNIQUE_SET, MaterialTechniqueSet>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderTracerDef.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderTracerDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* tracerDef = memory->Create<TracerDef>();
|
||||
memset(tracerDef, 0, sizeof(TracerDef));
|
||||
tracerDef->name = memory->Dup(assetName.c_str());
|
||||
return tracerDef;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderTracerDef.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderTracerDef.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderTracerDef final : public BasicAssetLoader<ASSET_TYPE_TRACER, TracerDef>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderVehicleDef.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderVehicleDef::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* vehicleDef = memory->Create<VehicleDef>();
|
||||
memset(vehicleDef, 0, sizeof(VehicleDef));
|
||||
vehicleDef->name = memory->Dup(assetName.c_str());
|
||||
return vehicleDef;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderVehicleDef.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderVehicleDef.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderVehicleDef final : public BasicAssetLoader<ASSET_TYPE_VEHICLE, VehicleDef>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderVehicleTrack.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderVehicleTrack::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* vehicleTrack = memory->Create<VehicleTrack>();
|
||||
memset(vehicleTrack, 0, sizeof(VehicleTrack));
|
||||
vehicleTrack->name = memory->Dup(assetName.c_str());
|
||||
return vehicleTrack;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderVehicleTrack final : public BasicAssetLoader<ASSET_TYPE_VEHICLE_TRACK, VehicleTrack>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderVertexDecl.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderVertexDecl::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* vertexDecl = memory->Create<MaterialVertexDeclaration>();
|
||||
memset(vertexDecl, 0, sizeof(MaterialVertexDeclaration));
|
||||
vertexDecl->name = memory->Dup(assetName.c_str());
|
||||
return vertexDecl;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderVertexDecl.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderVertexDecl.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderVertexDecl final : public BasicAssetLoader<ASSET_TYPE_VERTEXDECL, MaterialVertexDeclaration>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderVertexShader.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderVertexShader::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* vertexShader = memory->Create<MaterialVertexShader>();
|
||||
memset(vertexShader, 0, sizeof(MaterialVertexShader));
|
||||
vertexShader->name = memory->Dup(assetName.c_str());
|
||||
return vertexShader;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderVertexShader final : public BasicAssetLoader<ASSET_TYPE_VERTEXSHADER, MaterialVertexShader>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXAnim.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXAnim.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderXAnim.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderXAnim::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* anim = memory->Create<XAnimParts>();
|
||||
memset(anim, 0, sizeof(XAnimParts));
|
||||
anim->name = memory->Dup(assetName.c_str());
|
||||
return anim;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXAnim.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXAnim.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderXAnim final : public BasicAssetLoader<ASSET_TYPE_XANIMPARTS, XAnimParts>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXModel.cpp
Normal file
17
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXModel.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderXModel.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderXModel::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* model = memory->Create<XModel>();
|
||||
memset(model, 0, sizeof(XModel));
|
||||
model->name = memory->Dup(assetName.c_str());
|
||||
return model;
|
||||
}
|
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXModel.h
Normal file
14
src/ObjLoading/Game/IW5/AssetLoaders/AssetLoaderXModel.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderXModel final : public BasicAssetLoader<ASSET_TYPE_XMODEL, XModel>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -0,0 +1,17 @@
|
||||
#include "AssetLoaderXModelSurfs.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "Pool/GlobalAssetPool.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace IW5;
|
||||
|
||||
void* AssetLoaderXModelSurfs::CreateEmptyAsset(const std::string& assetName, MemoryManager* memory)
|
||||
{
|
||||
auto* modelSurfs = memory->Create<XModelSurfs>();
|
||||
memset(modelSurfs, 0, sizeof(XModelSurfs));
|
||||
modelSurfs->name = memory->Dup(assetName.c_str());
|
||||
return modelSurfs;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "AssetLoading/BasicAssetLoader.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "SearchPath/ISearchPath.h"
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class AssetLoaderXModelSurfs final : public BasicAssetLoader<ASSET_TYPE_XMODEL_SURFS, XModelSurfs>
|
||||
{
|
||||
public:
|
||||
_NODISCARD void* CreateEmptyAsset(const std::string& assetName, MemoryManager* memory) override;
|
||||
};
|
||||
} // namespace IW5
|
@ -1,14 +1,45 @@
|
||||
#include "ObjLoaderIW5.h"
|
||||
|
||||
#include "AssetLoaders/AssetLoaderAddonMapEnts.h"
|
||||
#include "AssetLoaders/AssetLoaderClipMap.h"
|
||||
#include "AssetLoaders/AssetLoaderComWorld.h"
|
||||
#include "AssetLoaders/AssetLoaderFont.h"
|
||||
#include "AssetLoaders/AssetLoaderFx.h"
|
||||
#include "AssetLoaders/AssetLoaderFxImpactTable.h"
|
||||
#include "AssetLoaders/AssetLoaderFxWorld.h"
|
||||
#include "AssetLoaders/AssetLoaderGfxImage.h"
|
||||
#include "AssetLoaders/AssetLoaderGfxLightDef.h"
|
||||
#include "AssetLoaders/AssetLoaderGfxWorld.h"
|
||||
#include "AssetLoaders/AssetLoaderGlassWorld.h"
|
||||
#include "AssetLoaders/AssetLoaderLeaderboard.h"
|
||||
#include "AssetLoaders/AssetLoaderLoadedSound.h"
|
||||
#include "AssetLoaders/AssetLoaderLocalizeEntry.h"
|
||||
#include "AssetLoaders/AssetLoaderMapEnts.h"
|
||||
#include "AssetLoaders/AssetLoaderMaterial.h"
|
||||
#include "AssetLoaders/AssetLoaderMenuDef.h"
|
||||
#include "AssetLoaders/AssetLoaderMenuList.h"
|
||||
#include "AssetLoaders/AssetLoaderPathData.h"
|
||||
#include "AssetLoaders/AssetLoaderPhysCollmap.h"
|
||||
#include "AssetLoaders/AssetLoaderPhysPreset.h"
|
||||
#include "AssetLoaders/AssetLoaderPixelShader.h"
|
||||
#include "AssetLoaders/AssetLoaderRawFile.h"
|
||||
#include "AssetLoaders/AssetLoaderScriptFile.h"
|
||||
#include "AssetLoaders/AssetLoaderSoundAliasList.h"
|
||||
#include "AssetLoaders/AssetLoaderSoundCurve.h"
|
||||
#include "AssetLoaders/AssetLoaderStringTable.h"
|
||||
#include "AssetLoaders/AssetLoaderStructuredDataDef.h"
|
||||
#include "AssetLoaders/AssetLoaderSurfaceFxTable.h"
|
||||
#include "AssetLoaders/AssetLoaderTechniqueSet.h"
|
||||
#include "AssetLoaders/AssetLoaderTracerDef.h"
|
||||
#include "AssetLoaders/AssetLoaderVehicleDef.h"
|
||||
#include "AssetLoaders/AssetLoaderVehicleTrack.h"
|
||||
#include "AssetLoaders/AssetLoaderVertexDecl.h"
|
||||
#include "AssetLoaders/AssetLoaderVertexShader.h"
|
||||
#include "AssetLoaders/AssetLoaderWeapon.h"
|
||||
#include "AssetLoaders/AssetLoaderWeaponAttachment.h"
|
||||
#include "AssetLoaders/AssetLoaderXAnim.h"
|
||||
#include "AssetLoaders/AssetLoaderXModel.h"
|
||||
#include "AssetLoaders/AssetLoaderXModelSurfs.h"
|
||||
#include "AssetLoading/AssetLoadingManager.h"
|
||||
#include "Game/IW5/GameAssetPoolIW5.h"
|
||||
#include "Game/IW5/GameIW5.h"
|
||||
@ -30,46 +61,46 @@ ObjLoader::ObjLoader()
|
||||
}
|
||||
#define BASIC_LOADER(assetType, assetClass) BasicAssetLoader<assetType, assetClass>
|
||||
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_PHYSPRESET, PhysPreset))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_PHYSCOLLMAP, PhysCollmap))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_XANIMPARTS, XAnimParts))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_XMODEL_SURFS, XModelSurfs))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_XMODEL, XModel))
|
||||
REGISTER_ASSET_LOADER(AssetLoaderPhysPreset)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderPhysCollmap)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderXAnim)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderXModelSurfs)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderXModel)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderMaterial)
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_PIXELSHADER, MaterialPixelShader))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_VERTEXSHADER, MaterialVertexShader))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_VERTEXDECL, MaterialVertexDeclaration))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_TECHNIQUE_SET, MaterialTechniqueSet))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_IMAGE, GfxImage))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_SOUND, snd_alias_list_t))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_SOUND_CURVE, SndCurve))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_LOADED_SOUND, LoadedSound))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_CLIPMAP, clipMap_t))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_COMWORLD, ComWorld))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_GLASSWORLD, GlassWorld))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_PATHDATA, PathData))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_VEHICLE_TRACK, VehicleTrack))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_MAP_ENTS, MapEnts))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_FXWORLD, FxWorld))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_GFXWORLD, GfxWorld))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_LIGHT_DEF, GfxLightDef))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_FONT, Font_s))
|
||||
REGISTER_ASSET_LOADER(AssetLoaderPixelShader)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderVertexShader)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderVertexDecl)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderTechniqueSet)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderGfxImage)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderSoundAliasList)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderSoundCurve)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderLoadedSound)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderClipMap)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderComWorld)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderGlassWorld)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderPathData)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderVehicleTrack)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderMapEnts)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderFxWorld)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderGfxWorld)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderGfxLightDef)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderFont)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderMenuList)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderMenuDef)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderLocalizeEntry)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderWeaponAttachment)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderWeapon)
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_FX, FxEffectDef))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_IMPACT_FX, FxImpactTable))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_SURFACE_FX, SurfaceFxTable))
|
||||
REGISTER_ASSET_LOADER(AssetLoaderFx)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderFxImpactTable)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderSurfaceFxTable)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderRawFile)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderScriptFile)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderStringTable)
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_LEADERBOARD, LeaderboardDef))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_STRUCTURED_DATA_DEF, StructuredDataDefSet))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_TRACER, TracerDef))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_VEHICLE, VehicleDef))
|
||||
REGISTER_ASSET_LOADER(BASIC_LOADER(ASSET_TYPE_ADDON_MAP_ENTS, AddonMapEnts))
|
||||
REGISTER_ASSET_LOADER(AssetLoaderLeaderboard)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderStructuredDataDef)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderTracerDef)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderVehicleDef)
|
||||
REGISTER_ASSET_LOADER(AssetLoaderAddonMapEnts)
|
||||
|
||||
#undef BASIC_LOADER
|
||||
#undef REGISTER_ASSET_LOADER
|
||||
|
Loading…
x
Reference in New Issue
Block a user