tunnelbridge.h

Go to the documentation of this file.
00001 /* $Id: tunnelbridge.h 12765 2008-04-18 10:16:51Z rubidium $ */
00002 
00005 #ifndef TUNNELBRIDGE_H
00006 #define TUNNELBRIDGE_H
00007 
00008 #include "tile_type.h"
00009 
00014 static inline uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
00015 {
00016   int x1 = TileX(begin);
00017   int y1 = TileY(begin);
00018   int x2 = TileX(end);
00019   int y2 = TileY(end);
00020 
00021   return abs(x2 + y2 - x1 - y1) - 1;
00022 }
00023 
00024 extern TileIndex _build_tunnel_endtile;
00025 
00026 #endif /* TUNNELBRIDGE_H */

Generated on Wed Apr 1 14:38:11 2009 for OpenTTD by  doxygen 1.5.6