equal
deleted
inserted
replaced
16 } RoadTileType; |
16 } RoadTileType; |
17 |
17 |
18 static inline RoadTileType GetRoadTileType(TileIndex t) |
18 static inline RoadTileType GetRoadTileType(TileIndex t) |
19 { |
19 { |
20 assert(IsTileType(t, MP_STREET)); |
20 assert(IsTileType(t, MP_STREET)); |
21 return (RoadTileType)(GB(_m[t].m5, 4, 4)); |
21 return (RoadTileType)GB(_m[t].m5, 4, 4); |
22 } |
22 } |
23 |
23 |
24 static inline bool IsLevelCrossing(TileIndex t) |
24 static inline bool IsLevelCrossing(TileIndex t) |
25 { |
25 { |
26 return GetRoadTileType(t) == ROAD_TILE_CROSSING; |
26 return GetRoadTileType(t) == ROAD_TILE_CROSSING; |
32 } |
32 } |
33 |
33 |
34 static inline RoadBits GetRoadBits(TileIndex t) |
34 static inline RoadBits GetRoadBits(TileIndex t) |
35 { |
35 { |
36 assert(GetRoadTileType(t) == ROAD_TILE_NORMAL); |
36 assert(GetRoadTileType(t) == ROAD_TILE_NORMAL); |
37 return (RoadBits)(GB(_m[t].m5, 0, 4)); |
37 return (RoadBits)GB(_m[t].m5, 0, 4); |
38 } |
38 } |
39 |
39 |
40 static inline void SetRoadBits(TileIndex t, RoadBits r) |
40 static inline void SetRoadBits(TileIndex t, RoadBits r) |
41 { |
41 { |
42 assert(GetRoadTileType(t) == ROAD_TILE_NORMAL); // XXX incomplete |
42 assert(GetRoadTileType(t) == ROAD_TILE_NORMAL); // XXX incomplete |