diff options
author | tron <tron@openttd.org> | 2005-06-24 12:38:35 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-24 12:38:35 +0000 |
commit | a733fede9b21d5e74a007ed64263bc07535ee25c (patch) | |
tree | 17004bd894946da466a10e50a86ff66225cf8896 /station.h | |
parent | 6699ee79d3c1d58be04351cc2bc18c683f4655dd (diff) | |
download | openttd-a733fede9b21d5e74a007ed64263bc07535ee25c.tar.xz |
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
Diffstat (limited to 'station.h')
-rw-r--r-- | station.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -187,7 +187,7 @@ VARDEF bool _global_station_sort_dirty; void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad); void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad); -uint GetStationPlatforms(Station *st, uint tile); +uint GetStationPlatforms(Station *st, TileIndex tile); /* Station layout for given dimensions - it is a two-dimensional array @@ -278,7 +278,8 @@ RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type); RoadStop * AllocateRoadStop( void ); void ClearSlot(Vehicle *v, RoadStop *rs); -static inline bool IsTrainStationTile(uint tile) { +static inline bool IsTrainStationTile(TileIndex tile) +{ return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8); } @@ -314,7 +315,8 @@ static inline bool IsBuoyTile(TileIndex tile) { /* Get's the direction the station exit points towards. Ie, returns 0 for a * station with the exit NE. */ -static inline byte GetRoadStationDir(uint tile) { +static inline byte GetRoadStationDir(TileIndex tile) +{ assert(IsRoadStationTile(tile)); return (_map5[tile] - 0x43) & 3; } |