benilla-re systems structs docs

CMapObjDef::SetPlacement

function · terrain · orchestration

Address
0x698f50 · 687 bytes, up to 0x6991fe
Signature
void __fastcall (void *def, const NTempest::C3Vector *position, float facing)
Meaning
Places a map object by position and facing, rebuilding its matrices, bounds and lights
Confidence
verified, proof one
Finding
terrain/doodads#group-re-pose

Finding: Group re-pose in terrain: doodad defs

0x698f50(def, position, facing) places a map object def. It stores the position at +0x24, writes a rotation about z by the facing and then a translation to the position into +0x94, and the inverse (0x7bd820, scale 1.0) into +0xd4; the facing is not stored. With the root loaded (+0x118, byte +0x1d4), the object's box +0x44 and sphere +0x5c, +0x68 are the root's moved by +0x94; otherwise the sphere is the position with radius 0 and the box is that point. For each group def whose group is loaded it moves the map lights and rebuilds the group's sphere and box, then calls 0x6a2070.

The derivation is in the doc.

Callers 2

Callees 15

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