src/rail.h
changeset 7928 63e18de69e50
parent 7833 ba402b153b79
child 7929 6c9b25842b0f
equal deleted inserted replaced
7927:3a3289a049f9 7928:63e18de69e50
   757  * @param  enginetype The RailType of the engine we are considering.
   757  * @param  enginetype The RailType of the engine we are considering.
   758  * @param  tiletype   The RailType of the tile we are considering.
   758  * @param  tiletype   The RailType of the tile we are considering.
   759  */
   759  */
   760 static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
   760 static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
   761 {
   761 {
   762 	return HASBIT(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype);
   762 	return HasBit(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype);
   763 }
   763 }
   764 
   764 
   765 /**
   765 /**
   766  * Checks if an engine of the given RailType got power on a tile with a given
   766  * Checks if an engine of the given RailType got power on a tile with a given
   767  * RailType. This would normally just be an equality check, but for electric
   767  * RailType. This would normally just be an equality check, but for electric
   770  * @param  enginetype The RailType of the engine we are considering.
   770  * @param  enginetype The RailType of the engine we are considering.
   771  * @param  tiletype   The RailType of the tile we are considering.
   771  * @param  tiletype   The RailType of the tile we are considering.
   772  */
   772  */
   773 static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
   773 static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
   774 {
   774 {
   775 	return HASBIT(GetRailTypeInfo(enginetype)->powered_railtypes, tiletype);
   775 	return HasBit(GetRailTypeInfo(enginetype)->powered_railtypes, tiletype);
   776 }
   776 }
   777 
   777 
   778 /**
   778 /**
   779  * Checks if the given tracks overlap, ie form a crossing. Basically this
   779  * Checks if the given tracks overlap, ie form a crossing. Basically this
   780  * means when there is more than one track on the tile, exept when there are
   780  * means when there is more than one track on the tile, exept when there are