diff options
Diffstat (limited to 'NW4RTools/VertexSettings.cs')
-rw-r--r-- | NW4RTools/VertexSettings.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/NW4RTools/VertexSettings.cs b/NW4RTools/VertexSettings.cs index b8a341f..2a0d3ac 100644 --- a/NW4RTools/VertexSettings.cs +++ b/NW4RTools/VertexSettings.cs @@ -8,14 +8,21 @@ namespace NW4RTools { public int[] Colors; public int[] TexCoords; + public byte PosMtxIndex; + public byte[] TexCoordMtxIndex; public void LoadFrom(InputStream ins, VertexSettings vs) { if (vs.PNMatrixIndexExists) - throw new NotImplementedException(); - if (vs.TexCoordMatrixIndexExists[0]) - throw new NotImplementedException(); - // won't bother with the rest + PosMtxIndex = ins.ReadByte(); + + for (int i = 0; i < 8; i++) { + if (vs.TexCoordMatrixIndexExists[i]) { + if (TexCoordMtxIndex == null) + TexCoordMtxIndex = new byte[8]; + TexCoordMtxIndex[i] = ins.ReadByte(); + } + } switch (vs.PositionDesc) { case VertexSettings.DescType.Direct: @@ -34,7 +41,7 @@ namespace NW4RTools { break; } - // not sure how to detect NBT3 yet + // not sure how to detect NBT3 yet -- or if it's even relevant? switch (vs.NormalDesc) { case VertexSettings.DescType.Direct: throw new NotImplementedException(); |