diff options
author | Peter Nelson <peter1138@openttd.org> | 2018-07-22 23:47:15 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2018-07-26 13:27:40 +0100 |
commit | 5db883fbe9b8ef6171bfafc145a80932c3920504 (patch) | |
tree | de3ec131897c708f3fd960e9bc7cb1865d32fe7e /src/rail_map.h | |
parent | 65548c37a840ca48378180df1bf8857b087f7329 (diff) | |
download | openttd-5db883fbe9b8ef6171bfafc145a80932c3920504.tar.xz |
Change: Move rail type bits from m3 to m8.
Diffstat (limited to 'src/rail_map.h')
-rw-r--r-- | src/rail_map.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rail_map.h b/src/rail_map.h index 2431a7920..bd580d32a 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -115,7 +115,7 @@ static inline bool IsRailDepotTile(TileIndex t) */ static inline RailType GetRailType(TileIndex t) { - return (RailType)GB(_m[t].m3, 0, 4); + return (RailType)GB(_me[t].m8, 0, 4); } /** @@ -125,7 +125,7 @@ static inline RailType GetRailType(TileIndex t) */ static inline void SetRailType(TileIndex t, RailType r) { - SB(_m[t].m3, 0, 4, r); + SB(_me[t].m8, 0, 4, r); } @@ -522,11 +522,12 @@ static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r) SetTileType(t, MP_RAILWAY); SetTileOwner(t, o); _m[t].m2 = 0; - _m[t].m3 = r; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_NORMAL << 6 | b; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = r; } @@ -535,11 +536,12 @@ static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirectio SetTileType(t, MP_RAILWAY); SetTileOwner(t, o); _m[t].m2 = did; - _m[t].m3 = r; + _m[t].m3 = 0; _m[t].m4 = 0; _m[t].m5 = RAIL_TILE_DEPOT << 6 | d; SB(_me[t].m6, 2, 4, 0); _me[t].m7 = 0; + _me[t].m8 = r; } #endif /* RAIL_MAP_H */ |