WorldToTile
function · minimap · primitive
- Address
0x6da540· 97 bytes, up to0x6da5a0- Signature
int32_t * __fastcall (int32_t *out, const float *world)- Meaning
- Writes the tile row and column of a world position
- Confidence
- verified, proof one
- Finding
- minimap/coordinates#world-and-tile-maps
- Test
minimap::world_to_tile_difftest
Finding: World and tile maps in minimap: coordinates
TileToWorld(out, tile) writes the world position of a tile's corner: x = 17066.666 − tile[1] · 533.3333, y = 17066.666 − tile[0] · 533.3333 and z = 0.
WorldToTile(out, world) is its inverse: for each axis t = (17066.666 − w) · 0.001875, less 1.0 when t is negative so the cut is a floor, and
then truncated to an integer. tile[0] comes from the world y and tile[1] from the world x. Both return the output pointer.
The derivation is in the doc.
Callers 1
- WorldToScreenScale minimap
Callees 1
- __ftol crt
Calls and jumps by a bare address, from tables/calls.tsv.