Exemplo n.º 1
0
 public bool Equals(FPropertyTag b)
 {
     return(name == b.name &&
            position == b.position &&
            property_type == b.property_type &&
            size == b.size &&
            array_index == b.array_index &&
            tag == b.tag &&
            tag_data == b.tag_data);
 }
Exemplo n.º 2
0
        internal UScriptArray(BinaryReader reader, string inner_type, FNameEntrySerialized[] name_map, FObjectImport[] import_map)
        {
            uint element_count = reader.ReadUInt32();

            tag = default;

            if (inner_type == "StructProperty" || inner_type == "ArrayProperty")
            {
                tag = read_property_tag(reader, name_map, import_map, false);
                if (tag.Equals(default))
Exemplo n.º 3
0
        internal USoundWave(BinaryReader reader, FNameEntrySerialized[] name_map, FObjectImport[] import_map, int asset_file_size, long export_size, BinaryReader ubulk)
        {
            base_object = new UObject(reader, name_map, import_map, "SoundWave", true);

            bCooked    = reader.ReadInt32() == 1;
            bStreaming = false;
            FPropertyTag streamingProperty = base_object.properties.Where(x => x.name == "bStreaming").Select(x => x).FirstOrDefault();

            if (streamingProperty.name != null)
            {
                if (streamingProperty.tag == FPropertyTagType.BoolProperty)
                {
                    bStreaming = (bool)streamingProperty.tag_data;
                }
            }
            if (!bStreaming)
            {
                if (bCooked)
                {
                    compressedFormatData = new List <FSoundFormatData>();
                    int elemCount = reader.ReadInt32();
                    for (int i = 0; i < elemCount; i++)
                    {
                        compressedFormatData.Add(new FSoundFormatData(reader, name_map, asset_file_size, export_size, ubulk));
                        format = compressedFormatData[i].name;
                    }
                    compressedDataGUID = new FGuid(reader);
                }
                else
                {
                    rawData            = new FByteBulkData(reader, ubulk, export_size + asset_file_size);
                    compressedDataGUID = new FGuid(reader);
                }
            }
            else
            {
                compressedDataGUID = new FGuid(reader);
                int numChunks = reader.ReadInt32();
                format = read_fname(reader, name_map);
                streamedAudioChunks = new List <FStreamedAudioChunk>();
                for (int i = 0; i < numChunks; i++)
                {
                    streamedAudioChunks.Add(new FStreamedAudioChunk(reader, asset_file_size, export_size, ubulk));
                }
            }
        }