Inheritance: DomainExportTableEntryBuilderBase
コード例 #1
0
    public override async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      ArchetypeObjectReference = reader.ReadInt32();

      ArchetypeObjectNameIndex = header.GetObjectTableEntry(ArchetypeObjectReference)?.NameTableIndex;

      await base.ReadDomainObject(reader, header, export, skipProperties, skipParse);
    }
コード例 #2
0
    private void onFileLoading(FileLoadingMessage message) {
      viewModel.Properties.ForEach(p => p.PropertyChanged -= onPropertyChanged);

      viewModel.Properties.Clear();

      export = null;
    }
コード例 #3
0
ファイル: DomainObjectBase.cs プロジェクト: stricq/UPKManager
    public virtual async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      if (!skipProperties) await PropertyHeader.ReadPropertyHeader(reader, header);

      AdditionalDataOffset = export.SerialDataOffset + reader.CurrentOffset;

      AdditionalDataReader = await reader.Splice();
    }
コード例 #4
0
    private void onExportObjectSelected(ExportTableEntrySelectedMessage message) {
      export = message.ExportTableEntry;

      viewModel.Properties.ForEach(p => p.PropertyChanged -= onPropertyChanged);

      viewModel.Properties = new ObservableCollection<PropertyViewEntity>(mapper.Map<IEnumerable<PropertyViewEntity>>(export.DomainObject.PropertyHeader.Properties));

      viewModel.Properties.ForEach(p => p.PropertyChanged += onPropertyChanged);
    }
コード例 #5
0
    public override async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      await base.ReadDomainObject(reader, header, export, skipProperties, skipParse);

      if (skipParse) return;

      Unknown1 = await reader.ReadBytes(sizeof(uint) * 3);

      CompressedChunkOffset = reader.ReadInt32();
    }
コード例 #6
0
    public override async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      await base.ReadDomainObject(reader, header, export, skipProperties, skipParse);

      if (skipParse) return;

      await ProcessCompressedBulkData(reader, async bulkChunk => {
        byte[] bik = (await bulkChunk.DecompressChunk(0))?.GetBytes();

        if (bik == null || bik.Length == 0) return;

        Movie = bik;
      });
    }
コード例 #7
0
    public override async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      await base.ReadDomainObject(reader, header, export, skipProperties, skipParse);

      if (skipParse) return;

      bool done = false;

      do {
        await ProcessCompressedBulkData(reader, async bulkChunk => {
          byte[] ogg = (await bulkChunk.DecompressChunk(0))?.GetBytes();

          if (ogg == null || ogg.Length == 0) {
            done = true;

            return;
          }

          Sounds.Add(ogg);
        });
      } while(!done);
    }
コード例 #8
0
    public override async Task ReadDomainObject(ByteArrayReader reader, DomainHeader header, DomainExportTableEntry export, bool skipProperties, bool skipParse) {
      await base.ReadDomainObject(reader, header, export, skipProperties, skipParse);

      if (skipParse) return;

      MipMapsCount = reader.ReadInt32();

      for(int i = 0; i < MipMapsCount; ++i) {
        await ProcessCompressedBulkData(reader, async bulkChunk => {
          DomainMipMap mip = new DomainMipMap {
            Width  = reader.ReadInt32(),
            Height = reader.ReadInt32()
          };

          if (mip.Width >= 4 || mip.Height >= 4) mip.ImageData = (await bulkChunk.DecompressChunk(0))?.GetBytes();

          MipMaps.Add(mip);
        });
      }

      Guid = await reader.ReadBytes(16);
    }
コード例 #9
0
ファイル: DomainHeader.cs プロジェクト: stricq/UPKManager
    private async Task readExportTable(Action<DomainLoadProgress> progress) {
      DomainLoadProgress message = new DomainLoadProgress { Text = "Reading Export Table...", Current = 0, Total = ExportTableCount };

      reader.Seek(ExportTableOffset);

      for(int i = 0; i < ExportTableCount; ++i) {
        DomainExportTableEntry export = new DomainExportTableEntry { TableIndex = i + 1 };

        await export.ReadExportTableEntry(reader, this);

        ExportTable.Add(export);

        message.IncrementCurrent();

        if (ExportTableCount > 100) progress?.Invoke(message);
      }

      message.Text    = "Expanding References...";
      message.Current = 0;
      message.Total   = 0;

      progress?.Invoke(message);

      await ExportTable.ForEachAsync(export => Task.Run(() => export.ExpandReferences(this)));
    }