Skip to content

Commit

Permalink
Merge pull request #36 from thunderysteak/master
Browse files Browse the repository at this point in the history
Compatibility support for Granny models reporting as UInt8 instead of NormalUInt8
  • Loading branch information
Norbyte authored Apr 26, 2020
2 parents 11968f1 + 55756dd commit 27a6a28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions LSLib/Granny/Model/Vertex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ public VertexDescriptor ConstructDescriptor(MemberDefinition memberDefn, StructD
{
desc.ColorMapType = ColorMapType.Byte4;
}
//Some Granny2 model formats report their color maps as UInt8 type instead of NormalUInt8, causing it to fail checks.
else if (member.Type == MemberType.UInt8 && member.ArraySize == 4)
{
desc.ColorMapType = ColorMapType.Byte4;
}
else
{
throw new Exception($"Unsupported color map type: {member.Type}, {member.ArraySize}");
Expand Down

0 comments on commit 27a6a28

Please sign in to comment.