(svn r2456) * Prettyfied npf.c using enums and wrappers from rail.h.

* Moved GetTileRailType() from npf.c to rail.[ch].
This commit is contained in:
matthijs
2005-06-17 17:11:05 +00:00
parent 7e9e233b37
commit d90840f7f8
3 changed files with 78 additions and 62 deletions

9
rail.h
View File

@@ -434,4 +434,13 @@ static inline bool HasSemaphores(TileIndex tile, Track track)
return (_map3_hi[tile] & SIG_SEMAPHORE_MASK);
}
/**
* Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile.
* Note that there is no check if the given trackdir is actually present on
* the tile!
* The given trackdir is used when there are (could be) multiple rail types on
* one tile.
*/
RailType GetTileRailType(TileIndex tile, byte trackdir);
#endif // RAIL_H