diff options
Diffstat (limited to 'NW4RTools/BrresWriter.cs')
-rw-r--r-- | NW4RTools/BrresWriter.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/NW4RTools/BrresWriter.cs b/NW4RTools/BrresWriter.cs index cf48cdd..f0dc0a1 100644 --- a/NW4RTools/BrresWriter.cs +++ b/NW4RTools/BrresWriter.cs @@ -329,15 +329,19 @@ namespace NW4RTools { CurrentPos += 0x18; // ResTexObj + LogPosition("Material ResTexObj: " + kv.Key); CurrentPos += 0x104; // ResTlutObj + LogPosition("Material ResTlutObj: " + kv.Key); CurrentPos += 0x64; // ResTexSrt + LogPosition("Material ResTexSrt: " + kv.Key); CurrentPos += 8 + (0x14 * 8) + (0x34 * 8); // ResMatChan + LogPosition("Material ResMatChan: " + kv.Key); CurrentPos += 0x28; // Texture Infos @@ -1032,6 +1036,15 @@ namespace NW4RTools { // Display Lists Output.AlignTo(0x20); + if (mat.PixDL.Length != 0x20) + throw new Exception("Material " + kv.Key + " PixDL must be size 0x20"); + if (mat.TevColorDL.Length != 0x80) + throw new Exception("Material " + kv.Key + " TevColorDL must be size 0x20"); + if (mat.IndMtxAndScaleDL.Length != 0x40) + throw new Exception("Material " + kv.Key + " IndMtxAndScaleDL must be size 0x20"); + if (mat.TexCoordGenDL.Length != 0xA0) + throw new Exception("Material " + kv.Key + " TexCoordGenDL must be size 0x20"); + Output.WriteBytes(mat.PixDL); Output.WriteBytes(mat.TevColorDL); Output.WriteBytes(mat.IndMtxAndScaleDL); |