mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r5326) Remove the indicator bit for custom waypoint graphics, because it just contains redundant information
Yup-yup-ed by: peter1138
This commit is contained in:
parent
ac217b2eea
commit
9e28713c4c
|
@ -142,7 +142,6 @@ m5 bits 7 and 6 set: railway depot / checkpoints
|
|||
<li>m1: <a href="#OwnershipInfo">owner</a> of the depot / checkpoint</li>
|
||||
<li>m2: For waypoints, index into the array of waypoints.</li>
|
||||
<li>m3 bits 0..3 = <a href="#TrackType">track type</a></li>
|
||||
<li>m3 bit 4 = use custom sprite (valid only for the checkpoint)</li>
|
||||
<li>m4 bits 0..3 = ground type, as per m2 bits 0..3 for railway tiles.</li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
|
|
|
@ -87,7 +87,7 @@ the array so you can quickly see what is used and what is not.
|
|||
<td class="caption">waypoint</td>
|
||||
<td class="bits">-inherit-</td>
|
||||
<td class="bits">XXXX XXXX XXXX XXXX</td>
|
||||
<td class="bits"><span class="free">OOO</span>X XXXX</td>
|
||||
<td class="bits"><span class="free">OOOO</span> XXXX</td>
|
||||
<td class="bits"><span class="free">OOOO</span> XXXX</td>
|
||||
<td class="bits">-inherit-</td>
|
||||
<td class="bits">XX<span class="free">OO O</span>XXX</td>
|
||||
|
|
|
@ -1325,7 +1325,7 @@ static void DrawTile_Track(TileInfo *ti)
|
|||
|
||||
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
|
||||
|
||||
if (IsRailWaypoint(ti->tile) && IsCustomWaypoint(ti->tile)) {
|
||||
if (IsRailWaypoint(ti->tile)) {
|
||||
// look for customization
|
||||
byte stat_id = GetWaypointByTile(ti->tile)->stat_id;
|
||||
const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, stat_id);
|
||||
|
|
14
rail_map.h
14
rail_map.h
|
@ -136,20 +136,6 @@ static inline TrackBits GetRailWaypointBits(TileIndex t)
|
|||
return _m[t].m5 & 1 ? TRACK_BIT_Y : TRACK_BIT_X;
|
||||
}
|
||||
|
||||
static inline void SetCustomWaypointSprite(TileIndex t)
|
||||
{
|
||||
SETBIT(_m[t].m3, 4);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -221,13 +221,11 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||
statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1);
|
||||
|
||||
if (statspec != NULL) {
|
||||
SetCustomWaypointSprite(tile);
|
||||
wp->stat_id = p1;
|
||||
wp->grfid = statspec->grfid;
|
||||
wp->localidx = statspec->localidx;
|
||||
} else {
|
||||
// Specified custom graphics do not exist, so use default.
|
||||
ClearCustomWaypointSprite(tile);
|
||||
wp->stat_id = 0;
|
||||
wp->grfid = 0;
|
||||
wp->localidx = 0;
|
||||
|
|
Loading…
Reference in New Issue