yapf/yapf_costbase.hpp
author truelight
Sat, 19 Aug 2006 19:45:04 +0000
changeset 4308 391dcafb34e5
parent 3900 2c84ed52709d
child 5018 479eff76269a
permissions -rw-r--r--
(svn r5955) -Fix r5728: 2 very important lines for ShowQueryString where removed by excident.
Because of this you couldn't join servers with passwords, and more of those
problems. (tnx Mucht)
/* $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 */