Example #1
0
 public void Dispose()
 {
     base_object          = null;
     rawData              = new FByteBulkData();
     compressedDataGUID   = new FGuid();
     compressedFormatData = null;
     streamedAudioChunks  = null;
 }
Example #2
0
        internal FTexture2DMipMap(BinaryReader reader, BinaryReader ubulk, long bulk_offset)
        {
            int cooked = reader.ReadInt32();

            data   = new FByteBulkData(reader, ubulk, bulk_offset);
            size_x = reader.ReadInt32();
            size_y = reader.ReadInt32();
            size_z = reader.ReadInt32();
            if (cooked != 1)
            {
                read_string(reader);
            }
        }
Example #3
0
        internal FStreamedAudioChunk(BinaryReader reader, int asset_file_size, long export_size, BinaryReader ubulk)
        {
            bool bCooked = reader.ReadInt32() == 1;

            if (bCooked)
            {
                data          = new FByteBulkData(reader, ubulk, export_size + asset_file_size);
                dataSize      = reader.ReadInt32();
                audioDataSize = reader.ReadInt32();
            }
            else
            {
                reader.BaseStream.Position -= 4;
                throw new FileLoadException("StreamedAudioChunks must be cooked");
            }
        }
Example #4
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));
                }
            }
        }
Example #5
0
 internal FSoundFormatData(BinaryReader reader, FNameEntrySerialized[] name_map, int asset_file_size, long export_size, BinaryReader ubulk)
 {
     name = read_fname(reader, name_map);
     data = new FByteBulkData(reader, ubulk, export_size + asset_file_size);
 }