benilla-re systems structs docs

CompareCraftRowsTrain

function · ui · primitive

Address
0x4f6920 · 413 bytes, up to 0x4f6abc
Signature
int __cdecl (void **a, void **b)
Meaning
Orders beast training rows by visibility, group position (a header row is position 0), bucket, name and spell level
Confidence
verified, proof one
Finding
ui/craft#craft-order
Test
ui::sortcmp_4f6920

Finding: Craft order in ui: the craft window list

Rows and headers are sorted by the recount 0x4f6630. The row comparator is 0x4f6920 for craft type 1 and 0x4f67a0 for the others. Both order by group visibility (shown before hidden), the group's position in the name-sorted header array, a header row before a recipe, the difficulty bucket (ascending), then the spell name case-insensitively; only 0x4f6920 adds the spell's level (+0x74) last, ascending. A header row skips the scan of the header array and keeps position 0 and visibility 1, so every header sorts ahead of every hidden row and of the shown recipes of every later group. With a single group the header count becomes 0 and no header shows.

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.