benilla-re systems structs docs

Script::GetScreenWidth

function · glue · primitive

Address
0x46dd30 · 66 bytes, up to 0x46dd71
Signature
int __fastcall (lua_State *L)
Meaning
Returns the screen root width from the scales 0x832a44 and 0x832a4c, about 768 times the aspect
Confidence
verified, proof two
Name from
the community database (idb)
Finding
ui/methods#screen-size-and-cursor-globals
Test
glue::lua_model_scale_difftest

Finding: Screen size and cursor globals in ui: the Frame and Region methods

With s_U the layout scale of UIParent (+0x7c, 1.0 when it does not exist), fx and fy the cursor dwords the screen root keeps at +0x1118 and +0x111c:

functionanswers
game GetScreenWidth, GetScreenHeightG(RN24(K1/s_U)), G(RN24(K2/s_U))
glue GetScreenWidth, GetScreenHeightG(K1), G(K2)
GetCursorPosition, game and glueG(RN24(K1·fx)), G(RN24(K2·fy))

At a = RN24(4/3) the height is 767.9999427795418 in glue and in the game with s_U 1; uiScale enters only through s_U.

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.