benilla-re systems structs docs

PlaceDoodadDef

function · terrain · primitive

Address
0x694bc0 · 713 bytes, up to 0x694e88
Signature
CMapDoodadDef * __fastcall (const char *name, const void *entry, const float *origin)
Meaning
Makes or finds the doodad def of an MDDF entry and sets its position, scale and matrix
Confidence
verified, proof one
Finding
terrain/files#doodad-placements
Test
terrain::mddf_create_xform_difftest

Finding: Doodad placements in terrain: files

0x694bc0(name, entry, origin) makes the CMapDoodadDef for a 36-byte MDDF entry, or returns the existing one with the same unique id (+0x04). The position is (o.x − f+0x10, o.y − f+0x08, o.z + f+0x0c), o being (17066.666, 17066.666, 0); the scale is the word +0x20 / 1024. The matrix at +0xcc is the identity translated to the position, rotated about z by f+0x18 degrees + π, about y by f+0x14 degrees and about x by f+0x1c degrees, then scaled.

The derivation is in the doc.

Callers 1

Callees 8

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