yapf/yapf_costbase.hpp
author Darkvater
Fri, 27 Oct 2006 10:12:57 +0000
changeset 4955 1ffc9ce449a8
parent 3900 2c84ed52709d
child 5018 479eff76269a
permissions -rw-r--r--
(svn r6954) -Feature: Constrain the drawing of a string inside an editbox to the dimensions of
the widget it is in. This allows for typing longer text into an editbox (if maxwidth
allows of course) and scroll around properly.
/* $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 */