summaryrefslogtreecommitdiff
path: root/NW4RTools/Models
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-03-03 04:53:56 +0100
committerTreeki <treeki@gmail.com>2011-03-03 04:53:56 +0100
commitab340fe4dc87086336643b6b616df6efdfac796b (patch)
treeaa01265000e80c8348631f3ae67cc6ded16d90bb /NW4RTools/Models
parent6b14bc71cb699b72ca6cf164b7b800add414dec6 (diff)
downloadnw4rtools-ab340fe4dc87086336643b6b616df6efdfac796b.tar.gz
nw4rtools-ab340fe4dc87086336643b6b616df6efdfac796b.zip
working (but not 100% tested) model and texture writing. a few other fixes, etc
Diffstat (limited to '')
-rw-r--r--NW4RTools/Models/Animation/CharacterAnim.cs8
-rw-r--r--NW4RTools/Models/Animation/ColorAnim.cs8
-rw-r--r--NW4RTools/Models/Animation/TextureSRTAnim.cs8
-rw-r--r--NW4RTools/Models/Material.cs2
-rw-r--r--NW4RTools/Models/Model.cs2
-rw-r--r--NW4RTools/Models/Shader.cs19
-rw-r--r--NW4RTools/Models/Shape.cs2
7 files changed, 48 insertions, 1 deletions
diff --git a/NW4RTools/Models/Animation/CharacterAnim.cs b/NW4RTools/Models/Animation/CharacterAnim.cs
new file mode 100644
index 0000000..951969e
--- /dev/null
+++ b/NW4RTools/Models/Animation/CharacterAnim.cs
@@ -0,0 +1,8 @@
+using System;
+namespace NW4RTools.Models.Animation {
+ public class CharacterAnim {
+ public CharacterAnim() {
+ }
+ }
+}
+
diff --git a/NW4RTools/Models/Animation/ColorAnim.cs b/NW4RTools/Models/Animation/ColorAnim.cs
new file mode 100644
index 0000000..e1e14bc
--- /dev/null
+++ b/NW4RTools/Models/Animation/ColorAnim.cs
@@ -0,0 +1,8 @@
+using System;
+namespace NW4RTools.Models.Animation {
+ public class ColorAnim {
+ public ColorAnim() {
+ }
+ }
+}
+
diff --git a/NW4RTools/Models/Animation/TextureSRTAnim.cs b/NW4RTools/Models/Animation/TextureSRTAnim.cs
new file mode 100644
index 0000000..edc3593
--- /dev/null
+++ b/NW4RTools/Models/Animation/TextureSRTAnim.cs
@@ -0,0 +1,8 @@
+using System;
+namespace NW4RTools.Models.Animation {
+ public class TextureSRTAnim {
+ public TextureSRTAnim() {
+ }
+ }
+}
+
diff --git a/NW4RTools/Models/Material.cs b/NW4RTools/Models/Material.cs
index 200c6e7..9e90348 100644
--- a/NW4RTools/Models/Material.cs
+++ b/NW4RTools/Models/Material.cs
@@ -36,6 +36,8 @@ namespace NW4RTools.Models {
// ResTexObj and ResTlutObj
public byte[][] TexObj;
+
+ public UInt32 TlutFlag;
public byte[] TlutObj;
// ResTexSrt
diff --git a/NW4RTools/Models/Model.cs b/NW4RTools/Models/Model.cs
index c0297db..71edaf3 100644
--- a/NW4RTools/Models/Model.cs
+++ b/NW4RTools/Models/Model.cs
@@ -30,6 +30,8 @@ namespace NW4RTools.Models {
public ScaleModeType ScaleMode;
public TexMatrixModeType TexMatrixMode;
+ public UInt32 VertexCount, TriangleCount;
+
public bool UsesNrmMtxArray, UsesTexMtxArray;
public Int32[] MatrixIDtoNodeID;
diff --git a/NW4RTools/Models/Shader.cs b/NW4RTools/Models/Shader.cs
index 767470e..6510110 100644
--- a/NW4RTools/Models/Shader.cs
+++ b/NW4RTools/Models/Shader.cs
@@ -10,6 +10,25 @@ namespace NW4RTools.Models {
public Shader() {
}
+
+
+ public bool DataMatches(Shader another) {
+ if (another.TevStageCount != TevStageCount)
+ return false;
+
+ if (another.Unk1 != Unk1 || another.Unk2 != Unk2)
+ return false;
+
+ if (another.DisplayList.Length != DisplayList.Length)
+ return false;
+
+ for (int i = 0; i < DisplayList.Length; i++) {
+ if (another.DisplayList[i] != DisplayList[i])
+ return false;
+ }
+
+ return true;
+ }
}
}
diff --git a/NW4RTools/Models/Shape.cs b/NW4RTools/Models/Shape.cs
index 6bc7e44..87bf370 100644
--- a/NW4RTools/Models/Shape.cs
+++ b/NW4RTools/Models/Shape.cs
@@ -21,7 +21,7 @@ namespace NW4RTools.Models {
public Int16 FurVecDataIndex;
public Int16 FurPosDataIndex;
- // todo: more
+ public UInt16[] ExtraData;
public Shape() {
}