yapf/yapf_costbase.hpp
changeset 3900 2c84ed52709d
child 5018 479eff76269a
equal deleted inserted replaced
3899:5ba7f20a14ca 3900:2c84ed52709d
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef  YAPF_COSTBASE_HPP
       
     4 #define  YAPF_COSTBASE_HPP
       
     5 
       
     6 struct CYapfCostBase {
       
     7 	static const TrackdirBits   c_upwards_slopes[16];
       
     8 
       
     9 	FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
       
    10 	{
       
    11 		if (IsDiagonalTrackdir(td)) {
       
    12 			uint tile_slope = GetTileSlope(tile, NULL) & 0x0F;
       
    13 			if ((c_upwards_slopes[tile_slope] & TrackdirToTrackdirBits(td)) != 0) {
       
    14 				return true;
       
    15 			}
       
    16 		}
       
    17 		return false;
       
    18 	}
       
    19 };
       
    20 
       
    21 struct CostRailSettings {
       
    22 	// look-ahead signal penalty
       
    23 };
       
    24 
       
    25 
       
    26 #endif /* YAPF_COSTBASE_HPP */