benilla-re systems structs docs

s_float37f5c290

global · ui

Address
0x806544 · 4 bytes, up to 0x806547
Type
const float
Meaning
Holds the float 0.000029296876 (0x37f5c290)
Confidence
verified, proof two
Finding
ui/geometry#the-cell-of-a-point

Finding: The cell of a point in ui: map geometry

0x4a6ec0(u, v) returns the area id under a point of the displayed map, or 0. The row is the selection's: the selected zone, else the continent's own row, else the direct-area word. Both arguments are clamped to 0 to 1. The row's two extents (+0x10 less +0x14, +0x18 less +0x1c) must be nonzero. The position is lo + (1 − u)·extent, and a cell's coordinate on each axis is 0.5 − position / 34133.33, which must lie in 0 to 1 inclusive; the cell is column trunc(128·x) and row trunc(128·y) of the continent's grid. A direct area, the world view and a missing row give 0.

The derivation is in the doc.