From fe451ef6fb5ea07b45fdaf4218001558bb171ef0 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 5 Feb 2011 04:34:12 +0100 Subject: progress on material reading. still need to add DL handling and figure out what the shader data offset is for (probably points to an entry in the Shaders dict) --- NW4RTools/Models/Material.cs | 11 +++++++++++ NW4RTools/Models/Model.cs | 1 + 2 files changed, 12 insertions(+) (limited to 'NW4RTools/Models') diff --git a/NW4RTools/Models/Material.cs b/NW4RTools/Models/Material.cs index bb1b85a..4540b0d 100644 --- a/NW4RTools/Models/Material.cs +++ b/NW4RTools/Models/Material.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace NW4RTools.Models { public class ChanCtrl { @@ -7,6 +8,8 @@ namespace NW4RTools.Models { public UInt32 FlagC, FlagA; } + + // TODO: Rename this class? public class SRTSettingInfo { public float ScaleX, ScaleY, Rotate, TranslateX, TranslateY; @@ -22,6 +25,7 @@ namespace NW4RTools.Models { public UInt32 TexMapID, TlutID, WrapS, WrapT, MinFilt, MagFilt; public float LODBias; public UInt32 MaxAniso; + public bool BiasClamp, DoEdgeLOD; } @@ -43,8 +47,15 @@ namespace NW4RTools.Models { public byte[] TlutObj; // ResTexSrt + public UInt32 TexMatrixType; public SRTSettingInfo[] SRTSettings; + // ResMatChan + public ChanCtrl[] ChanCtrls; + + // Other + public List BoundTextures; + // UNFINISHED public Material() { diff --git a/NW4RTools/Models/Model.cs b/NW4RTools/Models/Model.cs index ea95f4f..8fa576e 100644 --- a/NW4RTools/Models/Model.cs +++ b/NW4RTools/Models/Model.cs @@ -15,6 +15,7 @@ namespace NW4RTools.Models { public ResDict VtxNrmData; public ResDict VtxClrData; public ResDict VtxTexCoordData; + public ResDict Materials; /*public ResDict Bytecode, Nodes, VtxPosData, VtsNrmData, VtxClrData, VtxTexCoordData; public ResDict VtxFurVecData, VtxFurPosData, Materials, Shaders, Shapes; -- cgit v1.2.3