benilla-re systems structs docs

SelectKoreanParticle

function · ui · primitive

Address
0x7718b0 · 229 bytes, up to 0x771994
Signature
const uint16_t * __fastcall (const uint16_t *out, int32_t index, const uint16_t *first, const uint16_t *second)
Meaning
Picks the first or second part of a particle by the last sounded character before the index
Confidence
verified, proof one
Finding
ui/fonttext#korean-escape

Finding: Korean escape in ui: font string internals

In a text set from Lua, |1 followed by a non-digit opens a two-way particle, |1first;second;, which becomes one part by the sound that ends the text before it. A Hangul syllable with a final consonant picks the first part, one without it the second, except that a syllable ending in ㄹ (final index 8) picks the second when the first starts with 으. A digit picks by a ten-byte table (1 for 0, 1, 3, 6, 7, 8), a Latin letter by a 26-byte table (1 for b, c, k, l, m, n, p, q); other characters and bytes after | are skipped, and with nothing to look back at the first part wins.

The derivation is in the doc.

Callers 1

Callees 1

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