Files
@ r8438:829f4b24336f
Branch filter:
Location: cpp/openttd-patchpack/source/src/tunnel_map.h - annotation
r8438:829f4b24336f
1.7 KiB
text/x-c
(svn r12008) -Update: WebTranslator2 update to 2008-01-29 14:07:31
brazilian_portuguese - 5 fixed, 5 changed by fukumori (4), tucalipe (6)
bulgarian - 7 fixed by thetitan (7)
catalan - 1 fixed by arnaullv (1)
danish - 9 fixed by ThomasA (9)
dutch - 5 fixed by habell (5)
estonian - 7 fixed, 12 changed by kristjans (19)
french - 1 fixed by glx (1)
german - 6 fixed by moewe2 (6)
italian - 1 fixed by lorenzodv (1)
korean - 6 fixed, 11 changed by leejaeuk5 (17)
russian - 9 fixed by Smoky555 (9)
slovak - 7 fixed by lengyel (7)
slovenian - 7 fixed by Necrolyte (7)
swedish - 6 fixed by ChrillDeVille (6)
ukrainian - 7 fixed by mad (7)
brazilian_portuguese - 5 fixed, 5 changed by fukumori (4), tucalipe (6)
bulgarian - 7 fixed by thetitan (7)
catalan - 1 fixed by arnaullv (1)
danish - 9 fixed by ThomasA (9)
dutch - 5 fixed by habell (5)
estonian - 7 fixed, 12 changed by kristjans (19)
french - 1 fixed by glx (1)
german - 6 fixed by moewe2 (6)
italian - 1 fixed by lorenzodv (1)
korean - 6 fixed, 11 changed by leejaeuk5 (17)
russian - 9 fixed by Smoky555 (9)
slovak - 7 fixed by lengyel (7)
slovenian - 7 fixed by Necrolyte (7)
swedish - 6 fixed by ChrillDeVille (6)
ukrainian - 7 fixed by mad (7)
r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6422:5983361e241a r6422:5983361e241a r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r8100:d1eb5523ede7 r8102:c3f2dd9e9116 r8102:c3f2dd9e9116 r8108:1d5bdeea7e20 r5475:3f5cd13d1b63 r8083:8cd2123a0c7c r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r7928:a80e7e05d6c5 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r7002:201ff6832d3a r5475:3f5cd13d1b63 r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6661:a60bd28b4b57 r6540:ee437874694d r6661:a60bd28b4b57 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6661:a60bd28b4b57 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r6540:ee437874694d r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 | /* $Id$ */
/** @file tunnel_map.h */
#ifndef TUNNEL_MAP_H
#define TUNNEL_MAP_H
#include "direction_func.h"
#include "rail_type.h"
#include "road_type.h"
#include "tile_map.h"
/**
* Is this a tunnel (entrance)?
* @param t the tile that might be a tunnel
* @pre IsTileType(t, MP_TUNNELBRIDGE)
* @return true if and only if this tile is a tunnel (entrance)
*/
static inline bool IsTunnel(TileIndex t)
{
assert(IsTileType(t, MP_TUNNELBRIDGE));
return !HasBit(_m[t].m5, 7);
}
/**
* Is this a tunnel (entrance)?
* @param t the tile that might be a tunnel
* @return true if and only if this tile is a tunnel (entrance)
*/
static inline bool IsTunnelTile(TileIndex t)
{
return IsTileType(t, MP_TUNNELBRIDGE) && IsTunnel(t);
}
TileIndex GetOtherTunnelEnd(TileIndex);
bool IsTunnelInWay(TileIndex, uint z);
bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir);
/**
* Makes a road tunnel entrance
* @param t the entrance of the tunnel
* @param o the owner of the entrance
* @param d the direction facing out of the tunnel
* @param r the road type used in the tunnel
*/
static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTypes r)
{
SetTileType(t, MP_TUNNELBRIDGE);
SetTileOwner(t, o);
_m[t].m2 = 0;
_m[t].m3 = r;
_m[t].m4 = 0;
_m[t].m5 = TRANSPORT_ROAD << 2 | d;
}
/**
* Makes a rail tunnel entrance
* @param t the entrance of the tunnel
* @param o the owner of the entrance
* @param d the direction facing out of the tunnel
* @param r the rail type used in the tunnel
*/
static inline void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailType r)
{
SetTileType(t, MP_TUNNELBRIDGE);
SetTileOwner(t, o);
_m[t].m2 = 0;
_m[t].m3 = r;
_m[t].m4 = 0;
_m[t].m5 = TRANSPORT_RAIL << 2 | d;
}
#endif /* TUNNEL_MAP_H */
|