road_map.c
changeset 3404 3ac4f7fedfb5
parent 3234 986c30171e92
child 3793 33cdb5bf7b21
equal deleted inserted replaced
3403:96b9eb3eee48 3404:3ac4f7fedfb5
     5 #include "bridge_map.h"
     5 #include "bridge_map.h"
     6 #include "functions.h"
     6 #include "functions.h"
     7 #include "road_map.h"
     7 #include "road_map.h"
     8 #include "station.h"
     8 #include "station.h"
     9 #include "tunnel_map.h"
     9 #include "tunnel_map.h"
       
    10 #include "station_map.h"
    10 
    11 
    11 
    12 
    12 RoadBits GetAnyRoadBits(TileIndex tile)
    13 RoadBits GetAnyRoadBits(TileIndex tile)
    13 {
    14 {
    14 	switch (GetTileType(tile)) {
    15 	switch (GetTileType(tile)) {
    19 				case ROAD_CROSSING: return GetCrossingRoadBits(tile);
    20 				case ROAD_CROSSING: return GetCrossingRoadBits(tile);
    20 				case ROAD_DEPOT:    return DiagDirToRoadBits(GetRoadDepotDirection(tile));
    21 				case ROAD_DEPOT:    return DiagDirToRoadBits(GetRoadDepotDirection(tile));
    21 			}
    22 			}
    22 
    23 
    23 		case MP_STATION:
    24 		case MP_STATION:
    24 			if (!IsRoadStationTile(tile)) return 0;
    25 			if (!IsRoadStopTile(tile)) return 0;
    25 			return DiagDirToRoadBits(GetRoadStationDir(tile));
    26 			return DiagDirToRoadBits(GetRoadStopDir(tile));
    26 
    27 
    27 		case MP_TUNNELBRIDGE:
    28 		case MP_TUNNELBRIDGE:
    28 			if (IsBridge(tile)) {
    29 			if (IsBridge(tile)) {
    29 				if (IsBridgeMiddle(tile)) {
    30 				if (IsBridgeMiddle(tile)) {
    30 					if (!IsTransportUnderBridge(tile) ||
    31 					if (!IsTransportUnderBridge(tile) ||