예제 #1
0
 public void Serialize(BinarySerializer s)
 {
     s.Object(ref FileHeader);
     s.Array(ref Entries, FileHeader.FileCount);
     s.StringTable(ref StringTable, Encoding.UTF8, (int)FileHeader.StringTableSize);
     s.Array(ref ResourceEntries, FileHeader.ResourceCount, (ss, i, v) => ss.Value(ref v));
     s.Array(ref DataBlocks, FileHeader.DataBlockCount);
 }
예제 #2
0
 public void Serialize(BinarySerializer s)
 {
     s.Expect(ss => ss.Value(ref Magic), nameof(Magic), ExpectedMagic);
     s.Expect(ss => ss.Value(ref Version), nameof(Version), ExpectedVersion);
     s.Value(ref Unknown8);
     s.Value(ref AssetChecksum);
     s.Value(ref Unknown18);
     s.Value(ref DependencyCount);
     s.Value(ref DataBlockCount);
     s.Value(ref TagStructCount);
     s.Value(ref DataReferenceCount);
     s.Value(ref TagReferenceCount);
     s.Value(ref StringIdCount);
     s.Value(ref StringTableSize);
     s.Value(ref ZoneSetInfoSize);
     s.Value(ref HeaderSize);
     s.Value(ref TagDataSize);
     s.Value(ref ResourceDataSize);
     s.Value(ref HeaderAlignment);
     s.Value(ref TagDataAlignment);
     s.Value(ref ResourceDataAlignment);
     s.Value(ref Unknown4B);
     s.Value(ref Unknown4C);
     s.Array(ref Dependencies, DependencyCount);
     s.Array(ref DataBlocks, DataBlockCount);
     s.Array(ref TagStructs, TagStructCount);
     s.Array(ref DataReferences, DataReferenceCount);
     s.Array(ref TagReferences, TagReferenceCount);
     s.Array(ref StringIds, StringIdCount);
     s.StringTable(ref StringTable, Encoding.UTF8, (int)StringTableSize);
     s.Array(ref ZoneSetInfo, (int)ZoneSetInfoSize);
 }
예제 #3
0
 public void Serialize(BinarySerializer s)
 {
     s.Array(ref Guid, 0x10);
     s.Enum(ref Type);
     s.Value(ref Unknown12);
     s.Value(ref TargetIndex);
     s.Value(ref FieldBlockIndex);
     s.Value(ref FieldBlockOffset);
 }