From 364e99d849378546323d1d06307b6773e813b742 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 19 Feb 2012 06:28:18 +0100 Subject: added what is probably horribly broken support for reading animations --- NW4RTools/Models/Animation/Shared.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 NW4RTools/Models/Animation/Shared.cs (limited to 'NW4RTools/Models/Animation/Shared.cs') 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; + } + } +} -- cgit v1.2.3