equal
deleted
inserted
replaced
61 default: NOT_REACHED(); |
61 default: NOT_REACHED(); |
62 case ROADTYPE_ROAD: return (RoadBits)GB(_m[t].m4, 0, 4); |
62 case ROADTYPE_ROAD: return (RoadBits)GB(_m[t].m4, 0, 4); |
63 case ROADTYPE_TRAM: return (RoadBits)GB(_m[t].m4, 4, 4); |
63 case ROADTYPE_TRAM: return (RoadBits)GB(_m[t].m4, 4, 4); |
64 case ROADTYPE_HWAY: return (RoadBits)GB(_m[t].m6, 2, 4); |
64 case ROADTYPE_HWAY: return (RoadBits)GB(_m[t].m6, 2, 4); |
65 } |
65 } |
|
66 } |
|
67 |
|
68 /** |
|
69 * Get all RoadBits set on a tile except from the given RoadType |
|
70 * |
|
71 * @param t The tile from which we want to get the RoadBits |
|
72 * @param rt The RoadType which we exclude from the querry |
|
73 * @return all set RoadBits of the tile which are not from the given RoadType |
|
74 */ |
|
75 static inline RoadBits GetOtherRoadBits(TileIndex t, RoadType rt) |
|
76 { |
|
77 return ((rt == ROADTYPE_ROAD) ? ROAD_NONE : GetRoadBits(t, ROADTYPE_ROAD)) | |
|
78 ((rt == ROADTYPE_TRAM) ? ROAD_NONE : GetRoadBits(t, ROADTYPE_TRAM)) | |
|
79 ((rt == ROADTYPE_HWAY) ? ROAD_NONE : GetRoadBits(t, ROADTYPE_HWAY)); |
66 } |
80 } |
67 |
81 |
68 /** |
82 /** |
69 * Get all set RoadBits on the given tile |
83 * Get all set RoadBits on the given tile |
70 * |
84 * |