public override void Serialize(BitWriter writer) { writer.Write(LvlVersion); writer.Write(RevisionNumber); SkyBoxPointer = new PointerToken(writer); ObjectsPointer = new PointerToken(writer); EnvironmentPointer = new PointerToken(writer); }
public void Serialize(BitWriter writer) { writer.Write((uint)Data.Fields.Length); var namePointer = new PointerToken(writer); var dataPointer = new PointerToken(writer); namePointer.Dispose(); TableName.Serialize(writer); dataPointer.Dispose(); Data.Serialize(writer); }
public override void Serialize(BitWriter writer) { writer.Write((uint)(8 + UnknownFloatArray0.Length * 4)); var skySectionPointer = new PointerToken(writer); var otherSectionPointer = new PointerToken(writer); foreach (var f in UnknownFloatArray0) { writer.Write(f); } writer.Write((uint)Identifiers.Length); foreach (var identifier in Identifiers) { identifier.Serialize(writer); } for (var i = 0; i < 3; i++) { writer.Write(UnknownFloatArray1[i]); } for (var i = 0; i < 3; i++) { writer.Write(UnknownFloatArray2[i]); } skySectionPointer.Dispose(); writer.Write(WriteSkySection()); otherSectionPointer.Dispose(); writer.Write(WriteOtherSection()); }
public void Serialize(BitWriter writer) { var toSerialize = new List <(FdbRowInfo, PointerToken)>(); foreach (var info in RowInfos) { if (info == default) { writer.Write(-1); } else { toSerialize.Add((info, new PointerToken(writer))); } } for (var i = 0; i < FdbRowBucket.NextPowerOf2(RowInfos.Length) - RowInfos.Length; i++) { writer.Write(-1); } foreach (var serialize in toSerialize) { var(info, pointer) = serialize; var current = info; while (current != default && pointer != default) { pointer.Dispose(); PointerToken dataPointer = default; if (current.DataHeader == default) { writer.Write(-1); } else { dataPointer = new PointerToken(writer); } if (current.Linked == default) { writer.Write(-1); pointer = default; } else { pointer = new PointerToken(writer); } if (dataPointer != default) { dataPointer.Dispose(); current.DataHeader.Serialize(writer); } current = current.Linked; } } }