Files
@ r12698:23a20e8bb850
Branch filter:
Location: cpp/openttd-patchpack/source/src/tunnelbridge.h - annotation
r12698:23a20e8bb850
561 B
text/x-c
(svn r17171) -Doc: Additions and corrections of various doxygen strings.
r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8398:cf5cc32ab397 r8973:bd926d7578a7 r8973:bd926d7578a7 r8398:cf5cc32ab397 | /* $Id$ */
/** @file tunnelbridge.h Header file for things common for tunnels and bridges */
#ifndef TUNNELBRIDGE_H
#define TUNNELBRIDGE_H
#include "tile_type.h"
/**
* Calculates the length of a tunnel or a bridge (without end tiles)
* @return length of bridge/tunnel middle
*/
static inline uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
{
int x1 = TileX(begin);
int y1 = TileY(begin);
int x2 = TileX(end);
int y2 = TileY(end);
return abs(x2 + y2 - x1 - y1) - 1;
}
extern TileIndex _build_tunnel_endtile;
#endif /* TUNNELBRIDGE_H */
|