benilla-re systems structs docs

CursorModeFromName

function · ui · primitive

Address
0x523d40 · 55 bytes, up to 0x523d76
Signature
uint32_t __fastcall (const char *name)
Meaning
Returns the first cursor mode whose name matches, 0 for none
Confidence
verified, proof one
Finding
ui/worldcursor#custom-cursors

Finding: Custom cursors in ui: the pointer picture

0x523c40(name) loads the texture at the path name, as given, as the mode 41 cursor: SetCursor passes the script's string, and a game object its formatted Interface\Cursor\<name>.blp, or Interface\Cursor\Unable<name>.blp when unusable. It returns 1 at once when the shown mode is 41 and the name equals the last one, without case. Otherwise it loads the texture, which must be 32 by 32, copies it to image slot 41 (0xc0bd80), stores mode 41 and sends it, remembers the name in 0xbe2c70, and returns 1. A texture that cannot be loaded or has another size returns 0 and changes nothing. 0x523d40(name) maps a name back to a mode: the first mode from 1 up whose table name matches without case, or 0.

The derivation is in the doc.

Callers 1

Callees 1

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