2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-07 11:47:48 +00:00
Files
OpenAssetTools/src/ObjLoading/Game/T6/BSP/Linker/SkinnedVertsLinker.cpp
2025-11-09 23:31:25 +01:00

23 lines
822 B
C++

#include "SkinnedVertsLinker.h"
namespace BSP
{
SkinnedVertsLinker::SkinnedVertsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)
: m_memory(memory),
m_search_path(searchPath),
m_context(context)
{
}
T6::SkinnedVertsDef* SkinnedVertsLinker::LinkSkinnedVerts(const BSPData& bsp) const
{
// Pretty sure maxSkinnedVerts relates to the max amount of xmodel skinned verts a map will have
// But setting it to the world vertex count seems to work
auto* skinnedVerts = m_memory.Alloc<T6::SkinnedVertsDef>();
skinnedVerts->name = m_memory.Dup("skinnedverts");
skinnedVerts->maxSkinnedVerts = static_cast<unsigned int>(bsp.gfxWorld.vertices.size());
return skinnedVerts;
}
} // namespace BSP