예제 #1
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await Task.Run(() => {
        Writer.WriteInt32(Index);

        Writer.WriteInt32(Numeric);
      });
    }
예제 #2
0
    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);
    }
예제 #3
0
    public static ByteArrayWriter CreateNew(int Length) {
      ByteArrayWriter writer = new ByteArrayWriter();

      byte[] data = new byte[Length];

      writer.Initialize(data, 0);

      return writer;
    }
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await Task.Run(() => {
        Writer.WriteInt32(ExportTableCount);

        Writer.WriteInt32(NameTableCount);

        Writer.WriteInt32(NetObjectCount);
      });
    }
예제 #5
0
        public static ByteArrayWriter CreateNew(int Length)
        {
            ByteArrayWriter writer = new ByteArrayWriter();

            byte[] data = new byte[Length];

            writer.Initialize(data, 0);

            return(writer);
        }
예제 #6
0
    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);
      }
    }
예제 #7
0
    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 async Task WriteCompressedChunkBlock(ByteArrayWriter Writer) {
   await Task.Run(() => {
     Writer.WriteInt32(CompressedSize);
     Writer.WriteInt32(UncompressedSize);
   });
 }
예제 #9
0
 public abstract Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset);
예제 #10
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await StructNameIndex.WriteBuffer(Writer, CurrentOffset);

      await base.WriteBuffer(Writer, CurrentOffset);
    }
예제 #11
0
 public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
   if (byteValue.HasValue) Writer.WriteByte(byteValue.Value);
   else await NameIndexValue.WriteBuffer(Writer, CurrentOffset);
 }
예제 #12
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      Writer.WriteInt32(ArchetypeObjectReference);

      await base.WriteBuffer(Writer, CurrentOffset);
    }
예제 #13
0
    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);
    }
예제 #14
0
 public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
   await NameIndexValue.WriteBuffer(Writer, CurrentOffset);
 }
예제 #15
0
 public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
   await Task.Run(() => Writer.WriteUInt32(boolValue));
 }
 public async Task WriteCompressedChunkBlockData(ByteArrayWriter Writer) {
   await Writer.WriteBytes(CompressedData.GetBytes());
 }
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await Writer.WriteBytes(Unknown1);

      Writer.WriteInt32(CurrentOffset + Writer.Index + sizeof(int));
    }
    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);
    }
예제 #19
0
 public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
   await Task.Run(() => Writer.WriteSingle(floatValue));
 }
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await PropertyHeader.WriteBuffer(Writer, CurrentOffset);

      Writer.WriteInt32(ObjectTableReference);
    }
    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);
    }
예제 #22
0
    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);
    }
예제 #23
0
 public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
   await Writer.WriteBytes(DataReader?.GetBytes());
 }
예제 #24
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      writer = Writer;

      await writeUpkHeader();

      await writeNameTable();

      await writeImportTable();

      await encodePointers();

      await writeExportTable();

      await writeDependsTable();
    }
예제 #25
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      Writer.WriteInt32(TypeIndex);

      foreach(DomainProperty property in Properties) await property.WriteBuffer(Writer, CurrentOffset);
    }
예제 #26
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await Name.WriteBuffer(Writer, 0);

      Writer.WriteUInt64(Flags);
    }
예제 #27
0
    public override async Task WriteBuffer(ByteArrayWriter Writer, int CurrentOffset) {
      await PropertyHeader.WriteBuffer(Writer, CurrentOffset);

      await Writer.WriteBytes(AdditionalDataReader?.GetBytes());
    }