You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
513 B
C++
27 lines
513 B
C++
/* $Id$ */
|
|
|
|
#ifndef YAPF_COSTBASE_HPP
|
|
#define YAPF_COSTBASE_HPP
|
|
|
|
struct CYapfCostBase {
|
|
static const TrackdirBits c_upwards_slopes[16];
|
|
|
|
FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
|
|
{
|
|
if (IsDiagonalTrackdir(td)) {
|
|
uint tile_slope = GetTileSlope(tile, NULL) & 0x0F;
|
|
if ((c_upwards_slopes[tile_slope] & TrackdirToTrackdirBits(td)) != 0) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
};
|
|
|
|
struct CostRailSettings {
|
|
// look-ahead signal penalty
|
|
};
|
|
|
|
|
|
#endif /* YAPF_COSTBASE_HPP */
|