equal
deleted
inserted
replaced
9 #include "rail.h" |
9 #include "rail.h" |
10 |
10 |
11 |
11 |
12 static inline bool IsTunnel(TileIndex t) |
12 static inline bool IsTunnel(TileIndex t) |
13 { |
13 { |
|
14 assert(IsTileType(t, MP_TUNNELBRIDGE)); |
14 return !HASBIT(_m[t].m5, 7); |
15 return !HASBIT(_m[t].m5, 7); |
15 } |
16 } |
16 |
17 |
17 |
18 |
18 static inline bool IsTunnelTile(TileIndex t) |
19 static inline bool IsTunnelTile(TileIndex t) |
21 } |
22 } |
22 |
23 |
23 |
24 |
24 static inline DiagDirection GetTunnelDirection(TileIndex t) |
25 static inline DiagDirection GetTunnelDirection(TileIndex t) |
25 { |
26 { |
|
27 assert(IsTunnelTile(t)); |
26 return (DiagDirection)GB(_m[t].m5, 0, 2); |
28 return (DiagDirection)GB(_m[t].m5, 0, 2); |
27 } |
29 } |
28 |
30 |
29 |
31 |
30 static inline TransportType GetTunnelTransportType(TileIndex t) |
32 static inline TransportType GetTunnelTransportType(TileIndex t) |
31 { |
33 { |
|
34 assert(IsTunnelTile(t)); |
32 return (TransportType)GB(_m[t].m5, 2, 2); |
35 return (TransportType)GB(_m[t].m5, 2, 2); |
33 } |
36 } |
34 |
37 |
35 |
38 |
36 TileIndex GetOtherTunnelEnd(TileIndex); |
39 TileIndex GetOtherTunnelEnd(TileIndex); |