forked from Ryan-rsm-McKenzie/CommonLibF4
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#pragma once | ||
|
||
namespace RE | ||
{ | ||
class NiPoint2; | ||
class NiPoint3; | ||
class NiColorA; | ||
} | ||
|
||
namespace RE::BSGraphics::Utility | ||
{ | ||
inline std::uint64_t PackVertexData( | ||
std::uint32_t a_numVertices, | ||
NiPoint3* a_positions, | ||
NiPoint2* a_texCoords0, | ||
NiColorA* a_texCoords1, | ||
NiPoint3* a_normals, | ||
NiPoint3* a_binormals, | ||
NiPoint3* a_tangents, | ||
NiColorA* a_colors, | ||
NiColorA* a_skinBoneWeights, | ||
std::uint8_t* a_skinBoneIndices, | ||
NiColorA* a_landscapeData1, | ||
NiColorA* a_landscapeData2, | ||
float* a_eyeData, | ||
void* a_buffer, | ||
std::uint32_t* a_bufferSize, | ||
std::uint16_t* a_vertexMap, | ||
std::uint32_t a_dynamicFlags, | ||
std::uint16_t* a_tangentXBuffer, | ||
std::uint32_t a_tangentXBufferStride) | ||
{ | ||
using func_t = decltype(&PackVertexData); | ||
static REL::Relocation<func_t> func{ REL::ID(2277106) }; | ||
return func(a_numVertices, a_positions, a_texCoords0, a_texCoords1, a_normals, a_binormals, a_tangents, a_colors, a_skinBoneWeights, a_skinBoneIndices, a_landscapeData1, a_landscapeData2, a_eyeData, a_buffer, a_bufferSize, a_vertexMap, a_dynamicFlags, a_tangentXBuffer, a_tangentXBufferStride); | ||
|
||
} | ||
|
||
inline void UnpackVertexData( | ||
const std::uint8_t* a_vertices, | ||
const std::uint16_t a_index, | ||
const std::uint64_t a_vertexDesc, | ||
NiPoint3* a_position, | ||
NiPoint2* a_texCoord0, | ||
NiPoint2* a_texCoord1, | ||
NiPoint3* a_normal, | ||
NiPoint3* a_binormal, | ||
NiPoint3* a_tangent, | ||
NiColorA* a_color, | ||
NiColorA* a_skinBoneWeights, | ||
std::uint8_t* a_boneIndex0, | ||
std::uint8_t* a_boneIndex1, | ||
std::uint8_t* a_boneIndex2, | ||
std::uint8_t* a_boneIndex3) | ||
{ | ||
using func_t = decltype(&UnpackVertexData); | ||
static REL::Relocation<func_t> func{ REL::ID(2277129) }; | ||
func(a_vertices, a_index, a_vertexDesc, a_position, a_texCoord0, a_texCoord1, a_normal, a_binormal, a_tangent, a_color, a_skinBoneWeights, a_boneIndex0, a_boneIndex1, a_boneIndex2, a_boneIndex3); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters