s_mapNegCells
global · ui
- Address
0x806540· 4 bytes, up to0x806543- Type
const float- Meaning
- Holds -128.0, the multiplier that gives the row of an area bitmap cell
- 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.