CMapChunk::DecodeAlphaMap
function · terrain · orchestration
- Address
0x6b0a60· 94 bytes, up to0x6b0abd- Signature
void __thiscall (CMapChunk *this, uint16_t *dst, const uint8_t *src, uint32_t kind)- Meaning
- Picks the alpha decoder by MCNK flags bit 15 and shadowLevel
- Confidence
- verified, proof one
- Finding
- terrain/chunk#alpha-maps
Finding: Alpha maps in terrain: chunk
A layer's alpha map is 2,048 bytes of 4-bit values, low nibble first, decoded to 16-bit texels
(a << 12) | 0x0fff. When MCNK flags bit 15 is set, the map is 64×64; otherwise it holds 63 useful
values per 64-value row and the decoder copies column 62 into 63 and row 62 into 63. With
shadowLevel 0 the texture is 64×64; otherwise 32×32, sampling every other row and column. For a
64×64 map the 32 samples of a row or column are 0, 2, …, 60 and 63; for the other kind 0, 2, …,
62.
The derivation is in the doc.
Callers 1
- CMapChunk::DecodeLayerAlpha terrain
Callees 4
- DecodeAlpha64 terrain
- DecodeAlpha64Half terrain
- DecodeAlpha63 terrain
- DecodeAlpha63Half terrain
Calls and jumps by a bare address, from tables/calls.tsv.