summaryrefslogtreecommitdiff
path: root/NW4RTools/Models/Animation/CharacterAnim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'NW4RTools/Models/Animation/CharacterAnim.cs')
-rw-r--r--NW4RTools/Models/Animation/CharacterAnim.cs96
1 files changed, 69 insertions, 27 deletions
diff --git a/NW4RTools/Models/Animation/CharacterAnim.cs b/NW4RTools/Models/Animation/CharacterAnim.cs
index 33c30ce..dd496f6 100644
--- a/NW4RTools/Models/Animation/CharacterAnim.cs
+++ b/NW4RTools/Models/Animation/CharacterAnim.cs
@@ -1,44 +1,86 @@
using System;
+
namespace NW4RTools.Models.Animation {
public class CharacterAnim {
[FlagsAttribute]
public enum Flags : uint {
- Unk0 = 1,
- Unk1 = 2,
- Unk2 = 4,
- Unk3 = 8,
- Unk4 = 0x10,
+ AlwaysSet = 1,
+ Identity = 2,
+ RtZero = 4,
+ ScaleOne = 8,
+ ScaleUniform = 0x10,
RotateZero = 0x20,
TranslateZero = 0x40,
- Unk7 = 0x80,
- Unk8 = 0x100,
- Unk9 = 0x200,
- Unk10 = 0x400,
- Unk11 = 0x800,
- Unk12 = 0x1000,
- Unk13 = 0x2000,
- Unk14 = 0x4000,
- Unk15 = 0x8000,
- Unk16 = 0x10000,
- Unk17 = 0x20000,
- Unk18 = 0x40000,
- Unk19 = 0x80000,
- Unk20 = 0x100000,
- Unk21 = 0x200000,
+ ScaleUseModel = 0x80,
+ RotateUseModel = 0x100,
+ TranslateUseModel = 0x200,
+ ScaleCompensateApply = 0x400,
+ ScaleCompensateParent = 0x800,
+ ClassicScaleOff = 0x1000,
+ ScaleXConstant = 0x2000,
+ ScaleYConstant = 0x4000,
+ ScaleZConstant = 0x8000,
+ RotateXConstant = 0x10000,
+ RotateYConstant = 0x20000,
+ RotateZConstant = 0x40000,
+ TranslateXConstant = 0x80000,
+ TranslateYConstant = 0x100000,
+ TranslateZConstant = 0x200000,
CalcScale = 0x400000,
CalcRotate = 0x800000,
CalcTranslate = 0x1000000,
- Unk25 = 0x2000000,
- Unk26 = 0x4000000,
- Unk27 = 0x8000000,
- Unk28 = 0x10000000,
- Unk29 = 0x20000000,
- Unk30 = 0x40000000,
- Unk31 = 0x80000000,
+ ScaleFormatMask = 0x6000000,
+ RotateFormatMask = 0x38000000,
+ TranslateFormatMask = 0xC0000000,
+
+ ScaleXNotExist = Identity | ScaleOne | ScaleUseModel,
+ ScaleYNotExist = Identity | ScaleOne | ScaleUniform | ScaleUseModel,
+ ScaleZNotExist = Identity | ScaleOne | ScaleUniform | ScaleUseModel,
+ RotateXNotExist = Identity | RtZero | RotateZero | RotateUseModel,
+ RotateYNotExist = Identity | RtZero | RotateZero | RotateUseModel,
+ RotateZNotExist = Identity | RtZero | RotateZero | RotateUseModel,
+ TranslateXNotExist = Identity | RtZero | TranslateZero | TranslateUseModel,
+ TranslateYNotExist = Identity | RtZero | TranslateZero | TranslateUseModel,
+ TranslateZNotExist = Identity | RtZero | TranslateZero | TranslateUseModel,
+
+ NonComputableFlags = ScaleCompensateApply | ScaleCompensateParent | ClassicScaleOff,
}
+ public enum STFormatType {
+ Constant = 0,
+ Data32 = 1,
+ Data48 = 2,
+ Data96 = 3,
+ }
+
+ public enum RotateFormatType {
+ Constant = 0,
+ Data32 = 1,
+ Data48 = 2,
+ Data96 = 3,
+ DataUnk4 = 4,
+ DataUnk5 = 5,
+ DataUnk6 = 6,
+ Zero = 7,
+ }
+
+ public Model.ScaleModeType ScaleMode;
+ public bool Loop;
+
+ public UInt16 FrameCount;
+
+ public ResDict<Node> Nodes;
+
public class Node {
+ public CharacterAnim.Flags Flags;
+
+ public KeyframeAnim ScaleX, ScaleY, ScaleZ;
+ public KeyframeAnim RotateX, RotateY, RotateZ;
+ public KeyframeAnim TranslateX, TranslateY, TranslateZ;
+ public STFormatType ScaleFormat;
+ public STFormatType TranslateFormat;
+ public RotateFormatType RotateFormat;
}
public CharacterAnim() {