rail.h
changeset 3267 feff95208a9f
parent 3258 1c079364726d
child 3355 e414a0b104a6
equal deleted inserted replaced
3266:c09260482d2e 3267:feff95208a9f
   211 {
   211 {
   212 	RailTileType rtt = GetRailTileType(tile);
   212 	RailTileType rtt = GetRailTileType(tile);
   213 	return rtt == RAIL_TYPE_NORMAL || rtt == RAIL_TYPE_SIGNALS;
   213 	return rtt == RAIL_TYPE_NORMAL || rtt == RAIL_TYPE_SIGNALS;
   214 }
   214 }
   215 
   215 
   216 /**
       
   217  * Returns the tracks present on the given plain rail tile (IsPlainRailTile())
       
   218  */
       
   219 static inline TrackBits GetTrackBits(TileIndex tile)
       
   220 {
       
   221 	assert(GetRailTileType(tile) == RAIL_TYPE_NORMAL || GetRailTileType(tile) == RAIL_TYPE_SIGNALS);
       
   222 	return (TrackBits)(_m[tile].m5 & TRACK_BIT_MASK);
       
   223 }
       
   224 
   216 
   225 /**
   217 /**
   226  * Returns whether the given track is present on the given tile. Tile must be
   218  * Returns whether the given track is present on the given tile. Tile must be
   227  * a plain rail tile (IsPlainRailTile()).
   219  * a plain rail tile (IsPlainRailTile()).
   228  */
   220  */