AcquireLayerTexture
function · terrain · host
- Address
0x6aeaf0· 265 bytes, up to0x6aebf8- Signature
void * __fastcall (void *owner, void *callback, uint32_t a, uint32_t b)- Meaning
- Pops an alpha texture from its stack or creates one with a fill callback
- Confidence
- verified, proof one
- Finding
- terrain/chunk#texture-layers
Finding: Texture layers in terrain: chunk
CMapChunk::AddLayer (0x6aff80) makes one CChunkLayer (28 bytes) per 16-byte MCLY entry, up to
four at +0x128 with the count at +0x138. A layer holds the area's texture for the entry's index
(+0x0c), the entry's flags word (+0x08) and effect id word (+0x0a), and the address of its alpha
map, the entry's offset added to the MCAL data (+0x10). On the fixed-function path, when flags
bit 8 is set, the layer gets an alpha texture of 32 texels square when shadowLevel is exactly 1
and 64 otherwise. The decoders choose 32×32 for any nonzero value, and the option's check accepts
any integer up to 1, so a negative shadowLevel gives a 64×64 texture filled with 32×32 data.
The derivation is in the doc.
Callers 1
- CMapChunk::AddLayer terrain
Callees 4
- CGxTexFlags::CGxTexFlags gx
- GxTexCreate gx
- GxTexSetCallback gx
- ResizeTextureStack terrain
Calls and jumps by a bare address, from tables/calls.tsv.