mirror of https://github.com/OpenTTD/OpenTTD
(svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
parent
8310a46351
commit
3ae99e17bb
|
@ -194,11 +194,6 @@ uint GetStationPlatforms(const Station *st, TileIndex tile);
|
||||||
void StationPickerDrawSprite(int x, int y, RailType railtype, int image);
|
void StationPickerDrawSprite(int x, int y, RailType railtype, int image);
|
||||||
|
|
||||||
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
|
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
|
||||||
static inline RoadStopType GetRoadStopType(TileIndex tile)
|
|
||||||
{
|
|
||||||
return (_m[tile].m5 < 0x47) ? RS_TRUCK : RS_BUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type);
|
RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type);
|
||||||
uint GetNumRoadStops(const Station* st, RoadStopType type);
|
uint GetNumRoadStops(const Station* st, RoadStopType type);
|
||||||
RoadStop * AllocateRoadStop( void );
|
RoadStop * AllocateRoadStop( void );
|
||||||
|
|
|
@ -60,6 +60,12 @@ typedef enum StationType {
|
||||||
|
|
||||||
StationType GetStationType(TileIndex);
|
StationType GetStationType(TileIndex);
|
||||||
|
|
||||||
|
static inline RoadStopType GetRoadStopType(TileIndex t)
|
||||||
|
{
|
||||||
|
assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS);
|
||||||
|
return GetStationType(t) == STATION_TRUCK ? RS_TRUCK : RS_BUS;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool IsRailwayStation(TileIndex t)
|
static inline bool IsRailwayStation(TileIndex t)
|
||||||
{
|
{
|
||||||
return _m[t].m5 < RAILWAY_BASE + RAILWAY_SIZE;
|
return _m[t].m5 < RAILWAY_BASE + RAILWAY_SIZE;
|
||||||
|
|
Loading…
Reference in New Issue