diff options
author | KUDr <KUDr@openttd.org> | 2006-05-27 16:12:16 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2006-05-27 16:12:16 +0000 |
commit | 308f27a3de3817cc96ad21b7830b261443206cc0 (patch) | |
tree | e4580db6e03032a997fce1392929b7190dc3b03d /yapf/yapf_costbase.hpp | |
parent | 3c2eb4f0865c912340f292ece24cf5664559c1ad (diff) | |
download | openttd-308f27a3de3817cc96ad21b7830b261443206cc0.tar.xz |
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
Diffstat (limited to 'yapf/yapf_costbase.hpp')
-rw-r--r-- | yapf/yapf_costbase.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/yapf/yapf_costbase.hpp b/yapf/yapf_costbase.hpp new file mode 100644 index 000000000..7aa141bc8 --- /dev/null +++ b/yapf/yapf_costbase.hpp @@ -0,0 +1,26 @@ +/* $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 */ |