benilla-re systems structs docs

WorldPositionToMapView

function · ui · primitive

Address
0x4a72b0 · 104 bytes, up to 0x4a7317
Meaning
Maps a world position onto the world map view, with the vertical axis flipped
Confidence
verified, proof two
Finding
ui/geometry#world-to-map
Test
ui::geo_4a72b0

Finding: World to map in ui: map geometry

0x4a72b0(a, b) and the world leg of 0x4a7360 put a world position on the world view. For the WorldMapContinent row of the map id, the horizontal result is f6·k6 + 0.5 − b·c6·s and the vertical one f7·k7 + 0.5 − a·c7·s, with k6, k7, c6 and c7 the constants below. 0x4a72b0 returns the horizontal result and one minus the vertical one; 0x4a7360 returns both unchanged. Neither inverts 0x4a7100: composed with it, each result is off by a term in (1 − s), and 0x4a72b0's vertical result is 1 − v before that term.

The derivation is in the doc.

Callers 1

Callees 1

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