CMapDoodadDef::AddLights
function · terrain · primitive
- Address
0x6a8050· 382 bytes, up to0x6a81cd- Signature
void __thiscall (CMapDoodadDef *this, void *lights)- Meaning
- Adds a doodad def's ambient, directional and point lights to a model's lighting record
- Confidence
- verified, proof one
- Finding
- terrain/lights#doodad-def-lighting
- Test
terrain::add_lights_interior_difftest,terrain::add_lights_exterior_difftest
Finding: Doodad def lighting in terrain: map lights
0x6a8050 is the doodad def's light slot. It gathers map object lights when +0xc bit 1 is set. With
bit 2 (lit as an interior) it adds the ambient +0x9c bytes and the directional +0xa0 bytes
with the global direction 0xca816c. Otherwise it adds the scene light block's ambient colour and its
directional colour times +0xa4, with the block's direction. Then it adds each point light of
the list at +0x84 whose +0x64 is set.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 4
- GatherMapObjectLights terrain
- M2LightingAddAmbient models
- M2LightingAddDirectional models
- LightingAddLight models
Calls and jumps by a bare address, from tables/calls.tsv.