mirror of https://github.com/OpenTTD/OpenTTD
Change: Change rail depot type value in order to align bits.
parent
3e9b7f19cb
commit
a3d9165eb9
|
@ -520,7 +520,7 @@
|
|||
<li>m2 bit 11: opposite track is reserved, too</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>m5 bit 7 set, bit 6 set: railway depot
|
||||
<li>m5 bit 7 set, bit 6 clear: railway depot
|
||||
<ul>
|
||||
<li>m2: Depot index</li>
|
||||
<li>m5 bits 1..0: exit towards
|
||||
|
|
|
@ -118,7 +118,7 @@ the array so you can quickly see what is used and what is not.
|
|||
<td class="bits"><span class="pool" title="Depot index on pool">XXXX XXXX XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="free">OOOO</span> <span class="free">OOOO</span></td>
|
||||
<td class="bits"><span class="free">OOOO</span> <span class="used" title="Ground type: fences, snow, desert (fences on depot are not valid)">XXXX</span></td>
|
||||
<td class="bits"><span class="used" title="Rail tile type: rail, rail with signals, depot">11</span><span class="free">O</span><span class="used" title="PBS reservation">X</span> <span class="free">OO</span><span class="used" title="Depot exit direction">XX</span></td>
|
||||
<td class="bits"><span class="used" title="Rail tile type: rail, rail with signals, depot">1O</span><span class="free">O</span><span class="used" title="PBS reservation">X</span> <span class="free">OO</span><span class="used" title="Depot exit direction">XX</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan=3>2</td>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
enum RailTileType {
|
||||
RAIL_TILE_NORMAL = 0, ///< Normal rail tile without signals
|
||||
RAIL_TILE_SIGNALS = 1, ///< Normal rail tile with signals
|
||||
RAIL_TILE_DEPOT = 3, ///< Depot (one entrance)
|
||||
RAIL_TILE_DEPOT = 2, ///< Depot
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -641,6 +641,15 @@ bool AfterLoadGame()
|
|||
}
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_DEPOTS_ALIGN_RAIL_DEPOT_BITS)) {
|
||||
for (auto t : Map::Iterate()) {
|
||||
if (IsTileType(t, MP_RAILWAY) && GetRailTileType(t) == 3) {
|
||||
/* Change the rail type for depots from old value 3 to new value 2. */
|
||||
SB(t.m5(), 6, 2, RAIL_TILE_DEPOT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* in version 2.1 of the savegame, town owner was unified. */
|
||||
if (IsSavegameVersionBefore(SLV_2, 1)) ConvertTownOwner();
|
||||
|
||||
|
|
|
@ -390,6 +390,7 @@ enum SaveLoadVersion : uint16_t {
|
|||
SLV_DEPOTID_BACKUP_ORDERS, ///< 314 PR#XXXXX Backup orders are indexed through DepotIDs.
|
||||
|
||||
SLV_ALIGN_WATER_BITS, ///< 315 PR#XXXXX Align some water bits in the map array.
|
||||
SLV_DEPOTS_ALIGN_RAIL_DEPOT_BITS, ///< 316 PR#XXXXX Align one bit for rail depots.
|
||||
|
||||
SL_MAX_VERSION, ///< Highest possible saveload version
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue