Files @ r5116:6ab72109f482
Branch filter:

Location: cpp/openttd-patchpack/source/yapf/yapf_costbase.hpp

KUDr
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
(original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
/* $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) && !IsTunnelTile(tile)) {
			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 */