/// <summary> /// Reads the data-block from a stream. /// </summary> public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data this.Unknown_10h = reader.ReadInt32(); this.Unknown_14h = reader.ReadInt16(); this.HasUselessData = reader.ReadByte(); this.Unknown_17h = reader.ReadByte(); this.Unknown_18h = reader.ReadInt32(); this.RootBlockIndex = reader.ReadInt32(); this.StructureInfosPointer = reader.ReadInt64(); this.EnumInfosPointer = reader.ReadInt64(); this.DataBlocksPointer = reader.ReadInt64(); this.NamePointer = reader.ReadInt64(); this.UselessPointer = reader.ReadInt64(); this.StructureInfosCount = reader.ReadInt16(); this.EnumInfosCount = reader.ReadInt16(); this.DataBlocksCount = reader.ReadInt16(); this.Unknown_4Eh = reader.ReadInt16(); this.Unknown_50h = reader.ReadUInt32(); this.Unknown_54h = reader.ReadUInt32(); this.Unknown_58h = reader.ReadUInt32(); this.Unknown_5Ch = reader.ReadUInt32(); this.Unknown_60h = reader.ReadUInt32(); this.Unknown_64h = reader.ReadUInt32(); this.Unknown_68h = reader.ReadUInt32(); this.Unknown_6Ch = reader.ReadUInt32(); // read reference data this.StructureInfos = reader.ReadBlockAt <ResourceSimpleArray <MetaStructureInfo> >( (ulong)this.StructureInfosPointer, // offset this.StructureInfosCount ); this.EnumInfos = reader.ReadBlockAt <ResourceSimpleArray <MetaEnumInfo> >( (ulong)this.EnumInfosPointer, // offset this.EnumInfosCount ); this.DataBlocks = reader.ReadBlockAt <ResourceSimpleArray <MetaDataBlock> >( (ulong)this.DataBlocksPointer, // offset this.DataBlocksCount ); this.Name = reader.ReadStringAt( //BlockAt<string_r>( (ulong)this.NamePointer // offset ); if (!string.IsNullOrEmpty(Name)) { } //Strings = MetaTypes.GetStrings(this); }
/// <summary> /// Reads the data-block from a stream. /// </summary> public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.StructureNameHash = (MetaName)reader.ReadInt32(); this.DataLength = reader.ReadInt32(); this.DataPointer = reader.ReadInt64(); this.Data = reader.ReadBytesAt((ulong)this.DataPointer, (uint)DataLength); }
/// <summary> /// Reads the data-block from a stream. /// </summary> public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.StructureNameHash = (MetaName)reader.ReadInt32(); this.StructureKey = reader.ReadUInt32(); this.Unknown_8h = reader.ReadUInt32(); this.Unknown_Ch = reader.ReadUInt32(); this.EntriesPointer = reader.ReadInt64(); this.StructureSize = reader.ReadInt32(); this.Unknown_1Ch = reader.ReadInt16(); this.EntriesCount = reader.ReadInt16(); // read reference data this.Entries = reader.ReadStructsAt <MetaStructureEntryInfo_s>((ulong)this.EntriesPointer, (uint)this.EntriesCount); }
/// <summary> /// Reads the data-block from a stream. /// </summary> public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.EnumNameHash = (MetaName)reader.ReadInt32(); this.EnumKey = reader.ReadUInt32(); this.EntriesPointer = reader.ReadInt64(); this.EntriesCount = reader.ReadInt32(); this.Unknown_14h = reader.ReadInt32(); // read reference data //this.Entries = reader.ReadBlockAt<ResourceSimpleArray<MetaEnumEntryInfo>>( // (ulong)this.EntriesPointer, // offset // this.EntriesCount //); this.Entries = reader.ReadStructsAt <MetaEnumEntryInfo_s>((ulong)this.EntriesPointer, (uint)this.EntriesCount); }