Add 'File Type: Texture'

Lucas Schwiderski 2023-03-03 16:24:01 +01:00
parent 1aa0b33157
commit 2e17b3556b

74
File-Type%3A-Texture.md Normal file

@ -0,0 +1,74 @@
```010editor
uint32 type;
Assert(type == 0x1);
uint32 compressed_size;
uint32 uncompressed_size;
byte compressed_data[compressed_size];
uint32 unknown_1;
Assert(unknown_1 == 67);
uint32 unknown_2;
uint32 num_mipmaps;
uint32 width_largest;
uint32 height_largest;
byte unknown_3[60];
uint32 image_size;
byte unknown_4[64];
uint32 meta_size;
if (meta_size == 0) {
uint32 unknown_5;
} else {
uint32 num_chunks;
Assert((num_chunks * 4) + 8 == meta_size);
uint16 unknown_6;
Assert(unknown_6 == 0);
uint16 unknown_7;
Assert(unknown_7 == num_chunks);
uint32 chunks[num_chunks];
uint32 unknown_8;
byte stream[31];
}
```
`compressed_data`:
```010editor
byte unknown_1[8];
uint32 flags;
uint32 unknown_2;
uint32 base_width;
uint32 base_pitch;
byte unknown_3[60];
uint32 four_cc;
Assert(four_cc == 0x44583130) // Or reverse?
byte unknown_4[40];
uint32 dxt10_encoding_kind;
uint32 dxt10_dimension;
Assert(dxt10_dimension == 3);
uint32 dxt10_misc_flags;
uint32 dxt10_array_size;
Assert(dxt10_array_size == 1);
uint32 dxt10_misc_flags_2;
```