diff options
Diffstat (limited to '')
-rw-r--r-- | NW4RTools/Models/Material.cs | 10 | ||||
-rw-r--r-- | NW4RTools/Models/Model.cs | 5 | ||||
-rw-r--r-- | NW4RTools/Models/Shape.cs | 29 | ||||
-rw-r--r-- | NW4RTools/Models/TextureInfo.cs | 21 |
4 files changed, 56 insertions, 9 deletions
diff --git a/NW4RTools/Models/Material.cs b/NW4RTools/Models/Material.cs index 8ca5082..200c6e7 100644 --- a/NW4RTools/Models/Material.cs +++ b/NW4RTools/Models/Material.cs @@ -20,14 +20,6 @@ namespace NW4RTools.Models { public Matrix TexMatrix; } - public class BoundTextureInfo { - public string TextureName, PaletteName; - public UInt32 TexMapID, TlutID, WrapS, WrapT, MinFilt, MagFilt; - public float LODBias; - public UInt32 MaxAniso; - public bool BiasClamp, DoEdgeLOD; - } - public class Material { @@ -54,7 +46,7 @@ namespace NW4RTools.Models { public ChanCtrl[] ChanCtrls; // Other - public List<BoundTextureInfo> BoundTextures; + public List<TextureInfo> TextureInfos; public Shader ShaderRef; // Display Lists diff --git a/NW4RTools/Models/Model.cs b/NW4RTools/Models/Model.cs index d1c170b..c0297db 100644 --- a/NW4RTools/Models/Model.cs +++ b/NW4RTools/Models/Model.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; + namespace NW4RTools.Models { public class Model { public enum ScaleModeType { @@ -17,6 +19,9 @@ namespace NW4RTools.Models { public ResDict<VertexTexCoordData> VtxTexCoordData; public ResDict<Material> Materials; public ResDict<Shader> Shaders; + public ResDict<Shape> Shapes; + public ResDict<List<TexMatPairing>> PairingLookupByTexture; + public ResDict<List<TexMatPairing>> PairingLookupByPalette; /*public ResDict Bytecode, Nodes, VtxPosData, VtsNrmData, VtxClrData, VtxTexCoordData; public ResDict VtxFurVecData, VtxFurPosData, Materials, Shaders, Shapes; diff --git a/NW4RTools/Models/Shape.cs b/NW4RTools/Models/Shape.cs new file mode 100644 index 0000000..72cdbaa --- /dev/null +++ b/NW4RTools/Models/Shape.cs @@ -0,0 +1,29 @@ +using System; + +namespace NW4RTools.Models { + public class Shape { + public Int32 MatrixID; + public byte[] Unk; + public byte[] DisplayList1, DisplayList2; + public UInt32 DataFlags; + public UInt32 Flags; + public UInt32 Index; + + public UInt32 VertexCount; + public UInt32 PolygonCount; + + // todo: use refs for this + public Int16 PosDataIndex; + public Int16 NrmDataIndex; + public Int16[] ClrDataIndex; + public Int16[] TexCoordDataIndex; + public Int16 FurVecDataIndex; + public Int16 FurPosDataIndex; + + // todo: more + + public Shape() { + } + } +} + diff --git a/NW4RTools/Models/TextureInfo.cs b/NW4RTools/Models/TextureInfo.cs new file mode 100644 index 0000000..c8bc9a4 --- /dev/null +++ b/NW4RTools/Models/TextureInfo.cs @@ -0,0 +1,21 @@ +using System; + +namespace NW4RTools.Models { + public class TextureInfo { + public string TextureName, PaletteName; + public UInt32 TexMapID, TlutID, WrapS, WrapT, MinFilt, MagFilt; + public float LODBias; + public UInt32 MaxAniso; + public bool BiasClamp, DoEdgeLOD; + + public TextureInfo() { + } + } + + + public class TexMatPairing { + public TextureInfo Texture; + public Material Material; + } +} + |