From 1ccd4a96adde40cf0a3e00ebb5e56119fdcdde07 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 26 Jul 2018 23:53:21 +0200 Subject: openttd-git 28192.2a868b9f3-1 -> 28208.b885f6267-1 --- openttd-git/PKGBUILD | 4 +- openttd-git/everything.patch | 331 +++++++++++++++++++++++++------------------ 2 files changed, 198 insertions(+), 137 deletions(-) diff --git a/openttd-git/PKGBUILD b/openttd-git/PKGBUILD index 4414cea68..5e5fc0fe2 100755 --- a/openttd-git/PKGBUILD +++ b/openttd-git/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Erich Eckner pkgname=openttd-git -pkgver=28204.8090580f7 +pkgver=28208.b885f6267 _commit=${pkgver#*.} pkgrel=1 pkgdesc="A FOSS clone of Transport Tycoon Deluxe." @@ -37,7 +37,7 @@ source=( "clipboard.grf" ) sha512sums=('SKIP' - '09295720c9274464345a63053677840507036d6896179f44754de93d1306e3725f713b6c922e40e3598d01bf4fa3a608f8aff1847b78f7bad87a0565d8f82598' + 'a243ed901d5a661bce85e6a01c6dd6e8aeeff86ff14ca714130ac3bc52d55b0c8b1f824023504e0c0ed4a9e91904fe216f77f096d005dc08e98d776333563c7b' 'aa1f5d5c4fd9ff487bc03ed5c10701e99ae9fd29ae0cd65a06171486298558d1c26ced49ac8687acc5b1003a6538f6c83917992348cbd2b7426afdf0759cb1a5') pkgver() { diff --git a/openttd-git/everything.patch b/openttd-git/everything.patch index 29d84bb8e..b733c193e 100644 --- a/openttd-git/everything.patch +++ b/openttd-git/everything.patch @@ -1866,7 +1866,7 @@ index 000000000..47fffb238 + + 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 -@@ -835,6 +845,7 @@ +@@ -836,6 +846,7 @@ @@ -1936,7 +1936,7 @@ index 6fbd5e3f0..b9984d783 100644 -@@ -842,6 +853,7 @@ +@@ -843,6 +854,7 @@ @@ -1945,7 +1945,7 @@ index 6fbd5e3f0..b9984d783 100644 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 Widgets -@@ -1662,6 +1692,9 @@ +@@ -1665,6 +1695,9 @@ Command handlers @@ -2037,7 +2037,7 @@ index 7eee89731..dbab8cceb 100644 Command handlers -@@ -1683,6 +1716,9 @@ +@@ -1686,6 +1719,9 @@ Command handlers @@ -2048,7 +2048,7 @@ index 7eee89731..dbab8cceb 100644 Command handlers 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 -@@ -2542,6 +2582,10 @@ +@@ -2546,6 +2586,10 @@ RelativePath=".\..\src\clear_cmd.cpp" > @@ -2151,7 +2151,7 @@ index 2ea6fdcd6..2814f0952 100644 -@@ -2570,6 +2614,10 @@ +@@ -2574,6 +2618,10 @@ RelativePath=".\..\src\order_cmd.cpp" > @@ -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 -@@ -2539,6 +2579,10 @@ +@@ -2543,6 +2583,10 @@ RelativePath=".\..\src\clear_cmd.cpp" > @@ -2266,7 +2266,7 @@ index 174677586..5add42720 100644 -@@ -2567,6 +2611,10 @@ +@@ -2571,6 +2615,10 @@ RelativePath=".\..\src\order_cmd.cpp" > @@ -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(TileIndex t); +template int GetBridgeHeight(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::T,Owner,BridgeType,DiagDirection,TransportType,uint)*/ +static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, TransportType tt, uint rt) { return MakeBridgeRamp(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(p1); + RailType railtype = Extract(p1); - Track track = Extract(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 +static inline RailType GetRailType(typename TileIndexT::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::T) */ +static inline RailType GetRailType(TileIndex t) { return GetRailType(t); } @@ -33743,8 +33745,8 @@ index 2431a7920..b185d155f 100644 +template +static inline void SetRailType(typename TileIndexT::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::T,RailType) */ +static inline void SetRailType(TileIndex t, RailType r) { SetRailType(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::T,Owner,TrackBits,RailType) */ +static inline void MakeRailNormal(TileIndex t, Owner o, TrackBits b, RailType r) { MakeRailNormal(t, o, b, r); } +/** @copydoc MakeRailNormal(TileIndexT::T,Owner,TrackBits,RailType) */ +static inline void MakeRailNormal(GenericTileIndex t, Owner o, TrackBits b, RailType r) { MakeRailNormal(t, o, b, r); } - -- --static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirection d, RailType r) ++ +template +inline void MakeRailDepot(typename TileIndexT::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::T,Owner,DepotID,DiagDirection,RailType) */ +static inline void MakeRailDepot(TileIndex t, Owner o, DepotID did, DiagDirection d, RailType r) { MakeRailDepot(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::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::T,Owner,DiagDirection,RailType) */ +static inline void MakeRailTunnel(TileIndex t, Owner o, DiagDirection d, RailType r) { MakeRailTunnel(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(p1); + railtype = Extract(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 -- cgit v1.2.3-70-g09d2