equal
deleted
inserted
replaced
5 * @todo seperate this file into two |
5 * @todo seperate this file into two |
6 */ |
6 */ |
7 |
7 |
8 #include "stdafx.h" |
8 #include "stdafx.h" |
9 #include "openttd.h" |
9 #include "openttd.h" |
|
10 #include "bridge_map.h" |
10 #include "table/sprites.h" |
11 #include "table/sprites.h" |
11 #include "table/strings.h" |
12 #include "table/strings.h" |
12 #include "functions.h" |
13 #include "functions.h" |
13 #include "map.h" |
14 #include "map.h" |
14 #include "tile.h" |
15 #include "tile.h" |
|
16 #include "tunnel_map.h" |
15 #include "vehicle.h" |
17 #include "vehicle.h" |
16 #include "viewport.h" |
18 #include "viewport.h" |
17 #include "command.h" |
19 #include "command.h" |
18 #include "player.h" |
20 #include "player.h" |
19 #include "town.h" |
21 #include "town.h" |
1198 } |
1200 } |
1199 } |
1201 } |
1200 } |
1202 } |
1201 } |
1203 } |
1202 |
1204 |
1203 static inline bool IsTunnel(TileIndex t) {return !HASBIT(_m[t].m5, 7);} |
|
1204 static inline uint DiagDirToAxis(DiagDirection d) {return (d & 1);} |
|
1205 static inline DiagDirection GetTunnelDirection(TileIndex t) {return (DiagDirection)GB(_m[t].m5, 0, 2);} |
|
1206 static inline bool IsBridgeRamp(TileIndex t) {return !HASBIT(_m[t].m5, 6);} |
|
1207 static inline DiagDirection GetBridgeRampDirection(TileIndex t) {return (DiagDirection)((6 - (_m[t].m5 >> 4 & 2) - (_m[t].m5 & 1)) % 4);} |
|
1208 static inline bool IsTransportUnderBridge(TileIndex t) {return HASBIT(_m[t].m5, 5);} |
|
1209 static inline uint GetBridgeAxis(TileIndex t) {return GB(_m[t].m5, 0, 1);} |
|
1210 |
1205 |
1211 static uint GetSlopeZ_TunnelBridge(const TileInfo* ti) |
1206 static uint GetSlopeZ_TunnelBridge(const TileInfo* ti) |
1212 { |
1207 { |
1213 TileIndex tile = ti->tile; |
1208 TileIndex tile = ti->tile; |
1214 uint z = ti->z; |
1209 uint z = ti->z; |