tunnelbridge.h

Go to the documentation of this file.
00001 /* $Id: tunnelbridge.h 11968 2008-01-23 22:34:04Z smatz $ */
00002 
00005 #ifndef TUNNELBRIDGE_H
00006 #define TUNNELBRIDGE_H
00007 
00008 #include "tile_type.h"
00009 #include "map_func.h"
00010 #include "tunnelbridge_map.h"
00011 
00016 static inline uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
00017 {
00018   int x1 = TileX(begin);
00019   int y1 = TileY(begin);
00020   int x2 = TileX(end);
00021   int y2 = TileY(end);
00022 
00023   return abs(x2 + y2 - x1 - y1) - 1;
00024 }
00025 
00026 #endif /* TUNNELBRIDGE_H */

Generated on Wed Oct 1 17:03:25 2008 for openttd by  doxygen 1.5.6