benilla-re systems structs docs

InitCharacterComponent

function · charactermodel · primitive

Address
0x476b90 · 273 bytes, up to 0x476ca0
Signature
bool __thiscall (void *this, void *descriptor)
Meaning
Sets a component up from a descriptor; returns 0, its cells cleared, for a race or skin colour out of range
Confidence
verified, proof one
Finding
charactermodel/component#create-build-and-delete

Finding: Create, build and delete in charactermodel: component

0x475fb0 takes a block from the pool, constructs it with 0x476810 and stores its handle at +0x14. 0x476b90 builds a component from a descriptor: it releases the old model, copies 91 dwords to +0x18, zeroes both cell grids and +0x4d8 to +0x4e3, and fails (returns 0) unless the race is in range and CharSections has a skin row for it. It then marks a full rebuild, drops a stale target, sets the race flag from the race's flags bit 1, loads the baked skin when +0x3c is set, and applies skin, hair style and facial hair. 0x476000 destroys with 0x476ac0 and frees the block.

The derivation is in the doc.

Callers 5

Callees 7

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