TEX/v0: Difference between revisions
Jump to navigation
Jump to search
(→TXVR) |
(→TXBT) |
||
Line 10: | Line 10: | ||
===TXBT=== | ===TXBT=== | ||
struct SBlobTexture { | struct SBlobTexture { | ||
uint32_t filenameOffset; | uint32_t filenameOffset; // offset within TXFN chunk | ||
uint32_t txmdOffset; // TXMD | uint32_t txmdOffset; // TXMD chunk offset relative to end of TXFN chunk (or TXBT chunk for TXVR:Version=1 >8.1.5 as the TXFN chunk was removed) | ||
uint8_t sizex; | uint8_t sizex; // 64,32,16,8 | ||
uint8_t sizey; // special case: sizex = sizey * 6 | uint8_t sizey; // 64,32,16,8 (sizex, sizey can have different sizes) [special case: sizex = sizey * 6] | ||
uint7_t | uint7_t numLevels; // mipmaps | ||
uint1_t loaded; | uint1_t loaded; | ||
uint4_t dxt_type; // 0 = | uint4_t dxt_type; // 0 = DXT1, 1 = DXT3, 2 = DXT5 | ||
uint4_t | uint4_t alpha_dxt1 : 1; // DXT1 with alpha (for dxt_type = DXT1, prefer argb1555 over rgb565, when DXT1 unavailable) | ||
uint4_t _ : 1; | |||
uint4_t unknown_dxt3 : 1; // seems to be only set for DXT3 | |||
uint4_t unknown : 1; // seems to be only set for DXT3, DXT5 | |||
} entries[]; | } entries[]; | ||
===TXFN=== | ===TXFN=== | ||
char filenames[]; // zero-terminated, no file ending | char filenames[]; // zero-terminated, no file ending |
Revision as of 12:15, 15 August 2019
This is storing really low resolution textures for use if the real file is not yet loaded or streamed. One per continent (e.g. Azeroth.tex) and some special ones (spell effects by class). Chunked structure. Internally called 'TextureBlob'.
structure
While this is properly chunked, order is required.
TXVR
uint32_t version; // As of 4.0.12479 and 6.0.1.18179: 0. Not checked by client. // As of 8.1.5 (28938): 1. -- most likely because the TXFN chunks are now gone, the offset value in TXBT is still set
TXBT
struct SBlobTexture { uint32_t filenameOffset; // offset within TXFN chunk uint32_t txmdOffset; // TXMD chunk offset relative to end of TXFN chunk (or TXBT chunk for TXVR:Version=1 >8.1.5 as the TXFN chunk was removed) uint8_t sizex; // 64,32,16,8 uint8_t sizey; // 64,32,16,8 (sizex, sizey can have different sizes) [special case: sizex = sizey * 6] uint7_t numLevels; // mipmaps uint1_t loaded; uint4_t dxt_type; // 0 = DXT1, 1 = DXT3, 2 = DXT5 uint4_t alpha_dxt1 : 1; // DXT1 with alpha (for dxt_type = DXT1, prefer argb1555 over rgb565, when DXT1 unavailable) uint4_t _ : 1; uint4_t unknown_dxt3 : 1; // seems to be only set for DXT3 uint4_t unknown : 1; // seems to be only set for DXT3, DXT5 } entries[];
TXFN
char filenames[]; // zero-terminated, no file ending
TXMD[]
char textureData[]; // length depends on size, type and flags.
Can contain multiple mipmap levels for one texture. See UpdateBlobTexture() for unpacking.