Serious Engine 2 .tex file structure. | Zack Middleton (zturtleman), April 2021
The beginning of the file is the serialized form of a C++ class, which seems to be the same in most (all?) images.
There is compressed pixel data in a zlib compressed stream (begining with 78 9C
). For image type 0, 2, and 6 the pixel data is BGR888. For image type 1, 3, 4, and 5 the pixel data is BGRA8888. For image type 7, 8, and 9 the pixel data is DXT1, DXT3, and DXT5 image data respectfully with a full mipmap pryamid and possibly 6 images for a cubemap (see image flags?
and image type?
below).
"(marker)" "(string)" are non-null terminated plain text. Markers are typically 4 bytes but start and end markers are 8 and 7 bytes. For strings, the string length proceeds it but it's listed here as well.
"(int32)" and "(uint32)" are signed and unsigned little endian 32-bit integers. Though uint32 is just used here for lengths or counts that negative values wouldn't make sense.