equal
deleted
inserted
replaced
58 * @return The bridge type |
58 * @return The bridge type |
59 */ |
59 */ |
60 static inline uint GetBridgeType(TileIndex t) |
60 static inline uint GetBridgeType(TileIndex t) |
61 { |
61 { |
62 assert(IsBridgeTile(t)); |
62 assert(IsBridgeTile(t)); |
63 return GB(_m[t].m2, 4, 4); |
63 return GB(_m[t].m2, 12, 4); |
64 } |
64 } |
65 |
65 |
66 |
66 |
67 /** |
67 /** |
68 * Get the direction pointing onto the bridge |
68 * Get the direction pointing onto the bridge |
148 |
148 |
149 |
149 |
150 static inline void MakeBridgeRamp(TileIndex t, Owner o, uint bridgetype, DiagDirection d, TransportType tt) |
150 static inline void MakeBridgeRamp(TileIndex t, Owner o, uint bridgetype, DiagDirection d, TransportType tt) |
151 { |
151 { |
152 SetTileOwner(t, o); |
152 SetTileOwner(t, o); |
153 _m[t].m2 = bridgetype << 4; |
153 _m[t].m2 = bridgetype << 12; |
154 _m[t].m4 = d << 5; |
154 _m[t].m4 = d << 5; |
155 _m[t].m5 = 0; |
155 _m[t].m5 = 0; |
156 } |
156 } |
157 |
157 |
158 static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, uint bridgetype, DiagDirection d) |
158 static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, uint bridgetype, DiagDirection d) |