TextureDecodeTga
function · gx · primitive
- Address
0x4491f0· 430 bytes, up to0x44939d- Signature
uint32_t __fastcall (const char *name, uint32_t fileFlag, void **chain, uint32_t *width, uint32_t *height, uint32_t *arg6, uint32_t *opaque, uint32_t *alphaBits, uint32_t *typeCode)- Meaning
- Decodes a TGA file into level 0 of a 32-bit mip chain, reads its mip files and builds the rest
- Confidence
- verified, proof one
- Finding
- gx/tga#tga-texture-decode
- Test
gx::tga_opaque_flag_difftest,gx::tga_pixel_copy_difftest
Finding: TGA texture decode in gx: TGA textures
0x4491f0(name, fileFlag, chain, width, height, arg6, opaque, alphaBits, typeCode) opens the
file (0x5a3660), sets opaque when its attribute bits are 0, decodes with flags 3 (opaque alpha
added, palette expanded), sets the top origin (0x5a4070) and makes a 32-bit chain when *chain
is null (0x44af90), else lays out the one it holds (0x5a4bb0). Level 0 gets the decoded
pixels as they are, B, G, R, A: Argb8888. The mip files give the next levels and 0x44aec0
builds the rest. Non-null outputs get the width, the height, 1, the attribute bits after the
decode and type code 2. It returns 1, or 0 when the open or decode fails; a depth other than 32
after the decode crashes.
The derivation is in the doc.
Callers 2
Callees 11
- TextureReadTgaMips gx
- FormatTgaMipPattern gx
- TextureMipCount gx
- TextureBuildLowerMips gx
- TextureAllocMips gx
- TgaClose image
- TgaOpen image
- TgaDecode image
- TgaSetOrigin image
- TgaRequirePixels32 image
- MipFillChain image
Calls and jumps by a bare address, from tables/calls.tsv.