ReadUInt32() public method

public ReadUInt32 ( ) : uint
return uint
Exemplo n.º 1
0
    internal async Task ReadExportTableEntry(ByteArrayReader reader, DomainHeader header) {
      TypeReference   = reader.ReadInt32();
      ParentReference = reader.ReadInt32();
      OwnerReference  = reader.ReadInt32();

      NameTableIndex.ReadNameTableIndex(reader, header);

      ArchetypeReference = reader.ReadInt32();

      FlagsHigh = reader.ReadUInt32();
      FlagsLow  = reader.ReadUInt32();

      SerialDataSize   = reader.ReadInt32();
      SerialDataOffset = reader.ReadInt32();

      ExportFlags = reader.ReadUInt32();

      NetObjectCount = reader.ReadInt32();

      Guid = await reader.ReadBytes(16);

      Unknown1 = reader.ReadUInt32();

      Unknown2 = await reader.ReadBytes(sizeof(uint) * NetObjectCount);
    }
    public async Task ReadCompressedChunkHeader(ByteArrayReader reader, uint flags, int uncompressedSize, int compressedSize) {
      if (flags > 0) {
        Signature = reader.ReadUInt32();

        if (Signature != Signatures.Signature) throw new Exception("Compressed Header Signature not found.");

        BlockSize = reader.ReadInt32();

        CompressedSize   = reader.ReadInt32();
        UncompressedSize = reader.ReadInt32();

        Blocks.Clear();

        int blockCount = (UncompressedSize + BlockSize - 1) / BlockSize;

        for(int i = 0; i < blockCount; ++i) {
          DomainCompressedChunkBlock block = new DomainCompressedChunkBlock();

          block.ReadCompressedChunkBlock(reader);

          Blocks.Add(block);
        }
      }
      else {
        Blocks = new List<DomainCompressedChunkBlock> {
          new DomainCompressedChunkBlock {
            UncompressedSize = uncompressedSize,
              CompressedSize =   compressedSize
          }
        };
      }

      foreach(DomainCompressedChunkBlock block in Blocks) await block.ReadCompressedChunkBlockData(reader);
    }
    public override async Task ReadCompressedChunk(ByteArrayReader reader) {
      BulkDataFlags = reader.ReadUInt32();

      UncompressedSize = reader.ReadInt32();

      CompressedSize   = reader.ReadInt32();
      CompressedOffset = reader.ReadInt32();

      if (((BulkDataCompressionTypes)BulkDataFlags & NothingToDo) > 0) return;

      Header = new DomainCompressedChunkHeader();

      await Header.ReadCompressedChunkHeader(reader, BulkDataFlags, UncompressedSize, CompressedSize);
    }
Exemplo n.º 4
0
 public override async Task ReadPropertyValue(ByteArrayReader reader, int size, DomainHeader header) {
   boolValue = await Task.Run(() => reader.ReadUInt32());
 }