benilla-re systems structs docs

Script::SortRealms

function · glue · orchestration

Address
0x46f330 · 195 bytes, up to 0x46f3f2
Signature
int __fastcall (lua_State *L)
Meaning
Maps a column name to a sort key and applies it, name for an unknown string
Confidence
verified, proof one
Name from
the community database (idb)
Finding
glue/realms#sort-records

Finding: Sort records in glue: the realm list

The sort is four records {key, descending} at 0xb41f40, keys 0 characters, 1 load, 2 name, 3 mode. 0x46e300 writes {0,0} {1,0} {2,0} {3,0} once per process, over the zeros of .bss. Only SortRealms changes them, through 0x46e9b0(key): the key already first toggles its direction; any other moves to the front keeping its own, the records ahead of it shifting back one. Then every category is re-sorted and OPEN_REALM_LIST (9) fires. A refresh does not reset the records: the rebuild only reads them, so a sort lasts until the process exits. SortRealms(s) maps name, load, characters and mode case-insensitively, any other string or number to name; anything else raises Usgae: SortRealms("type"), the binary's spelling.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 5

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