mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r4275) -Codechange: Use of map accessor functions inside station_map.h when possible
This commit is contained in:
parent
3ff5b879d0
commit
a281b0ebd3
@ -76,15 +76,6 @@ static inline bool IsRailwayStationTile(TileIndex t)
|
|||||||
return IsTileType(t, MP_STATION) && IsRailwayStation(t);
|
return IsTileType(t, MP_STATION) && IsRailwayStation(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
|
|
||||||
{
|
|
||||||
assert(IsRailwayStationTile(t2));
|
|
||||||
return
|
|
||||||
IsRailwayStationTile(t1) &&
|
|
||||||
IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
|
|
||||||
GB(_m[t1].m5, 0, 1) == GB(_m[t2].m5, 0, 1); // same direction?
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool IsHangar(TileIndex t)
|
static inline bool IsHangar(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_STATION));
|
assert(IsTileType(t, MP_STATION));
|
||||||
@ -175,6 +166,15 @@ static inline Track GetRailStationTrack(TileIndex t)
|
|||||||
return GetRailStationAxis(t) == AXIS_X ? TRACK_X : TRACK_Y;
|
return GetRailStationAxis(t) == AXIS_X ? TRACK_X : TRACK_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool IsCompatibleTrainStationTile(TileIndex t1, TileIndex t2)
|
||||||
|
{
|
||||||
|
assert(IsRailwayStationTile(t2));
|
||||||
|
return
|
||||||
|
IsRailwayStationTile(t1) &&
|
||||||
|
IsCompatibleRail(GetRailType(t1), GetRailType(t2)) &&
|
||||||
|
GetRailStationAxis(t1) == GetRailStationAxis(t2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline DiagDirection GetDockDirection(TileIndex t)
|
static inline DiagDirection GetDockDirection(TileIndex t)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user