1
0
mirror of synced 2024-09-23 19:18:21 +02:00

CMDL : use the right tex coord target for dkctf

This commit is contained in:
KillzXGaming 2023-02-16 17:28:58 -05:00
parent afe7ab3890
commit d1820ba8f0
2 changed files with 6 additions and 3 deletions

View File

@ -42,7 +42,7 @@ namespace DKCTF
/// <summary>
/// Gets a vertex list from the provided buffer and descriptor info.
/// </summary>
public static CMDL.CVertex[] LoadVertexBuffer(List<byte[]> buffers, int startIndex, CMDL.VertexBuffer vertexInfo, bool isLittleEndian)
public static CMDL.CVertex[] LoadVertexBuffer(List<byte[]> buffers, int startIndex, CMDL.VertexBuffer vertexInfo, bool isLittleEndian, bool swapTexCoord)
{
var vertices = new CMDL.CVertex[vertexInfo.VertexCount];
@ -72,7 +72,10 @@ namespace DKCTF
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
break;
case CMDL.EVertexComponent.in_texCoord1:
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
if (swapTexCoord)
vertex.TexCoord0 = ReadData(reader, comp.Format).Xy;
else
vertex.TexCoord1 = ReadData(reader, comp.Format).Xy;
break;
case CMDL.EVertexComponent.in_texCoord2:
vertex.TexCoord2 = ReadData(reader, comp.Format).Xy;

View File

@ -158,7 +158,7 @@ namespace DKCTF
if (!this.IsMPR)
bufferID = j;
var vertices = BufferHelper.LoadVertexBuffer(vertexData, bufferID, vertexInfo, IsSwitch);
var vertices = BufferHelper.LoadVertexBuffer(vertexData, bufferID, vertexInfo, IsSwitch, this.IsMPR);
//Read
foreach (var mesh in Meshes)