(svn r12410) -Codechange: abstract out the test for catenary on electric rails

This commit is contained in:
2008-03-25 12:10:13 +00:00
parent 237524f960
commit 6184676ec7
6 changed files with 25 additions and 14 deletions

View File

@@ -183,6 +183,17 @@ void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
void *EnsureNoTrainOnTrackProc(Vehicle *v, void *data);
int TicksToLeaveDepot(const Vehicle *v);
/**
* Test if a rail type has catenary
* @param rt Rail type to test
*/
static inline bool HasCatenary(RailType rt)
{
return rt == RAILTYPE_ELECTRIC;
}
/**
* Draws overhead wires and pylons for electric railways.
* @param ti The TileInfo struct of the tile being drawn