public void Deserialize(Stream stream, MotHeader header, int boneEnd, bool bFMode) { stream.Position = header.InfoOffset; var serializer = new BinarySerializer(); Info = serializer.Deserialize <MotInfo>(stream); stream.Position = header.UnkDataOffset; while (stream.Position < header.DataOffset) { Settings.Add(DataStream.ReadUInt32(stream)); } for (var i = 0; i < MotFile.MaxData; ++i) { var flagCount = MotFile.FrameValueOffset.ContainsKey(i) ? MotFile.FrameValueOffset[i] : 0; var motion = MotData.Deserialize(stream, flagCount, bFMode); Data.Add(motion); } Skeleton = new MotSkeleton(Data); stream.Position = header.BoneOffset; Bones = new MotBones(); Bones.GetIds(stream, boneEnd); }
public MotAnim() { Info = new MotInfo(); Settings = new List <uint>(); Data = new List <MotData>(); Bones = new MotBones(); }