s_terrainShaderFlagA
global · terrain
- Address
0xc89f44· 1 bytes, up to0xc89f44- Type
uint8_t- Meaning
- Holds 1 when a terrain shader set is in use, which selects the combined chunk texture
- Confidence
- verified, proof one
- Finding
- terrain/chunk#mcnk-header
Finding: MCNK header in terrain: chunk
CMapChunk::Load (0x6af5f0) keeps the record, resolves eight sub-record pointers, and reads the
header: flags +0x00, layer count +0x0c, doodad references +0x10, area id +0x34, object
references +0x38, the 16-byte low-resolution texture map +0x40, the 8-byte doodad map +0x50,
sound emitters +0x5c and position +0x68. In order it builds vertices, normals, liquid, sound
emitters and neighbour links; sets the chunk flag word +0xc to 0x40 when flags bit 1 is set, else
0; then reads references and layers, the shadow map when flags bit 0 is set and world flag 0x40
is on, the combined texture under either shader flag, links lights, and files the chunk in the
area's table.
| header | sub-record | chunk field |
|---|---|---|
| +0x14 | heights (MCVT) | +0xf14 |
| +0x18 | normals (MCNR) | +0xf18 |
| +0x1c | layers (MCLY) | +0xf20 |
| +0x20 | references (MCRF) | +0xf28 |
| +0x24 | alpha maps (MCAL) | +0xf24 |
| +0x2c | shadow map (MCSH) | +0xf1c |
| +0x58 | sound emitters (MCSE) | +0xf30 |
| +0x60 | liquid (MCLQ) | +0xf2c |
The derivation is in the doc.