diff options
author | Treeki <treeki@gmail.com> | 2012-02-19 06:28:18 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-02-19 06:28:18 +0100 |
commit | 364e99d849378546323d1d06307b6773e813b742 (patch) | |
tree | 3a30e29e3bd9bd3b3f245425d74b879103e46004 /NW4RTools/Models/Animation/Shared.cs | |
parent | f5f1901be759a9dc3837a4cc2933f75c0ea765b7 (diff) | |
download | nw4rtools-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.cs | 32 |
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; + } + } +} |