benilla-re systems structs docs

CMapDoodadDef::SetPlacement

function · terrain · orchestration

Address
0x698e20 · 291 bytes, up to 0x698f42
Signature
void __fastcall (void *def, const NTempest::C3Vector *position, float facing)
Meaning
Places a doodad by position and facing, bounds it and relinks it
Confidence
verified, proof one
Finding
terrain/entities#entity-transform

Finding: Entity transform in terrain: entity facets

0x6709a0(entity, position, facing, anchor) places a world entity, which is the def itself. A nonzero anchor first runs 0x698110, which can move the position's x and y in place (terrain/doodads#placement-anchor-snap). The type word +0x8 then picks the branch: bit 0x8, a map object def, calls 0x698f50; else bit 0x40, a doodad def, calls 0x698e20; any other entity is left alone. No branch stores the facing. The doodad branch sets the scale +0x30 to 1.0, builds +0xcc as a rotation about z by the facing and then a translation to the position, bounds the def, relinks it and propagates its bounds.

The derivation is in the doc.

Callers 2

Callees 6

Calls and jumps by a bare address, from tables/calls.tsv.