/// <summary> /// Reads the data-block from a stream. /// </summary> public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); this.Unknown_8h = reader.ReadUInt32(); this.Unknown_Ch = reader.ReadUInt32(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); this.Unknown_18h = reader.ReadUInt32(); this.Unknown_1Ch = reader.ReadUInt32(); this.Unknown_20h = reader.ReadBlock <ResourcePointerList64 <ExpressionUnk1> >(); this.Unknown_30h = reader.ReadBlock <ResourceSimpleList64_uint>(); this.Unknown_40h = reader.ReadBlock <ResourceSimpleList64 <ExpressionUnk2> >(); this.Unknown_50h = reader.ReadBlock <ResourceSimpleList64_uint>(); this.NamePointer = reader.ReadUInt64(); this.Unknown_68h = reader.ReadUInt32(); this.Unknown_6Ch = reader.ReadUInt32(); this.Unknown_70h = reader.ReadUInt32(); this.Unknown_74h = reader.ReadUInt32(); this.len = reader.ReadUInt16(); this.Unknown_7Ah = reader.ReadUInt16(); this.Unknown_7Ch = reader.ReadUInt32(); this.Unknown_80h = reader.ReadUInt32(); this.Unknown_84h = reader.ReadUInt32(); this.Unknown_88h = reader.ReadUInt32(); this.Unknown_8Ch = reader.ReadUInt32(); // read reference data this.Name = reader.ReadBlockAt <string_r>( this.NamePointer // offset ); }
public override IResourceBlock[] GetReferences() { var list = new List <IResourceBlock>(); if (!string.IsNullOrEmpty(Name)) { NameBlock = (string_r)Name; list.Add(NameBlock); } return(list.ToArray()); }
/// <summary> /// Returns a list of data blocks which are referenced by this block. /// </summary> public override IResourceBlock[] GetReferences() { var list = new List <IResourceBlock>(base.GetReferences()); if ((StructureInfos != null) && (StructureInfos.Count > 0)) { list.Add(StructureInfos); } if ((EnumInfos != null) && (EnumInfos.Count > 0)) { list.Add(EnumInfos); } if ((DataBlocks != null) && (DataBlocks.Count > 0)) { list.Add(DataBlocks); } if (!string.IsNullOrEmpty(Name)) { NameBlock = (string_r)Name; list.Add(NameBlock); } return(list.ToArray()); }
public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); this.Unknown_8h = reader.ReadUInt32(); this.Unknown_Ch = reader.ReadUInt32(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); this.Unknown_18h = reader.ReadUInt32(); this.Unknown_1Ch = reader.ReadUInt32(); this.Unknown_20h = reader.ReadBlock <ResourcePointerList64 <ExpressionUnk1> >(); this.BoneTracks = reader.ReadBlock <ResourceSimpleList64_s <ExpressionBoneTrack> >(); this.Unknown_40h = reader.ReadBlock <ResourceSimpleList64 <ExpressionUnk2> >(); this.Unknown_50h = reader.ReadBlock <ResourceSimpleList64_s <MetaHash> >(); this.NamePointer = reader.ReadUInt64(); this.NameLength = reader.ReadUInt16(); this.NameCapacity = reader.ReadUInt16(); this.Unknown_6Ch = reader.ReadUInt32(); this.Unknown_70h = reader.ReadUInt32(); this.Unknown_74h = reader.ReadUInt32(); this.Unk1ItemLength = reader.ReadUInt16(); this.Unknown_7Ah = reader.ReadUInt16(); this.Unknown_7Ch = reader.ReadUInt32(); this.Unknown_80h = reader.ReadUInt32(); this.Unknown_84h = reader.ReadUInt32(); this.Unknown_88h = reader.ReadUInt32(); this.Unknown_8Ch = reader.ReadUInt32(); // read reference data this.Name = reader.ReadBlockAt <string_r>( this.NamePointer // offset ); //if (Unknown_50h?.data_items?.Length > 0) //{ } // faceinit.expr, independent_mover.expr BuildBoneTracksDict(); #region testing //long tlen = 0; //if (Unknown_20h?.data_items != null) foreach (var item in Unknown_20h.data_items) tlen = Math.Max(tlen, item.BlockLength); //if (Unk1ItemLength != tlen) //{ }//no hit //if (Unknown_4h != 1) //{ }//no hit //if (Unknown_8h != 0) //{ }//no hit //if (Unknown_Ch != 0) //{ }//no hit //if (Unknown_10h != 0) //{ }//no hit //if (Unknown_14h != 0) //{ }//no hit //if (Unknown_18h != 0) //{ }//no hit //if (Unknown_1Ch != 0) //{ }//no hit //if (NameLength != (Name?.Value?.Length ?? 0)) //{ }//no hit //if (NameCapacity != (NameLength + 1)) //{ }//no hit //if (Unknown_6Ch != 0) //{ }//no hit //if (Unknown_70h != 1) //{ }//no hit //switch (Unknown_74h) //{ // default: // break; //} //if (Unknown_7Ah != 0) //{ }//no hit //switch (Unknown_7Ch) //{ // case 3: // case 2: // break; // default: // break;//no hit //} //if (Unknown_80h != 0) //{ }//no hit //if (Unknown_84h != 0) //{ }//no hit //if (Unknown_88h != 0) //{ }//no hit //if (Unknown_8Ch != 0) //{ }//no hit #endregion }