map.h
changeset 2403 f339737b38bc
parent 2360 09e42e4ee139
child 2436 177cb6a8339f
equal deleted inserted replaced
2402:2b52df0f1236 2403:f339737b38bc
   142 // Functions to calculate distances
   142 // Functions to calculate distances
   143 uint DistanceManhattan(TileIndex, TileIndex); // also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
   143 uint DistanceManhattan(TileIndex, TileIndex); // also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads)
   144 uint DistanceSquare(TileIndex, TileIndex); // euclidian- or L2-Norm squared
   144 uint DistanceSquare(TileIndex, TileIndex); // euclidian- or L2-Norm squared
   145 uint DistanceMax(TileIndex, TileIndex); // also known as L-Infinity-Norm
   145 uint DistanceMax(TileIndex, TileIndex); // also known as L-Infinity-Norm
   146 uint DistanceMaxPlusManhattan(TileIndex, TileIndex); // Max + Manhattan
   146 uint DistanceMaxPlusManhattan(TileIndex, TileIndex); // Max + Manhattan
   147 uint DistanceTrack(TileIndex, TileIndex); // Returns the shortest distance one could go over tracks
       
   148 uint DistanceFromEdge(TileIndex); // shortest distance from any edge of the map
   147 uint DistanceFromEdge(TileIndex); // shortest distance from any edge of the map
   149 
   148 
   150 
   149 
   151 #define BEGIN_TILE_LOOP(var,w,h,tile)                      \
   150 #define BEGIN_TILE_LOOP(var,w,h,tile)                      \
   152 	{                                                        \
   151 	{                                                        \