mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r4386) -Codechange: Add and make use of IsCustomWaypoint
This commit is contained in:
parent
5d94951496
commit
b03bd97b47
@ -1308,7 +1308,7 @@ static void DrawTile_Track(TileInfo *ti)
|
||||
|
||||
if (ti->tileh != 0) DrawFoundation(ti, ti->tileh);
|
||||
|
||||
if (IsRailWaypoint(ti->tile) && HASBIT(_m[ti->tile].m3, 4)) {
|
||||
if (IsRailWaypoint(ti->tile) && IsCustomWaypoint(ti->tile)) {
|
||||
// look for customization
|
||||
byte stat_id = GetWaypointByTile(ti->tile)->stat_id;
|
||||
const StationSpec *stat = GetCustomStation(STAT_CLASS_WAYP, stat_id);
|
||||
|
@ -144,6 +144,11 @@ static inline void ClearCustomWaypointSprite(TileIndex t)
|
||||
CLRBIT(_m[t].m3, 4);
|
||||
}
|
||||
|
||||
static inline bool IsCustomWaypoint(TileIndex t)
|
||||
{
|
||||
return HASBIT(_m[t].m3, 4);
|
||||
}
|
||||
|
||||
static inline Axis GetWaypointAxis(TileIndex t)
|
||||
{
|
||||
return HASBIT(_m[t].m5, 0) ? AXIS_Y : AXIS_X;
|
||||
|
Loading…
Reference in New Issue
Block a user