コード例 #1
0
 public M2Event(BinaryReader br, uint build)
 {
     EventName  = br.ReadString(4);
     Data       = br.ReadUInt32();
     BoneIndex  = br.ReadUInt32();
     Position   = br.ReadStruct <C3Vector>();
     EventTrack = new M2Track <bool>(br, build, true);
 }
コード例 #2
0
 public M2Attachment(BinaryReader br, uint build)
 {
     AttachmentId = br.ReadEnum <GeoComponentLink>();
     BoneIndex    = br.ReadUInt16();
     Unknown_0x6  = br.ReadUInt16();
     Position     = br.ReadStruct <C3Vector>();
     AnimTrack    = new M2Track <bool>(br, build);
 }
コード例 #3
0
 public M2Bone(BinaryReader br, uint build)
 {
     KeyBoneId  = (KeyBone)br.ReadInt32();
     Flags      = br.ReadEnum <M2Bone_Flags>();
     Parent     = br.ReadInt16();
     SubmeshId  = br.ReadInt16();
     TransTrack = new M2Track <C3Vector>(br, build);
     RotTrack   = new M2Track <C4Quaternion>(br, build);
     ScaleTrack = new M2Track <C3Vector>(br, build);
     Pivot      = br.ReadStruct <C3Vector>();
 }
コード例 #4
0
 public M2Camera(BinaryReader br, uint build)
 {
     Type             = br.ReadEnum <CameraType>();
     FieldOfView      = br.ReadSingle();
     FarClip          = br.ReadSingle();
     NearClip         = br.ReadSingle();
     TransTrack       = new M2Track <SplineKey <C3Vector> >(br, build);
     Pivot            = br.ReadStruct <C3Vector>();
     TargetTransTrack = new M2Track <SplineKey <C3Vector> >(br, build);
     TargetPivot      = br.ReadStruct <C3Vector>();
     RollTrack        = new M2Track <SplineKey <float> >(br, build);
 }
コード例 #5
0
 public M2Light(BinaryReader br, uint build)
 {
     Type              = br.ReadEnum <LightType>();
     BoneIndex         = br.ReadUInt16();
     Position          = br.ReadStruct <C3Vector>();
     AmbColorTrack     = new M2Track <C3Vector>(br, build);
     AmbIntensityTrack = new M2Track <float>(br, build);
     ColorTrack        = new M2Track <C3Vector>(br, build);
     IntensityTrack    = new M2Track <float>(br, build);
     AttenStartTrack   = new M2Track <float>(br, build);
     AttenEndTrack     = new M2Track <float>(br, build);
     VisibilityTrack   = new M2Track <bool>(br, build);
 }
コード例 #6
0
 public M2Ribbon(BinaryReader br, uint build)
 {
     RibbonId         = br.ReadInt32();
     BoneIndex        = br.ReadUInt32();
     Position         = br.ReadStruct <C3Vector>();
     TextureLookup    = br.ReadM2Array <short>(build);
     MaterialLookup   = br.ReadM2Array <short>(build);
     ColorTrack       = new M2Track <CRGB>(br, build);
     AlphaTrack       = new M2Track <FixedPoint_0_15>(br, build);
     HeightAboveTrack = new M2Track <float>(br, build);
     HeightBelowTrack = new M2Track <float>(br, build);
     EdgesPerSecond   = br.ReadSingle();
     EdgeLifetime     = br.ReadSingle();
     Gravity          = br.ReadSingle();
     TextureRows      = br.ReadUInt16();
     TextureCols      = br.ReadUInt16();
     TextureSlotTrack = new M2Track <ushort>(br, build);
     VisbilityTrack   = new M2Track <bool>(br, build);
 }
コード例 #7
0
 public M2Color(BinaryReader br, uint build)
 {
     ColorTrack = new M2Track <CRGB>(br, build);
     AlphaTrack = new M2Track <FixedPoint_0_15>(br, build);
 }
コード例 #8
0
 public M2TextureTransform(BinaryReader br, uint build)
 {
     TransTrack = new M2Track <C3Vector>(br, build);
     RotTrack   = new M2Track <C4Vector>(br, build);
     ScaleTrack = new M2Track <C3Vector>(br, build);
 }
コード例 #9
0
 public M2Particle(BinaryReader br, uint build)
 {
     ParticleId           = br.ReadInt32();
     Flags                = (Particle_Flags)br.ReadUInt32();
     Position             = br.ReadStruct <C3Vector>();
     BoneIndex            = br.ReadUInt16();
     TextureIndex         = br.ReadUInt16();
     GeometryMdl          = br.ReadM2Array <byte>(build)?.AsString();
     RecursionMdl         = br.ReadM2Array <byte>(build)?.AsString();
     BlendMode            = br.ReadUInt16();
     EmitterType          = br.ReadEnum <EmitterType>();
     ParticleType         = br.ReadEnum <ParticleType>();
     CellType             = br.ReadEnum <CellType>();
     PriorityPlane        = br.ReadInt16();
     Rows                 = br.ReadUInt16();
     Cols                 = br.ReadUInt16();
     SpeedTrack           = new M2Track <float>(br, build);
     VariationTrack       = new M2Track <float>(br, build);
     LatitudeTrack        = new M2Track <float>(br, build);
     LongitudeTrack       = new M2Track <float>(br, build);
     GravityTrack         = new M2Track <float>(br, build);
     LifeTrack            = new M2Track <float>(br, build);
     EmissionRateTrack    = new M2Track <float>(br, build);
     WidthTrack           = new M2Track <float>(br, build);
     LengthTrack          = new M2Track <float>(br, build);
     ZSourceTrack         = new M2Track <float>(br, build);
     MiddleTime           = br.ReadSingle();
     StartColor           = br.ReadStruct <CImVector>();
     MiddleColor          = br.ReadStruct <CImVector>();
     EndColor             = br.ReadStruct <CImVector>();
     StartScale           = br.ReadSingle();
     MiddleScale          = br.ReadSingle();
     EndScale             = br.ReadSingle();
     LifespanUVAnimStart  = br.ReadUInt16();
     LifespanUVAnimEnd    = br.ReadUInt16();
     LifespanUVAnimRepeat = br.ReadUInt16();
     DecayUVAnimStart     = br.ReadUInt16();
     DecayUVAnimEnd       = br.ReadUInt16();
     DecayUVAnimRepeat    = br.ReadUInt16();
     TailUVAnimStart      = br.ReadUInt16();
     TailUVAnimEnd        = br.ReadUInt16();
     TailDecayUVAnimStart = br.ReadUInt16();
     TailDecayUVAnimEnd   = br.ReadUInt16(); // unverified
     TailLength           = br.ReadSingle();
     TwinkleFPS           = br.ReadSingle();
     TwinklePercent       = br.ReadSingle();
     TwinkleScaleMin      = br.ReadSingle();
     TwinkleScaleMax      = br.ReadSingle();
     IvelScale            = br.ReadSingle();
     Drag                 = br.ReadSingle();
     Spin                 = br.ReadSingle();
     TumblexMin           = br.ReadSingle();
     TumblexMax           = br.ReadSingle();
     TumbleyMin           = br.ReadSingle();
     TumbleyMax           = br.ReadSingle();
     TumblezMin           = br.ReadSingle();
     TumblezMax           = br.ReadSingle();
     WindVector           = br.ReadStruct <C3Vector>();
     WindTime             = br.ReadSingle();
     FollowSpeed1         = br.ReadSingle();
     FollowScale1         = br.ReadSingle();
     FollowSpeed2         = br.ReadSingle();
     FollowScale2         = br.ReadSingle();
     Splines              = br.ReadM2Array <C3Vector>(build);
     EnabledIn            = new M2Track <bool>(br, build);
 }