public override void LoadSection(BinaryReaderEx reader) { base.LoadSection(reader); this.MotionInfoBlocks = new List<MotionInfoBlock>(); int numMIBs = (this.SectionLength - 4) / bytesPerBlock; for (var i = 0; i < numMIBs; i++) { var mib = new MotionInfoBlock(); mib.MotionName = reader.ReadFixedLengthString(16).Trim(); mib.FrameCount = reader.ReadSByte(); mib.CurveCoefficient = reader.ReadSByte(); mib.InitialVelocity = reader.ReadSByte(); mib.RollingFrameEnd = reader.ReadSByte(); mib.CaseOfRightFootEnd = reader.ReadSByte(); mib.CaseOfLeftFootEnd = reader.ReadSByte(); mib.Unk1 = reader.ReadSByte(); mib.Unk2 = reader.ReadSByte(); mib.SubstituteMotionName = reader.ReadFixedLengthString(16).Trim(); mib.SubstituteMotionStartFrame = reader.ReadSByte(); mib.IdleFramesToBlend = reader.ReadSByte(); mib.FrameStartingRotationStop = reader.ReadSByte(); mib.EndsOnWhichFoot = reader.ReadSByte(); mib.Unknown = reader.ReadInt16(); this.MotionInfoBlocks.Add(mib); } }
public override void LoadSection(BinaryReaderEx reader) { base.LoadSection(reader); this.MotionInfoBlocks = new List <MotionInfoBlock>(); int numMIBs = (this.SectionLength - 4) / bytesPerBlock; for (var i = 0; i < numMIBs; i++) { var mib = new MotionInfoBlock(); mib.MotionName = reader.ReadFixedLengthString(16).Trim(); mib.FrameCount = reader.ReadSByte(); mib.CurveCoefficient = reader.ReadSByte(); mib.InitialVelocity = reader.ReadSByte(); mib.RollingFrameEnd = reader.ReadSByte(); mib.CaseOfRightFootEnd = reader.ReadSByte(); mib.CaseOfLeftFootEnd = reader.ReadSByte(); mib.Unk1 = reader.ReadSByte(); mib.Unk2 = reader.ReadSByte(); mib.SubstituteMotionName = reader.ReadFixedLengthString(16).Trim(); mib.SubstituteMotionStartFrame = reader.ReadSByte(); mib.IdleFramesToBlend = reader.ReadSByte(); mib.FrameStartingRotationStop = reader.ReadSByte(); mib.EndsOnWhichFoot = reader.ReadSByte(); mib.Unknown = reader.ReadInt16(); this.MotionInfoBlocks.Add(mib); } }