benilla-re systems structs docs

CreateGroupDefs

function · terrain · host

Address
0x695960 · 317 bytes, up to 0x695a9c
Signature
void __fastcall (void *root, void *instance)
Meaning
Makes a def group for each group of a placed map object with its world sphere, box and light class
Confidence
verified, proof one
Finding
terrain/doodads#group-def-creation

Finding: Group def creation in terrain: doodad defs

0x695960(root, instance) makes a def group for each group of a placed map object. Each def group is allocated (0x6a0ca0), given a link node targeting the instance (0x6a0450) and linked into the instance's list (+0x134, link offset +0x130). Its sphere at +0x5c (centre) and +0x68 (radius) is the group's (0x6a44b0) with the centre moved to the world by the instance matrix +0x94; its world box at +0x44 is the group's box moved by the same matrix. It stores the group index at +0x7c and the instance's word +0x150 at +0x88, clears +0xc and sets its light class from the group's flags in the root's group record: bit 4 with 0x48, else bit 2.

The derivation is in the doc.

Callers 1

Callees 8

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