public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); AnimName = buffer.ReadCharArray(65); Velocity = buffer.ReadFloat32(); Field3 = buffer.ReadFloat32(); Field4 = buffer.ReadFloat32(); Field5 = buffer.ReadFloat32(); Field6 = buffer.ReadFloat32(); Time1 = buffer.ReadInt(32); Time2 = buffer.ReadInt(32); Field9 = buffer.ReadFloat32(); Field10 = buffer.ReadFloat32(); Field11 = buffer.ReadFloat32(); Field12 = buffer.ReadFloat32(); Field13 = buffer.ReadInt(32); BoneNameCount = buffer.ReadInt(32); serBoneNames = new SerializeData(); serBoneNames.Parse(buffer); //still checking variablearrays this.BoneNames = new List<BoneName>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _BoneNames.Count; loop12++) { _BoneNames[loop12] = new BoneName(); _BoneNames[loop12].Parse(buffer); } KeyframePosCount = buffer.ReadInt(32); serTranslationCurves = new SerializeData(); serTranslationCurves.Parse(buffer); //still checking variablearrays this.TranslationCurves = new List<TranslationCurve>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _TranslationCurves.Count; loop12++) { _TranslationCurves[loop12] = new TranslationCurve(); _TranslationCurves[loop12].Parse(buffer); } serRotationCurves = new SerializeData(); serRotationCurves.Parse(buffer); //still checking variablearrays this.RotationCurves = new List<RotationCurve>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _RotationCurves.Count; loop12++) { _RotationCurves[loop12] = new RotationCurve(); _RotationCurves[loop12].Parse(buffer); } serScaleCurves = new SerializeData(); serScaleCurves.Parse(buffer); //still checking variablearrays this.ScaleCurves = new List<ScaleCurve>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _ScaleCurves.Count; loop12++) { _ScaleCurves[loop12] = new ScaleCurve(); _ScaleCurves[loop12].Parse(buffer); } Field24 = buffer.ReadFloat32(); Field25 = buffer.ReadFloat32(); Field26 = buffer.ReadFloat32(); Field27 = buffer.ReadFloat32(); Field28 = new Vector3D(); Field28.Parse(buffer); Field29 = new Vector3D(); Field29.Parse(buffer); Field30 = new Vector3D(); Field30.Parse(buffer); Field31 = new Vector3D(); Field31.Parse(buffer); Field32 = buffer.ReadFloat32(); KeyedAttachmentsCount = buffer.ReadInt(32); serKeyedAttachments = new SerializeData(); serKeyedAttachments.Parse(buffer); //still checking variablearrays this.KeyedAttachments = new List<KeyframedAttachment>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _KeyedAttachments.Count; loop12++) { _KeyedAttachments[loop12] = new KeyframedAttachment(); _KeyedAttachments[loop12].Parse(buffer); } serKeyframePosList = new SerializeData(); serKeyframePosList.Parse(buffer); //still checking variablearrays this.KeyframePosList = new List<Vector3D>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _KeyframePosList.Count; loop12++) { _KeyframePosList[loop12] = new Vector3D(); _KeyframePosList[loop12].Parse(buffer); } serNonlinearOffset = new SerializeData(); serNonlinearOffset.Parse(buffer); //still checking variablearrays this.NonlinearOffset = new List<Vector3D>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _NonlinearOffset.Count; loop12++) { _NonlinearOffset[loop12] = new Vector3D(); _NonlinearOffset[loop12].Parse(buffer); } Velocity3D = new VelocityVector3D(); Velocity3D.Parse(buffer); Link = new HardpointLink(); Link.Parse(buffer); Field42 = buffer.ReadCharArray(256); Field43 = buffer.ReadCharArray(256); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = stream.ReadValueS32(); stream.Position = offset + 4; AnimName = stream.ReadString(65); stream.Position = offset + 72; Velocity = stream.ReadValueF32(); stream.Position = offset + 76; Field3 = stream.ReadValueF32(); stream.Position = offset + 80; Field4 = stream.ReadValueF32(); stream.Position = offset + 84; Field5 = stream.ReadValueF32(); stream.Position = offset + 88; Field6 = stream.ReadValueF32(); stream.Position = offset + 92; Time1 = stream.ReadValueS32(); stream.Position = offset + 96; Time2 = stream.ReadValueS32(); stream.Position = offset + 104; Field9 = stream.ReadValueF32(); stream.Position = offset + 108; Field10 = stream.ReadValueF32(); stream.Position = offset + 112; Field11 = stream.ReadValueF32(); stream.Position = offset + 116; Field12 = stream.ReadValueF32(); stream.Position = offset + 100; Field13 = stream.ReadValueS32(); stream.Position = offset + 120; BoneNameCount = stream.ReadValueS32(); stream.Position = offset + 124; serBoneNames = new SerializeData(); serBoneNames.FileRead(stream, stream.Position); stream.Position = offset + 136; //still checking variablearrays BoneNames = new List<BoneName>(); for(int i = 0; i < (int)(serBoneNames.Field1 / 64); i++) { stream.Position = serBoneNames.Field0 + 16 + (64*i) ; BoneName temp12_BoneNames; temp12_BoneNames = new BoneName(); temp12_BoneNames.FileRead(stream, stream.Position); _BoneNames.Add(temp12_BoneNames); } stream.Position = offset + 144; KeyframePosCount = stream.ReadValueS32(); stream.Position = offset + 148; serTranslationCurves = new SerializeData(); serTranslationCurves.FileRead(stream, stream.Position); stream.Position = offset + 160; //still checking variablearrays TranslationCurves = new List<TranslationCurve>(); for(int i = 0; i < (int)(serTranslationCurves.Field1 / 24); i++) { stream.Position = serTranslationCurves.Field0 + 16 + (24*i) ; TranslationCurve temp12_TranslationCurves; temp12_TranslationCurves = new TranslationCurve(); temp12_TranslationCurves.FileRead(stream, stream.Position); _TranslationCurves.Add(temp12_TranslationCurves); } stream.Position = offset + 168; serRotationCurves = new SerializeData(); serRotationCurves.FileRead(stream, stream.Position); stream.Position = offset + 176; //still checking variablearrays RotationCurves = new List<RotationCurve>(); for(int i = 0; i < (int)(serRotationCurves.Field1 / 24); i++) { stream.Position = serRotationCurves.Field0 + 16 + (24*i) ; RotationCurve temp12_RotationCurves; temp12_RotationCurves = new RotationCurve(); temp12_RotationCurves.FileRead(stream, stream.Position); _RotationCurves.Add(temp12_RotationCurves); } stream.Position = offset + 184; serScaleCurves = new SerializeData(); serScaleCurves.FileRead(stream, stream.Position); stream.Position = offset + 192; //still checking variablearrays ScaleCurves = new List<ScaleCurve>(); for(int i = 0; i < (int)(serScaleCurves.Field1 / 24); i++) { stream.Position = serScaleCurves.Field0 + 16 + (24*i) ; ScaleCurve temp12_ScaleCurves; temp12_ScaleCurves = new ScaleCurve(); temp12_ScaleCurves.FileRead(stream, stream.Position); _ScaleCurves.Add(temp12_ScaleCurves); } stream.Position = offset + 200; Field24 = stream.ReadValueF32(); stream.Position = offset + 204; Field25 = stream.ReadValueF32(); stream.Position = offset + 208; Field26 = stream.ReadValueF32(); stream.Position = offset + 212; Field27 = stream.ReadValueF32(); stream.Position = offset + 216; Field28 = new Vector3D(); Field28.FileRead(stream, stream.Position); stream.Position = offset + 228; Field29 = new Vector3D(); Field29.FileRead(stream, stream.Position); stream.Position = offset + 240; Field30 = new Vector3D(); Field30.FileRead(stream, stream.Position); stream.Position = offset + 252; Field31 = new Vector3D(); Field31.FileRead(stream, stream.Position); stream.Position = offset + 264; Field32 = stream.ReadValueF32(); stream.Position = offset + 276; KeyedAttachmentsCount = stream.ReadValueS32(); stream.Position = offset + 268; serKeyedAttachments = new SerializeData(); serKeyedAttachments.FileRead(stream, stream.Position); stream.Position = offset + 280; //still checking variablearrays KeyedAttachments = new List<KeyframedAttachment>(); for(int i = 0; i < (int)(serKeyedAttachments.Field1 / 412); i++) { stream.Position = serKeyedAttachments.Field0 + 16 + (412*i) ; KeyframedAttachment temp12_KeyedAttachments; temp12_KeyedAttachments = new KeyframedAttachment(); temp12_KeyedAttachments.FileRead(stream, stream.Position); _KeyedAttachments.Add(temp12_KeyedAttachments); } stream.Position = offset + 288; serKeyframePosList = new SerializeData(); serKeyframePosList.FileRead(stream, stream.Position); stream.Position = offset + 296; //still checking variablearrays KeyframePosList = new List<Vector3D>(); for(int i = 0; i < (int)(serKeyframePosList.Field1 / 12); i++) { stream.Position = serKeyframePosList.Field0 + 16 + (12*i) ; Vector3D temp12_KeyframePosList; temp12_KeyframePosList = new Vector3D(); temp12_KeyframePosList.FileRead(stream, stream.Position); _KeyframePosList.Add(temp12_KeyframePosList); } stream.Position = offset + 304; serNonlinearOffset = new SerializeData(); serNonlinearOffset.FileRead(stream, stream.Position); stream.Position = offset + 312; //still checking variablearrays NonlinearOffset = new List<Vector3D>(); for(int i = 0; i < (int)(serNonlinearOffset.Field1 / 12); i++) { stream.Position = serNonlinearOffset.Field0 + 16 + (12*i) ; Vector3D temp12_NonlinearOffset; temp12_NonlinearOffset = new Vector3D(); temp12_NonlinearOffset.FileRead(stream, stream.Position); _NonlinearOffset.Add(temp12_NonlinearOffset); } stream.Position = offset + 320; Velocity3D = new VelocityVector3D(); Velocity3D.FileRead(stream, stream.Position); stream.Position = offset + 332; Link = new HardpointLink(); Link.FileRead(stream, stream.Position); stream.Position = offset + 400; Field42 = stream.ReadString(256); stream.Position = offset + 656; Field43 = stream.ReadString(256); }