diff --git a/File Type - Bundle.-.md b/File Type - Bundle.-.md new file mode 100644 index 0000000..43b42cf --- /dev/null +++ b/File Type - Bundle.-.md @@ -0,0 +1,78 @@ +``` +//------------------------------------------------ +//--- 010 Editor v12.0.1 Binary Template +// +// File: dt_bundle_decompressed.bt +// Authors: Lucas Schwiderski +// Version: +// Purpose: +// Category: Darktide +// File Mask: +// ID Bytes: +// History: +//------------------------------------------------ + +typedef struct { + uint64 extension ; + uint64 name ; + uint32 flags ; +} FileMeta; + +typedef struct { + uint32 lang ; + byte is_data_file ; + uint32 size; + byte unknown_2; + // If > 0, data chunk will be followed by a string of that length, which is an auxiliary/extension file + // to the data in the data chunk. + // Example: `.wwise_stream` only contains 12 bytes of data in the bundle, which includes an offset and a length. + // The extra file then contains the actual data. + uint32 len_data_file_name; + + if (unknown_2 != 1) { + Warning("Expected '1' for 'unknown_2', got '%x'", unknown_2); + } +} FileHeader; + +typedef struct { + uint64 extension ; + uint64 name ; + + uint32 header_count; + uint32 unknown_1; + + FileHeader headers[header_count]; + + local int i = 0; + for (i = 0; i < header_count; i++) { + if (headers[i].is_data_file) { + char data_file[headers[i].size]; + } else { + byte data[headers[i].size]; + char data_file[headers[i].len_data_file_name]; + } + } +} File; + +uint32 version ; +uint32 unknown_1; +Assert(unknown_1 == 3); + +uint32 num_entries; +uint64 properties[32] ; + +FileMeta file_meta[num_entries]; + +uint32 num_chunks; +uint32 chunk_sizes[num_chunks]; + +local int padding_size = 16 - (FTell() % 16); +if (padding_size < 16) { + byte padding[padding_size]; +} + +uint32 unpacked_size ; +uint32 unknown_3; + +File files[num_entries] ; +``` \ No newline at end of file