TextureReadTgaMips
function · gx · primitive
- Address
0x4493a0· 425 bytes, up to0x449548- Signature
uint32_t __fastcall (const void *record, const char *pattern, uint32_t fileFlag, void **levels)- Meaning
- Reads a TGA texture's lower levels from its numbered mip files and returns 1 plus the count read
- Confidence
- verified, proof one
- Finding
- gx/tga#tga-mip-files
- Test
gx::tga_mip_copy_difftest
Finding: TGA mip files in gx: TGA textures
0x4493a0(record, pattern, fileFlag, levels) reads lower mip levels from files: for level n from
1 while the base image has smaller levels, it formats the pattern with n, stops when that file
does not resolve, does not open or does not decode, or when its size is not the expected one (the base's sides
halved for level 1, a side of 1 giving 0, and each later level halving the sides above 1), decodes it with flags 2, adds an opaque alpha when it
has none, sets the top origin and copies its 32-bit pixels into chain level n. It returns 1 plus
the number of files read; 0x4491f0 passes that count to 0x44aec0 as the first level it builds.
The derivation is in the doc.
Callers 1
Callees 9
- TextureMipCount gx
- TgaClose image
- TgaOpen image
- TgaDecode image
- TgaSetAlphaPlane image
- TgaSetOrigin image
- TgaRequirePixels32 image
- SFileExistsEx storm
- SStrPrintf storm
Calls and jumps by a bare address, from tables/calls.tsv.