summaryrefslogtreecommitdiff
path: root/road_map.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-06 13:11:08 +0000
committertron <tron@openttd.org>2006-03-06 13:11:08 +0000
commit03254940a48ceecb68eee1b64cce4de045e2aab6 (patch)
tree7384488cf17eb4d93ce21ad3b40437978efc939a /road_map.h
parent6fa5f041f8c6b33b91018840489d8a2d5a7891ae (diff)
downloadopenttd-03254940a48ceecb68eee1b64cce4de045e2aab6.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.h9
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);