public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { await NameIndex.WriteBuffer(Writer, 0); if (NameIndex.Name == ObjectTypes.None.ToString()) { return; } await TypeNameIndex.WriteBuffer(Writer, 0); Writer.WriteInt32(Size); Writer.WriteInt32(ArrayIndex); await Value.WriteBuffer(Writer, CurrentOffset); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteInt32(NameArray.Count); foreach (DomainString domainstring in NameArray) { domainstring.WriteBuffer(Writer, CurrentOffset); } }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteInt32(TypeReference); Writer.WriteInt32(ParentReference); Writer.WriteInt32(OwnerReference); await NameTableIndex.WriteBuffer(Writer, 0); Writer.WriteInt32(ArchetypeReference); Writer.WriteUInt32(FlagsHigh); Writer.WriteUInt32(FlagsLow); Writer.WriteInt32(BuilderSerialDataSize); Writer.WriteInt32(BuilderSerialDataOffset); Writer.WriteUInt32(ExportFlags); Writer.WriteInt32(NetObjectCount); await Writer.WriteBytes(Guid); Writer.WriteUInt32(Unknown1); await Writer.WriteBytes(Unknown2); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { await PropertyHeader.WriteBuffer(Writer, CurrentOffset); await base.WriteBuffer(Writer, CurrentOffset); Writer.WriteInt32(MipMaps.Count); for (int i = 0; i < MipMaps.Count; ++i) { await CompressedChunks[i].WriteCompressedChunk(Writer, CurrentOffset); Writer.WriteInt32(MipMaps[i].Width); Writer.WriteInt32(MipMaps[i].Height); } await Writer.WriteBytes(Guid); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteInt32(TypeIndex); foreach (DomainProperty property in Properties) { await property.WriteBuffer(Writer, CurrentOffset); } }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { await PackageNameIndex.WriteBuffer(Writer, 0); await TypeNameIndex.WriteBuffer(Writer, 0); Writer.WriteInt32(OwnerReference); await NameTableIndex.WriteBuffer(Writer, 0); }
public async Task WriteCompressedChunkHeader(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteUInt32(Signature); Writer.WriteInt32(BlockSize); Writer.WriteInt32(CompressedSize); Writer.WriteInt32(UncompressedSize); foreach (DomainCompressedChunkBlock block in Blocks) { await block.WriteCompressedChunkBlock(Writer); } foreach (DomainCompressedChunkBlock block in Blocks) { await block.WriteCompressedChunkBlockData(Writer); } }
private async Task writeUpkHeader() { writer.Seek(0); writer.WriteUInt32(Signature); writer.WriteUInt16(Version); writer.WriteUInt16(Licensee); writer.WriteInt32(BuilderSize); await Group.WriteBuffer(writer, 0); writer.WriteUInt32(Flags); writer.WriteInt32(NameTable.Count); writer.WriteInt32(BuilderNameTableOffset); writer.WriteInt32(ExportTable.Count); writer.WriteInt32(BuilderExportTableOffset); writer.WriteInt32(ImportTable.Count); writer.WriteInt32(BuilderImportTableOffset); writer.WriteInt32(BuilderDependsTableOffset); writer.WriteBytes(Guid); writer.WriteInt32(GenerationTable.Count); await writeGenerationTable(); writer.WriteUInt32(EngineVersion); writer.WriteUInt32(CookerVersion); writer.WriteUInt32(CompressionFlags); writer.WriteInt32(CompressedChunks.Count); writer.WriteUInt32(Unknown1); writer.WriteUInt32(Unknown2); }
public async Task WriteCompressedChunk(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteUInt32(BulkDataFlags); if (((BulkDataCompressionTypes)BulkDataFlags & NothingToDo) > 0) { Writer.WriteInt32(0); Writer.WriteInt32(-1); Writer.WriteInt32(-1); return; } Writer.WriteInt32(UncompressedSize); Writer.WriteInt32(CompressedSize); Writer.WriteInt32(CurrentOffset + Writer.Index + sizeof(int)); if (((BulkDataCompressionTypes)BulkDataFlags & BulkDataCompressionTypes.Unused) > 0) { return; } if (((BulkDataCompressionTypes)BulkDataFlags & BulkDataCompressionTypes.StoreInSeparatefile) > 0) { return; } await Header.WriteCompressedChunkHeader(Writer, CurrentOffset); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteInt32(Size); if (Size < 0) { await Writer.WriteBytes(Encoding.Unicode.GetBytes(String)); } else { await Writer.WriteBytes(Encoding.ASCII.GetBytes(String)); Writer.WriteByte(0); } }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { await PropertyHeader.WriteBuffer(Writer, CurrentOffset); Writer.WriteInt32(ObjectTableReference); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteBytes(Unknown1); Writer.WriteInt32(CurrentOffset + Writer.Index + sizeof(int)); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { Writer.WriteInt32(ArchetypeObjectReference); await base.WriteBuffer(Writer, CurrentOffset); }
public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) { await Task.Run(() => Writer.WriteInt32(IntValue)); }