MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Tile_GetDistanceRoundedUp

Function Tile_GetDistanceRoundedUp

src/tile.c:103–106  ·  view source on GitHub ↗

* Calculates the rounded up distance between the two given packed tiles. * * @param from The origin. * @param to The destination. * @return The longest distance between the X or Y coordinates, plus half the shortest. */

Source from the content-addressed store, hash-verified

101 * @return The longest distance between the X or Y coordinates, plus half the shortest.
102 */
103uint16 Tile_GetDistanceRoundedUp(tile32 from, tile32 to)
104{
105 return (Tile_GetDistance(from, to) + 0x80) >> 8;
106}
107
108/**
109 * Remove fog in the radius around the given tile.

Calls 1

Tile_GetDistanceFunction · 0.85

Tested by

no test coverage detected