summaryrefslogtreecommitdiff
path: root/NW4RTools/Models/Animation/Shared.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-02-19 06:28:18 +0100
committerTreeki <treeki@gmail.com>2012-02-19 06:28:18 +0100
commit364e99d849378546323d1d06307b6773e813b742 (patch)
tree3a30e29e3bd9bd3b3f245425d74b879103e46004 /NW4RTools/Models/Animation/Shared.cs
parentf5f1901be759a9dc3837a4cc2933f75c0ea765b7 (diff)
downloadnw4rtools-364e99d849378546323d1d06307b6773e813b742.tar.gz
nw4rtools-364e99d849378546323d1d06307b6773e813b742.zip
added what is probably horribly broken support for reading animations
Diffstat (limited to '')
-rw-r--r--NW4RTools/Models/Animation/Shared.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/NW4RTools/Models/Animation/Shared.cs b/NW4RTools/Models/Animation/Shared.cs
new file mode 100644
index 0000000..f87bea6
--- /dev/null
+++ b/NW4RTools/Models/Animation/Shared.cs
@@ -0,0 +1,32 @@
+using System;
+
+namespace NW4RTools.Models.Animation {
+ public struct Keyframe {
+ public float Frame, Value, Slope;
+ }
+
+ public struct KeyframeAnim {
+ public bool IsConstant;
+
+ public float ConstValue;
+
+ public Keyframe[] Keyframes;
+
+ // Only valid sometimes
+ // This sucks but I'm not sure how else to do it atm
+ public float BaseValue, Multiplier;
+ public int[] Values;
+ public float[] FloatValues;
+
+ public KeyframeAnim(float cv) {
+ IsConstant = true;
+ ConstValue = cv;
+
+ Keyframes = null;
+
+ BaseValue = Multiplier = 0;
+ Values = null;
+ FloatValues = null;
+ }
+ }
+}