summaryrefslogtreecommitdiff
path: root/station_map.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-03 21:25:49 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-03 21:25:49 +0000
commit530b4136126459729362a720142b27b77b72172b (patch)
tree610a090dee03a33a26b6d42df03a3fd21128d3a5 /station_map.h
parentbe5744ae508c1ad7baf6158d95a7a27d52656ac2 (diff)
downloadopenttd-530b4136126459729362a720142b27b77b72172b.tar.xz
(svn r4724) - Newstations: Add per-tile random data for station tiles.
Diffstat (limited to 'station_map.h')
-rw-r--r--station_map.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/station_map.h b/station_map.h
index 847b028d8..721d236e3 100644
--- a/station_map.h
+++ b/station_map.h
@@ -236,6 +236,18 @@ static inline uint GetCustomStationSpecIndex(TileIndex t)
return _m[t].m4;
}
+static inline void SetStationTileRandomBits(TileIndex t, byte random_bits)
+{
+ assert(IsTileType(t, MP_STATION));
+ SB(_m[t].m3, 4, 4, random_bits);
+}
+
+static inline byte GetStationTileRandomBits(TileIndex t)
+{
+ assert(IsTileType(t, MP_STATION));
+ return GB(_m[t].m3, 4, 4);
+}
+
static inline void MakeStation(TileIndex t, Owner o, StationID sid, byte m5)
{
SetTileType(t, MP_STATION);