|
@@ -144,48 +144,53 @@ static inline void SetStopBuiltOnTownRoa
|
|
|
/**
|
|
|
* Gets the direction the road stop entrance points towards.
|
|
|
*/
|
|
|
static inline DiagDirection GetRoadStopDir(TileIndex t)
|
|
|
{
|
|
|
StationGfx gfx = GetStationGfx(t);
|
|
|
assert(IsRoadStopTile(t));
|
|
|
if (gfx < GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET) {
|
|
|
return (DiagDirection)(gfx);
|
|
|
} else {
|
|
|
return (DiagDirection)(gfx - GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static inline bool IsOilRig(TileIndex t)
|
|
|
{
|
|
|
return GetStationType(t) == STATION_OILRIG;
|
|
|
}
|
|
|
|
|
|
static inline bool IsDock(TileIndex t)
|
|
|
{
|
|
|
return GetStationType(t) == STATION_DOCK;
|
|
|
}
|
|
|
|
|
|
static inline bool IsDockTile(TileIndex t)
|
|
|
{
|
|
|
return IsTileType(t, MP_STATION) && GetStationType(t) == STATION_DOCK;
|
|
|
}
|
|
|
|
|
|
static inline bool IsBuoy(TileIndex t)
|
|
|
{
|
|
|
return GetStationType(t) == STATION_BUOY;
|
|
|
}
|
|
|
|
|
|
static inline bool IsBuoyTile(TileIndex t)
|
|
|
{
|
|
|
return IsTileType(t, MP_STATION) && IsBuoy(t);
|
|
|
}
|
|
|
|
|
|
static inline bool IsHangarTile(TileIndex t)
|
|
|
{
|
|
|
return IsTileType(t, MP_STATION) && IsHangar(t);
|
|
|
}
|
|
|
|
|
|
|
|
|
static inline Axis GetRailStationAxis(TileIndex t)
|
|
|
{
|
|
|
assert(IsRailwayStation(t));
|
|
|
return HasBit(GetStationGfx(t), 0) ? AXIS_Y : AXIS_X;
|
|
|
}
|
|
|
|
|
|
|
|
|
static inline Track GetRailStationTrack(TileIndex t)
|