benilla-re systems structs docs

CVar::Register

function · cvar · primitive

Address
0x63db90 · 585 bytes, up to 0x63ddd8
Signature
CVar * __fastcall (const char *name, const char *help, uint32_t flags, const char *def, void *cb, uint32_t category, uint8_t hidden, void *arg)
Meaning
Registers a setting, or updates an existing one, and returns its record
Confidence
verified, proof two
Name from
the community database (idb)
Finding
cvar/registry#registering-a-setting

Finding: Registering a setting in cvar: registry

Register(name, help, flags, default, callback, category, scriptHidden, callbackArg) returns the record. A name that exists keeps its record: the flags are ORed, the callback and argument are replaced, and the callback is called with the current value. Then the default text is offered with Set(apply 0), which fills only the empty reset and default slots, so a value read from the config file survives. A new name gets a duplicated name, the help text and the callback, and Set(default, apply 1) runs before the flags exist, so a latch cannot defer it; the callback sees the default, and a false result leaves the value empty. The record then gets its flags and a console command of its own name.

The derivation is in the doc.

Callers 35

Callees 11

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