benilla-re systems structs docs

Script::GetCorpseMapPosition

function · ui · orchestration

Address
0x4a86d0 · 62 bytes, up to 0x4a870d
Signature
int __fastcall (lua_State *L)
Meaning
Pushes the normalised map position of the cached corpse
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/worldmap#unit-and-corpse-positions

Finding: Unit and corpse positions in ui: the world map

0x4a7360(&(x, y), mapId, &u, &v) normalises a world position. In the world view a WorldMapContinent row for the map id gives the position from its scale; otherwise the displayed row (the continent's child, its own row, or the direct area) must belong to that map id and gives u = 1 - (y - right) / (left - right) and v = 1 - (x - bottom) / (top - bottom), each 0 for a zero numerator or divisor, and both 0 if either leaves 0 to 1. GetPlayerMapPosition(unit) pushes u and v for the player or a group member, else 0 and 0. GetCorpseMapPosition() projects the cached corpse position under its display map id.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 2

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