File diff r17629:21e9dfd343cd → r17630:7d818445376d
src/map_func.h
Show inline comments
 
@@ -187,6 +187,12 @@ static inline TileIndexDiff TileDiffXY(i
 
	return (y * MapSizeX()) + x;
 
}
 

	
 
/**
 
 * Get a tile from the virtual XY-coordinate.
 
 * @param x The virtual x coordinate of the tile.
 
 * @param y The virtual y coordinate of the tile.
 
 * @return The TileIndex calculated by the coordinate.
 
 */
 
static inline TileIndex TileVirtXY(uint x, uint y)
 
{
 
	return (y >> 4 << MapLogX()) + (x >> 4);