benilla-re systems structs docs

CMapDoodadDef::Repose

function · terrain · primitive

Address
0x6a81d0 · 572 bytes, up to 0x6a840b
Signature
void __thiscall (CMapDoodadDef *this, const NTempest::C44Matrix *m)
Meaning
Poses a doodad def again under a matrix and rebuilds its bounds
Confidence
verified, proof one
Finding
terrain/doodads#doodad-re-pose
Test
terrain::chunk_fade_scale_twin_difftest

Finding: Doodad re-pose in terrain: doodad defs

0x6a81d0(def, matrix) leaves a def without a model (+0x88) alone. Otherwise it sets bit 0 of +0xc, sets the position +0x24 to the local position +0x13c moved by the matrix, and +0xcc to the saved local matrix +0x10c times the matrix. A loaded model gives the sphere centre moved by +0xcc (into +0x5c), its radius times the scale +0x30 (into +0x68), and its bounding and collision boxes moved by +0xcc into +0x44 and +0x14c; an unloaded model gives zeros, so the sphere is +0xcc's translation with radius 0. A sound handle +0x168 moves to +0x24.

The derivation is in the doc.

Callers 1

Callees 10

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