benilla-re systems structs docs

Script::SetChatWindowColor

function · ui · primitive

Address
0x4a14f0 · 219 bytes, up to 0x4a15ca
Signature
int __fastcall (lua_State *L)
Meaning
Stores a window's red, green and blue as the unit values times 255 truncated
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/chatwindows#setting-colour-alpha-and-size
Test
ui::chat_scale_byte, ui::chat_scale_product

Finding: Setting colour, alpha and size in ui: chat windows and their settings file

SetChatWindowColor(index, r, g, b) stores int(255.0 * x) of each argument into red +0x8a, green +0x89 and blue +0x88; SetChatWindowAlpha(index, a) stores int(255.0 * a) into +0x8b; neither clamps, and the store keeps the low byte of the truncated integer, so alpha 2.0 stores 254, -1.0 stores 1 and 0.5 stores 127. SetChatWindowSize(index, n) stores the truncated integer into +0x84 unless it is 0 or negative, which is discarded silently. Nothing else is written and no event or dirty flag follows.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 4

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