mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Move station tile flag cached bits from m6 to m3.
This frees up bits 0..1 of m6 for all tile types. No savegame bump is needed as these bits are always reset on load.pull/12741/head
parent
be505ec459
commit
44de8d77bf
|
@ -892,6 +892,9 @@
|
|||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m3 bit 2: rail station / waypoint may have catenary pylons</li>
|
||||
<li>m3 bit 1: rail station / waypoint may have catenary wires</li>
|
||||
<li>m3 bit 0: rail station / waypoint is blocked</li>
|
||||
<li>m4: custom station id; 0 means standard graphics</li>
|
||||
<li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
|
||||
<li>m5: graphics index (range from 0..255 for each station type):
|
||||
|
@ -1021,11 +1024,8 @@
|
|||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
|
||||
<li>m6 bits 6..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint, road waypoint)</li>
|
||||
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
||||
<li>m6 bit 1: rail station / waypoint may have catenary wires</li>
|
||||
<li>m6 bit 0: rail station / waypoint is blocked</li>
|
||||
|
||||
<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
|
||||
<li>m7: animation frame (railway stations/waypoints, airports)</li>
|
||||
|
|
|
@ -185,10 +185,10 @@ the array so you can quickly see what is used and what is not.
|
|||
<td class="caption">rail station</td>
|
||||
<td class="bits" rowspan=8><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||
<td class="bits" rowspan=8><span class="pool" title="Station index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">O</span><span class="used" title="May have pylons">X</span><span class="used" title="May have wires">X</span><span class="used" title="Tile is blocked">X</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Custom station specifications ID">XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="used" title="Graphics index">XXXX XXXX</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span><span class="used" title="Station type">XXXX</span> <span class="used" title="Reserved track">X</span><span class="used" title="May have wires">X</span><span class="used" title="Tile is blocked">X</span></td>
|
||||
<td class="bits" rowspan=2><span class="free">O</span><span class="used" title="Station type">XXX X</span><span class="used" title="Reserved track">X</span><span class="free">OO</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
|
||||
<td class="bits" rowspan=2><span class="free">OOOO OOOO OO</span><span class="used" title="Railway type">XX XXXX</span></td>
|
||||
</tr>
|
||||
|
|
|
@ -431,7 +431,7 @@ inline bool IsHangarTile(Tile t)
|
|||
inline bool IsStationTileBlocked(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 0);
|
||||
return HasBit(t.m3(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -443,7 +443,7 @@ inline bool IsStationTileBlocked(Tile t)
|
|||
inline void SetStationTileBlocked(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 0, b);
|
||||
AssignBit(t.m3(), 0, b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -455,7 +455,7 @@ inline void SetStationTileBlocked(Tile t, bool b)
|
|||
inline bool CanStationTileHaveWires(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 1);
|
||||
return HasBit(t.m3(), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -467,7 +467,7 @@ inline bool CanStationTileHaveWires(Tile t)
|
|||
inline void SetStationTileHaveWires(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 1, b);
|
||||
AssignBit(t.m3(), 1, b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -479,7 +479,7 @@ inline void SetStationTileHaveWires(Tile t, bool b)
|
|||
inline bool CanStationTileHavePylons(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 7);
|
||||
return HasBit(t.m3(), 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -491,7 +491,7 @@ inline bool CanStationTileHavePylons(Tile t)
|
|||
inline void SetStationTileHavePylons(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 7, b);
|
||||
AssignBit(t.m3(), 2, b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue