Пример #1
0
        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);
        }