summaryrefslogtreecommitdiff
path: root/manualPorts
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-26 23:53:29 +0200
committerErich Eckner <git@eckner.net>2018-07-26 23:53:29 +0200
commitdadc3140324c2c16938e8ed9f67bef39c410ee9e (patch)
tree23c459ca255dc07ee9e68ad7587929917ed4ade1 /manualPorts
parent4607984363ac60932bef3e5cbdac7b12d59700c1 (diff)
downloadcrux-ports-dadc3140324c2c16938e8ed9f67bef39c410ee9e.tar.xz
openttd-git: 28207.b885f6267 -> 28208.b885f6267
Diffstat (limited to 'manualPorts')
-rw-r--r--manualPorts/openttd-git/.md5sum4
-rw-r--r--manualPorts/openttd-git/.signature8
-rw-r--r--manualPorts/openttd-git/Pkgfile2
-rw-r--r--manualPorts/openttd-git/everything.patch331
4 files changed, 203 insertions, 142 deletions
diff --git a/manualPorts/openttd-git/.md5sum b/manualPorts/openttd-git/.md5sum
index 1fe3cb1..c403061 100644
--- a/manualPorts/openttd-git/.md5sum
+++ b/manualPorts/openttd-git/.md5sum
@@ -1,6 +1,6 @@
-1909406785d23e2e6f8834a5c9d26794 8090580f77.tar.gz
+5a1a86b3bda53ff36c2631078fa8cd33 b885f6267.tar.gz
47a15ba014973e0f1c969b9cbd25844a clipboard.grf
-96e301ad29b461bf47c1ab423406ed5e everything.patch
+4e8175d787c79d194e30734034367fd5 everything.patch
4f4a6465cd5b84964b7ceecd1c06d686 opengfx-0.5.4.zip
858b79d44aea6de5e15d9d1439e86cc3 openmsx-0.3.1.zip
6e3a5cf97fe69e3a351c3e0615a14b04 opensfx-0.2.3.zip
diff --git a/manualPorts/openttd-git/.signature b/manualPorts/openttd-git/.signature
index c0ca940..8b1275d 100644
--- a/manualPorts/openttd-git/.signature
+++ b/manualPorts/openttd-git/.signature
@@ -1,10 +1,10 @@
untrusted comment: verify with /etc/ports/deepthought.pub
-RWQxCptPusLGGmqBtD0C/TNJ9GTOUY+JCfuMHMzOSoeEoEvRQM6spnqRktwmWc8ckdDI6s0Woi/Bjgf3W9C0kCwKi9MmSGb5/ws=
-SHA256 (Pkgfile) = 58e97528d1caa1b2554139b68ecf0863bb8a1871a04dbe3cfe2d9163bccafd0d
+RWQxCptPusLGGurkE6p352xUtLv/BI38zkW1/pL1mwOHi7pZAKvUS3mX9Af86jvyO9dNWvP5jPnroXTZ8s7AM90V6Je3QMK/NAM=
+SHA256 (Pkgfile) = 5e2d075dfcef0897bd2209a50dff9d47e77f8478078dea1aa76975d947ea4b16
SHA256 (.footprint) = 26ff2049f39ad547cae38d8892577cdace0d8925e9aaa5a5ce72b3ef88d7dc24
SHA256 (opengfx-0.5.4.zip) = 3d136d776906dbe8b5df1434cb9a68d1249511a3c4cfaca55cc24cc0028ae078
SHA256 (opensfx-0.2.3.zip) = 3574745ac0c138bae53b56972591db8d778ad9faffd51deae37a48a563e71662
SHA256 (openmsx-0.3.1.zip) = 92e293ae89f13ad679f43185e83fb81fb8cad47fe63f4af3d3d9f955130460f5
-SHA256 (everything.patch) = 148e499132363bcd29bb6d2b097def655ccfb83dfeb707114c2a7d539a92a907
+SHA256 (everything.patch) = e8311976310315cfa0159476fcaea7c2f8dc2843da4059fc21e424425c73f869
SHA256 (clipboard.grf) = 12b90fe53f2d61d2d45d74ecc6b97d3a5f041c4215a5c1b02a6b1ba162e4572a
-SHA256 (8090580f77.tar.gz) = dca66773ddfe7f88c30d366a9904736dc70e328d4e7e427ce72ec5e2896d81dc
+SHA256 (b885f6267.tar.gz) = 1e27245b35a3078022454be3ae1ecd04f74db9ebf1710c8a5342a2e385e70507
diff --git a/manualPorts/openttd-git/Pkgfile b/manualPorts/openttd-git/Pkgfile
index 3af81ee..7746991 100644
--- a/manualPorts/openttd-git/Pkgfile
+++ b/manualPorts/openttd-git/Pkgfile
@@ -5,7 +5,7 @@
# Depends on: libsdl libpng fontconfig lzo
name=openttd-git
-version=28204.8090580f77
+version=28208.b885f6267
gfxversion=0.5.4
sfxversion=0.2.3
diff --git a/manualPorts/openttd-git/everything.patch b/manualPorts/openttd-git/everything.patch
index 29d84bb..b733c19 100644
--- a/manualPorts/openttd-git/everything.patch
+++ b/manualPorts/openttd-git/everything.patch
@@ -1866,7 +1866,7 @@ index 000000000..47fffb238
+ </g>
+</svg>
diff --git a/projects/openttd_vs100.vcxproj b/projects/openttd_vs100.vcxproj
-index 6fbd5e3f0..b9984d783 100644
+index e400081df..dc44ed960 100644
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -325,6 +325,7 @@
@@ -1928,7 +1928,7 @@ index 6fbd5e3f0..b9984d783 100644
<ClInclude Include="..\src\widgets\company_widget.h" />
<ClInclude Include="..\src\widgets\console_widget.h" />
<ClInclude Include="..\src\widgets\date_widget.h" />
-@@ -835,6 +845,7 @@
+@@ -836,6 +846,7 @@
<ClCompile Include="..\src\aircraft_cmd.cpp" />
<ClCompile Include="..\src\autoreplace_cmd.cpp" />
<ClCompile Include="..\src\clear_cmd.cpp" />
@@ -1936,7 +1936,7 @@ index 6fbd5e3f0..b9984d783 100644
<ClCompile Include="..\src\company_cmd.cpp" />
<ClCompile Include="..\src\depot_cmd.cpp" />
<ClCompile Include="..\src\group_cmd.cpp" />
-@@ -842,6 +853,7 @@
+@@ -843,6 +854,7 @@
<ClCompile Include="..\src\misc_cmd.cpp" />
<ClCompile Include="..\src\object_cmd.cpp" />
<ClCompile Include="..\src\order_cmd.cpp" />
@@ -1945,7 +1945,7 @@ index 6fbd5e3f0..b9984d783 100644
<ClCompile Include="..\src\road_cmd.cpp" />
<ClCompile Include="..\src\roadveh_cmd.cpp" />
diff --git a/projects/openttd_vs100.vcxproj.filters b/projects/openttd_vs100.vcxproj.filters
-index 7eee89731..dbab8cceb 100644
+index 47f431e55..b91cbc942 100644
--- a/projects/openttd_vs100.vcxproj.filters
+++ b/projects/openttd_vs100.vcxproj.filters
@@ -132,6 +132,9 @@
@@ -2027,7 +2027,7 @@ index 7eee89731..dbab8cceb 100644
<ClInclude Include="..\src\widgets\company_widget.h">
<Filter>Widgets</Filter>
</ClInclude>
-@@ -1662,6 +1692,9 @@
+@@ -1665,6 +1695,9 @@
<ClCompile Include="..\src\clear_cmd.cpp">
<Filter>Command handlers</Filter>
</ClCompile>
@@ -2037,7 +2037,7 @@ index 7eee89731..dbab8cceb 100644
<ClCompile Include="..\src\company_cmd.cpp">
<Filter>Command handlers</Filter>
</ClCompile>
-@@ -1683,6 +1716,9 @@
+@@ -1686,6 +1719,9 @@
<ClCompile Include="..\src\order_cmd.cpp">
<Filter>Command handlers</Filter>
</ClCompile>
@@ -2048,7 +2048,7 @@ index 7eee89731..dbab8cceb 100644
<Filter>Command handlers</Filter>
</ClCompile>
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
-index 2ea6fdcd6..2814f0952 100644
+index c5e41e925..e538833d7 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -482,6 +482,10 @@
@@ -2140,7 +2140,7 @@ index 2ea6fdcd6..2814f0952 100644
<File
RelativePath=".\..\src\widgets\company_widget.h"
>
-@@ -2542,6 +2582,10 @@
+@@ -2546,6 +2586,10 @@
RelativePath=".\..\src\clear_cmd.cpp"
>
</File>
@@ -2151,7 +2151,7 @@ index 2ea6fdcd6..2814f0952 100644
<File
RelativePath=".\..\src\company_cmd.cpp"
>
-@@ -2570,6 +2614,10 @@
+@@ -2574,6 +2618,10 @@
RelativePath=".\..\src\order_cmd.cpp"
>
</File>
@@ -2163,7 +2163,7 @@ index 2ea6fdcd6..2814f0952 100644
RelativePath=".\..\src\rail_cmd.cpp"
>
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
-index 174677586..5add42720 100644
+index d2e5744a2..95ea8f19e 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -479,6 +479,10 @@
@@ -2255,7 +2255,7 @@ index 174677586..5add42720 100644
<File
RelativePath=".\..\src\widgets\company_widget.h"
>
-@@ -2539,6 +2579,10 @@
+@@ -2543,6 +2583,10 @@
RelativePath=".\..\src\clear_cmd.cpp"
>
</File>
@@ -2266,7 +2266,7 @@ index 174677586..5add42720 100644
<File
RelativePath=".\..\src\company_cmd.cpp"
>
-@@ -2567,6 +2611,10 @@
+@@ -2571,6 +2615,10 @@
RelativePath=".\..\src\order_cmd.cpp"
>
</File>
@@ -2278,7 +2278,7 @@ index 174677586..5add42720 100644
RelativePath=".\..\src\rail_cmd.cpp"
>
diff --git a/source.list b/source.list
-index ee8e69ef5..75c6754b5 100644
+index 5dec0e861..ab81c2f23 100644
--- a/source.list
+++ b/source.list
@@ -9,6 +9,7 @@ cargomonitor.cpp
@@ -2340,7 +2340,7 @@ index ee8e69ef5..75c6754b5 100644
widgets/company_widget.h
widgets/console_widget.h
widgets/date_widget.h
-@@ -570,6 +580,7 @@ widgets/waypoint_widget.h
+@@ -571,6 +581,7 @@ widgets/waypoint_widget.h
aircraft_cmd.cpp
autoreplace_cmd.cpp
clear_cmd.cpp
@@ -2348,7 +2348,7 @@ index ee8e69ef5..75c6754b5 100644
company_cmd.cpp
depot_cmd.cpp
group_cmd.cpp
-@@ -577,6 +588,7 @@ industry_cmd.cpp
+@@ -578,6 +589,7 @@ industry_cmd.cpp
misc_cmd.cpp
object_cmd.cpp
order_cmd.cpp
@@ -2443,7 +2443,7 @@ index d1e0d6024..c76374512 100644
+template int GetBridgeHeight<false>(TileIndex t);
+template int GetBridgeHeight<true>(GenericTileIndex t);
diff --git a/src/bridge_map.h b/src/bridge_map.h
-index 74c6974db..c2e4d9b23 100644
+index 75b20498d..4ee4f45ce 100644
--- a/src/bridge_map.h
+++ b/src/bridge_map.h
@@ -21,31 +21,46 @@
@@ -2583,7 +2583,7 @@ index 74c6974db..c2e4d9b23 100644
/**
* Generic part to make a bridge ramp for both roads and rails.
-@@ -126,17 +168,22 @@ static inline void SetBridgeMiddle(TileIndex t, Axis a)
+@@ -126,18 +168,23 @@ static inline void SetBridgeMiddle(TileIndex t, Axis a)
* @param rt the road or rail type
* @note this function should not be called directly.
*/
@@ -2594,17 +2594,19 @@ index 74c6974db..c2e4d9b23 100644
SetTileType(t, MP_TUNNELBRIDGE);
SetTileOwner(t, o);
- _m[t].m2 = 0;
-- _m[t].m3 = rt;
+- _m[t].m3 = 0;
- _m[t].m4 = 0;
- _m[t].m5 = 1 << 7 | tt << 2 | d;
- SB(_me[t].m6, 2, 4, bridgetype);
- _me[t].m7 = 0;
+- _me[t].m8 = rt;
+ GetTile(t)->m2 = 0;
-+ GetTile(t)->m3 = rt;
++ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = 1 << 7 | tt << 2 | d;
+ SB(GetTileEx(t)->m6, 2, 4, bridgetype);
+ GetTileEx(t)->m7 = 0;
++ GetTileEx(t)->m8 = rt;
}
+/** @copydoc MakeBridgeRamp(TileIndexT<Tgeneric>::T,Owner,BridgeType,DiagDirection,TransportType,uint)*/
+static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, TransportType tt, uint rt) { return MakeBridgeRamp<false>(t, o, bridgetype, d, tt, rt); }
@@ -2613,7 +2615,7 @@ index 74c6974db..c2e4d9b23 100644
/**
* Make a bridge ramp for roads.
-@@ -148,13 +195,18 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D
+@@ -149,13 +196,18 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D
* @param d the direction this ramp must be facing
* @param r the road type of the bridge
*/
@@ -2633,7 +2635,7 @@ index 74c6974db..c2e4d9b23 100644
/**
* Make a bridge ramp for rails.
-@@ -164,10 +216,15 @@ static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, Owner owner_road, Ow
+@@ -165,10 +217,15 @@ static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, Owner owner_road, Ow
* @param d the direction this ramp must be facing
* @param r the rail type of the bridge
*/
@@ -2650,7 +2652,7 @@ index 74c6974db..c2e4d9b23 100644
/**
* Make a bridge ramp for aqueducts.
-@@ -175,9 +232,14 @@ static inline void MakeRailBridgeRamp(TileIndex t, Owner o, BridgeType bridgetyp
+@@ -176,9 +233,14 @@ static inline void MakeRailBridgeRamp(TileIndex t, Owner o, BridgeType bridgetyp
* @param o the new owner of the bridge ramp
* @param d the direction this ramp must be facing
*/
@@ -5858,10 +5860,10 @@ index 18f27807d..19bff768b 100644
/* We update every tile every 256 ticks, so divide the map size by 2^8 = 256 */
diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt
-index bd8395506..11b60a5f2 100644
+index b888e3799..d9c1bff91 100644
--- a/src/lang/afrikaans.txt
+++ b/src/lang/afrikaans.txt
-@@ -4864,10 +4864,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4871,10 +4871,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Spektator, {1:STRING}
# Viewport strings
@@ -5881,10 +5883,10 @@ index bd8395506..11b60a5f2 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/basque.txt b/src/lang/basque.txt
-index ddb3afb60..3be636c0b 100644
+index cd97bf02c..434f185ec 100644
--- a/src/lang/basque.txt
+++ b/src/lang/basque.txt
-@@ -4727,10 +4727,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4734,10 +4734,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Ikuslea, {1:STRING}
# Viewport strings
@@ -5904,10 +5906,10 @@ index ddb3afb60..3be636c0b 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt
-index c9aba3b21..00b2d0e11 100644
+index 54f7aac65..e50949a76 100644
--- a/src/lang/catalan.txt
+++ b/src/lang/catalan.txt
-@@ -4883,10 +4883,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4950,10 +4950,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :{G=Masculin}Espectador, {1:STRING}
# Viewport strings
@@ -10918,10 +10920,10 @@ index 000000000..2909a9c82
+
+STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
diff --git a/src/lang/danish.txt b/src/lang/danish.txt
-index 45321d19f..9ecd2f300 100644
+index 4b9ea6bf5..396993a08 100644
--- a/src/lang/danish.txt
+++ b/src/lang/danish.txt
-@@ -4889,10 +4889,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4896,10 +4896,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Tilskuer, {1:STRING}
# Viewport strings
@@ -10941,10 +10943,10 @@ index 45321d19f..9ecd2f300 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt
-index 764a0fc10..6db63370d 100644
+index 9b387f2f7..86ffaacca 100644
--- a/src/lang/dutch.txt
+++ b/src/lang/dutch.txt
-@@ -4882,10 +4882,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4889,10 +4889,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Toeschouwer, {1:STRING}
# Viewport strings
@@ -11197,10 +11199,10 @@ index 1be138706..6391ae276 100644
STR_TINY_BLACK_STATION :{TINY_FONT}{BLACK}{STATION}
STR_BLACK_STRING :{BLACK}{STRING}
diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt
-index dd1e7effa..81b1eaa02 100644
+index 80c27eebf..1547470ed 100644
--- a/src/lang/estonian.txt
+++ b/src/lang/estonian.txt
-@@ -4921,10 +4921,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4928,10 +4928,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Vaatleja, {1:STRING}
# Viewport strings
@@ -11220,10 +11222,10 @@ index dd1e7effa..81b1eaa02 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt
-index 9a17e2387..fabdfe8d0 100644
+index 2eb53ca21..1f6300df3 100644
--- a/src/lang/faroese.txt
+++ b/src/lang/faroese.txt
-@@ -4369,10 +4369,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4376,10 +4376,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Eygleiðari, {1:STRING}
# Viewport strings
@@ -11243,7 +11245,7 @@ index 9a17e2387..fabdfe8d0 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/german.txt b/src/lang/german.txt
-index e91d83c28..0bc50c0a2 100644
+index cd7eb37d8..16cef397e 100644
--- a/src/lang/german.txt
+++ b/src/lang/german.txt
@@ -233,6 +233,7 @@ STR_TOOLTIP_GROUP_ORDER :{BLACK}Gruppier
@@ -11311,7 +11313,7 @@ index e91d83c28..0bc50c0a2 100644
# Industry cargoes window
STR_INDUSTRY_CARGOES_INDUSTRY_CAPTION :{WHITE}Produktionskette für {STRING}
STR_INDUSTRY_CARGOES_CARGO_CAPTION :{WHITE}Produktionskette für {STRING}
-@@ -3153,6 +3169,8 @@ STR_CARGO_RATING_OUTSTANDING :Hervorragend
+@@ -3160,6 +3176,8 @@ STR_CARGO_RATING_OUTSTANDING :Hervorragend
STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Hauptansicht zur Station scrollen. Strg+Klick öffnet neue Zusatzansicht bei der Station
STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Namen der Station ändern
@@ -11320,7 +11322,7 @@ index e91d83c28..0bc50c0a2 100644
STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Alle Züge, die diesen Bahnhof anfahren, anzeigen
STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Alle Straßenfahrzeuge, die diese Station anfahren, anzeigen
STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP :{BLACK}Alle Flugzeuge, die diesen Flughafen anfliegen, anzeigen
-@@ -3948,6 +3966,8 @@ STR_TIMETABLE_EXPECTED_TOOLTIP :{BLACK}Umschalt
+@@ -3955,6 +3973,8 @@ STR_TIMETABLE_EXPECTED_TOOLTIP :{BLACK}Umschalt
STR_TIMETABLE_ARRIVAL_ABBREVIATION :an
STR_TIMETABLE_DEPARTURE_ABBREVIATION :ab
@@ -11329,7 +11331,7 @@ index e91d83c28..0bc50c0a2 100644
# Date window (for timetable)
STR_DATE_CAPTION :{WHITE}Datum auswählen
-@@ -4883,10 +4903,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4890,10 +4910,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Zuschauer, {1:STRING}
# Viewport strings
@@ -16340,10 +16342,10 @@ index 000000000..f0cc17660
+
+STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt
-index 3fe531977..86cc728e0 100644
+index 6d8a4bae6..2953e17c6 100644
--- a/src/lang/icelandic.txt
+++ b/src/lang/icelandic.txt
-@@ -4622,10 +4622,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4629,10 +4629,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Áhorfandi, {1:STRING}
# Viewport strings
@@ -16363,10 +16365,10 @@ index 3fe531977..86cc728e0 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt
-index 7c8c41700..c8eb8061f 100644
+index f3300c711..3df583fb0 100644
--- a/src/lang/indonesian.txt
+++ b/src/lang/indonesian.txt
-@@ -4863,10 +4863,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4870,10 +4870,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Penonton, {1:STRING}
# Viewport strings
@@ -16386,10 +16388,10 @@ index 7c8c41700..c8eb8061f 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/italian.txt b/src/lang/italian.txt
-index f4d5f8a98..1f64f028c 100644
+index 1ffafdcd7..0abc65085 100644
--- a/src/lang/italian.txt
+++ b/src/lang/italian.txt
-@@ -4928,10 +4928,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4979,10 +4979,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Spettatore, {1:STRING}
# Viewport strings
@@ -21429,10 +21431,10 @@ index 000000000..988a95758
+
+STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt
-index 324bacc92..0fe6ba4b0 100644
+index c4978c0b8..2a87de85c 100644
--- a/src/lang/luxembourgish.txt
+++ b/src/lang/luxembourgish.txt
-@@ -4882,10 +4882,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4889,10 +4889,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Zuschauer, {1:STRING}
# Viewport strings
@@ -26442,10 +26444,10 @@ index 000000000..d1d26f75d
+
+STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt
-index 449527190..7db7b0d4c 100644
+index aa53408be..daa8eb3e2 100644
--- a/src/lang/norwegian_nynorsk.txt
+++ b/src/lang/norwegian_nynorsk.txt
-@@ -4779,10 +4779,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4786,10 +4786,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Tilskuar, {1:STRING}
# Viewport strings
@@ -26465,10 +26467,10 @@ index 449527190..7db7b0d4c 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt
-index 82662903f..94432055a 100644
+index b071b9c18..9249f8ca0 100644
--- a/src/lang/portuguese.txt
+++ b/src/lang/portuguese.txt
-@@ -4883,10 +4883,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4890,10 +4890,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Espectador, {1:STRING}
# Viewport strings
@@ -26488,10 +26490,10 @@ index 82662903f..94432055a 100644
STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt
-index 7dd3c4a54..f99f023dd 100644
+index d0deb739e..0c00b44fc 100644
--- a/src/lang/spanish.txt
+++ b/src/lang/spanish.txt
-@@ -4883,10 +4883,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
+@@ -4890,10 +4890,18 @@ STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STR
STR_SAVEGAME_NAME_SPECTATOR :Espectador, {1:STRING}
# Viewport strings
@@ -32280,11 +32282,11 @@ index 21d69b138..63152e6b4 100644
/**
* Determines the DiagDirection to get from one tile to another.
diff --git a/src/map_type.h b/src/map_type.h
-index 620885e5d..ee419d1f1 100644
+index 7af391b46..fca0c2440 100644
--- a/src/map_type.h
+++ b/src/map_type.h
-@@ -37,6 +37,22 @@ struct TileExtended {
- byte m7; ///< Primarily used for newgrf support
+@@ -38,6 +38,22 @@ struct TileExtended {
+ uint16 m8; ///< General purpose
};
+/** Tile array. */
@@ -32306,7 +32308,7 @@ index 620885e5d..ee419d1f1 100644
/**
* An offset value between to tiles.
*
-@@ -62,9 +78,11 @@ struct TileIndexDiffC {
+@@ -63,9 +79,11 @@ struct TileIndexDiffC {
/** Minimal and maximal map width and height */
static const uint MIN_MAP_SIZE_BITS = 6; ///< Minimal size of map is equal to 2 ^ MIN_MAP_SIZE_BITS
@@ -32937,7 +32939,7 @@ index d538064a2..fff67c68c 100644
/**
* Finds out if a company has a certain railtype available
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
-index 5bc97a58d..cac0c3dea 100644
+index d21c1468c..b9b27c0b2 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -11,6 +11,7 @@
@@ -32974,7 +32976,7 @@ index 5bc97a58d..cac0c3dea 100644
-CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
+CommandCost CmdBuildSingleRails(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- RailType railtype = Extract<RailType, 0, 4>(p1);
+ RailType railtype = Extract<RailType, 0, 6>(p1);
- Track track = Extract<Track, 0, 3>(p2);
+ TrackBits trackbits = (TrackBits)GB(p2, 0, 6);
CommandCost cost(EXPENSES_CONSTRUCTION);
@@ -33589,15 +33591,15 @@ index 5bc97a58d..cac0c3dea 100644
+ CopyPasteTile_Rail, // copypaste_tile_proc
};
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
-index de8d43474..2288dcb85 100644
+index 5a533e5c5..4c1555086 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -192,7 +192,7 @@ static void PlaceRail_Station(TileIndex tile)
VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_BUILD_STATION);
VpSetPlaceSizingLimit(_settings_game.station.station_spread);
} else {
-- uint32 p1 = _cur_railtype | _railstation.orientation << 4 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24;
-+ uint32 p1 = _cur_railtype | _railstation.orientation << 4 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | (_settings_game.station.adjacent_stations && _ctrl_pressed) << 24;
+- uint32 p1 = _cur_railtype | _railstation.orientation << 6 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24;
++ uint32 p1 = _cur_railtype | _railstation.orientation << 6 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | (_settings_game.station.adjacent_stations && _ctrl_pressed) << 24;
uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
int w = _settings_client.gui.station_numtracks;
@@ -33605,13 +33607,13 @@ index de8d43474..2288dcb85 100644
if (_railstation.orientation == AXIS_X) Swap(numtracks, platlength);
-- uint32 p1 = _cur_railtype | _railstation.orientation << 4 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24;
-+ uint32 p1 = _cur_railtype | _railstation.orientation << 4 | numtracks << 8 | platlength << 16 | (_settings_game.station.adjacent_stations && _ctrl_pressed) << 24;
+- uint32 p1 = _cur_railtype | _railstation.orientation << 6 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24;
++ uint32 p1 = _cur_railtype | _railstation.orientation << 6 | numtracks << 8 | platlength << 16 | (_settings_game.station.adjacent_stations && _ctrl_pressed) << 24;
uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation, "" };
diff --git a/src/rail_map.h b/src/rail_map.h
-index 2431a7920..b185d155f 100644
+index 74afe5ace..254e17119 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -34,11 +34,16 @@ enum RailTileType {
@@ -33726,8 +33728,8 @@ index 2431a7920..b185d155f 100644
+template <bool Tgeneric>
+static inline RailType GetRailType(typename TileIndexT<Tgeneric>::T t)
{
-- return (RailType)GB(_m[t].m3, 0, 4);
-+ return (RailType)GB(GetTile(t)->m3, 0, 4);
+- return (RailType)GB(_me[t].m8, 0, 6);
++ return (RailType)GB(GetTileEx(t)->m8, 0, 6);
}
+/** @copydoc GetRailType(TileIndexT<Tgeneric>::T) */
+static inline RailType GetRailType(TileIndex t) { return GetRailType<false>(t); }
@@ -33743,8 +33745,8 @@ index 2431a7920..b185d155f 100644
+template <bool Tgeneric>
+static inline void SetRailType(typename TileIndexT<Tgeneric>::T t, RailType r)
{
-- SB(_m[t].m3, 0, 4, r);
-+ SB(GetTile(t)->m3, 0, 4, r);
+- SB(_me[t].m8, 0, 6, r);
++ SB(GetTileEx(t)->m8, 0, 6, r);
}
+/** @copydoc SetRailType(TileIndexT<Tgeneric>::T,RailType) */
+static inline void SetRailType(TileIndex t, RailType r) { SetRailType<false>(t, r); }
@@ -34091,7 +34093,7 @@ index 2431a7920..b185d155f 100644
}
static inline bool IsSnowRailGround(TileIndex t)
-@@ -517,29 +632,38 @@ static inline bool IsSnowRailGround(TileIndex t)
+@@ -517,31 +632,40 @@ static inline bool IsSnowRailGround(TileIndex t)
}
@@ -34102,43 +34104,49 @@ index 2431a7920..b185d155f 100644
SetTileType(t, MP_RAILWAY);
SetTileOwner(t, o);
- _m[t].m2 = 0;
-- _m[t].m3 = r;
+- _m[t].m3 = 0;
- _m[t].m4 = 0;
- _m[t].m5 = RAIL_TILE_NORMAL << 6 | b;
- SB(_me[t].m6, 2, 4, 0);
- _me[t].m7 = 0;
+- _me[t].m8 = r;
+-}
+-
+-
+-static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirection d, RailType r)
+ GetTile(t)->m2 = 0;
-+ GetTile(t)->m3 = r;
++ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = RAIL_TILE_NORMAL << 6 | b;
+ SB(GetTileEx(t)->m6, 2, 4, 0);
+ GetTileEx(t)->m7 = 0;
- }
++ GetTileEx(t)->m8 = r;
++}
+/** @copydoc MakeRailNormal(TileIndexT<Tgeneric>::T,Owner,TrackBits,RailType) */
+static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r) { MakeRailNormal<false>(t, o, b, r); }
+/** @copydoc MakeRailNormal(TileIndexT<Tgeneric>::T,Owner,TrackBits,RailType) */
+static inline void MakeRailNormal(GenericTileIndex t, Owner o, TrackBits b, RailType r) { MakeRailNormal<true>(t, o, b, r); }
-
--
--static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirection d, RailType r)
++
+template <bool Tgeneric>
+inline void MakeRailDepot(typename TileIndexT<Tgeneric>::T t, Owner o, DepotID did, DiagDirection d, RailType r)
{
SetTileType(t, MP_RAILWAY);
SetTileOwner(t, o);
- _m[t].m2 = did;
-- _m[t].m3 = r;
+- _m[t].m3 = 0;
- _m[t].m4 = 0;
- _m[t].m5 = RAIL_TILE_DEPOT << 6 | d;
- SB(_me[t].m6, 2, 4, 0);
- _me[t].m7 = 0;
+- _me[t].m8 = r;
-}
+ GetTile(t)->m2 = did;
-+ GetTile(t)->m3 = r;
++ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = RAIL_TILE_DEPOT << 6 | d;
+ SB(GetTileEx(t)->m6, 2, 4, 0);
+ GetTileEx(t)->m7 = 0;
++ GetTileEx(t)->m8 = r;
+}
+/** @copydoc MakeRailDepot(TileIndexT<Tgeneric>::T,Owner,DepotID,DiagDirection,RailType) */
+static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirection d, RailType r) { MakeRailDepot<false>(t, o, did, d, r); }
@@ -34461,7 +34469,7 @@ index 6faa42262..2b7db72b7 100644
}
break;
diff --git a/src/road_map.h b/src/road_map.h
-index 693730294..d1bfaec8c 100644
+index 5b3e6b090..de507bd9f 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -32,11 +32,16 @@ enum RoadTileType {
@@ -34987,7 +34995,7 @@ index 693730294..d1bfaec8c 100644
/**
* Make a level crossing.
-@@ -574,18 +684,23 @@ static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, Tow
+@@ -574,19 +684,24 @@ static inline void MakeRoadNormal(TileIndex t, RoadBits bits, RoadTypes rot, Tow
* @param rot New present road types.
* @param town Town ID if the road is a town-owned road.
*/
@@ -34998,17 +35006,19 @@ index 693730294..d1bfaec8c 100644
SetTileType(t, MP_ROAD);
SetTileOwner(t, rail);
- _m[t].m2 = town;
-- _m[t].m3 = rat;
+- _m[t].m3 = 0;
- _m[t].m4 = 0;
- _m[t].m5 = ROAD_TILE_CROSSING << 6 | roaddir;
- SB(_me[t].m6, 2, 4, 0);
- _me[t].m7 = rot << 6 | road;
+- _me[t].m8 = rat;
+ GetTile(t)->m2 = town;
-+ GetTile(t)->m3 = rat;
++ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = ROAD_TILE_CROSSING << 6 | roaddir;
+ SB(GetTileEx(t)->m6, 2, 4, 0);
+ GetTileEx(t)->m7 = rot << 6 | road;
++ GetTileEx(t)->m8 = rat;
SetRoadOwner(t, ROADTYPE_TRAM, tram);
}
+/** @copydoc MakeRoadCrossing(TileIndexT<Tgeneric>::T,Owner,Owner,Owner,Axis,RailType,RoadTypes,uint) */
@@ -35018,7 +35028,7 @@ index 693730294..d1bfaec8c 100644
/**
* Make a road depot.
-@@ -595,17 +710,22 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner r
+@@ -596,17 +711,22 @@ static inline void MakeRoadCrossing(TileIndex t, Owner road, Owner tram, Owner r
* @param dir Direction of the depot exit.
* @param rt Road type of the depot.
*/
@@ -35062,7 +35072,7 @@ index ed67a5221..4715731ac 100644
}
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
-index 33c49fb61..4f841bbba 100644
+index cca9ad328..310590957 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -125,7 +125,7 @@ void SetWaterClassDependingOnSurroundings(TileIndex t, bool include_invalid_wate
@@ -35355,7 +35365,36 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1289,23 +1292,23 @@ bool AfterLoadGame()
+@@ -1219,24 +1222,24 @@ bool AfterLoadGame()
+ for (TileIndex t = 0; t < map_size; t++) {
+ switch (GetTileType(t)) {
+ case MP_RAILWAY:
+- SetRailType(t, (RailType)GB(_m[t].m3, 0, 4));
++ SetRailType(t, (RailType)GB(GetTile(t)->m3, 0, 4));
+ break;
+
+ case MP_ROAD:
+ if (IsLevelCrossing(t)) {
+- SetRailType(t, (RailType)GB(_m[t].m3, 0, 4));
++ SetRailType(t, (RailType)GB(GetTile(t)->m3, 0, 4));
+ }
+ break;
+
+ case MP_STATION:
+ if (HasStationRail(t)) {
+- SetRailType(t, (RailType)GB(_m[t].m3, 0, 4));
++ SetRailType(t, (RailType)GB(GetTile(t)->m3, 0, 4));
+ }
+ break;
+
+ case MP_TUNNELBRIDGE:
+ if (GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL) {
+- SetRailType(t, (RailType)GB(_m[t].m3, 0, 4));
++ SetRailType(t, (RailType)GB(GetTile(t)->m3, 0, 4));
+ }
+ break;
+
+@@ -1321,23 +1324,23 @@ bool AfterLoadGame()
* (see the code somewhere above) so don't use m4, use m2 instead. */
/* convert PBS signals to combo-signals */
@@ -35385,7 +35424,7 @@ index 33c49fb61..4f841bbba 100644
break;
default: break;
-@@ -1414,31 +1417,31 @@ bool AfterLoadGame()
+@@ -1446,31 +1449,31 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(53)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_HOUSE)) {
@@ -35426,7 +35465,7 @@ index 33c49fb61..4f841bbba 100644
SetHouseCompleted(t, true);
}
}
-@@ -1453,19 +1456,19 @@ bool AfterLoadGame()
+@@ -1485,19 +1488,19 @@ bool AfterLoadGame()
if (IsTileType(t, MP_INDUSTRY)) {
switch (GetIndustryGfx(t)) {
case GFX_POWERPLANT_SPARKS:
@@ -35449,7 +35488,7 @@ index 33c49fb61..4f841bbba 100644
break;
default: // No animation states to change
-@@ -1513,8 +1516,8 @@ bool AfterLoadGame()
+@@ -1545,8 +1548,8 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(52)) {
for (TileIndex t = 0; t < map_size; t++) {
@@ -35460,7 +35499,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1577,10 +1580,10 @@ bool AfterLoadGame()
+@@ -1609,10 +1612,10 @@ bool AfterLoadGame()
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_RAILWAY) && HasSignals(t)) {
/* move signal states */
@@ -35474,7 +35513,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1623,7 +1626,7 @@ bool AfterLoadGame()
+@@ -1655,7 +1658,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(83)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsShipDepotTile(t)) {
@@ -35483,7 +35522,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1659,8 +1662,8 @@ bool AfterLoadGame()
+@@ -1691,8 +1694,8 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(81)) {
for (TileIndex t = 0; t < map_size; t++) {
if (GetTileType(t) == MP_TREES) {
@@ -35494,7 +35533,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1727,8 +1730,8 @@ bool AfterLoadGame()
+@@ -1759,8 +1762,8 @@ bool AfterLoadGame()
case STATION_OILRIG:
case STATION_DOCK:
case STATION_BUOY:
@@ -35505,7 +35544,7 @@ index 33c49fb61..4f841bbba 100644
break;
default:
-@@ -1738,8 +1741,8 @@ bool AfterLoadGame()
+@@ -1770,8 +1773,8 @@ bool AfterLoadGame()
break;
case MP_WATER:
@@ -35516,7 +35555,7 @@ index 33c49fb61..4f841bbba 100644
break;
case MP_OBJECT:
-@@ -1766,7 +1769,7 @@ bool AfterLoadGame()
+@@ -1798,7 +1801,7 @@ bool AfterLoadGame()
MakeCanal(t, o, Random());
}
} else if (IsShipDepot(t)) {
@@ -35525,7 +35564,7 @@ index 33c49fb61..4f841bbba 100644
SetWaterClass(t, o == OWNER_WATER ? WATER_CLASS_SEA : WATER_CLASS_CANAL);
}
}
-@@ -1855,8 +1858,8 @@ bool AfterLoadGame()
+@@ -1887,8 +1890,8 @@ bool AfterLoadGame()
/* Increase HouseAnimationFrame from 5 to 7 bits */
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_HOUSE) && GetHouseType(t) >= NEW_HOUSE_OFFSET) {
@@ -35536,7 +35575,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1889,7 +1892,7 @@ bool AfterLoadGame()
+@@ -1921,7 +1924,7 @@ bool AfterLoadGame()
/* Replace "house construction year" with "house age" */
if (IsTileType(t, MP_HOUSE) && IsHouseCompleted(t)) {
@@ -35545,7 +35584,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -1903,10 +1906,10 @@ bool AfterLoadGame()
+@@ -1935,10 +1938,10 @@ bool AfterLoadGame()
case MP_RAILWAY:
if (HasSignals(t)) {
/* move the signal variant */
@@ -35560,7 +35599,7 @@ index 33c49fb61..4f841bbba 100644
}
/* Clear PBS reservation on track */
-@@ -1998,11 +2001,11 @@ bool AfterLoadGame()
+@@ -2030,11 +2033,11 @@ bool AfterLoadGame()
for (TileIndex t = 0; t < map_size; t++) {
/* Check for HQ bit being set, instead of using map accessor,
* since we've already changed it code-wise */
@@ -35575,7 +35614,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -2011,13 +2014,13 @@ bool AfterLoadGame()
+@@ -2043,13 +2046,13 @@ bool AfterLoadGame()
if (!IsTileType(t, MP_OBJECT)) continue;
/* Reordering/generalisation of the object bits. */
@@ -35594,7 +35633,7 @@ index 33c49fb61..4f841bbba 100644
}
}
-@@ -2030,15 +2033,15 @@ bool AfterLoadGame()
+@@ -2062,15 +2065,15 @@ bool AfterLoadGame()
/* No towns, so remove all objects! */
DoClearSquare(t);
} else {
@@ -35614,7 +35653,7 @@ index 33c49fb61..4f841bbba 100644
int size = type == OBJECT_HQ ? 2 : 1;
if (!Object::CanAllocateItem()) {
-@@ -2052,14 +2055,14 @@ bool AfterLoadGame()
+@@ -2084,14 +2087,14 @@ bool AfterLoadGame()
o->location.w = size;
o->location.h = size;
o->build_date = _date;
@@ -35632,7 +35671,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -2273,8 +2276,8 @@ bool AfterLoadGame()
+@@ -2305,8 +2308,8 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(128)) {
const Depot *d;
FOR_ALL_DEPOTS(d) {
@@ -35643,7 +35682,7 @@ index 33c49fb61..4f841bbba 100644
}
}
-@@ -2296,16 +2299,16 @@ bool AfterLoadGame()
+@@ -2328,16 +2331,16 @@ bool AfterLoadGame()
if (IsTileType(t, MP_CLEAR)) {
if (GetRawClearGround(t) == CLEAR_SNOW) {
SetClearGroundDensity(t, CLEAR_GRASS, GetClearDensity(t));
@@ -35666,7 +35705,7 @@ index 33c49fb61..4f841bbba 100644
}
}
}
-@@ -2419,23 +2422,23 @@ bool AfterLoadGame()
+@@ -2451,23 +2454,23 @@ bool AfterLoadGame()
switch (GetTileType(t)) {
case MP_HOUSE:
if (GetHouseType(t) >= NEW_HOUSE_OFFSET) {
@@ -35699,7 +35738,7 @@ index 33c49fb61..4f841bbba 100644
break;
default:
-@@ -2760,16 +2763,16 @@ bool AfterLoadGame()
+@@ -2792,16 +2795,16 @@ bool AfterLoadGame()
for (TileIndex t = 0; t < map_size; t++) {
if (!IsTileType(t, MP_CLEAR) && !IsTileType(t, MP_TREES)) continue;
if (IsTileType(t, MP_CLEAR) && IsClearGround(t, CLEAR_FIELDS)) continue;
@@ -35720,7 +35759,7 @@ index 33c49fb61..4f841bbba 100644
}
}
-@@ -2886,9 +2889,9 @@ bool AfterLoadGame()
+@@ -2918,9 +2921,9 @@ bool AfterLoadGame()
/* Move ObjectType from map to pool */
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_OBJECT)) {
@@ -35734,7 +35773,7 @@ index 33c49fb61..4f841bbba 100644
}
}
diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp
-index 86a185ca4..3a37173d4 100644
+index 693ddb7ce..d3c371d8a 100644
--- a/src/saveload/map_sl.cpp
+++ b/src/saveload/map_sl.cpp
@@ -56,7 +56,7 @@ static void Load_MAPT()
@@ -35912,6 +35951,24 @@ index 86a185ca4..3a37173d4 100644
SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT8);
}
}
+@@ -279,7 +279,7 @@ static void Load_MAP8()
+
+ for (TileIndex i = 0; i != size;) {
+ SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT16);
+- for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) _me[i++].m8 = buf[j];
++ for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) GetTileEx(i++)->m8 = buf[j];
+ }
+ }
+
+@@ -290,7 +290,7 @@ static void Save_MAP8()
+
+ SlSetLength(size * sizeof(uint16));
+ for (TileIndex i = 0; i != size;) {
+- for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = _me[i++].m8;
++ for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = GetTileEx(i++)->m8;
+ SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT16);
+ }
+ }
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index 1974bb31f..d5b4f3a46 100644
--- a/src/saveload/oldloader_sl.cpp
@@ -36249,10 +36306,10 @@ index 0f9396985..0abd04cbf 100644
new_wp->owner = GetTileOwner(t);
diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq
-index aa0b34b1e..070e30cd7 100644
+index 7ce2c7029..580f71a09 100644
--- a/src/script/api/game/game_window.hpp.sq
+++ b/src/script/api/game/game_window.hpp.sq
-@@ -250,6 +250,28 @@ void SQGSWindow_Register(Squirrel *engine)
+@@ -252,6 +252,28 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_BUILD_SEL, "WID_BV_BUILD_SEL");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_RENAME, "WID_BV_RENAME");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_PANEL, "WID_C_PANEL");
@@ -36281,7 +36338,7 @@ index aa0b34b1e..070e30cd7 100644
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_CAPTION, "WID_C_CAPTION");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE, "WID_C_FACE");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE_TITLE, "WID_C_FACE_TITLE");
-@@ -1126,6 +1148,7 @@ void SQGSWindow_Register(Squirrel *engine)
+@@ -1138,6 +1160,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LOWER_LAND, "WID_TT_LOWER_LAND");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_RAISE_LAND, "WID_TT_RAISE_LAND");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LEVEL_LAND, "WID_TT_LEVEL_LAND");
@@ -36290,7 +36347,7 @@ index aa0b34b1e..070e30cd7 100644
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUY_LAND, "WID_TT_BUY_LAND");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLANT_TREES, "WID_TT_PLANT_TREES");
diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp
-index c2b6662fb..7b350e257 100644
+index 9dcf58e05..3c7f1ce39 100644
--- a/src/script/api/script_window.hpp
+++ b/src/script/api/script_window.hpp
@@ -23,6 +23,7 @@
@@ -36301,7 +36358,7 @@ index c2b6662fb..7b350e257 100644
#include "../../widgets/company_widget.h"
#include "../../widgets/console_widget.h"
#include "../../widgets/date_widget.h"
-@@ -993,6 +994,43 @@ public:
+@@ -1006,6 +1007,43 @@ public:
WID_C_PANEL = ::WID_C_PANEL, ///< Panel where all cheats are shown in.
};
@@ -36345,7 +36402,7 @@ index c2b6662fb..7b350e257 100644
/* automatically generated from ../../widgets/company_widget.h */
/** Widgets of the #CompanyWindow class. */
enum CompanyWidgets {
-@@ -2313,6 +2351,7 @@ public:
+@@ -2345,6 +2383,7 @@ public:
WID_TT_LOWER_LAND = ::WID_TT_LOWER_LAND, ///< Lower land button.
WID_TT_RAISE_LAND = ::WID_TT_RAISE_LAND, ///< Raise land button.
WID_TT_LEVEL_LAND = ::WID_TT_LEVEL_LAND, ///< Level land button.
@@ -36354,7 +36411,7 @@ index c2b6662fb..7b350e257 100644
WID_TT_BUY_LAND = ::WID_TT_BUY_LAND, ///< Buy land button.
WID_TT_PLANT_TREES = ::WID_TT_PLANT_TREES, ///< Plant trees button (note: opens separate window, no place-push-button).
diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq
-index a21a75ab8..14cac3dd8 100644
+index 3077215ec..2489b55ed 100644
--- a/src/script/api/template/template_window.hpp.sq
+++ b/src/script/api/template/template_window.hpp.sq
@@ -47,6 +47,8 @@ namespace SQConvert {
@@ -40223,7 +40280,7 @@ index 5e16b0d54..8357a530f 100644
/* virtual */ inline bool TileBelongsToRailStation(TileIndex tile) const
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
-index 07db05856..946254936 100644
+index 6dd7bb2fd..84721eb87 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -13,6 +13,9 @@
@@ -45739,7 +45796,7 @@ index 4e6d5a7e1..c992b09de 100644
int height;
diff --git a/src/tunnel_map.h b/src/tunnel_map.h
-index e200a1275..73a55e2d5 100644
+index d6f475d05..4234db7ef 100644
--- a/src/tunnel_map.h
+++ b/src/tunnel_map.h
@@ -21,25 +21,42 @@
@@ -45789,7 +45846,7 @@ index e200a1275..73a55e2d5 100644
/**
* Makes a road tunnel entrance
-@@ -48,20 +65,25 @@ bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir);
+@@ -48,21 +65,26 @@ bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir);
* @param d the direction facing out of the tunnel
* @param r the road type used in the tunnel
*/
@@ -45805,12 +45862,14 @@ index e200a1275..73a55e2d5 100644
- _m[t].m5 = TRANSPORT_ROAD << 2 | d;
- SB(_me[t].m6, 2, 4, 0);
- _me[t].m7 = 0;
+- _me[t].m8 = 0;
+ GetTile(t)->m2 = 0;
+ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = TRANSPORT_ROAD << 2 | d;
+ SB(GetTileEx(t)->m6, 2, 4, 0);
+ GetTileEx(t)->m7 = 0;
++ GetTileEx(t)->m8 = 0;
SetRoadOwner(t, ROADTYPE_ROAD, o);
if (o != OWNER_TOWN) SetRoadOwner(t, ROADTYPE_TRAM, o);
SetRoadTypes(t, r);
@@ -45822,7 +45881,7 @@ index e200a1275..73a55e2d5 100644
/**
* Makes a rail tunnel entrance
-@@ -70,16 +92,21 @@ static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTyp
+@@ -71,17 +93,22 @@ static inline void MakeRoadTunnel(TileIndex t, Owner o, DiagDirection d, RoadTyp
* @param d the direction facing out of the tunnel
* @param r the rail type used in the tunnel
*/
@@ -45833,17 +45892,19 @@ index e200a1275..73a55e2d5 100644
SetTileType(t, MP_TUNNELBRIDGE);
SetTileOwner(t, o);
- _m[t].m2 = 0;
-- _m[t].m3 = r;
+- _m[t].m3 = 0;
- _m[t].m4 = 0;
- _m[t].m5 = TRANSPORT_RAIL << 2 | d;
- SB(_me[t].m6, 2, 4, 0);
- _me[t].m7 = 0;
+- _me[t].m8 = r;
+ GetTile(t)->m2 = 0;
-+ GetTile(t)->m3 = r;
++ GetTile(t)->m3 = 0;
+ GetTile(t)->m4 = 0;
+ GetTile(t)->m5 = TRANSPORT_RAIL << 2 | d;
+ SB(GetTileEx(t)->m6, 2, 4, 0);
+ GetTileEx(t)->m7 = 0;
++ GetTileEx(t)->m8 = r;
}
+/** @copydoc MakeRailTunnel(TileIndexT<Tgeneric>::T,Owner,DiagDirection,RailType) */
+static inline void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailType r) { MakeRailTunnel<false>(t, o, d, r); }
@@ -45877,7 +45938,7 @@ index 0a2c2293d..9e46c3ea8 100644
extern TileIndex _build_tunnel_endtile;
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
-index 9ba9b26e3..9f4b59eb1 100644
+index ce14188fd..365d0884a 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -17,6 +17,7 @@
@@ -45953,7 +46014,7 @@ index 9ba9b26e3..9f4b59eb1 100644
bool is_new_owner;
@@ -576,7 +603,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
* @param flags type of operation
- * @param p1 bit 0-3 railtype or roadtypes
+ * @param p1 bit 0-5 railtype or roadtypes
* bit 8-9 transport type
- * @param p2 unused
+ * @param p2 the end tile (only if DC_PASTE flags is set)
@@ -45969,7 +46030,7 @@ index 9ba9b26e3..9f4b59eb1 100644
+
switch (transport_type) {
case TRANSPORT_RAIL:
- railtype = Extract<RailType, 0, 4>(p1);
+ railtype = Extract<RailType, 0, 6>(p1);
@@ -597,7 +627,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
case TRANSPORT_ROAD:
@@ -46129,7 +46190,7 @@ index 9ba9b26e3..9f4b59eb1 100644
ret = DoCommand(end_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return_cmd_error(STR_ERROR_UNABLE_TO_EXCAVATE_LAND);
cost.AddCost(ret);
-@@ -710,7 +814,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
+@@ -724,7 +828,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
/* Pay for the rail/road in the tunnel including entrances */
switch (transport_type) {
@@ -46138,7 +46199,7 @@ index 9ba9b26e3..9f4b59eb1 100644
case TRANSPORT_RAIL: cost.AddCost((tiles + 2) * RailBuildCost(railtype)); break;
default: NOT_REACHED();
}
-@@ -1125,6 +1229,103 @@ static void DrawBridgeTramBits(int x, int y, int z, int offset, bool overlay, bo
+@@ -1139,6 +1243,103 @@ static void DrawBridgeTramBits(int x, int y, int z, int offset, bool overlay, bo
}
}
@@ -46242,7 +46303,7 @@ index 9ba9b26e3..9f4b59eb1 100644
/**
* Draws a tunnel of bridge tile.
* For tunnels, this is rather simple, as you only need to draw the entrance.
-@@ -1206,6 +1407,8 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
+@@ -1220,6 +1421,8 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
if (surface != 0) DrawGroundSprite(surface + tunnelbridge_direction, PAL_NONE);
}
@@ -46251,7 +46312,7 @@ index 9ba9b26e3..9f4b59eb1 100644
/* PBS debugging, draw reserved tracks darker */
if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasTunnelBridgeReservation(ti->tile)) {
if (rti->UsesOverlay()) {
-@@ -1239,6 +1442,9 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
+@@ -1253,6 +1456,9 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, ti->x, ti->y, BB_data[6], BB_data[7], TILE_HEIGHT, ti->z);
AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, ti->x + BB_data[4], ti->y + BB_data[5], BB_data[6], BB_data[7], TILE_HEIGHT, ti->z);
@@ -46261,7 +46322,7 @@ index 9ba9b26e3..9f4b59eb1 100644
DrawBridgeMiddle(ti);
} else { // IsBridge(ti->tile)
const PalSpriteID *psid;
-@@ -1346,6 +1552,9 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
+@@ -1360,6 +1566,9 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
}
}
@@ -46271,7 +46332,7 @@ index 9ba9b26e3..9f4b59eb1 100644
DrawBridgeMiddle(ti);
}
}
-@@ -1494,6 +1703,9 @@ void DrawBridgeMiddle(const TileInfo *ti)
+@@ -1508,6 +1717,9 @@ void DrawBridgeMiddle(const TileInfo *ti)
if (HasRailCatenaryDrawn(GetRailType(rampsouth))) {
DrawRailCatenaryOnBridge(ti);
}
@@ -46281,7 +46342,7 @@ index 9ba9b26e3..9f4b59eb1 100644
}
/* draw roof, the component of the bridge which is logically between the vehicle and the camera */
-@@ -1582,9 +1794,9 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
+@@ -1596,9 +1808,9 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
TransportType tt = GetTunnelBridgeTransportType(tile);
if (IsTunnel(tile)) {
@@ -46294,7 +46355,7 @@ index 9ba9b26e3..9f4b59eb1 100644
}
td->owner[0] = GetTileOwner(tile);
-@@ -1654,6 +1866,26 @@ static void TileLoop_TunnelBridge(TileIndex tile)
+@@ -1668,6 +1880,26 @@ static void TileLoop_TunnelBridge(TileIndex tile)
}
}
@@ -46321,7 +46382,7 @@ index 9ba9b26e3..9f4b59eb1 100644
static TrackStatus GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
{
TransportType transport_type = GetTunnelBridgeTransportType(tile);
-@@ -1899,6 +2131,178 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flag
+@@ -1913,6 +2145,178 @@ static CommandCost TerraformTile_TunnelBridge(TileIndex tile, DoCommandFlag flag
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
}
@@ -46500,7 +46561,7 @@ index 9ba9b26e3..9f4b59eb1 100644
extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
DrawTile_TunnelBridge, // draw_tile_proc
GetSlopePixelZ_TunnelBridge, // get_slope_z_proc
-@@ -1906,7 +2310,7 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
+@@ -1920,7 +2324,7 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
NULL, // add_accepted_cargo_proc
GetTileDesc_TunnelBridge, // get_tile_desc_proc
GetTileTrackStatus_TunnelBridge, // get_tile_track_status_proc
@@ -46509,7 +46570,7 @@ index 9ba9b26e3..9f4b59eb1 100644
NULL, // animate_tile_proc
TileLoop_TunnelBridge, // tile_loop_proc
ChangeTileOwner_TunnelBridge, // change_tile_owner_proc
-@@ -1914,4 +2318,5 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
+@@ -1928,4 +2332,5 @@ extern const TileTypeProcs _tile_type_tunnelbridge_procs = {
VehicleEnter_TunnelBridge, // vehicle_enter_tile_proc
GetFoundation_TunnelBridge, // get_foundation_proc
TerraformTile_TunnelBridge, // terraform_tile_proc