diff options
author | tron <tron@openttd.org> | 2006-03-06 13:11:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-06 13:11:08 +0000 |
commit | f3fb21c96cd447fd2efeaf085d28bac9588649c7 (patch) | |
tree | 7384488cf17eb4d93ce21ad3b40437978efc939a /road_map.h | |
parent | d79329277897c59f86a6a914af53fdc50d90852c (diff) | |
download | openttd-f3fb21c96cd447fd2efeaf085d28bac9588649c7.tar.xz |
(svn r3773) Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes
Diffstat (limited to 'road_map.h')
-rw-r--r-- | road_map.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/road_map.h b/road_map.h index 120688474..1aa3ea88c 100644 --- a/road_map.h +++ b/road_map.h @@ -33,6 +33,12 @@ static inline RoadBits GetRoadBits(TileIndex tile) return GB(_m[tile].m5, 0, 4); } +static inline void SetRoadBits(TileIndex tile, RoadBits r) +{ + SB(_m[tile].m5, 0, 4, r); +} + + static inline RoadBits GetCrossingRoadBits(TileIndex tile) { return _m[tile].m5 & 8 ? ROAD_Y : ROAD_X; @@ -67,6 +73,9 @@ static inline RoadType GetRoadType(TileIndex tile) RoadBits GetAnyRoadBits(TileIndex); +TrackBits GetAnyRoadTrackBits(TileIndex tile); + + static inline void MakeRoadNormal(TileIndex t, Owner owner, RoadBits bits, uint town) { SetTileType(t, MP_STREET); |