benilla-re systems structs docs

CompareBookTabs

function · ui · primitive

Address
0x4b3040 · 121 bytes, up to 0x4b30b8
Signature
int __cdecl (void **a, void **b)
Meaning
Orders two tab nodes: General first, then by SkillLine name
Confidence
verified, proof one
Finding
ui/spellbook#book-order

Finding: Book order in ui: the spell book

0x4b2fd0(sortBook, sortPet) sorts the tab list with 0x4b3040 and the book with 0x4b30c0 when sortBook is nonzero, sorts the pet book with 0x4b30c0 when sortPet is nonzero, and always signals SPELLS_CHANGED (260). Tabs: General (key 0) first, then by the localized SkillLine name with SStrCmp. Spells: by their tab's position in the tab list, then by name (+0x1e0), then by rank, then by the rank string (+0x204). The rank is the first run of digits in the rank string, or the spell level (+0x74) when it has none; two nonzero ranks compare numerically and end the comparison, and the rank strings are compared only when either rank is 0. UpdateSpells (0x4b43e0) calls 0x4b2fd0(0, 0), so it signals only.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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