Change: Store station blocked/wires/pylons flags in map.
This stores three flags in unused map bits, and avoids having to look up station graphics and custom station specs to determine blocked/wires/pylons status. This potentially affects rail pathfinding performance. Savegame version is not bumped, as the flags can just be updated every time. (cherry picked from commit cb658e6cc6e1c114c1eaafaaa5b14849f04ca083)
This commit is contained in:

committed by
Jonathan G Rennison

parent
e162e7a331
commit
b2a1ec96f1
@@ -1050,8 +1050,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
|
||||
<li>m6 bits <span style="color: blue">6</span>..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint, <span style="color: blue">road waypoint</span>)</li>
|
||||
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
||||
<li>m6 bit <span style="color: blue">1</span>: 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>
|
||||
|
@@ -194,7 +194,7 @@ the array so you can quickly see what is used and what is not.
|
||||
<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="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="free">O<span class="patch" title="Station type (extra bit)">P</span></span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="free">OO</span></td>
|
||||
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span> <span class="patch" title="Station type (extra bit)">P</span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="patch" title="May have wires (moved from bit 6)">P</span><span class="used" title="Tile is blocked">X</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>
|
||||
|
Reference in New Issue
Block a user