equal
deleted
inserted
replaced
3 /** @file road_map.h */ |
3 /** @file road_map.h */ |
4 |
4 |
5 #ifndef ROAD_MAP_H |
5 #ifndef ROAD_MAP_H |
6 #define ROAD_MAP_H |
6 #define ROAD_MAP_H |
7 |
7 |
8 #include "macros.h" |
8 #include "track_func.h" |
9 #include "rail.h" |
9 #include "rail_type.h" |
10 #include "road.h" |
10 #include "town_type.h" |
11 #include "tile.h" |
11 #include "road_func.h" |
|
12 #include "tile_map.h" |
12 |
13 |
13 |
14 |
14 enum RoadTileType { |
15 enum RoadTileType { |
15 ROAD_TILE_NORMAL, |
16 ROAD_TILE_NORMAL, |
16 ROAD_TILE_CROSSING, |
17 ROAD_TILE_CROSSING, |
302 * @param tile the tile to get the track bits for |
303 * @param tile the tile to get the track bits for |
303 * @return the track bits for the given tile |
304 * @return the track bits for the given tile |
304 */ |
305 */ |
305 TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt); |
306 TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt); |
306 |
307 |
|
308 /** |
|
309 * Return if the tile is a valid tile for a crossing. |
|
310 * |
|
311 * @note function is overloaded |
|
312 * @param tile the curent tile |
|
313 * @param ax the axis of the road over the rail |
|
314 * @return true if it is a valid tile |
|
315 */ |
|
316 bool IsPossibleCrossing(const TileIndex tile, Axis ax); |
|
317 |
307 |
318 |
308 static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, TownID town, Owner road, Owner tram, Owner hway) |
319 static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, TownID town, Owner road, Owner tram, Owner hway) |
309 { |
320 { |
310 SetTileType(t, MP_ROAD); |
321 SetTileType(t, MP_ROAD); |
311 SetTileOwner(t, road); |
322 SetTileOwner(t, road); |