From 3c80f2d14a73aee0bfda4a9c38049b93c5b38411 Mon Sep 17 00:00:00 2001 From: translators Date: Thu, 19 Jan 2023 18:45:02 +0000 Subject: [PATCH 01/17] Update: Translations from eints english (au): 6 changes by krysclarke chinese (simplified): 3 changes by XiaoJi-Game, 1 change by ZZY2357 arabic (egypt): 11 changes by AviationGamerX korean: 3 changes by telk5093 indonesian: 8 changes by K4smun1 --- src/lang/arabic_egypt.txt | 11 +++++++++++ src/lang/english_AU.txt | 12 ++++++------ src/lang/indonesian.txt | 16 ++++++++-------- src/lang/korean.txt | 6 +++--- src/lang/simplified_chinese.txt | 8 ++++---- 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 1428366b9f..90fa933876 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -1188,6 +1188,7 @@ STR_CONFIG_SETTING_INFLATION_HELPTEXT :تمكين ال STR_CONFIG_SETTING_MAX_BRIDGE_HEIGHT_HELPTEXT :الارتفاع الأقصى لبناء الجسور +STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH_HELPTEXT :الطول الأقصى لبناء الأنفاق STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD :طريقة بناء المصانع الأولية يدوية : {STRING} ###length 3 @@ -1484,6 +1485,7 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :السماح ب STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :السماح بلاعبين كمبيوترالذكاء الصناعي بالمشاركة في الالعاب الجماعية. STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes قبل تعليق الاسكربت: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE :{COMMA} MiB STR_CONFIG_SETTING_SERVINT_ISPERCENT :فترات الصيانة بالنسبة المئوية : {STRING} @@ -1588,6 +1590,7 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :محذور STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :مسموح STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :مسموح - نمط مدينة قابل للتعديل +STR_CONFIG_SETTING_TOWN_CARGOGENMODE :توليد البضائع في المدينة: {STRING} ###length 2 STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :تربيعي (أصلي) STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :خطي @@ -1598,6 +1601,7 @@ STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_SPREAD_RAINFOREST :تنموا ول STR_CONFIG_SETTING_TOOLBAR_POS :موقع شريط الأدوات الرئيسي: {STRING} STR_CONFIG_SETTING_STATUSBAR_POS :موقع شريط المعلومات: {STRING} +STR_CONFIG_SETTING_SNAP_RADIUS :دائرة تثبيت النافذة: {STRING} ###setting-zero-is-special STR_CONFIG_SETTING_SNAP_RADIUS_DISABLED :غير مفعل STR_CONFIG_SETTING_SOFT_LIMIT :حدود نعومة النوافذ - غير ملتصقة - :{STRING} @@ -1683,6 +1687,7 @@ STR_CONFIG_SETTING_ENVIRONMENT_INDUSTRIES :{ORANGE} مصا STR_CONFIG_SETTING_ENVIRONMENT_CARGODIST :توزيع البضائع{ORANGE} STR_CONFIG_SETTING_AI :{ORANGE}المتنافسين STR_CONFIG_SETTING_AI_NPC :{ORANGE} لاعبين الحاسوب +STR_CONFIG_SETTING_NETWORK :{ORANGE}شبكة الاتصال STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS :موجد الطريق- قصاص الطريق - للقطارات:{STRING} STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES :موجد الطريق (قصاص الأثر) للعربات: {STRING} @@ -2613,6 +2618,7 @@ STR_FRAMERATE_AI :{BLACK} AI {N ###length 15 STR_FRAMETIME_CAPTION_GL_TRAINS : تكتكة القطار +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :تأخر ارتباط الرسم البياني STR_FRAMETIME_CAPTION_SOUND :اختلاط الصوت STR_FRAMETIME_CAPTION_GAMESCRIPT :كتابة اللعبة @@ -2657,6 +2663,7 @@ STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}عدد STR_MAPGEN_HEIGHTMAP_HEIGHT_UP :{BLACK}قم بزيادة أقصى ارتفاع لأعلى قمة على الخريطة بواحد STR_MAPGEN_SNOW_COVERAGE :{BLACK}تغطية الثلج: STR_MAPGEN_SNOW_COVERAGE_DOWN :{BLACK}تقليل تغطية الثلوج بنسبة عشرة بالمائة +STR_MAPGEN_SNOW_COVERAGE_TEXT :{BLACK}{NUM}% STR_MAPGEN_DESERT_COVERAGE :{BLACK}مدى تغطيت السحراء: STR_MAPGEN_DESERT_COVERAGE_DOWN :{BLACK}تقليل التغطية الصحراوية بنسبة عشرة بالمائة STR_MAPGEN_DESERT_COVERAGE_TEXT :{BLACK}{NUM}% @@ -3049,6 +3056,7 @@ STR_STATION_VIEW_FROM :{YELLOW}{CARGO_ STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT} من خلال {STATION} STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT} إلى {STATION} STR_STATION_VIEW_TO_ANY :{RED}{CARGO_SHORT} إلى أي محطة +STR_STATION_VIEW_NONSTOP :{YELLOW}{CARGO_SHORT} بدون توقف STR_STATION_VIEW_GROUP_V_S_D :عبر-المصدر-الوجهة @@ -3301,6 +3309,7 @@ STR_PURCHASE_INFO_COST :{BLACK}التك STR_PURCHASE_INFO_COST_REFIT :{BLACK}التكلفة: {GOLD}{CURRENCY_LONG}{BLACK} (تكلفة التغيير: {GOLD}{CURRENCY_LONG}{BLACK}) STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}الوزن: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT}) STR_PURCHASE_INFO_COST_SPEED :{BLACK}التكلفة: {GOLD}{CURRENCY_LONG}{BLACK} السرعة : {GOLD}{VELOCITY} +STR_PURCHASE_INFO_COST_REFIT_SPEED :{BLACK}التكلفة: {GOLD}{CURRENCY_LONG}{BLACK} (تكلفة التغير: {GOLD}{CURRENCY_LONG}{BLACK}) السرعة: {GOLD}{VELOCITY} STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK} السعة {GOLD}{CARGO_LONG}, {CARGO_LONG} STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK} العربات ذات الطاقة: {GOLD}+{POWER}{BLACK} الوزن: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}يمكن تعديلها الى: {GOLD}{STRING} @@ -3326,6 +3335,7 @@ STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}شراء ###length VEHICLE_TYPES STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}شراء العربة وتجديد بضائعها +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}شراء وإعادة تجهيز السفينة ###length VEHICLE_TYPES STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}شراء العربة الموضحة @@ -3927,6 +3937,7 @@ STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW} شاش # AI configuration window STR_AI_CONFIG_CAPTION_AI :{WHITE}اعدادات االذكاء الاصطناعي +STR_AI_CONFIG_CAPTION_GAMESCRIPT :{WHITE}تكوين مخطوط اللعبة STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}مخطوطات اللعبة الذي سيتم تحميله في اللعبة التالية STR_AI_CONFIG_AILIST_TOOLTIP :{BLACK}الذكاء الاصطناعي الذي سيتم تحميله في اللعبة التالية STR_AI_CONFIG_HUMAN_PLAYER :لاعب انساني diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 72e0e8cd81..b59bbfe1e9 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -386,7 +386,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Town gen STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industry generation STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Road construction STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Tramway construction -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Shift toggles building/showing cost estimate +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate @@ -1925,13 +1925,13 @@ STR_CONFIG_SETTING_LINKGRAPH_TIME :Take {STRING}{N STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Time taken for each recalculation of a link graph component. When a recalculation is started, a thread is spawned which is allowed to run for this number of days. The shorter you set this the more likely it is that the thread is not finished when it's supposed to. Then the game stops until it is ("lag"). The longer you set it the longer it takes for the distribution to be updated when routes change. STR_CONFIG_SETTING_DISTRIBUTION_PAX :Distribution mode for passengers: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"symmetric" means that roughly the same number of passengers will go from a station A to a station B as from B to A. "asymmetric" means that arbitrary numbers of passengers can go in either direction. "manual" means that no automatic distribution will take place for passengers. +STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"Symmetric" means that roughly the same number of passengers will go from a station A to a station B as from B to A. "Asymmetric" means that arbitrary numbers of passengers can go in either direction. "Manual" means that no automatic distribution will take place for passengers. STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Distribution mode for mail: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"symmetric" means that roughly the same amount of mail will be sent from a station A to a station B as from B to A. "asymmetric" means that arbitrary amounts of mail can be sent in either direction. "manual" means that no automatic distribution will take place for mail. +STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"Symmetric" means that roughly the same amount of mail will be sent from a station A to a station B as from B to A. "Asymmetric" means that arbitrary amounts of mail can be sent in either direction. "Manual" means that no automatic distribution will take place for mail. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Distribution mode for the ARMOURED cargo class: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :The ARMOURED cargo class contains valuables in the temperate, diamonds in the subtropical or gold in subarctic climate. NewGRFs may change that. "symmetric" means that roughly the same amount of that cargo will be sent from a station A to a station B as from B to A. "asymmetric" means that arbitrary of that cargo can be sent in either direction. "manual" means that no automatic distribution will take place for that cargo. It is recommended to set this to asymmetric or manual when playing subarctic, as banks won't send any gold back to gold mines. For temperate and subtropical you can also choose symmetric as banks will send valuables back to the origin bank of some load of valuables. +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :The ARMOURED cargo class contains valuables in the temperate, diamonds in the subtropical, or gold in the subarctic climate. NewGRFs may change that. "Symmetric" means that roughly the same amount of that cargo will be sent from a station A to a station B as from B to A. "Asymmetric" means that arbitrary amounts of that cargo can be sent in either direction. "Manual" means that no automatic distribution will take place for that cargo. It is recommended to set this to asymmetric or manual when playing subarctic or subtropic, as banks only receive cargo in these climates. For temperate you can also choose symmetric as banks will send valuables back to the origin bank. STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Distribution mode for other cargo classes: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"asymmetric" means that arbitrary amounts of cargo can be sent in either direction. "manual" means that no automatic distribution will take place for those cargoes. +STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asymmetric" means that arbitrary amounts of cargo can be sent in either direction. "Manual" means that no automatic distribution will take place for those cargoes. ###length 3 STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asymmetric @@ -2819,7 +2819,7 @@ STR_OBJECT_CLASS_TRNS :Transmitters STR_PLANT_TREE_CAPTION :{WHITE}Trees STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Shift toggles building/showing cost estimate +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 0c0b14b623..f2e7b4a046 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -386,7 +386,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Pertumbu STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Membuat Industri STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Pembangunan Jalan STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Pembangunan Jalur Tram -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Menanam Pohon. Shift untuk menampilkan perkiraan biaya +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Tanam Pohon. Ctrl untuk memilih area secara diagonal. Shift untuk menampilkan perkiraan biaya STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Memasang pengenal STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Tempatkan Obyek. Ctrl untuk memilih area secara diagonal. Shift untuk menampilkan perkiraan biaya @@ -1925,13 +1925,13 @@ STR_CONFIG_SETTING_LINKGRAPH_TIME :Ambil {STRING}{ STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Waktu dibutuhkan untuk setiap perhitungan dari komponen 'linkgraph'. Ketika perhitungan dimulai, ada utas 'dibuat' yang boleh dijalankan untuk jumlah hari ini. Semakin pendek anda mengatur ini lebih mungkin utas ini belum selesai ketika itu seharusnya. Kemudian permainan berhenti sampai itu ("lag"). Semakin lama anda mengatur semakin lama itu untuk distribusinya untuk memperbarui ketika rute mengganti. STR_CONFIG_SETTING_DISTRIBUTION_PAX :Modus distribusi untuk penumpang: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"simetris" berarti kira-kira jumlah penumpang yang sama akan pergi dari stasiun A ke stasiun B sebagaimana dari B ke A. "asimetris" berarti jumlah penumpang yang pergi ke kedua arah bisa berbeda-beda. "manual" berarti bahwa tidak ada distribusi otomatis akan dilakukan untuk penumpang. +STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"Simetris" berarti kira-kira jumlah penumpang sama akan pergi dari stasiun A ke stasiun B sebagaimana dari B ke A. "Asimetris" berarti jumlah penumpang pergi pada kedua arah bisa berbeda-beda. "Manual" berarti bahwa tidak ada distribusi otomatis akan dilakukan untuk penumpang. STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Modus distribusi untuk surat: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"simetris" berarti kira-kira jumlah surat yang sama akan pergi dari stasiun A ke stasiun B sebagaimana dari B ke A. "asimetris" berarti jumlah surat yang pergi ke kedua arah bisa berbeda-beda. "manual" berarti bahwa tidak ada distribusi otomatis akan dilakukan untuk surat. +STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"Simetris" berarti kira-kira jumlah surat yang sama akan dikirim dari stasiun A ke stasiun B sebagaimana dari B ke A. "Asimetris" berarti jumlah surat dikirim pada kedua arah bisa berbeda-beda. "Manual" berarti tidak ada distribusi otomatis akan dilakukan untuk surat. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Modus distribusi untuk kelas kargo BERLAPIS BAJA: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Kelas kargo BERLAPIS BAJA meliputi barang berharga pada iklim sedang, intan pada sub tropis atau emas pada iklim sub arktik. NewGRF mungkin mengubah itu. "simetris" berarti bahwa jumlah kargo kira-kira akan terkirim sama dari stasiun A ke stasiun B sebagaimana dari B ke A. "asimetris" berarti jumlah kargo terkirim bisa berbeda pada kedua arah. "manual" berarti bahwa tidak ada distribusi otomatis akan dilakukan untuk kargo itu. Disarankan untuk memilih asimetris atau manual ketika bermain sub arktik, karena bank tidak mengirim emas kembali ke tambang emas. Untuk iklim tropis dan sub tropis anda juga bisah pilih simetris karena bank akan mengirim kembali beberapa barang berharga ke bank asalnya. +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Kelas kargo LAPIS-BAJA meliputi barang berharga pada iklim sedang, berlian pada iklim sub tropis atau emas pada iklim sub arktik. NewGRF bisa merubah ketentuan tersebut. "Simetris" berarti jumlah kargo kira-kira akan terkirim sama banyak dari stasiun A ke stasiun B sebagaimana dari B ke A. "Asimetris" berarti jumlah kargo terkirim bisa berbeda pada kedua arah. "Manual" berarti tidak ada distribusi otomatis yang akan dilakukan untuk kargo tersebut. Disarankan memilih asimetris atau manual ketika bermain pada sub arktik atau sub tropis, karena bank hanya sebagai penerima pada iklim tersebut. Untuk iklim sedang anda bisa memilih simetris karena bank akan mengirim barang berharga pula ke bank asal. STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Modus distribusi untuk kelas kargo yang lain: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"asimetris" berarti jumlah kargo yang pergi ke kedua arah bisa berbeda-beda. "manual" berarti bahwa tidak ada distribusi otomatis akan dilakukan untuk kargo. +STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimetris" berarti jumlah kargo dikirim pada kedua arah bisa berbeda-beda. "Manual" berarti tidak ada distribusi otomatis akan dilakukan untuk kargo tersebut. ###length 3 STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimetris @@ -2104,9 +2104,9 @@ STR_QUIT_YES :{BLACK}Ya STR_QUIT_NO :{BLACK}Tidak # Abandon game -STR_ABANDON_GAME_CAPTION :{WHITE}Batalkan Permainan +STR_ABANDON_GAME_CAPTION :{WHITE}Tinggalkan Permainan STR_ABANDON_GAME_QUERY :{YELLOW}Apakah anda yakin untuk meninggalkan permainan? -STR_ABANDON_SCENARIO_QUERY :{YELLOW}Apakan anda yakin untuk mengabaikan skenario ini ? +STR_ABANDON_SCENARIO_QUERY :{YELLOW}Apakah anda yakin untuk mengabaikan skenario ini ? # Cheat window STR_CHEATS :{WHITE}Kode Curang @@ -2819,7 +2819,7 @@ STR_OBJECT_CLASS_TRNS :Pemancar STR_PLANT_TREE_CAPTION :{WHITE}Pepohonan STR_PLANT_TREE_TOOLTIP :{BLACK}Pilih jenis pohon untuk ditanam. Jika pohon sudah tertanam, ini akan menambah jenis pohon secara acak dari tipe yang sama. STR_TREES_RANDOM_TYPE :{BLACK}Tanam pohon secara acak -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Tempatkan tipe tumbuhan secara acak. Shift untuk menampilkan perkiraan biaya +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Tanam tipe pepohonan secara acak. Ctrl untuk memilih area secara diagonal. Shift untuk menampilkan perkiraan biaya STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Pohon Acak STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Menanam pohon secara acak pada lansekap STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal diff --git a/src/lang/korean.txt b/src/lang/korean.txt index b19eb2340c..adf3b18136 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -387,7 +387,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}도시 STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}산업시설을 건설합니다. STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}도로를 건설합니다. STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}전찻길 건설 -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}나무를 심습니다. SHIFT 키를 누른 채로 사용하면 예상 비용을 볼 수 있습니다 +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}나무를 심습니다. CTRL 키를 누른 채로 사용하면 대각선 방향의 영역을 선택할 수 있습니다. SHIFT 키를 누른 채로 사용하면 예상 비용을 볼 수 있습니다 STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}팻말을 답니다. STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}오브젝트를 설치합니다. CTRL 키를 누르면 대각선 방향의 영역을 선택할 수 있습니다. SHIFT 키를 누른 채로 사용하면 예상 비용을 볼 수 있습니다 @@ -1930,7 +1930,7 @@ STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"대칭"은 A STR_CONFIG_SETTING_DISTRIBUTION_MAIL :우편에 대한 분배 형식: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"대칭"은 A역에서 B역으로 가려는 우편물의 수가 B에서 A로 가려는 우편물의 수와 비슷하다는 뜻입니다. "비대칭"은 우편물이 아무 방향이나 임의의 양만큼 가게 됨을 뜻합니다. "수동"은 자동적인 우편물 분배가 일어나지 않고 기존 방식을 사용하겠음을 뜻합니다. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :귀금속 화물에 대한 분배 형식: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :귀금속 화물은 온대 기후의 귀금속, 아열대 기후의 다이아몬드 또는 아한대 기후의 금을 말합니다. NewGRF을 사용하면 달라질 수 있습니다. "대칭"은 A역에서 B역으로 가려는 화물의 수가 B에서 A로 가려는 화물의 수와 비슷하다는 뜻입니다. "비대칭"은 화물이 아무 방향이나 임의의 양만큼 가게 됨을 뜻합니다. "수동"은 자동적인 화물 분배가 일어나지 않고 기존 방식을 사용하겠음을 뜻합니다. 아한대 기후에서는 대칭으로 설정하면 은행이 금광으로 금을 보내지 않으려 하기 때문에 비대칭이나 수동으로 설정하는 것을 추천합니다. 온대 기후나 아열대 기후에서는 은행이 일부 적재한 귀금속을 원래 은행으로 보내려고 하기 때문에 대칭을 선택해도 됩니다. +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :귀금속 화물은 온대 기후의 귀금속, 아열대 기후의 다이아몬드 또는 아한대 기후의 금을 말합니다. NewGRF을 사용하면 달라질 수 있습니다. "대칭"은 A역에서 B역으로 가려는 화물의 수가 B에서 A로 가려는 화물의 수와 비슷하다는 뜻입니다. "비대칭"은 화물이 아무 방향이나 임의의 양만큼 가게 됨을 뜻합니다. "수동"은 자동적인 화물 분배가 일어나지 않고 기존 방식을 사용하겠음을 뜻합니다. 아한대나 아열대 기후에서는 대칭으로 설정하면 은행이 금을 받기만 하기 때문에 비대칭이나 수동으로 설정하는 것을 추천합니다. 온대 기후에서는 은행이 귀금속을 원래 은행으로 보내려고 하기 때문에 대칭을 선택해도 됩니다. STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :다른 화물에 대한 분배 형식: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"비대칭"은 화물이 아무 방향이나 임의의 양만큼 가게 됨을 뜻합니다. "수동"은 자동적인 화물 분배가 일어나지 않고 기존 방식을 사용하겠음을 뜻합니다. 특별한 이유가 없는 한, "비대칭"이나 "수동"으로 설정하십시오. ###length 3 @@ -2820,7 +2820,7 @@ STR_OBJECT_CLASS_TRNS :송신기 STR_PLANT_TREE_CAPTION :{WHITE}나무 STR_PLANT_TREE_TOOLTIP :{BLACK}심고싶은 나무의 종류를 선택합니다. 이미 나무가 심어져있는 경우에는 선택한 나무의 크기를 키웁니다 STR_TREES_RANDOM_TYPE :{BLACK}여러 종류의 나무 같이 심기 -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}여러 종류의 나무를 심습니다. SHIFT 키를 이용하면 예상 비용을 볼 수 있습니다 +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}여러 종류의 나무를 심습니다. CTRL 키를 누르면 대각선 방향의 영역을 선택할 수 있습니다. SHIFT 키를 이용하면 예상 비용을 볼 수 있습니다 STR_TREES_RANDOM_TREES_BUTTON :{BLACK}무작위로 나무 심기 STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}전 지역에 걸쳐 무작위로 나무를 심습니다 STR_TREES_MODE_NORMAL_BUTTON :{BLACK}일반 diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 2c3e0bbd5a..a5d058d28e 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -386,7 +386,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}生成 STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}生成工业 STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}公路建设 STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}电车道建设 -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}植树。Shift显示预计花费。 +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}植树。按 Ctrl 沿对角线建造,按 Shift 显示预计花费。 STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}放置标志 STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}放置物体,按住Ctrl可沿对角线选择区域,按住Shift键操作显示预计费用 @@ -1925,9 +1925,9 @@ STR_CONFIG_SETTING_LINKGRAPH_TIME :容许系统用 STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :当刷新货物分配图时,系统会创建一条线程。此处设定的数值即该线程的持续时间。{}赋值越小,线程越有可能在应当停止的时候还未完成,游戏会暂停运作至线程完成工作。相反,赋值越大,则货物分配功能需要较长时间反映线路网变动的影晌。 STR_CONFIG_SETTING_DISTRIBUTION_PAX :乗客分配方式:{STRING} -STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的乗客数量與乙站往甲站的乗客数量大致相同。“不对称”指任何一站往另一站的乗客数量皆由系统随意决定。“手动”指系统不会自动分配乗客的目的地。 +STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的乗客数量与乙站往甲站的乘客数量大致相同。“不对称”指任何一站往另一站的乘客数量皆由系统随意决定。“手动”指系统不会自动分配乘客的目的地。 STR_CONFIG_SETTING_DISTRIBUTION_MAIL :邮件分配方式:{STRING} -STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的邮件数量與乙站往甲站的邮件数量大致相同。“不对称”指任何一站往另一站的邮件数量皆由系统随意决定。“手动”指系统不会自动分配邮件的目的地。 +STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的邮件数量与乙站往甲站的邮件数量大致相同。“不对称”指任何一站往另一站的邮件数量皆由系统随意决定。“手动”指系统不会自动分配邮件的目的地。 STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :装甲货物分配方式:{STRING} STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :“装甲货物”包括温带场景的“贵重品”、寒带场景的“金块”及沙漠场景的“钻石”。使用 NewGRF 可能会改变以上设置。{} 假设有交通路线连接甲、乙两站。“对称”指甲站往乙站的货物数量与乙站往甲站的装甲货物数量大致相同。“不对称”指任何一站往另一站的装甲货物数量皆由系统随意决定。“手动”指系统不会自动分配装甲货物的目的地。{} 建议在温带及沙漠场景使用“对称”,因为银行之间会相互发送贵重品或钻石;在寒带则应使用“不对称”,因为银行不会把金块送回金矿。 STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :其他货物分配方式:{STRING} @@ -2819,7 +2819,7 @@ STR_OBJECT_CLASS_TRNS :发射机 STR_PLANT_TREE_CAPTION :{WHITE}树木 STR_PLANT_TREE_TOOLTIP :{BLACK}选择要种植的树木类型。如果格子内已经有树木,将种植随机类型的树木 STR_TREES_RANDOM_TYPE :{BLACK}随机类型的树木 -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}种植随机类型的树木,按住 Shift 键可以显示所需资金 +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}种植随机类型的树木。按 Ctrl 键沿对角线建造,按住 Shift 键可以显示所需资金 STR_TREES_RANDOM_TREES_BUTTON :{BLACK}随机树木 STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}随机地种植一些树木 STR_TREES_MODE_NORMAL_BUTTON :{BLACK}正常 From 01be4232377d743abada0e3a06ebf1f084bb185b Mon Sep 17 00:00:00 2001 From: Francis Herne Date: Mon, 16 Jan 2023 17:51:34 +0000 Subject: [PATCH 02/17] Fix #10362: NewGRF bridges without speed limits. For bridges, a max speed of 0xFFFF (i.e. no effective limit) is no longer displayed as a limit in the UI. A max speed of 0 is also considered unlimited, for similarity to the roadtype and railtype interface. --- src/bridge_gui.cpp | 39 +++++++++++++++++++++++---------------- src/lang/english.txt | 6 ++++-- src/newgrf.cpp | 3 ++- src/tunnelbridge_cmd.cpp | 4 ++++ 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 23ae9dbf82..62f4c96b9b 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -130,6 +130,23 @@ private: this->SetWidgetDirty(WID_BBS_BRIDGE_LIST); } + /** + * Get the StringID to draw in the selection list and set the appropriate DParams. + * @param bridge_data the bridge to get the StringID of. + * @return the StringID. + */ + StringID GetBridgeSelectString(const BuildBridgeData &bridge_data) const + { + SetDParam(0, bridge_data.spec->material); + SetDParam(1, bridge_data.spec->speed); + SetDParam(2, bridge_data.cost); + /* If the bridge has no meaningful speed limit, don't display it. */ + if (bridge_data.spec->speed == UINT16_MAX) { + return _game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_INFO_NAME : STR_SELECT_BRIDGE_INFO_NAME_COST; + } + return _game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED : STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST; + } + public: BuildBridgeWindow(WindowDesc *desc, TileIndex start, TileIndex end, TransportType transport_type, byte road_rail_type, GUIBridgeList *bl) : Window(desc), start_tile(start), @@ -183,14 +200,9 @@ public: case WID_BBS_BRIDGE_LIST: { Dimension sprite_dim = {0, 0}; // Biggest bridge sprite dimension Dimension text_dim = {0, 0}; // Biggest text dimension - for (int i = 0; i < (int)this->bridges->size(); i++) { - const BridgeSpec *b = this->bridges->at(i).spec; - sprite_dim = maxdim(sprite_dim, GetSpriteSize(b->sprite)); - - SetDParam(2, this->bridges->at(i).cost); - SetDParam(1, b->speed); - SetDParam(0, b->material); - text_dim = maxdim(text_dim, GetStringBoundingBox(_game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO)); + for (const BuildBridgeData &bridge_data : *this->bridges) { + sprite_dim = maxdim(sprite_dim, GetSpriteSize(bridge_data.spec->sprite)); + text_dim = maxdim(text_dim, GetStringBoundingBox(GetBridgeSelectString(bridge_data))); } sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field. text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field. @@ -224,15 +236,10 @@ public: case WID_BBS_BRIDGE_LIST: { Rect tr = r.WithHeight(this->resize.step_height).Shrink(WidgetDimensions::scaled.matrix); for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < (int)this->bridges->size(); i++) { - const BridgeSpec *b = this->bridges->at(i).spec; - - SetDParam(2, this->bridges->at(i).cost); - SetDParam(1, b->speed); - SetDParam(0, b->material); - + const BuildBridgeData &bridge_data = this->bridges->at(i); + const BridgeSpec *b = bridge_data.spec; DrawSprite(b->sprite, b->pal, tr.left, tr.bottom - GetSpriteSize(b->sprite).height); - DrawStringMultiLine(tr.Indent(this->bridgetext_offset, false), - _game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO); + DrawStringMultiLine(tr.Indent(this->bridgetext_offset, false), GetBridgeSelectString(bridge_data)); tr = tr.Translate(0, this->resize.step_height); } break; diff --git a/src/lang/english.txt b/src/lang/english.txt index 9f8830c5a0..2ff0ac81fe 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2698,8 +2698,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 69d41af8d5..60dc364b6d 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2190,7 +2190,7 @@ static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, ByteR case 0x0A: // Maximum length bridge->max_length = buf->ReadByte(); - if (bridge->max_length > 16) bridge->max_length = 0xFFFF; + if (bridge->max_length > 16) bridge->max_length = UINT16_MAX; break; case 0x0B: // Cost factor @@ -2199,6 +2199,7 @@ static ChangeInfoResult BridgeChangeInfo(uint brid, int numinfo, int prop, ByteR case 0x0C: // Maximum speed bridge->speed = buf->ReadWord(); + if (bridge->speed == 0) bridge->speed = UINT16_MAX; break; case 0x0D: { // Bridge sprite tables diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index c22168476b..d154c4ad67 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1757,12 +1757,16 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td) if (!IsTunnel(tile)) { uint16 spd = GetBridgeSpec(GetBridgeType(tile))->speed; + /* rail speed special-cases 0 as unlimited, hides display of limit etc. */ + if (spd == UINT16_MAX) spd = 0; if (td->rail_speed == 0 || spd < td->rail_speed) { td->rail_speed = spd; } } } else if (tt == TRANSPORT_ROAD && !IsTunnel(tile)) { uint16 spd = GetBridgeSpec(GetBridgeType(tile))->speed; + /* road speed special-cases 0 as unlimited, hides display of limit etc. */ + if (spd == UINT16_MAX) spd = 0; if (road_rt != INVALID_ROADTYPE && (td->road_speed == 0 || spd < td->road_speed)) td->road_speed = spd; if (tram_rt != INVALID_ROADTYPE && (td->tram_speed == 0 || spd < td->tram_speed)) td->tram_speed = spd; } From 5eb2e0fd3db5dd5a3b5a51b144a0ace997609ca0 Mon Sep 17 00:00:00 2001 From: translators Date: Fri, 20 Jan 2023 18:46:24 +0000 Subject: [PATCH 03/17] Update: Translations from eints dutch: 4 changes by Afoklala --- src/lang/afrikaans.txt | 2 -- src/lang/arabic_egypt.txt | 2 -- src/lang/basque.txt | 2 -- src/lang/belarusian.txt | 2 -- src/lang/brazilian_portuguese.txt | 2 -- src/lang/bulgarian.txt | 2 -- src/lang/catalan.txt | 2 -- src/lang/croatian.txt | 2 -- src/lang/czech.txt | 2 -- src/lang/danish.txt | 2 -- src/lang/dutch.txt | 10 ++++------ src/lang/english_AU.txt | 2 -- src/lang/english_US.txt | 2 -- src/lang/esperanto.txt | 2 -- src/lang/estonian.txt | 2 -- src/lang/faroese.txt | 2 -- src/lang/finnish.txt | 2 -- src/lang/french.txt | 2 -- src/lang/frisian.txt | 2 -- src/lang/gaelic.txt | 2 -- src/lang/galician.txt | 2 -- src/lang/german.txt | 2 -- src/lang/greek.txt | 2 -- src/lang/hebrew.txt | 2 -- src/lang/hungarian.txt | 2 -- src/lang/icelandic.txt | 2 -- src/lang/indonesian.txt | 2 -- src/lang/irish.txt | 2 -- src/lang/italian.txt | 2 -- src/lang/japanese.txt | 2 -- src/lang/korean.txt | 2 -- src/lang/latin.txt | 2 -- src/lang/latvian.txt | 2 -- src/lang/lithuanian.txt | 2 -- src/lang/luxembourgish.txt | 2 -- src/lang/malay.txt | 2 -- src/lang/maltese.txt | 1 - src/lang/marathi.txt | 2 -- src/lang/norwegian_bokmal.txt | 2 -- src/lang/norwegian_nynorsk.txt | 2 -- src/lang/persian.txt | 2 -- src/lang/polish.txt | 2 -- src/lang/portuguese.txt | 2 -- src/lang/romanian.txt | 2 -- src/lang/russian.txt | 2 -- src/lang/serbian.txt | 2 -- src/lang/simplified_chinese.txt | 2 -- src/lang/slovak.txt | 2 -- src/lang/slovenian.txt | 2 -- src/lang/spanish.txt | 2 -- src/lang/spanish_MX.txt | 2 -- src/lang/swedish.txt | 2 -- src/lang/tamil.txt | 2 -- src/lang/thai.txt | 2 -- src/lang/traditional_chinese.txt | 2 -- src/lang/turkish.txt | 2 -- src/lang/ukrainian.txt | 2 -- src/lang/urdu.txt | 2 -- src/lang/vietnamese.txt | 2 -- src/lang/welsh.txt | 2 -- 60 files changed, 4 insertions(+), 123 deletions(-) diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index c727774375..dcad6e6eb8 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -2482,8 +2482,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Verhoog STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Kies Spoor Brug STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selekteer Pad Brug STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brugkeuring - klik op jou verkose brug om dit te bou -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Kabelstut, Staal STR_BRIDGE_NAME_GIRDER_STEEL :Balk, Staal STR_BRIDGE_NAME_CANTILEVER_STEEL :Vrydraer, Staal diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index 90fa933876..7c961dcbd1 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -2274,8 +2274,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}زياد STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}اختر جسر السكة STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}اختر الجسر المناسب STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}بناء الجسور - اختر الجسر المفضل لديك لبنائة -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :تعليق, حديدي STR_BRIDGE_NAME_GIRDER_STEEL :العارضة, حديدية STR_BRIDGE_NAME_CANTILEVER_STEEL :الحامل, حديدي diff --git a/src/lang/basque.txt b/src/lang/basque.txt index a989df5135..dae81d2051 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -2354,8 +2354,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Seinale STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Trenbide zubia aukeratu STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Errepide zubia aukeratu STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Zubi aukerak - eraiki nahi duzun zubian klik egin -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Altzairuzko zubi esekia STR_BRIDGE_NAME_GIRDER_STEEL :Altzairuzko habe zubia STR_BRIDGE_NAME_CANTILEVER_STEEL :Altzairuzko mentsula zubia diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index ad0fcb998e..5798072b5e 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -2830,8 +2830,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Павя STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Выберыце чыгуначны мост STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Выберыце аўтамабiльны мост STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Выбар моста — пстрыкніце па малюнку моста, які Вы хочаце пабудаваць -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Падвесны сталёвы STR_BRIDGE_NAME_GIRDER_STEEL :Бэлечны сталёвы STR_BRIDGE_NAME_CANTILEVER_STEEL :Кансольны сталёвы diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 76a575b57e..7477d2beb6 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selecionar Ponte Ferroviária STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selecionar Ponte Rodoviária STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Seleção de ponte - clique na ponte desejada para construir -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensa, Aço STR_BRIDGE_NAME_GIRDER_STEEL :Vigas, Aço STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Aço diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index 5fede3a4d3..6e9f0d2ac0 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -2402,8 +2402,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увел STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Избери ЖП мост STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Избор на асфалтов мост STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Избиране на мост - натисни върху избрания от теб мост, за да се построи -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Висящ, Стоманен STR_BRIDGE_NAME_GIRDER_STEEL :Гредоред, Стоманен STR_BRIDGE_NAME_CANTILEVER_STEEL :Конзолен, Стоманен diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index a72c1221f0..559f85d381 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmenta STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selecciona Pont de Tren STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selecciona Pont de Carretera STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selecció de pont - clica sobre el pont triat per construir-lo -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Pont penjant d'acer STR_BRIDGE_NAME_GIRDER_STEEL :Pont biga d'acer STR_BRIDGE_NAME_CANTILEVER_STEEL :Pont en mènsula d'acer diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 35174f26e7..309ae94c89 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -2625,8 +2625,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećaj STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Odaberi željeznički most STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Odaberi cestovni most STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Izbor mosta - klikni na most koji želiš izgraditi -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Viseći, čelični STR_BRIDGE_NAME_GIRDER_STEEL :Noseći, čelični STR_BRIDGE_NAME_CANTILEVER_STEEL :Konzolni, čelični diff --git a/src/lang/czech.txt b/src/lang/czech.txt index 356f74c79a..3841b58be6 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -2785,8 +2785,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Zvýšit STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Zvolit železniční most STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Zvolit silniční most STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Výběr mostů - staví se kliknutím na obrázek mostu -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Zavěšený, ocelový STR_BRIDGE_NAME_GIRDER_STEEL :Trámový, ocelový STR_BRIDGE_NAME_CANTILEVER_STEEL :Konzolový, ocelový diff --git a/src/lang/danish.txt b/src/lang/danish.txt index 93356057a3..45720f744e 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -2658,8 +2658,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Forøg t STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vælg jernbanebro STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Vælg vejbro STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Valg af bro - klik på din foretrukne brotype for at bygge den -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hængebro, stål STR_BRIDGE_NAME_GIRDER_STEEL :Bjælkebro, stål STR_BRIDGE_NAME_CANTILEVER_STEEL :Gerberbro, stål diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 5708c70cc0..cb6dc3b0fd 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -386,7 +386,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Stadsont STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industrieontwikkeling STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Wegenbouw STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Tramsporen bouwen -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Bomen planten. Shift schakelt tussen planten/inschatting van de kosten +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Bomen planten. Ctrl selecteert het gebied diagonaal. Shift schakelt tussen planten/inschatting van de kosten STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Bord plaatsen STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Object plaatsen. Ctrl selecteert een diagonaal gebied. Shift+klik wisselt tussen bouwen/verwachte kosten weergeven. @@ -1929,9 +1929,9 @@ STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :'Symmetrisch' b STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Distributiemodus voor post: {STRING} STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :'Symmetrisch' betekent dat ongeveer dezelfde hoeveelheid post wordt verzonden van station A naar station B als van B naar A. 'Asymmetrisch' betekent dat willekeurige hoeveelheden post in beide richtingen worden verzonden. 'Handmatig' betekent dat er geen automatische distributie plaatsvindt voor post. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Distributiemodus voor de GEPANTSERDE ladingsklasse: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :De GEPANTSERDE ladingsklasse bevat waardevolle spullen in het gematigde klimaat, diamanten in het subtropische klimaat of goud in het subarctische klimaat. NewGRF's kunnen dat veranderen. 'Symmetrisch' betekent dat ongeveer dezelfde hoeveelheid lading wordt verzonden van een station A naar station B als van B naar A. 'Asymmetrisch' betekent dat deze vracht willekeurig in beide richtingen kan worden verzonden. 'Handmatig' betekent dat er geen automatische distributie zal plaatsvinden voor die lading. Het wordt aanbevolen om dit op 'Asymmetrisch' of 'Handmatig' te zetten bij het spelen in subarctisch klimaat omdat banken geen goud terugsturen naar goudmijnen. Voor gematigd en subtropisch klimaat kun je ook 'Symmetrisch' kiezen omdat banken waardevolle spullen terug kunnen sturen naar de oorspronkelijke bank. +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :De GEPANTSERDE ladingsklasse bevat waardevolle spullen in het gematigde klimaat, diamanten in het subtropische klimaat of goud in het subarctische klimaat. NewGRF's kunnen dat veranderen. 'Symmetrisch' betekent dat ongeveer dezelfde hoeveelheid lading wordt verzonden van een station A naar station B als van B naar A. 'Asymmetrisch' betekent dat deze vracht willekeurig in beide richtingen kan worden verzonden. 'Handmatig' betekent dat er geen automatische distributie zal plaatsvinden voor die lading. Het wordt aanbevolen om dit op 'Asymmetrisch' of 'Handmatig' te zetten bij het spelen in subarctisch of subtropisch klimaat omdat banken daar alleen vracht kunnen accepteren, niet versturen. Voor gematigd klimaat kun je ook 'Symmetrisch' kiezen omdat banken kostbaarheden terug kunnen sturen naar de oorspronkelijke bank. STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Distributiemodus voor andere vrachtsoorten: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :'Symmetrisch' betekent dat willekeurige hoeveelheden lading in beide richtingen kunnen worden gestuurd. 'Handmatig' betekent dat er geen automatische distributie plaatsvindt voor die lading. +STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :'Asymmetrisch' betekent dat willekeurige hoeveelheden lading in beide richtingen kunnen worden gestuurd. 'Handmatig' betekent dat er geen automatische distributie plaatsvindt voor die lading. ###length 3 STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :Handmatig STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :Asymmetrisch @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Dichthei STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selecteer type spoorbrug STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selecteer type wegbrug STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brugkeuze - klik op de gewenste brug om die te bouwen -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hangend, staal STR_BRIDGE_NAME_GIRDER_STEEL :Ligger, staal STR_BRIDGE_NAME_CANTILEVER_STEEL :Vrijdragend, staal @@ -2819,7 +2817,7 @@ STR_OBJECT_CLASS_TRNS :Zendmasten STR_PLANT_TREE_CAPTION :{WHITE}Bomen STR_PLANT_TREE_TOOLTIP :{BLACK}Selecteer een soort boom om te planten. Als de tegel al bomen bevat, komen er meer bomen van verschillende typen bij, onafhankelijk van het geselecteerde type STR_TREES_RANDOM_TYPE :{BLACK}Willekeurige soorten bomen -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Willekeurig bomen planten. Shift+klik wisselt tussen bouwen/verwachte kosten. +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Willekeurig bomen planten. Ctrl selecteert het gebied diagonaal. Shift+klik wisselt tussen bouwen/verwachte kosten. STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Willekeurige bomen STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Hiermee plant je bomen willekeurig over het landschap STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normaal diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index b59bbfe1e9..7b3a298fa4 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 2d7adbc888..82c70d39eb 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index 33ecc9e4c5..480b1c46bc 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -2062,8 +2062,6 @@ STR_BUILD_SIGNAL_CAPTION :{WHITE}Elekto d STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Elektu Relan Ponton STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Elektu Vojan Ponton STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Pontelekto - klaku vian preferatan ponton por konstrui ĝin -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Ŝtala pendanta STR_BRIDGE_NAME_GIRDER_STEEL :Ŝtala ebena STR_BRIDGE_NAME_CANTILEVER_STEEL :Ŝtala luksa diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index 8b2ac0539c..0d0b709cf7 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -2663,8 +2663,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Suurenda STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vali raudteesild STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Vali sillatüüp STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Silla valik - ehitamiseks klõpsi sobival sillal -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Rippsild, terasest STR_BRIDGE_NAME_GIRDER_STEEL :Raamistikuga, terasest STR_BRIDGE_NAME_CANTILEVER_STEEL :Konsool, terasest diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index 8992427f81..a8a973becc 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -2233,8 +2233,6 @@ STR_BUILD_SIGNAL_CAPTION :{WHITE}Úrval a STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vel jarnbreyta brúgv STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Vel vega brúgv STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brúgva úrval - trýst á ta brúnna tær dámar fyri at byggja hana -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Heingibrúgv, stál STR_BRIDGE_NAME_GIRDER_STEEL :Bjálkabrúgv, stál STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, stál diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index 866321f327..68a95fdce7 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Suurenna STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Valitse rautatiesilta STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Valitse maantiesilta STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Sillan valinta – napsauta valittua siltaa rakentaaksesi sen -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Riippusilta, terästä STR_BRIDGE_NAME_GIRDER_STEEL :Palkki, terästä STR_BRIDGE_NAME_CANTILEVER_STEEL :Ulokepalkki, terästä diff --git a/src/lang/french.txt b/src/lang/french.txt index 22e01611f4..416b84f42b 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augmente STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Choisir un pont ferroviaire STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Choisir un pont routier STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Sélection de pont - Cliquer sur le type de pont désiré pour le construire. -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspendu en acier STR_BRIDGE_NAME_GIRDER_STEEL :À poutres en acier STR_BRIDGE_NAME_CANTILEVER_STEEL :Porte-à-faux en acier diff --git a/src/lang/frisian.txt b/src/lang/frisian.txt index ffb5778b56..19bb320d54 100644 --- a/src/lang/frisian.txt +++ b/src/lang/frisian.txt @@ -2340,8 +2340,6 @@ STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Bloksein STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selektear Spoarbrêge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selektear brêge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brêge seleksje - klik op de brêge dyst boue wolst -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hingbrêge, Stiel STR_BRIDGE_NAME_GIRDER_STEEL :Brêge mei balken, Stiel STR_BRIDGE_NAME_CANTILEVER_STEEL :Fakwurkbrêge, Stiel diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 2b2fd83c26..947089feab 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -2661,8 +2661,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Meudaich STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Tagh drochaid rèile STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Tagh drochaid rathaid STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Tagh drochaid - briog air an drochaid a thogras tu gus a togail -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Crochaidh, Stàilinn STR_BRIDGE_NAME_GIRDER_STEEL :Teannadair, Stàilinn STR_BRIDGE_NAME_CANTILEVER_STEEL :Starr-chrann, Stàillinn diff --git a/src/lang/galician.txt b/src/lang/galician.txt index eb88efafdc..ebaefa6def 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selecciona ponte ferroviaria STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selecciona ponte de estrada STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selección de pontes - picha na ponte seleccionada para construíla -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Colgante, aceiro STR_BRIDGE_NAME_GIRDER_STEEL :Vigas, aceiro STR_BRIDGE_NAME_CANTILEVER_STEEL :Voladizo, aceiro diff --git a/src/lang/german.txt b/src/lang/german.txt index 859a5ab6d6..6c96a74cf3 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Signalab STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Eisenbahnbrücke auswählen STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Straßenbrücke wählen STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brückenauswahl – Auf die gewünschte Brücke klicken, um sie zu bauen -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Stahlhängebrücke STR_BRIDGE_NAME_GIRDER_STEEL :Stahlträgerbrücke STR_BRIDGE_NAME_CANTILEVER_STEEL :Auslegerbrücke (Stahl) diff --git a/src/lang/greek.txt b/src/lang/greek.txt index e2a89902ff..75e3787de7 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -2804,8 +2804,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Αύξη STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Επιλογή Γέφυρας STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Επιλογή Γέφυρας Δρόμου STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Επιλογή γέφυρας - πατήστε στην γέφυρα της προτίμησής σας για κατασκευή -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Ατσάλινη, με Αναρτήσεις STR_BRIDGE_NAME_GIRDER_STEEL :Ατσάλινη, με Δοκούς STR_BRIDGE_NAME_CANTILEVER_STEEL :Ατσάλινη, Κρεμαστή diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 03a3df883a..f4dc8b772c 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -2529,8 +2529,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}הגדל STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}בחר סוג הגשר עליו תעבור המסילה STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}בחירת גשר לכביש STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK} בחירת סוג הגשר – בחר את הסוג שברצונך לבנות -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :גשר תלוי, ברזל STR_BRIDGE_NAME_GIRDER_STEEL :גשר קורות, ברזל STR_BRIDGE_NAME_CANTILEVER_STEEL :גשר זיז, פלדה diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 0248ac680e..8728460e36 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -2762,8 +2762,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Automata STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Válassz egy vasúti hidat STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Közúti híd építése STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Híd kiválasztása - kattints arra a hídra, amit meg akarsz építeni -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Függő, acél STR_BRIDGE_NAME_GIRDER_STEEL :Gerendás, acél STR_BRIDGE_NAME_CANTILEVER_STEEL :Rácsos, acél diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index b7d3fc9a75..08af721213 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -2300,8 +2300,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Auka þ STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Veldu tegund brúar STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Veldu vegabrú STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brúarval - smelltu á brú að eigin vali til að reysa hana -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hengibrú, stál STR_BRIDGE_NAME_GIRDER_STEEL :Burðarbitabrú, stál STR_BRIDGE_NAME_CANTILEVER_STEEL :Svifbitabrú, stál diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index f2e7b4a046..e8318a4f8b 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Tambah k STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Pilih Jembatan Rel STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Pilih Jembatan STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Pilihan jembatan - Klik pada jembatan yang ingin anda bangun -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensi, Baja STR_BRIDGE_NAME_GIRDER_STEEL :Balok, Baja STR_BRIDGE_NAME_CANTILEVER_STEEL :Beton, Baja diff --git a/src/lang/irish.txt b/src/lang/irish.txt index dc4054130a..a879918469 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -2650,8 +2650,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Méadaig STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Roghnaigh Droichead Iarnróid STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Roghnaigh Droichead Bóthair STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Droichead a roghnú - cliceáil ar an droichead is rogha leat chun é a thógáil -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Crochta, Cruach STR_BRIDGE_NAME_GIRDER_STEEL :Cearchaill, Cruach STR_BRIDGE_NAME_CANTILEVER_STEEL :Starrmhaide, Cruach diff --git a/src/lang/italian.txt b/src/lang/italian.txt index 5697a5c0ad..fa1cdde290 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -2739,8 +2739,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumenta STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleziona ponte ferroviario STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Seleziona ponte stradale STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selezione ponte - fare clic sul ponte desiderato per costruirlo -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Sospeso, Acciaio STR_BRIDGE_NAME_GIRDER_STEEL :A travatura, Acciaio STR_BRIDGE_NAME_CANTILEVER_STEEL :A mensola, Acciaio diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index f2e076c940..33dffb1217 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -2666,8 +2666,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}ドラ STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}鉄道橋建設 STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}道路橋建設 STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}建設したい橋の種類をクリックしてください -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING}、{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :吊橋(S造) STR_BRIDGE_NAME_GIRDER_STEEL :桁橋(S造) STR_BRIDGE_NAME_CANTILEVER_STEEL :カンチレバートラス橋(S造) diff --git a/src/lang/korean.txt b/src/lang/korean.txt index adf3b18136..911a41d693 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}드래 STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}철교 선택 STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}다리 종류를 선택하세요 STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}다리 건설 - 원하는 다리 종류를 선택하세요 -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :강철 현수교 STR_BRIDGE_NAME_GIRDER_STEEL :강철 거더교 STR_BRIDGE_NAME_CANTILEVER_STEEL :강철 캔틸레버교 diff --git a/src/lang/latin.txt b/src/lang/latin.txt index a9b7541683..efba0d6a19 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -2666,8 +2666,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Augere i STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Eligere Pontem Ferriviarium STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Eligere Pontem Viarium STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Electio pontium - preme in pontem delectum ut struatur -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Pendulus, Chalybeius STR_BRIDGE_NAME_GIRDER_STEEL :Trabum, Chalybeius STR_BRIDGE_NAME_CANTILEVER_STEEL :Prominens, Chalybeius diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index b69c982644..f96ecbb92c 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -2702,8 +2702,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Palielin STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Izvēlēties dzelzceļa tiltu STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Izvēlēties tiltu STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Tiltu izvēle - klikšķināt uz vēlamo tiltu, lai to uzbūvētu -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Vanšu, tērauda STR_BRIDGE_NAME_GIRDER_STEEL :Siju, tērauda STR_BRIDGE_NAME_CANTILEVER_STEEL :Izgriežamais, tērauda diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index fc150eddba..6c611c5d70 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -2869,8 +2869,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Padidint STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Pasirinkite geležinkelio tilto tipą STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Pasirinkite automobilių tilto tipą STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Tilto statyba — spragtelkite ant pageidaujamo tilto -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Kabantis plieninis STR_BRIDGE_NAME_GIRDER_STEEL :Plieno sijų STR_BRIDGE_NAME_CANTILEVER_STEEL :Gembinis plieninis diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 167e14ea31..781d0410cf 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Setzt Si STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Zuchbréck auswielen STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Stroossebréck auswielen STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bréckenauswiel - Wiel deng Bréck aus -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Stolen Hängebréck STR_BRIDGE_NAME_GIRDER_STEEL :Stoldréier Bréck STR_BRIDGE_NAME_CANTILEVER_STEEL :Fräidroend Stolbréck diff --git a/src/lang/malay.txt b/src/lang/malay.txt index dc35a1ab70..61e35adbc2 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -2194,8 +2194,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Tinggika STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Pilih Jambatan Keretapi STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Pilih Jambatan Jalanraya STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Pilihan jambatan - klik di jambatan pilihan anda untuk membinanya -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Tergantung, Keluli STR_BRIDGE_NAME_GIRDER_STEEL :Berpalang, Keluli STR_BRIDGE_NAME_CANTILEVER_STEEL :Kantilever, keluli diff --git a/src/lang/maltese.txt b/src/lang/maltese.txt index ed8cca15f1..3518e7c8dd 100644 --- a/src/lang/maltese.txt +++ b/src/lang/maltese.txt @@ -855,7 +855,6 @@ STR_NETWORK_SERVER_MESSAGE :*** {1:STRING} # Signal window # Bridge selection window -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} # Road construction toolbar diff --git a/src/lang/marathi.txt b/src/lang/marathi.txt index baa5dfc766..1021a16b71 100644 --- a/src/lang/marathi.txt +++ b/src/lang/marathi.txt @@ -1204,8 +1204,6 @@ STR_NETWORK_SERVER_MESSAGE :*** {1:STRING} # Signal window # Bridge selection window -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_WOODEN :लाकडी diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 29945b6834..fe1a54ca2f 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -2668,8 +2668,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Øk sign STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Velg jernbanebrotype STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Velg veibrotype STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Brovalg - klikk på broen du vil ha for å bygge den. -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hengebro, stål STR_BRIDGE_NAME_GIRDER_STEEL :Bjelker, stål STR_BRIDGE_NAME_CANTILEVER_STEEL :Frittbærende, stål diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index 4ec6c54d6f..c210846e9b 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -2363,8 +2363,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Auk tett STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vel jernbanebrutype STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Vel type bru STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bruval - klikk på brua du vil ha for å byggje ho -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hengjebru, stål STR_BRIDGE_NAME_GIRDER_STEEL :Bjelkar, stål STR_BRIDGE_NAME_CANTILEVER_STEEL :Frittberande, stål diff --git a/src/lang/persian.txt b/src/lang/persian.txt index 975ad05c7e..319ad9549b 100644 --- a/src/lang/persian.txt +++ b/src/lang/persian.txt @@ -2165,8 +2165,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}زیاد STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}انتخب پل راه آهن STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}ساخت پل ماشین رو STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK} ساخت پل - بر روی پل مورد نظر خود کلیک کنید تا ساخته شود -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :معلق، فولادی STR_BRIDGE_NAME_GIRDER_STEEL :پیوسته، فولادی STR_BRIDGE_NAME_CANTILEVER_STEEL :پایه دار، فولادی diff --git a/src/lang/polish.txt b/src/lang/polish.txt index a015b369b2..b341396187 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -3078,8 +3078,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Zwiększ STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Wybierz rodzaj mostu kolejowego STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Wybierz most drogowy STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Wybór mostu - kliknij na wybranym moście, aby go zbudować -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Podwieszany, stalowy STR_BRIDGE_NAME_GIRDER_STEEL :Dźwigarowy, stalowy STR_BRIDGE_NAME_CANTILEVER_STEEL :Wspornikowy, stalowy diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index 6d9cd6839c..71d53c7326 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleccione Ponte Ferroviária STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Seleccionar Ponte Rodoviária STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selecção de ponte - clique na ponte desejada para a construir -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensa, Aço STR_BRIDGE_NAME_GIRDER_STEEL :Viga, Aço STR_BRIDGE_NAME_CANTILEVER_STEEL :Consola, Aço diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index dc695ca6e0..11a8a5e407 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Creşte STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Alege pod de cale ferată STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Alege pod rutier STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Alegere pod - click pe podul preferat pentru a-l construi -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensie, Oţel STR_BRIDGE_NAME_GIRDER_STEEL :Grindă, Oţel STR_BRIDGE_NAME_CANTILEVER_STEEL :Arc, Oţel diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 37989f0c88..982d153952 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -2869,8 +2869,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увел STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Выберите железнодорожный мост STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Выберите тип моста STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Выбор моста - щёлкните по изображению моста, который вы хотите построить -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING}{}{VELOCITY}; {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Висячий стальной STR_BRIDGE_NAME_GIRDER_STEEL :Балочный стальной STR_BRIDGE_NAME_CANTILEVER_STEEL :Консольный стальной diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index 07760460a5..a29aab1a06 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -2893,8 +2893,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povećav STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Izbor železničkog mosta STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Izbor drumskog mosta STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Izbor mosta - gradnja se potvrđuje klikom na željeni most -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Viseći, čelični STR_BRIDGE_NAME_GIRDER_STEEL :Gredni, čelični STR_BRIDGE_NAME_CANTILEVER_STEEL :Obešeni, čelični diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index a5d058d28e..fd73a7695e 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}增加 STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}选择铁路桥 STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}选择公路桥梁 STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}选择桥梁 - 点击选择喜欢的桥梁进行建设 -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :钢制悬索 STR_BRIDGE_NAME_GIRDER_STEEL :钢制桁桥 STR_BRIDGE_NAME_CANTILEVER_STEEL :钢制悬臂 diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index b384097d16..ac59e2a263 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -2766,8 +2766,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Zvýšit STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Vyber železničný most STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Vyber cestný most STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Výber mostu - pre postavanie zvoľ typ mostu -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Závesný oceľový STR_BRIDGE_NAME_GIRDER_STEEL :Pilierový oceľový STR_BRIDGE_NAME_CANTILEVER_STEEL :Visutý oceľový diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 1ca8af506e..700c8ecb42 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -2606,8 +2606,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Povečaj STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Izberi železniski most STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Izberi cestni most STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Izbira mostu - klikni na željeni most za izgradnjo -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Viseč, Jeklen STR_BRIDGE_NAME_GIRDER_STEEL :Nosilni, Jeklen STR_BRIDGE_NAME_CANTILEVER_STEEL :Nosilni križi, Jeklen diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 570dfffc19..809b406e77 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incremen STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selección de Puente de Ferrocarril STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selección de Cuente de Carretera STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selección de puente - Clica en el puente elegido para construirlo -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Colgante, Acero STR_BRIDGE_NAME_GIRDER_STEEL :Tirantes, Acero STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantiléver, Acero diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index b26d0b79b0..4d878492ed 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selección de puente de ferrocarril STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selección de puente de carretera STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selección de puente. Clic para construir -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Colgante (acero) STR_BRIDGE_NAME_GIRDER_STEEL :Vigas (acero) STR_BRIDGE_NAME_CANTILEVER_STEEL :Voladizo (acero) diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index a7e8e92b32..8289cd3941 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Öka avs STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Välj järnvägsbro STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Välj vägbro STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Välj bro - klicka på önskad bro för att bygga den -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Hängbro, Stål STR_BRIDGE_NAME_GIRDER_STEEL :Balkbro, Stål STR_BRIDGE_NAME_CANTILEVER_STEEL :Konsolbro, Stål diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index 5e2060cf1a..556ede8912 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -2388,8 +2388,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}சி STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}இரயில்வே பாலத்தினை தேர்ந்தெடு STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}சாலைப் பாலத்தினை தேர்ந்தெடு STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}பாலம் தேர்ந்தெடுத்தல் - தேவையான பாலத்தினைக் கட்ட அதனினை சொடுக்கவும் -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :தொங்குபாலம், எஃகு STR_BRIDGE_NAME_GIRDER_STEEL :உத்திரம்பாலம் , எஃகு STR_BRIDGE_NAME_CANTILEVER_STEEL :நெடுங்கைபாலம், எஃகு diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 6552a3b71b..6ebbe16e15 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -2501,8 +2501,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}เพ STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}เลือกสะพานรถไฟ STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}เลือกสะพานสำหรับรถยนต์ STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}เลือกสะพาน - คลิกสะพานที่ท่านชื่นชอบเพื่อก่อสร้าง -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :สะพานแขวนแบบคอนกรีต STR_BRIDGE_NAME_GIRDER_STEEL :สะพานนั่งร้านแบบเหล็กกล้า STR_BRIDGE_NAME_CANTILEVER_STEEL :สะพานคานแบบเหล็กกล้า diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index 83275dbc42..4754206744 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}增加 ( STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}選擇鐵路橋樑 STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}選擇道路橋樑 STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}選擇橋樑 - 點選想建的橋樑即可建造 -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :吊橋,鋼製 STR_BRIDGE_NAME_GIRDER_STEEL :桁橋,鋼製 STR_BRIDGE_NAME_CANTILEVER_STEEL :懸臂橋,鋼製 diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index 2d60bbb689..553fafc929 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -2699,8 +2699,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Sinyal s STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Tren Köprüsü Seç STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Köprü Seç STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Köprü seçimi - tercih ettiğiniz köprüyü yapmak için tıklayın -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Çelik, Asma STR_BRIDGE_NAME_GIRDER_STEEL :Çelik, Kirişli STR_BRIDGE_NAME_CANTILEVER_STEEL :Çelik, Ağ diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 38b11a6819..100c0d6afd 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -2829,8 +2829,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Збіл STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Виберіть міст STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Виберіть дорожній міст STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Вибір мосту - натисніть на міст, який бажаєте збудувати -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Підвісний сталевий STR_BRIDGE_NAME_GIRDER_STEEL :Балочний сталевий STR_BRIDGE_NAME_CANTILEVER_STEEL :Каркасний сталевий diff --git a/src/lang/urdu.txt b/src/lang/urdu.txt index 5d2947ee58..14f45e478e 100644 --- a/src/lang/urdu.txt +++ b/src/lang/urdu.txt @@ -2034,8 +2034,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}کھین STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}ریل کا پل منتخب کریں STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}سڑک کا پل منتخب کریں STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}پل کا انتخاب - تعمیر کرنے کے لئے اپنی مرضی کے پل پر کلک کریں -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :لٹکا ہوا، سٹیل کا STR_BRIDGE_NAME_GIRDER_STEEL :گارڈر، سٹیل کا STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever، سٹیل diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index b9697403d1..6a4267cf97 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -2698,8 +2698,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Tăng m STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Chọn Loại Cầu Tàu Hỏa STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Chọn Loại Cầu Đường Bộ STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Chọn cầu - chọn loại cầu bạn muốn xây dựng -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Cầu treo thép STR_BRIDGE_NAME_GIRDER_STEEL :Cầu dầm thép STR_BRIDGE_NAME_CANTILEVER_STEEL :Cầu dầm chìa thép diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 2f36fe5650..4896b326e1 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -2449,8 +2449,6 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Cynyddu STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Dewiswch Bont Rheilffordd STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Dewiswch Bont Ffordd STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Dewis pont - cliciwch ar y eich dewis i'w hadeiladu -STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} -STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY} STR_BRIDGE_NAME_SUSPENSION_STEEL :Crog, Dur STR_BRIDGE_NAME_GIRDER_STEEL :Hytrawst, Dur STR_BRIDGE_NAME_CANTILEVER_STEEL :Canttilifer, Dur From 3b0b572ebf21546d5409452b038371360f5e43c7 Mon Sep 17 00:00:00 2001 From: Andy <1780327+andythenorth@users.noreply.github.com> Date: Fri, 20 Jan 2023 21:42:57 +0000 Subject: [PATCH 04/17] Change: Log AI/GS Squirrel crashes in white text for readability (#10375) --- src/ai/ai_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index d885de813b..e861c56f47 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1166,7 +1166,7 @@ struct AIDebugWindow : public Window { TextColour colour; switch (log->type[pos]) { case ScriptLog::LOG_SQ_INFO: colour = TC_BLACK; break; - case ScriptLog::LOG_SQ_ERROR: colour = TC_RED; break; + case ScriptLog::LOG_SQ_ERROR: colour = TC_WHITE; break; case ScriptLog::LOG_INFO: colour = TC_BLACK; break; case ScriptLog::LOG_WARNING: colour = TC_YELLOW; break; case ScriptLog::LOG_ERROR: colour = TC_RED; break; From 953445a5ac3bd6f5f8e8fd0b7b8a6751412cce57 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 10:08:04 +0100 Subject: [PATCH 05/17] Codechange: use MakeSea/AllocateMap in the oldloader instead of MemSetT --- src/saveload/oldloader_sl.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index fc09c7e787..380fe5ccaa 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -47,9 +47,7 @@ void FixOldMapArray() { /* TTO/TTD/TTDP savegames could have buoys at tile 0 * (without assigned station struct) */ - MemSetT(&_m[0], 0); - SetTileType(0, MP_WATER); - SetTileOwner(0, OWNER_WATER); + MakeSea(0); } static void FixTTDMapArray() @@ -1467,8 +1465,7 @@ static bool LoadOldGameDifficulty(LoadgameState *ls, int num) static bool LoadOldMapPart1(LoadgameState *ls, int num) { if (_savegame_type == SGT_TTO) { - MemSetT(_m, 0, OLD_MAP_SIZE); - MemSetT(_me, 0, OLD_MAP_SIZE); + AllocateMap(OLD_MAP_SIZE, OLD_MAP_SIZE); } for (uint i = 0; i < OLD_MAP_SIZE; i++) { From 22d3de8b67a40ea008ee24ce8ebce061015384ee Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 10:57:29 +0100 Subject: [PATCH 06/17] Codechange: use ScriptMap size functions instead of global functions --- src/script/api/script_rail.cpp | 16 ++++++++-------- src/script/api/script_tile.cpp | 8 ++++---- src/script/api/script_vehicle.cpp | 5 +++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/script/api/script_rail.cpp b/src/script/api/script_rail.cpp index 76eda79f4d..bc60617609 100644 --- a/src/script/api/script_rail.cpp +++ b/src/script/api/script_rail.cpp @@ -276,11 +276,11 @@ if (tile - from == 1) { if (to - tile == 1) return (GetRailTracks(tile) & RAILTRACK_NE_SW) != 0; - if (to - tile == ::MapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NE_SE) != 0; - } else if (tile - from == ::MapSizeX()) { + if (to - tile == ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NE_SE) != 0; + } else if (tile - from == ScriptMap::GetMapSizeX()) { if (tile - to == 1) return (GetRailTracks(tile) & RAILTRACK_NW_NE) != 0; if (to - tile == 1) return (GetRailTracks(tile) & RAILTRACK_NW_SW) != 0; - if (to - tile == ::MapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NW_SE) != 0; + if (to - tile == ScriptMap::GetMapSizeX()) return (GetRailTracks(tile) & RAILTRACK_NW_SE) != 0; } else { return (GetRailTracks(tile) & RAILTRACK_SW_SE) != 0; } @@ -301,7 +301,7 @@ static Track SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else if (::TileX(from) == ::TileX(*to)) { track = TRACK_Y; - *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); + *to -= ScriptMap::GetMapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } else if (::TileY(from) < ::TileY(tile)) { if (::TileX(*to) < ::TileX(tile)) { track = TRACK_UPPER; @@ -311,7 +311,7 @@ static Track SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) if (diag_offset != 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else { - *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); + *to -= ScriptMap::GetMapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } } else if (::TileY(from) > ::TileY(tile)) { if (::TileX(*to) < ::TileX(tile)) { @@ -322,7 +322,7 @@ static Track SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) if (diag_offset != 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else { - *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); + *to -= ScriptMap::GetMapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } } else if (::TileX(from) < ::TileX(tile)) { if (::TileY(*to) < ::TileY(tile)) { @@ -333,7 +333,7 @@ static Track SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) if (diag_offset == 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else { - *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); + *to -= ScriptMap::GetMapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } } else if (::TileX(from) > ::TileX(tile)) { if (::TileY(*to) < ::TileY(tile)) { @@ -344,7 +344,7 @@ static Track SimulateDrag(TileIndex from, TileIndex tile, TileIndex *to) if (diag_offset == 0) { *to -= Clamp((int)::TileX(*to) - (int)::TileX(tile), -1, 1); } else { - *to -= ::MapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); + *to -= ScriptMap::GetMapSizeX() * Clamp((int)::TileY(*to) - (int)::TileY(tile), -1, 1); } } return track; diff --git a/src/script/api/script_tile.cpp b/src/script/api/script_tile.cpp index ed7b1300cd..b187c39317 100644 --- a/src/script/api/script_tile.cpp +++ b/src/script/api/script_tile.cpp @@ -253,7 +253,7 @@ /* static */ bool ScriptTile::RaiseTile(TileIndex tile, int32 slope) { EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY); - EnforcePrecondition(false, tile < ::MapSize()); + EnforcePrecondition(false, tile < ScriptMap::GetMapSize()); return ScriptObject::Command::Do(tile, (::Slope)slope, true); } @@ -261,7 +261,7 @@ /* static */ bool ScriptTile::LowerTile(TileIndex tile, int32 slope) { EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY); - EnforcePrecondition(false, tile < ::MapSize()); + EnforcePrecondition(false, tile < ScriptMap::GetMapSize()); return ScriptObject::Command::Do(tile, (::Slope)slope, false); } @@ -269,8 +269,8 @@ /* static */ bool ScriptTile::LevelTiles(TileIndex start_tile, TileIndex end_tile) { EnforcePrecondition(false, ScriptObject::GetCompany() != OWNER_DEITY); - EnforcePrecondition(false, start_tile < ::MapSize()); - EnforcePrecondition(false, end_tile < ::MapSize()); + EnforcePrecondition(false, start_tile < ScriptMap::GetMapSize()); + EnforcePrecondition(false, end_tile < ScriptMap::GetMapSize()); return ScriptObject::Command::Do(end_tile, start_tile, false, LM_LEVEL); } diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index 3ff05d9ba6..851d72f3b8 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -12,6 +12,7 @@ #include "script_cargo.hpp" #include "script_gamesettings.hpp" #include "script_group.hpp" +#include "script_map.hpp" #include "../script_instance.hpp" #include "../../string_func.h" #include "../../strings_func.h" @@ -256,8 +257,8 @@ const Vehicle *v = ::Vehicle::Get(vehicle_id); if (v->type == VEH_AIRCRAFT) { - uint x = Clamp(v->x_pos / TILE_SIZE, 0, ::MapSizeX() - 2); - uint y = Clamp(v->y_pos / TILE_SIZE, 0, ::MapSizeY() - 2); + uint x = Clamp(v->x_pos / TILE_SIZE, 0, ScriptMap::GetMapSizeX() - 2); + uint y = Clamp(v->y_pos / TILE_SIZE, 0, ScriptMap::GetMapSizeY() - 2); return ::TileXY(x, y); } From 9c1a3b17e395eb6bf14f3834d1f3b46f51f9ca04 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 10:31:31 +0100 Subject: [PATCH 07/17] Codechange: use MapLogY() instead of FindFirstBit(MapSizeY()), MapSize() instead of MapSizeX() * MapSizeY() --- src/console_cmds.cpp | 4 ++-- src/landscape.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 67d3cd03b0..7735726729 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1144,7 +1144,7 @@ DEF_CONSOLE_CMD(ConRestart) /* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */ _settings_game.game_creation.map_x = MapLogX(); - _settings_game.game_creation.map_y = FindFirstBit(MapSizeY()); + _settings_game.game_creation.map_y = MapLogY(); _switch_mode = SM_RESTARTGAME; return true; } @@ -1161,7 +1161,7 @@ DEF_CONSOLE_CMD(ConReload) /* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */ _settings_game.game_creation.map_x = MapLogX(); - _settings_game.game_creation.map_y = FindFirstBit(MapSizeY()); + _settings_game.game_creation.map_y = MapLogY(); _switch_mode = SM_RELOADGAME; return true; } diff --git a/src/landscape.cpp b/src/landscape.cpp index 31cdd7f6df..efee6be234 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1536,7 +1536,7 @@ static uint CalculateCoverageLine(uint coverage, uint edge_multiplier) } /* The amount of land we have is the map size minus the first (sea) layer. */ - uint land_tiles = MapSizeX() * MapSizeY() - histogram[0]; + uint land_tiles = MapSize() - histogram[0]; int best_score = land_tiles; /* Our goal is the coverage amount of the land-mass. */ From d481f78b2406313aa26425dd78c86b7bcf3051fc Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 10:27:00 +0100 Subject: [PATCH 08/17] Codechange: add map size related functions to Map structure --- src/map.cpp | 2 +- src/map_func.h | 191 ++++++++++++++++++++++++++----------------------- 2 files changed, 104 insertions(+), 89 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 2a08d656e6..a376d2d32e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -36,7 +36,7 @@ TileExtended *_me = nullptr; ///< Extended Tiles of the map * @param size_x the width of the map along the NE/SW edge * @param size_y the 'height' of the map along the SE/NW edge */ -void AllocateMap(uint size_x, uint size_y) +/* static */ void Map::Allocate(uint size_x, uint size_y) { /* Make sure that the map size is within the limits and that * size of both axes is a power of 2. */ diff --git a/src/map_func.h b/src/map_func.h index c780bd28ec..69f41a12a1 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -41,105 +41,120 @@ extern Tile *_m; */ extern TileExtended *_me; -void AllocateMap(uint size_x, uint size_y); - /** - * Logarithm of the map size along the X side. - * @note try to avoid using this one - * @return 2^"return value" == MapSizeX() + * Size related data of the map. */ -static inline uint MapLogX() -{ - extern uint _map_log_x; - return _map_log_x; -} +struct Map { + static void Allocate(uint size_x, uint size_y); -/** - * Logarithm of the map size along the y side. - * @note try to avoid using this one - * @return 2^"return value" == MapSizeY() - */ -static inline uint MapLogY() -{ - extern uint _map_log_y; - return _map_log_y; -} + /** + * Logarithm of the map size along the X side. + * @note try to avoid using this one + * @return 2^"return value" == Map::SizeX() + */ + static inline uint LogX() + { + extern uint _map_log_x; + return _map_log_x; + } -/** - * Get the size of the map along the X - * @return the number of tiles along the X of the map - */ -static inline uint MapSizeX() -{ - extern uint _map_size_x; - return _map_size_x; -} + /** + * Logarithm of the map size along the y side. + * @note try to avoid using this one + * @return 2^"return value" == Map::SizeY() + */ + static inline uint LogY() + { + extern uint _map_log_y; + return _map_log_y; + } -/** - * Get the size of the map along the Y - * @return the number of tiles along the Y of the map - */ -static inline uint MapSizeY() -{ - extern uint _map_size_y; - return _map_size_y; -} + /** + * Get the size of the map along the X + * @return the number of tiles along the X of the map + */ + static inline uint SizeX() + { + extern uint _map_size_x; + return _map_size_x; + } -/** - * Get the size of the map - * @return the number of tiles of the map - */ -static inline uint MapSize() -{ - extern uint _map_size; - return _map_size; -} + /** + * Get the size of the map along the Y + * @return the number of tiles along the Y of the map + */ + static inline uint SizeY() + { + extern uint _map_size_y; + return _map_size_y; + } -/** - * Gets the maximum X coordinate within the map, including MP_VOID - * @return the maximum X coordinate - */ -static inline uint MapMaxX() -{ - return MapSizeX() - 1; -} + /** + * Get the size of the map + * @return the number of tiles of the map + */ + static inline uint Size() + { + extern uint _map_size; + return _map_size; + } -/** - * Gets the maximum Y coordinate within the map, including MP_VOID - * @return the maximum Y coordinate - */ -static inline uint MapMaxY() -{ - return MapSizeY() - 1; -} + /** + * Gets the maximum X coordinate within the map, including MP_VOID + * @return the maximum X coordinate + */ + static inline uint MaxX() + { + return Map::SizeX() - 1; + } -/** - * Scales the given value by the map size, where the given value is - * for a 256 by 256 map. - * @param n the value to scale - * @return the scaled size - */ -static inline uint ScaleByMapSize(uint n) -{ - /* Subtract 12 from shift in order to prevent integer overflow - * for large values of n. It's safe since the min mapsize is 64x64. */ - return CeilDiv(n << (MapLogX() + MapLogY() - 12), 1 << 4); -} + /** + * Gets the maximum Y coordinate within the map, including MP_VOID + * @return the maximum Y coordinate + */ + static inline uint MaxY() + { + return Map::SizeY() - 1; + } + /** + * Scales the given value by the map size, where the given value is + * for a 256 by 256 map. + * @param n the value to scale + * @return the scaled size + */ + static inline uint ScaleBySize(uint n) + { + /* Subtract 12 from shift in order to prevent integer overflow + * for large values of n. It's safe since the min mapsize is 64x64. */ + return CeilDiv(n << (Map::LogX() + Map::LogY() - 12), 1 << 4); + } -/** - * Scales the given value by the maps circumference, where the given - * value is for a 256 by 256 map - * @param n the value to scale - * @return the scaled size - */ -static inline uint ScaleByMapSize1D(uint n) -{ - /* Normal circumference for the X+Y is 256+256 = 1<<9 - * Note, not actually taking the full circumference into account, - * just half of it. */ - return CeilDiv((n << MapLogX()) + (n << MapLogY()), 1 << 9); -} + /** + * Scales the given value by the maps circumference, where the given + * value is for a 256 by 256 map + * @param n the value to scale + * @return the scaled size + */ + static inline uint ScaleBySize1D(uint n) + { + /* Normal circumference for the X+Y is 256+256 = 1<<9 + * Note, not actually taking the full circumference into account, + * just half of it. */ + return CeilDiv((n << Map::LogX()) + (n << Map::LogY()), 1 << 9); + } +}; + +static inline void AllocateMap(uint size_x, uint size_y) { Map::Allocate(size_x, size_y); } +static inline uint MapLogX() { return Map::LogX(); } +static inline uint MapLogY() { return Map::LogY(); } +static inline uint MapSizeX() { return Map::SizeX(); } +static inline uint MapSizeY() { return Map::SizeY(); } +static inline uint MapSize() { return Map::Size(); } +static inline uint MapMaxX() { return Map::MaxX(); } +static inline uint MapMaxY() { return Map::MaxY(); } +static inline uint ScaleByMapSize(uint n) { return Map::ScaleBySize(n); } +static inline uint ScaleByMapSize1D(uint n) { return Map::ScaleBySize1D(n); } /** * An offset value between two tiles. From fe2bcd2a583fd02416ca394062f8f53bacf0722d Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 10:43:03 +0100 Subject: [PATCH 09/17] Codechange: migrate size related functions to Map structure --- src/aircraft_cmd.cpp | 12 +++--- src/cheat_gui.cpp | 2 +- src/clear_cmd.cpp | 4 +- src/command_func.h | 6 +-- src/console_cmds.cpp | 12 +++--- src/disaster_vehicle.cpp | 26 ++++++------ src/economy.cpp | 6 +-- src/effectvehicle.cpp | 4 +- src/genworld.cpp | 6 +-- src/heightmap.cpp | 20 ++++----- src/industry_cmd.cpp | 18 ++++---- src/industry_gui.cpp | 2 +- src/landscape.cpp | 66 +++++++++++++++--------------- src/linkgraph/demands.cpp | 2 +- src/map.cpp | 26 ++++++------ src/map_func.h | 23 ++++------- src/network/core/game_info.cpp | 4 +- src/network/network_admin.cpp | 4 +- src/newgrf.cpp | 4 +- src/newgrf_airport.cpp | 4 +- src/object_cmd.cpp | 24 +++++------ src/object_gui.cpp | 4 +- src/rail_cmd.cpp | 6 +-- src/rail_gui.cpp | 2 +- src/road_cmd.cpp | 10 ++--- src/saveload/afterload.cpp | 16 ++++---- src/saveload/company_sl.cpp | 2 +- src/saveload/labelmaps_sl.cpp | 2 +- src/saveload/map_sl.cpp | 44 ++++++++++---------- src/saveload/town_sl.cpp | 6 +-- src/saveload/waypoint_sl.cpp | 4 +- src/screenshot.cpp | 18 ++++---- src/script/api/script_map.cpp | 6 +-- src/script/api/script_object.hpp | 2 +- src/script/api/script_tilelist.cpp | 4 +- src/settings_table.cpp | 22 +++++----- src/smallmap_gui.cpp | 10 ++--- src/sound.cpp | 4 +- src/station.cpp | 4 +- src/station_cmd.cpp | 8 ++-- src/station_gui.cpp | 6 +-- src/station_kdtree.h | 4 +- src/terraform_cmd.cpp | 22 +++++----- src/terraform_gui.cpp | 8 ++-- src/tgp.cpp | 20 ++++----- src/tile_map.cpp | 16 ++++---- src/tile_map.h | 34 +++++++-------- src/tilearea.cpp | 22 +++++----- src/tilematrix_type.hpp | 4 +- src/town_cmd.cpp | 18 ++++---- src/train_cmd.cpp | 6 +-- src/tree_cmd.cpp | 18 ++++---- src/tunnel_map.cpp | 4 +- src/tunnelbridge_cmd.cpp | 4 +- src/viewport.cpp | 34 +++++++-------- src/water_cmd.cpp | 8 ++-- 56 files changed, 334 insertions(+), 343 deletions(-) diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 1886db88f8..171260b572 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -529,12 +529,12 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z) Aircraft *u = v->Next(); - int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE); - int safe_y = Clamp(y - 1, 0, MapMaxY() * TILE_SIZE); + int safe_x = Clamp(x, 0, Map::MaxX() * TILE_SIZE); + int safe_y = Clamp(y - 1, 0, Map::MaxY() * TILE_SIZE); u->x_pos = x; u->y_pos = y - ((v->z_pos - GetSlopePixelZ(safe_x, safe_y)) >> 3); - safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE); + safe_y = Clamp(u->y_pos, 0, Map::MaxY() * TILE_SIZE); u->z_pos = GetSlopePixelZ(safe_x, safe_y); u->sprite_cache.sprite_seq.CopyWithoutPalette(v->sprite_cache.sprite_seq); // the shadow is never coloured @@ -696,8 +696,8 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE, */ int GetTileHeightBelowAircraft(const Vehicle *v) { - int safe_x = Clamp(v->x_pos, 0, MapMaxX() * TILE_SIZE); - int safe_y = Clamp(v->y_pos, 0, MapMaxY() * TILE_SIZE); + int safe_x = Clamp(v->x_pos, 0, Map::MaxX() * TILE_SIZE); + int safe_y = Clamp(v->y_pos, 0, Map::MaxY() * TILE_SIZE); return TileHeight(TileVirtXY(safe_x, safe_y)) * TILE_HEIGHT; } @@ -1164,7 +1164,7 @@ static bool HandleCrashedAircraft(Aircraft *v) /* make aircraft crash down to the ground */ if (v->crashed_counter < 500 && st == nullptr && ((v->crashed_counter % 3) == 0) ) { - int z = GetSlopePixelZ(Clamp(v->x_pos, 0, MapMaxX() * TILE_SIZE), Clamp(v->y_pos, 0, MapMaxY() * TILE_SIZE)); + int z = GetSlopePixelZ(Clamp(v->x_pos, 0, Map::MaxX() * TILE_SIZE), Clamp(v->y_pos, 0, Map::MaxY() * TILE_SIZE)); v->z_pos -= 1; if (v->z_pos == z) { v->crashed_counter = 500; diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 9d5a84d955..ba70bdb8e1 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -133,7 +133,7 @@ static int32 ClickChangeMaxHlCheat(int32 p1, int32 p2) /* Check if at least one mountain on the map is higher than the new value. * If yes, disallow the change. */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if ((int32)TileHeight(t) > p1) { ShowErrorMessage(STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN, INVALID_STRING_ID, WL_ERROR); /* Return old, unchanged value */ diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 17711a6267..30edb95069 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -316,8 +316,8 @@ void GenerateClearTile() TileIndex tile; /* add rough tiles */ - i = ScaleByMapSize(GB(Random(), 0, 10) + 0x400); - gi = ScaleByMapSize(GB(Random(), 0, 7) + 0x80); + i = Map::ScaleBySize(GB(Random(), 0, 10) + 0x400); + gi = Map::ScaleBySize(GB(Random(), 0, 7) + 0x80); SetGeneratingWorldProgress(GWP_ROUGH_ROCKY, gi + i); do { diff --git a/src/command_func.h b/src/command_func.h index d78c8229a4..9ccd384dc9 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -152,7 +152,7 @@ public: if constexpr (std::is_same_v>>) { /* Do not even think about executing out-of-bounds tile-commands. */ TileIndex tile = std::get<0>(std::make_tuple(args...)); - if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (flags & DC_ALL_TILES) == 0))) return MakeResult(CMD_ERROR); + if (tile != 0 && (tile >= Map::Size() || (!IsValidTile(tile) && (flags & DC_ALL_TILES) == 0))) return MakeResult(CMD_ERROR); } RecursiveCommandCounter counter{}; @@ -225,7 +225,7 @@ public: if constexpr (std::is_same_v>) { /* Do not even think about executing out-of-bounds tile-commands. */ TileIndex tile = std::get<0>(args); - if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; + if (tile != 0 && (tile >= Map::Size() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; } return InternalPost(err_message, callback, my_cmd, true, location, std::move(args)); @@ -306,7 +306,7 @@ protected: static bool InternalPost(StringID err_message, Tcallback *callback, bool my_cmd, bool network_command, TileIndex tile, std::tuple args) { /* Do not even think about executing out-of-bounds tile-commands. */ - if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; + if (tile != 0 && (tile >= Map::Size() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; auto [err, estimate_only, only_sending] = InternalPostBefore(Tcmd, GetCommandFlags(), tile, err_message, network_command); if (err) return false; diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 7735726729..c36df77014 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -344,7 +344,7 @@ DEF_CONSOLE_CMD(ConScrollToTile) case 1: { uint32 result; if (GetArgumentInteger(&result, argv[arg_index])) { - if (result >= MapSize()) { + if (result >= Map::Size()) { IConsolePrint(CC_ERROR, "Tile does not exist."); return true; } @@ -357,7 +357,7 @@ DEF_CONSOLE_CMD(ConScrollToTile) case 2: { uint32 x, y; if (GetArgumentInteger(&x, argv[arg_index]) && GetArgumentInteger(&y, argv[arg_index + 1])) { - if (x >= MapSizeX() || y >= MapSizeY()) { + if (x >= Map::SizeX() || y >= Map::SizeY()) { IConsolePrint(CC_ERROR, "Tile does not exist."); return true; } @@ -1143,8 +1143,8 @@ DEF_CONSOLE_CMD(ConRestart) } /* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */ - _settings_game.game_creation.map_x = MapLogX(); - _settings_game.game_creation.map_y = MapLogY(); + _settings_game.game_creation.map_x = Map::LogX(); + _settings_game.game_creation.map_y = Map::LogY(); _switch_mode = SM_RESTARTGAME; return true; } @@ -1160,8 +1160,8 @@ DEF_CONSOLE_CMD(ConReload) } /* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */ - _settings_game.game_creation.map_x = MapLogX(); - _settings_game.game_creation.map_y = MapLogY(); + _settings_game.game_creation.map_x = Map::LogX(); + _settings_game.game_creation.map_y = Map::LogY(); _switch_mode = SM_RELOADGAME; return true; } diff --git a/src/disaster_vehicle.cpp b/src/disaster_vehicle.cpp index 4a99ca2544..e91e2fb842 100644 --- a/src/disaster_vehicle.cpp +++ b/src/disaster_vehicle.cpp @@ -191,12 +191,12 @@ void DisasterVehicle::UpdatePosition(int x, int y, int z) DisasterVehicle *u = this->Next(); if (u != nullptr) { - int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE); - int safe_y = Clamp(y - 1, 0, MapMaxY() * TILE_SIZE); + int safe_x = Clamp(x, 0, Map::MaxX() * TILE_SIZE); + int safe_y = Clamp(y - 1, 0, Map::MaxY() * TILE_SIZE); u->x_pos = x; u->y_pos = y - 1 - (std::max(z - GetSlopePixelZ(safe_x, safe_y), 0) >> 3); - safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE); + safe_y = Clamp(u->y_pos, 0, Map::MaxY() * TILE_SIZE); u->z_pos = GetSlopePixelZ(safe_x, safe_y); u->direction = this->direction; @@ -250,7 +250,7 @@ static bool DisasterTick_Zeppeliner(DisasterVehicle *v) } } - if (v->y_pos >= (int)((MapSizeY() + 9) * TILE_SIZE - 1)) { + if (v->y_pos >= (int)((Map::SizeY() + 9) * TILE_SIZE - 1)) { delete v; return false; } @@ -400,7 +400,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v) static void DestructIndustry(Industry *i) { - for (TileIndex tile = 0; tile != MapSize(); tile++) { + for (TileIndex tile = 0; tile != Map::Size(); tile++) { if (i->TileBelongsToIndustry(tile)) { ResetIndustryConstructionStage(tile); MarkTileDirtyByTile(tile); @@ -429,7 +429,7 @@ static bool DisasterTick_Aircraft(DisasterVehicle *v, uint16 image_override, boo GetNewVehiclePosResult gp = GetNewVehiclePos(v); v->UpdatePosition(gp.x, gp.y, GetAircraftFlightLevel(v)); - if ((leave_at_top && gp.x < (-10 * (int)TILE_SIZE)) || (!leave_at_top && gp.x > (int)(MapSizeX() * TILE_SIZE + 9 * TILE_SIZE) - 1)) { + if ((leave_at_top && gp.x < (-10 * (int)TILE_SIZE)) || (!leave_at_top && gp.x > (int)(Map::SizeX() * TILE_SIZE + 9 * TILE_SIZE) - 1)) { delete v; return false; } @@ -465,7 +465,7 @@ static bool DisasterTick_Aircraft(DisasterVehicle *v, uint16 image_override, boo int x = v->x_pos + ((leave_at_top ? -15 : 15) * TILE_SIZE); int y = v->y_pos; - if ((uint)x > MapMaxX() * TILE_SIZE - 1) return true; + if ((uint)x > Map::MaxX() * TILE_SIZE - 1) return true; TileIndex tile = TileVirtXY(x, y); if (!IsTileType(tile, MP_INDUSTRY)) return true; @@ -623,7 +623,7 @@ static bool DisasterTick_Big_Ufo_Destroyer(DisasterVehicle *v) GetNewVehiclePosResult gp = GetNewVehiclePos(v); v->UpdatePosition(gp.x, gp.y, GetAircraftFlightLevel(v)); - if (gp.x > (int)(MapSizeX() * TILE_SIZE + 9 * TILE_SIZE) - 1) { + if (gp.x > (int)(Map::SizeX() * TILE_SIZE + 9 * TILE_SIZE) - 1) { delete v; return false; } @@ -751,7 +751,7 @@ static void Disaster_Small_Ufo_Init() int x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2; DisasterVehicle *v = new DisasterVehicle(x, 0, DIR_SE, ST_SMALL_UFO); - v->dest_tile = TileXY(MapSizeX() / 2, MapSizeY() / 2); + v->dest_tile = TileXY(Map::SizeX() / 2, Map::SizeY() / 2); /* Allocate shadow */ DisasterVehicle *u = new DisasterVehicle(x, 0, DIR_SE, ST_SMALL_UFO_SHADOW); @@ -776,7 +776,7 @@ static void Disaster_Airplane_Init() if (found == nullptr) return; /* Start from the bottom (south side) of the map */ - int x = (MapSizeX() + 9) * TILE_SIZE - 1; + int x = (Map::SizeX() + 9) * TILE_SIZE - 1; int y = TileY(found->location.tile) * TILE_SIZE + 37; DisasterVehicle *v = new DisasterVehicle(x, y, DIR_NE, ST_AIRPLANE); @@ -820,10 +820,10 @@ static void Disaster_Big_Ufo_Init() if (!Vehicle::CanAllocateItem(2)) return; int x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2; - int y = MapMaxX() * TILE_SIZE - 1; + int y = Map::MaxX() * TILE_SIZE - 1; DisasterVehicle *v = new DisasterVehicle(x, y, DIR_NW, ST_BIG_UFO); - v->dest_tile = TileXY(MapSizeX() / 2, MapSizeY() / 2); + v->dest_tile = TileXY(Map::SizeX() / 2, Map::SizeY() / 2); /* Allocate shadow */ DisasterVehicle *u = new DisasterVehicle(x, y, DIR_NW, ST_BIG_UFO_SHADOW); @@ -841,7 +841,7 @@ static void Disaster_Submarine_Init(DisasterSubType subtype) int x = TileX(r) * TILE_SIZE + TILE_SIZE / 2; if (HasBit(r, 31)) { - y = MapMaxY() * TILE_SIZE - TILE_SIZE / 2 - 1; + y = Map::MaxY() * TILE_SIZE - TILE_SIZE / 2 - 1; dir = DIR_NW; } else { y = TILE_SIZE / 2; diff --git a/src/economy.cpp b/src/economy.cpp index 27ab5120f2..4c97feb1cf 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -491,7 +491,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) TileIndex tile = 0; do { ChangeTileOwner(tile, old_owner, new_owner); - } while (++tile != MapSize()); + } while (++tile != Map::Size()); if (new_owner != INVALID_OWNER) { /* Update all signals because there can be new segment that was owned by two companies @@ -510,7 +510,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) } else if (IsLevelCrossingTile(tile) && IsTileOwner(tile, new_owner)) { UpdateLevelCrossing(tile); } - } while (++tile != MapSize()); + } while (++tile != Map::Size()); } /* update signals in buffer */ @@ -903,7 +903,7 @@ void SetPriceBaseMultiplier(Price price, int factor) */ void StartupIndustryDailyChanges(bool init_counter) { - uint map_size = MapLogX() + MapLogY(); + uint map_size = Map::LogX() + Map::LogY(); /* After getting map size, it needs to be scaled appropriately and divided by 31, * which stands for the days in a month. * Using just 31 will make it so that a monthly reset (based on the real number of days of that month) diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp index 9f1f070172..c0ac226953 100644 --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -621,8 +621,8 @@ EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type) */ EffectVehicle *CreateEffectVehicleAbove(int x, int y, int z, EffectVehicleType type) { - int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE); - int safe_y = Clamp(y, 0, MapMaxY() * TILE_SIZE); + int safe_x = Clamp(x, 0, Map::MaxX() * TILE_SIZE); + int safe_y = Clamp(y, 0, Map::MaxY() * TILE_SIZE); return CreateEffectVehicle(x, y, GetSlopePixelZ(safe_x, safe_y) + z, type); } diff --git a/src/genworld.cpp b/src/genworld.cpp index ecdae28860..4ae44b98eb 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -110,8 +110,8 @@ static void _GenerateWorld() /* Make sure the tiles at the north border are void tiles if needed. */ if (_settings_game.construction.freeform_edges) { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); } /* Make the map the height of the setting */ @@ -322,7 +322,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti ShowGenerateWorldProgress(); /* Centre the view on the map */ - ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / 2), true); + ScrollMainWindowToTile(TileXY(Map::SizeX() / 2, Map::SizeY() / 2), true); _GenerateWorld(); } diff --git a/src/heightmap.cpp b/src/heightmap.cpp index ebda86a019..2964a5c129 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -341,12 +341,12 @@ static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map) switch (_settings_game.game_creation.heightmap_rotation) { default: NOT_REACHED(); case HM_COUNTER_CLOCKWISE: - width = MapSizeX(); - height = MapSizeY(); + width = Map::SizeX(); + height = Map::SizeY(); break; case HM_CLOCKWISE: - width = MapSizeY(); - height = MapSizeX(); + width = Map::SizeY(); + height = Map::SizeX(); break; } @@ -361,8 +361,8 @@ static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map) } if (_settings_game.construction.freeform_edges) { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); } /* Form the landscape */ @@ -426,8 +426,8 @@ void FixSlopes() byte current_tile; /* Adjust height difference to maximum one horizontal/vertical change. */ - width = MapSizeX(); - height = MapSizeY(); + width = Map::SizeX(); + height = Map::SizeY(); /* Top and left edge */ for (row = 0; (uint)row < height; row++) { @@ -544,8 +544,8 @@ void LoadHeightmap(DetailedFileType dft, const char *filename) void FlatEmptyWorld(byte tile_height) { int edge_distance = _settings_game.construction.freeform_edges ? 0 : 2; - for (uint row = edge_distance; row < MapSizeY() - edge_distance; row++) { - for (uint col = edge_distance; col < MapSizeX() - edge_distance; col++) { + for (uint row = edge_distance; row < Map::SizeY() - edge_distance; row++) { + for (uint col = edge_distance; col < Map::SizeX() - edge_distance; col++) { SetTileHeight(TileXY(col, row), tile_height); } } diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index c382ed3691..25b47143ca 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1044,7 +1044,7 @@ static void PlantFarmField(TileIndex tile, IndustryID industry) /* check the amount of bad tiles */ int count = 0; for (TileIndex cur_tile : ta) { - assert(cur_tile < MapSize()); + assert(cur_tile < Map::Size()); count += IsSuitableForFarmField(cur_tile, false); } if (count * 2 < ta.w * ta.h) return; @@ -1056,7 +1056,7 @@ static void PlantFarmField(TileIndex tile, IndustryID industry) /* make field */ for (TileIndex cur_tile : ta) { - assert(cur_tile < MapSize()); + assert(cur_tile < Map::Size()); if (IsSuitableForFarmField(cur_tile, true)) { MakeField(cur_tile, field_type, industry); SetClearCounter(cur_tile, counter); @@ -1253,8 +1253,8 @@ static bool CheckScaledDistanceFromEdge(TileIndex tile, uint maxdist) uint maxdist_x = maxdist; uint maxdist_y = maxdist; - if (MapSizeX() > 256) maxdist_x *= MapSizeX() / 256; - if (MapSizeY() > 256) maxdist_y *= MapSizeY() / 256; + if (Map::SizeX() > 256) maxdist_x *= Map::SizeX() / 256; + if (Map::SizeY() > 256) maxdist_y *= Map::SizeY() / 256; if (DistanceFromEdgeDir(tile, DIAGDIR_NE) < maxdist_x) return true; if (DistanceFromEdgeDir(tile, DIAGDIR_NW) < maxdist_y) return true; @@ -1604,7 +1604,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags, TileArea ta(tile + TileDiffXY(-_settings_game.construction.industry_platform, -_settings_game.construction.industry_platform), max_x + 2 + 2 * _settings_game.construction.industry_platform, max_y + 2 + 2 * _settings_game.construction.industry_platform); - if (TileX(ta.tile) + ta.w >= MapMaxX() || TileY(ta.tile) + ta.h >= MapMaxY()) return false; + if (TileX(ta.tile) + ta.w >= Map::MaxX() || TileY(ta.tile) + ta.h >= Map::MaxY()) return false; /* _current_company is OWNER_NONE for randomly generated industries and in editor, or the company who funded or prospected the industry. * Perform terraforming as OWNER_TOWN to disable autoslope and town ratings. */ @@ -2190,7 +2190,7 @@ static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *forc chance *= 16; // to increase precision /* We want industries appearing at coast to appear less often on bigger maps, as length of coast increases slower than map area. * For simplicity we scale in both cases, though scaling the probabilities of all industries has no effect. */ - chance = (ind_spc->check_proc == CHECK_REFINERY || ind_spc->check_proc == CHECK_OIL_RIG) ? ScaleByMapSize1D(chance) : ScaleByMapSize(chance); + chance = (ind_spc->check_proc == CHECK_REFINERY || ind_spc->check_proc == CHECK_OIL_RIG) ? Map::ScaleBySize1D(chance) : Map::ScaleBySize(chance); *force_at_least_one = (chance > 0) && !(ind_spc->behaviour & INDUSTRYBEH_NOBUILT_MAPCREATION) && (_game_mode != GM_EDITOR); return chance; @@ -2245,7 +2245,7 @@ static uint GetNumberOfIndustries() if (difficulty == ID_CUSTOM) return std::min(IndustryPool::MAX_SIZE, _settings_game.game_creation.custom_industry_number); - return std::min(IndustryPool::MAX_SIZE, ScaleByMapSize(numof_industry_table[difficulty])); + return std::min(IndustryPool::MAX_SIZE, Map::ScaleBySize(numof_industry_table[difficulty])); } /** @@ -2321,9 +2321,9 @@ void IndustryBuildData::MonthlyLoop() /* To prevent running out of unused industries for the player to connect, * add a fraction of new industries each month, but only if the manager can keep up. */ - uint max_behind = 1 + std::min(99u, ScaleByMapSize(3)); // At most 2 industries for small maps, and 100 at the biggest map (about 6 months industry build attempts). + uint max_behind = 1 + std::min(99u, Map::ScaleBySize(3)); // At most 2 industries for small maps, and 100 at the biggest map (about 6 months industry build attempts). if (GetCurrentTotalNumberOfIndustries() + max_behind >= (this->wanted_inds >> 16)) { - this->wanted_inds += ScaleByMapSize(NEWINDS_PER_MONTH); + this->wanted_inds += Map::ScaleBySize(NEWINDS_PER_MONTH); } } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index b87d125196..61c99e1e40 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -614,7 +614,7 @@ public: for (Industry *industry : Industry::Iterate()) delete industry; /* Clear farmland. */ - for (TileIndex tile = 0; tile < MapSize(); tile++) { + for (TileIndex tile = 0; tile < Map::Size(); tile++) { if (IsTileType(tile, MP_CLEAR) && GetRawClearGround(tile) == CLEAR_FIELDS) { MakeClear(tile, CLEAR_GRASS, 3); } diff --git a/src/landscape.cpp b/src/landscape.cpp index efee6be234..eacac6be24 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -113,8 +113,8 @@ Point InverseRemapCoords2(int x, int y, bool clamp_to_map, bool *clamped) Point pt = InverseRemapCoords(x, y); const uint min_coord = _settings_game.construction.freeform_edges ? TILE_SIZE : 0; - const uint max_x = MapMaxX() * TILE_SIZE - 1; - const uint max_y = MapMaxY() * TILE_SIZE - 1; + const uint max_x = Map::MaxX() * TILE_SIZE - 1; + const uint max_y = Map::MaxY() * TILE_SIZE - 1; if (clamp_to_map) { /* Bring the coordinates near to a valid range. At the top we allow a number @@ -360,7 +360,7 @@ int GetSlopePixelZ(int x, int y) */ int GetSlopePixelZOutsideMap(int x, int y) { - if (IsInsideBS(x, 0, MapSizeX() * TILE_SIZE) && IsInsideBS(y, 0, MapSizeY() * TILE_SIZE)) { + if (IsInsideBS(x, 0, Map::SizeX() * TILE_SIZE) && IsInsideBS(y, 0, Map::SizeY() * TILE_SIZE)) { return GetSlopePixelZ(x, y); } else { return _tile_type_procs[MP_VOID]->get_slope_z_proc(INVALID_TILE, x, y); @@ -748,7 +748,7 @@ CommandCost CmdLandscapeClear(DoCommandFlag flags, TileIndex tile) */ std::tuple CmdClearArea(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal) { - if (start_tile >= MapSize()) return { CMD_ERROR, 0 }; + if (start_tile >= Map::Size()) return { CMD_ERROR, 0 }; Money money = GetAvailableMoneyForCommand(); CommandCost cost(EXPENSES_CONSTRUCTION); @@ -816,10 +816,10 @@ void RunTileLoop() 0xD8F, 0x1296, 0x2496, 0x4357, 0x8679, 0x1030E, 0x206CD, 0x403FE, 0x807B8, 0x1004B2, 0x2006A8, 0x4004B2, 0x800B87 }; static_assert(lengthof(feedbacks) == 2 * MAX_MAP_SIZE_BITS - 2 * MIN_MAP_SIZE_BITS + 1); - const uint32 feedback = feedbacks[MapLogX() + MapLogY() - 2 * MIN_MAP_SIZE_BITS]; + const uint32 feedback = feedbacks[Map::LogX() + Map::LogY() - 2 * MIN_MAP_SIZE_BITS]; /* We update every tile every 256 ticks, so divide the map size by 2^8 = 256 */ - uint count = 1 << (MapLogX() + MapLogY() - 8); + uint count = 1 << (Map::LogX() + Map::LogY() - 8); TileIndex tile = _cur_tileloop_tile; /* The LFSR cannot have a zeroed state. */ @@ -843,8 +843,8 @@ void RunTileLoop() void InitializeLandscape() { - for (uint y = _settings_game.construction.freeform_edges ? 1 : 0; y < MapMaxY(); y++) { - for (uint x = _settings_game.construction.freeform_edges ? 1 : 0; x < MapMaxX(); x++) { + for (uint y = _settings_game.construction.freeform_edges ? 1 : 0; y < Map::MaxY(); y++) { + for (uint x = _settings_game.construction.freeform_edges ? 1 : 0; x < Map::MaxX(); x++) { MakeClear(TileXY(x, y), CLEAR_GRASS, 3); SetTileHeight(TileXY(x, y), 0); SetTropicZone(TileXY(x, y), TROPICZONE_NORMAL); @@ -852,8 +852,8 @@ void InitializeLandscape() } } - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, MapMaxY())); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(MapMaxX(), y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, Map::MaxY())); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(Map::MaxX(), y)); } static const byte _genterrain_tbl_1[5] = { 10, 22, 33, 37, 4 }; @@ -866,8 +866,8 @@ static void GenerateTerrain(int type, uint flag) const Sprite *templ = GetSprite((((r >> 24) * _genterrain_tbl_1[type]) >> 8) + _genterrain_tbl_2[type] + 4845, ST_MAPGEN); if (templ == nullptr) usererror("Map generator sprites could not be loaded"); - uint x = r & MapMaxX(); - uint y = (r >> MapLogX()) & MapMaxY(); + uint x = r & Map::MaxX(); + uint y = (r >> Map::LogX()) & Map::MaxY(); uint edge_distance = 1 + (_settings_game.construction.freeform_edges ? 1 : 0); if (x <= edge_distance || y <= edge_distance) return; @@ -881,14 +881,14 @@ static void GenerateTerrain(int type, uint flag) const byte *p = templ->data; if ((flag & 4) != 0) { - uint xw = x * MapSizeY(); - uint yw = y * MapSizeX(); - uint bias = (MapSizeX() + MapSizeY()) * 16; + uint xw = x * Map::SizeY(); + uint yw = y * Map::SizeX(); + uint bias = (Map::SizeX() + Map::SizeY()) * 16; switch (flag & 3) { default: NOT_REACHED(); case 0: - if (xw + yw > MapSize() - bias) return; + if (xw + yw > Map::Size() - bias) return; break; case 1: @@ -896,7 +896,7 @@ static void GenerateTerrain(int type, uint flag) break; case 2: - if (xw + yw < MapSize() + bias) return; + if (xw + yw < Map::Size() + bias) return; break; case 3: @@ -905,8 +905,8 @@ static void GenerateTerrain(int type, uint flag) } } - if (x + w >= MapMaxX()) return; - if (y + h >= MapMaxY()) return; + if (x + w >= Map::MaxX()) return; + if (y + h >= Map::MaxY()) return; TileIndex tile = TileXY(x, y); @@ -973,10 +973,10 @@ static void GenerateTerrain(int type, uint flag) static void CreateDesertOrRainForest(uint desert_tropic_line) { - TileIndex update_freq = MapSize() / 4; + TileIndex update_freq = Map::Size() / 4; const TileIndexDiffC *data; - for (TileIndex tile = 0; tile != MapSize(); ++tile) { + for (TileIndex tile = 0; tile != Map::Size(); ++tile) { if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE); if (!IsValidTile(tile)) continue; @@ -997,7 +997,7 @@ static void CreateDesertOrRainForest(uint desert_tropic_line) RunTileLoop(); } - for (TileIndex tile = 0; tile != MapSize(); ++tile) { + for (TileIndex tile = 0; tile != Map::Size(); ++tile) { if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE); if (!IsValidTile(tile)) continue; @@ -1454,7 +1454,7 @@ static void CreateRivers() int amount = _settings_game.game_creation.amount_of_rivers; if (amount == 0) return; - uint wells = ScaleByMapSize(4 << _settings_game.game_creation.amount_of_rivers); + uint wells = Map::ScaleBySize(4 << _settings_game.game_creation.amount_of_rivers); const uint num_short_rivers = wells - std::max(1u, wells / 10); SetGeneratingWorldProgress(GWP_RIVER, wells + 256 / 64); // Include the tile loop calls below. @@ -1520,7 +1520,7 @@ static uint CalculateCoverageLine(uint coverage, uint edge_multiplier) std::array edge_histogram = {}; /* Build a histogram of the map height. */ - for (TileIndex tile = 0; tile < MapSize(); tile++) { + for (TileIndex tile = 0; tile < Map::Size(); tile++) { uint h = TileHeight(tile); histogram[h]++; @@ -1536,7 +1536,7 @@ static uint CalculateCoverageLine(uint coverage, uint edge_multiplier) } /* The amount of land we have is the map size minus the first (sea) layer. */ - uint land_tiles = MapSize() - histogram[0]; + uint land_tiles = Map::Size() - histogram[0]; int best_score = land_tiles; /* Our goal is the coverage amount of the land-mass. */ @@ -1619,19 +1619,19 @@ void GenerateLandscape(byte mode) } else { SetGeneratingWorldProgress(GWP_LANDSCAPE, steps + GLS_ORIGINAL); if (_settings_game.construction.freeform_edges) { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); } switch (_settings_game.game_creation.landscape) { case LT_ARCTIC: { uint32 r = Random(); - for (uint i = ScaleByMapSize(GB(r, 0, 7) + 950); i != 0; --i) { + for (uint i = Map::ScaleBySize(GB(r, 0, 7) + 950); i != 0; --i) { GenerateTerrain(2, 0); } uint flag = GB(r, 7, 2) | 4; - for (uint i = ScaleByMapSize(GB(r, 9, 7) + 450); i != 0; --i) { + for (uint i = Map::ScaleBySize(GB(r, 9, 7) + 450); i != 0; --i) { GenerateTerrain(4, flag); } break; @@ -1640,18 +1640,18 @@ void GenerateLandscape(byte mode) case LT_TROPIC: { uint32 r = Random(); - for (uint i = ScaleByMapSize(GB(r, 0, 7) + 170); i != 0; --i) { + for (uint i = Map::ScaleBySize(GB(r, 0, 7) + 170); i != 0; --i) { GenerateTerrain(0, 0); } uint flag = GB(r, 7, 2) | 4; - for (uint i = ScaleByMapSize(GB(r, 9, 8) + 1700); i != 0; --i) { + for (uint i = Map::ScaleBySize(GB(r, 9, 8) + 1700); i != 0; --i) { GenerateTerrain(0, flag); } flag ^= 2; - for (uint i = ScaleByMapSize(GB(r, 17, 7) + 410); i != 0; --i) { + for (uint i = Map::ScaleBySize(GB(r, 17, 7) + 410); i != 0; --i) { GenerateTerrain(3, flag); } break; @@ -1661,7 +1661,7 @@ void GenerateLandscape(byte mode) uint32 r = Random(); assert(_settings_game.difficulty.quantity_sea_lakes != CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY); - uint i = ScaleByMapSize(GB(r, 0, 7) + (3 - _settings_game.difficulty.quantity_sea_lakes) * 256 + 100); + uint i = Map::ScaleBySize(GB(r, 0, 7) + (3 - _settings_game.difficulty.quantity_sea_lakes) * 256 + 100); for (; i != 0; --i) { /* Make sure we do not overflow. */ GenerateTerrain(Clamp(_settings_game.difficulty.terrain_type, 0, 3), 0); diff --git a/src/linkgraph/demands.cpp b/src/linkgraph/demands.cpp index c31e8896f6..6fc529c497 100644 --- a/src/linkgraph/demands.cpp +++ b/src/linkgraph/demands.cpp @@ -256,7 +256,7 @@ void DemandCalculator::CalcDemand(LinkGraphJob &job, Tscaler scaler) * @param job Job to calculate the demands for. */ DemandCalculator::DemandCalculator(LinkGraphJob &job) : - max_distance(DistanceMaxPlusManhattan(TileXY(0,0), TileXY(MapMaxX(), MapMaxY()))) + max_distance(DistanceMaxPlusManhattan(TileXY(0,0), TileXY(Map::MaxX(), Map::MaxY()))) { const LinkGraphSettings &settings = job.Settings(); CargoID cargo = job.Cargo(); diff --git a/src/map.cpp b/src/map.cpp index a376d2d32e..98bf6eb614 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -73,14 +73,14 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add, uint x; uint y; - dx = add & MapMaxX(); - if (dx >= (int)MapSizeX() / 2) dx -= MapSizeX(); - dy = (add - dx) / (int)MapSizeX(); + dx = add & Map::MaxX(); + if (dx >= (int)Map::SizeX() / 2) dx -= Map::SizeX(); + dy = (add - dx) / (int)Map::SizeX(); x = TileX(tile) + dx; y = TileY(tile) + dy; - if (x >= MapSizeX() || y >= MapSizeY()) { + if (x >= Map::SizeX() || y >= Map::SizeY()) { char buf[512]; seprintf(buf, lastof(buf), "TILE_ADD(%s) when adding 0x%.4X and 0x%.4X failed", @@ -120,7 +120,7 @@ TileIndex TileAddWrap(TileIndex tile, int addx, int addy) if ((x == 0 || y == 0) && _settings_game.construction.freeform_edges) return INVALID_TILE; /* Are we about to wrap? */ - if (x >= MapMaxX() || y >= MapMaxY()) return INVALID_TILE; + if (x >= Map::MaxX() || y >= Map::MaxY()) return INVALID_TILE; return TileXY(x, y); } @@ -218,8 +218,8 @@ uint DistanceFromEdge(TileIndex tile) { const uint xl = TileX(tile); const uint yl = TileY(tile); - const uint xh = MapSizeX() - 1 - xl; - const uint yh = MapSizeY() - 1 - yl; + const uint xh = Map::SizeX() - 1 - xl; + const uint yh = Map::SizeY() - 1 - yl; const uint minl = std::min(xl, yl); const uint minh = std::min(xh, yh); return std::min(minl, minh); @@ -236,8 +236,8 @@ uint DistanceFromEdgeDir(TileIndex tile, DiagDirection dir) switch (dir) { case DIAGDIR_NE: return TileX(tile) - (_settings_game.construction.freeform_edges ? 1 : 0); case DIAGDIR_NW: return TileY(tile) - (_settings_game.construction.freeform_edges ? 1 : 0); - case DIAGDIR_SW: return MapMaxX() - TileX(tile) - 1; - case DIAGDIR_SE: return MapMaxY() - TileY(tile) - 1; + case DIAGDIR_SW: return Map::MaxX() - TileX(tile) - 1; + case DIAGDIR_SE: return Map::MaxY() - TileY(tile) - 1; default: NOT_REACHED(); } } @@ -307,7 +307,7 @@ bool CircularTileSearch(TileIndex *tile, uint radius, uint w, uint h, TestTileOn for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { /* Is the tile within the map? */ for (uint j = extent[dir] + n * 2 + 1; j != 0; j--) { - if (x < MapSizeX() && y < MapSizeY()) { + if (x < Map::SizeX() && y < Map::SizeY()) { TileIndex t = TileXY(x, y); /* Is the callback successful? */ if (proc(t, user_data)) { @@ -346,8 +346,8 @@ uint GetClosestWaterDistance(TileIndex tile, bool water) int x = TileX(tile); int y = TileY(tile); - uint max_x = MapMaxX(); - uint max_y = MapMaxY(); + uint max_x = Map::MaxX(); + uint max_y = Map::MaxY(); uint min_xy = _settings_game.construction.freeform_edges ? 1 : 0; /* go in a 'spiral' with increasing manhattan distance in each iteration */ @@ -378,7 +378,7 @@ uint GetClosestWaterDistance(TileIndex tile, bool water) if (!water) { /* no land found - is this a water-only map? */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (!IsTileType(t, MP_VOID) && !IsTileType(t, MP_WATER)) return 0x1FF; } } diff --git a/src/map_func.h b/src/map_func.h index 69f41a12a1..c5f5f8680a 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -146,15 +146,6 @@ struct Map { }; static inline void AllocateMap(uint size_x, uint size_y) { Map::Allocate(size_x, size_y); } -static inline uint MapLogX() { return Map::LogX(); } -static inline uint MapLogY() { return Map::LogY(); } -static inline uint MapSizeX() { return Map::SizeX(); } -static inline uint MapSizeY() { return Map::SizeY(); } -static inline uint MapSize() { return Map::Size(); } -static inline uint MapMaxX() { return Map::MaxX(); } -static inline uint MapMaxY() { return Map::MaxY(); } -static inline uint ScaleByMapSize(uint n) { return Map::ScaleBySize(n); } -static inline uint ScaleByMapSize1D(uint n) { return Map::ScaleBySize1D(n); } /** * An offset value between two tiles. @@ -177,7 +168,7 @@ typedef int32 TileIndexDiff; */ static inline TileIndex TileXY(uint x, uint y) { - return (y << MapLogX()) + x; + return (y << Map::LogX()) + x; } /** @@ -197,7 +188,7 @@ static inline TileIndexDiff TileDiffXY(int x, int y) * 0 << shift isn't optimized to 0 properly. * Typically x and y are constants, and then this doesn't result * in any actual multiplication in the assembly code.. */ - return (y * MapSizeX()) + x; + return (y * Map::SizeX()) + x; } /** @@ -208,7 +199,7 @@ static inline TileIndexDiff TileDiffXY(int x, int y) */ static inline TileIndex TileVirtXY(uint x, uint y) { - return (y >> 4 << MapLogX()) + (x >> 4); + return (y >> 4 << Map::LogX()) + (x >> 4); } @@ -219,7 +210,7 @@ static inline TileIndex TileVirtXY(uint x, uint y) */ static inline uint TileX(TileIndex tile) { - return tile.value & MapMaxX(); + return tile.value & Map::MaxX(); } /** @@ -229,7 +220,7 @@ static inline uint TileX(TileIndex tile) */ static inline uint TileY(TileIndex tile) { - return tile.value >> MapLogX(); + return tile.value >> Map::LogX(); } /** @@ -244,7 +235,7 @@ static inline uint TileY(TileIndex tile) */ static inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc) { - return (tidc.y << MapLogX()) + tidc.x; + return (tidc.y << Map::LogX()) + tidc.x; } @@ -317,7 +308,7 @@ static inline TileIndex AddTileIndexDiffCWrap(TileIndex tile, TileIndexDiffC dif int x = TileX(tile) + diff.x; int y = TileY(tile) + diff.y; /* Negative value will become big positive value after cast */ - if ((uint)x >= MapSizeX() || (uint)y >= MapSizeY()) return INVALID_TILE; + if ((uint)x >= Map::SizeX() || (uint)y >= Map::SizeY()) return INVALID_TILE; return TileXY(x, y); } diff --git a/src/network/core/game_info.cpp b/src/network/core/game_info.cpp index 7dbf7c4b70..4cbcb31ba7 100644 --- a/src/network/core/game_info.cpp +++ b/src/network/core/game_info.cpp @@ -126,8 +126,8 @@ void FillStaticNetworkServerGameInfo() _network_game_info.start_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1); _network_game_info.clients_max = _settings_client.network.max_clients; _network_game_info.companies_max = _settings_client.network.max_companies; - _network_game_info.map_width = MapSizeX(); - _network_game_info.map_height = MapSizeY(); + _network_game_info.map_width = Map::SizeX(); + _network_game_info.map_height = Map::SizeY(); _network_game_info.landscape = _settings_game.game_creation.landscape; _network_game_info.dedicated = _network_dedicated; _network_game_info.grfconfig = _grfconfig; diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 6729ece6c3..4a2baa3f23 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -178,8 +178,8 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() p->Send_uint32(_settings_game.game_creation.generation_seed); p->Send_uint8 (_settings_game.game_creation.landscape); p->Send_uint32(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1)); - p->Send_uint16(MapSizeX()); - p->Send_uint16(MapSizeY()); + p->Send_uint16(Map::SizeX()); + p->Send_uint16(Map::SizeY()); this->SendPacket(p); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 60dc364b6d..d5a2c02f58 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -7076,8 +7076,8 @@ static uint32 GetPatchVariable(uint8 param) */ case 0x13: { byte map_bits = 0; - byte log_X = MapLogX() - 6; // subtraction is required to make the minimal size (64) zero based - byte log_Y = MapLogY() - 6; + byte log_X = Map::LogX() - 6; // subtraction is required to make the minimal size (64) zero based + byte log_Y = Map::LogY() - 6; byte max_edge = std::max(log_X, log_Y); if (log_X == log_Y) { // we have a squared map, since both edges are identical diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index df400145d5..e72b3a7e85 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -143,8 +143,8 @@ bool AirportSpec::IsWithinMapBounds(byte table, TileIndex tile) const byte h = this->size_y; if (this->rotation[table] == DIR_E || this->rotation[table] == DIR_W) Swap(w, h); - return TileX(tile) + w < MapSizeX() && - TileY(tile) + h < MapSizeY(); + return TileX(tile) + w < Map::SizeX() && + TileY(tile) + h < Map::SizeY(); } /** diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index b5fe6f561d..e27b4a600a 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -386,7 +386,7 @@ CommandCost CmdBuildObject(DoCommandFlag flags, TileIndex tile, ObjectType type, */ CommandCost CmdBuildObjectArea(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, ObjectType type, uint8 view, bool diagonal) { - if (start_tile >= MapSize()) return CMD_ERROR; + if (start_tile >= Map::Size()) return CMD_ERROR; if (type >= NUM_OBJECTS) return CMD_ERROR; const ObjectSpec *spec = ObjectSpec::Get(type); @@ -735,8 +735,8 @@ static bool HasTransmitter(TileIndex tile, void *user) */ static bool TryBuildLightHouse() { - uint maxx = MapMaxX(); - uint maxy = MapMaxY(); + uint maxx = Map::MaxX(); + uint maxy = Map::MaxY(); uint r = Random(); /* Scatter the lighthouses more evenly around the perimeter */ @@ -762,7 +762,7 @@ static bool TryBuildLightHouse() int h; if (IsTileType(tile, MP_CLEAR) && IsTileFlat(tile, &h) && h <= 2 && !IsBridgeAbove(tile)) { BuildObject(OBJECT_LIGHTHOUSE, tile); - assert(tile < MapSize()); + assert(tile < Map::Size()); return true; } tile += TileOffsByDiagDir(dir); @@ -797,13 +797,13 @@ void GenerateObjects() /* Determine number of water tiles at map border needed for freeform_edges */ uint num_water_tiles = 0; if (_settings_game.construction.freeform_edges) { - for (uint x = 0; x < MapMaxX(); x++) { + for (uint x = 0; x < Map::MaxX(); x++) { if (IsTileType(TileXY(x, 1), MP_WATER)) num_water_tiles++; - if (IsTileType(TileXY(x, MapMaxY() - 1), MP_WATER)) num_water_tiles++; + if (IsTileType(TileXY(x, Map::MaxY() - 1), MP_WATER)) num_water_tiles++; } - for (uint y = 1; y < MapMaxY() - 1; y++) { + for (uint y = 1; y < Map::MaxY() - 1; y++) { if (IsTileType(TileXY(1, y), MP_WATER)) num_water_tiles++; - if (IsTileType(TileXY(MapMaxX() - 1, y), MP_WATER)) num_water_tiles++; + if (IsTileType(TileXY(Map::MaxX() - 1, y), MP_WATER)) num_water_tiles++; } } @@ -821,15 +821,15 @@ void GenerateObjects() /* Scale the amount of lighthouses with the amount of land at the borders. * The -6 is because the top borders are MP_VOID (-2) and all corners * are counted twice (-4). */ - amount = ScaleByMapSize1D(amount * num_water_tiles) / (2 * MapMaxY() + 2 * MapMaxX() - 6); + amount = Map::ScaleBySize1D(amount * num_water_tiles) / (2 * Map::MaxY() + 2 * Map::MaxX() - 6); } else if (spec->flags & OBJECT_FLAG_SCALE_BY_WATER) { - amount = ScaleByMapSize1D(amount); + amount = Map::ScaleBySize1D(amount); } else { - amount = ScaleByMapSize(amount); + amount = Map::ScaleBySize(amount); } /* Now try to place the requested amount of this object */ - for (uint j = ScaleByMapSize(1000); j != 0 && amount != 0 && Object::CanAllocateItem(); j--) { + for (uint j = Map::ScaleBySize(1000); j != 0 && amount != 0 && Object::CanAllocateItem(); j--) { switch (i) { case OBJECT_TRANSMITTER: if (TryBuildTransmitter()) amount--; diff --git a/src/object_gui.cpp b/src/object_gui.cpp index cdbfdc70de..784e74607c 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -575,8 +575,8 @@ public: if (!_settings_game.construction.freeform_edges) { /* When end_tile is MP_VOID, the error tile will not be visible to the * user. This happens when terraforming at the southern border. */ - if (TileX(end_tile) == MapMaxX()) end_tile += TileDiffXY(-1, 0); - if (TileY(end_tile) == MapMaxY()) end_tile += TileDiffXY(0, -1); + if (TileX(end_tile) == Map::MaxX()) end_tile += TileDiffXY(-1, 0); + if (TileY(end_tile) == Map::MaxY()) end_tile += TileDiffXY(0, -1); } const ObjectSpec *spec = ObjectClass::Get(_selected_object_class)->GetSpec(_selected_object_index); Command::Post(STR_ERROR_CAN_T_BUILD_OBJECT, CcPlaySound_CONSTRUCTION_OTHER, diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index eda42d1620..75cc0a7c82 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -883,7 +883,7 @@ static CommandCost CmdRailTrackHelper(DoCommandFlag flags, TileIndex tile, TileI CommandCost total_cost(EXPENSES_CONSTRUCTION); if ((!remove && !ValParamRailtype(railtype)) || !ValParamTrackOrientation(track)) return CMD_ERROR; - if (end_tile >= MapSize() || tile >= MapSize()) return CMD_ERROR; + if (end_tile >= Map::Size() || tile >= Map::Size()) return CMD_ERROR; Trackdir trackdir = TrackToTrackdir(track); @@ -1244,7 +1244,7 @@ static CommandCost CmdSignalTrackHelper(DoCommandFlag flags, TileIndex tile, Til { CommandCost total_cost(EXPENSES_CONSTRUCTION); - if (end_tile >= MapSize() || !ValParamTrackOrientation(track)) return CMD_ERROR; + if (end_tile >= Map::Size() || !ValParamTrackOrientation(track)) return CMD_ERROR; if (signal_density == 0 || signal_density > 20) return CMD_ERROR; if (!remove && (sigtype > SIGTYPE_LAST || sigvar > SIG_SEMAPHORE)) return CMD_ERROR; @@ -1540,7 +1540,7 @@ CommandCost CmdConvertRail(DoCommandFlag flags, TileIndex tile, TileIndex area_s TileIndex area_end = tile; if (!ValParamRailtype(totype)) return CMD_ERROR; - if (area_start >= MapSize()) return CMD_ERROR; + if (area_start >= Map::Size()) return CMD_ERROR; TrainList affected_trains; diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 20679dfb44..f0039753b7 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -2156,7 +2156,7 @@ static void SetDefaultRailGui() /* Find the most used rail type */ uint count[RAILTYPE_END]; memset(count, 0, sizeof(count)); - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) || (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL)) { count[GetRailType(t)]++; diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index dbfc00494a..d7bb06bf8c 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -979,7 +979,7 @@ static bool CanConnectToRoad(TileIndex tile, RoadType rt, DiagDirection dir) */ CommandCost CmdBuildLongRoad(DoCommandFlag flags, TileIndex end_tile, TileIndex start_tile, RoadType rt, Axis axis, DisallowedRoadDirections drd, bool start_half, bool end_half, bool is_ai) { - if (start_tile >= MapSize()) return CMD_ERROR; + if (start_tile >= Map::Size()) return CMD_ERROR; if (!ValParamRoadType(rt) || !IsValidAxis(axis) || !IsValidDisallowedRoadDirections(drd)) return CMD_ERROR; @@ -1077,7 +1077,7 @@ std::tuple CmdRemoveLongRoad(DoCommandFlag flags, TileIndex { CommandCost cost(EXPENSES_CONSTRUCTION); - if (start_tile >= MapSize()) return { CMD_ERROR, 0 }; + if (start_tile >= Map::Size()) return { CMD_ERROR, 0 }; if (!ValParamRoadType(rt) || !IsValidAxis(axis)) return { CMD_ERROR, 0 }; /* Only drag in X or Y direction dictated by the direction variable */ @@ -1725,7 +1725,7 @@ static void DrawTile_Road(TileInfo *ti) uint adjacent_diagdirs = 0; for (DiagDirection dir : { dir1, dir2 }) { const TileIndex t = TileAddByDiagDir(ti->tile, dir); - if (t < MapSize() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == road_axis) { + if (t < Map::Size() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == road_axis) { SetBit(adjacent_diagdirs, dir); } } @@ -1873,7 +1873,7 @@ void UpdateNearestTownForRoadTiles(bool invalidate) { assert(!invalidate || _generating_world); - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (IsTileType(t, MP_ROAD) && !IsRoadDepot(t) && !HasTownOwnedRoad(t)) { TownID tid = INVALID_TOWN; if (!invalidate) { @@ -2391,7 +2391,7 @@ CommandCost CmdConvertRoad(DoCommandFlag flags, TileIndex tile, TileIndex area_s TileIndex area_end = tile; if (!ValParamRoadType(to_type)) return CMD_ERROR; - if (area_start >= MapSize()) return CMD_ERROR; + if (area_start >= Map::Size()) return CMD_ERROR; RoadVehicleList affected_rvs; RoadTramType rtt = GetRoadTramType(to_type); diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index b8f80d1685..b1eafabbf3 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -93,7 +93,7 @@ void SetWaterClassDependingOnSurroundings(TileIndex t, bool include_invalid_wate /* Mark tile dirty in all cases */ MarkTileDirtyByTile(t); - if (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == MapMaxX() - 1 || TileY(t) == MapMaxY() - 1) { + if (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == Map::MaxX() - 1 || TileY(t) == Map::MaxY() - 1) { /* tiles at map borders are always WATER_CLASS_SEA */ SetWaterClass(t, WATER_CLASS_SEA); return; @@ -150,7 +150,7 @@ void SetWaterClassDependingOnSurroundings(TileIndex t, bool include_invalid_wate static void ConvertTownOwner() { - for (TileIndex tile = 0; tile != MapSize(); tile++) { + for (TileIndex tile = 0; tile != Map::Size(); tile++) { switch (GetTileType(tile)) { case MP_ROAD: if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) { @@ -203,8 +203,8 @@ static void UpdateCurrencies() */ static void UpdateVoidTiles() { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, MapMaxY())); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(MapMaxX(), y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, Map::MaxY())); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(Map::MaxX(), y)); } static inline RailType UpdateRailType(RailType rt, RailType min) @@ -564,7 +564,7 @@ bool AfterLoadGame() { SetSignalHandlers(); - TileIndex map_size = MapSize(); + TileIndex map_size = Map::Size(); extern TileIndex _cur_tileloop_tile; // From landscape.cpp. /* The LFSR used in RunTileLoop iteration cannot have a zeroed state, make it non-zeroed. */ @@ -838,7 +838,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_72)) { /* Locks in very old savegames had OWNER_WATER as owner */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { switch (GetTileType(t)) { default: break; @@ -1833,7 +1833,7 @@ bool AfterLoadGame() for (TileIndex t = 0; t < map_size; t++) { /* skip oil rigs at borders! */ if ((IsTileType(t, MP_WATER) || IsBuoyTile(t)) && - (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == MapMaxX() - 1 || TileY(t) == MapMaxY() - 1)) { + (TileX(t) == 0 || TileY(t) == 0 || TileX(t) == Map::MaxX() - 1 || TileY(t) == Map::MaxY() - 1)) { /* Some version 86 savegames have wrong water class at map borders (under buoy, or after removing buoy). * This conversion has to be done before buoys with invalid owner are removed. */ SetWaterClass(t, WATER_CLASS_SEA); @@ -3197,7 +3197,7 @@ bool AfterLoadGame() } /* Refresh all level crossings to bar adjacent crossing tiles. */ - for (TileIndex tile = 0; tile < MapSize(); tile++) { + for (TileIndex tile = 0; tile < Map::Size(); tile++) { if (IsLevelCrossingTile(tile)) UpdateLevelCrossing(tile, false, true); } } diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index cc8a9f9cb6..9b3546c257 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -106,7 +106,7 @@ void AfterLoadCompanyStats() } Company *c; - for (TileIndex tile = 0; tile < MapSize(); tile++) { + for (TileIndex tile = 0; tile < Map::Size(); tile++) { switch (GetTileType(tile)) { case MP_RAILWAY: c = Company::GetIfValid(GetTileOwner(tile)); diff --git a/src/saveload/labelmaps_sl.cpp b/src/saveload/labelmaps_sl.cpp index 432aa9ce48..1fcbc21a70 100644 --- a/src/saveload/labelmaps_sl.cpp +++ b/src/saveload/labelmaps_sl.cpp @@ -52,7 +52,7 @@ void AfterLoadLabelMaps() railtype_conversion_map.push_back(r); } - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { switch (GetTileType(t)) { case MP_RAILWAY: SetRailType(t, railtype_conversion_map[GetRailType(t)]); diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index 07a36d6a38..8adbf7175f 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -34,8 +34,8 @@ struct MAPSChunkHandler : ChunkHandler { { SlTableHeader(_map_desc); - _map_dim_x = MapSizeX(); - _map_dim_y = MapSizeY(); + _map_dim_x = Map::SizeX(); + _map_dim_y = Map::SizeY(); SlSetArrayIndex(0); SlGlobList(_map_desc); @@ -73,7 +73,7 @@ struct MAPTChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -84,7 +84,7 @@ struct MAPTChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -100,7 +100,7 @@ struct MAPHChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -111,7 +111,7 @@ struct MAPHChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -127,7 +127,7 @@ struct MAPOChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -138,7 +138,7 @@ struct MAPOChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -154,7 +154,7 @@ struct MAP2ChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, @@ -168,7 +168,7 @@ struct MAP2ChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size * sizeof(uint16)); for (TileIndex i = 0; i != size;) { @@ -184,7 +184,7 @@ struct M3LOChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -195,7 +195,7 @@ struct M3LOChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -211,7 +211,7 @@ struct M3HIChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -222,7 +222,7 @@ struct M3HIChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -238,7 +238,7 @@ struct MAP5ChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -249,7 +249,7 @@ struct MAP5ChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -265,7 +265,7 @@ struct MAPEChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); if (IsSavegameVersionBefore(SLV_42)) { for (TileIndex i = 0; i != size;) { @@ -289,7 +289,7 @@ struct MAPEChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -305,7 +305,7 @@ struct MAP7ChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT8); @@ -316,7 +316,7 @@ struct MAP7ChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size); for (TileIndex i = 0; i != size;) { @@ -332,7 +332,7 @@ struct MAP8ChunkHandler : ChunkHandler { void Load() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); for (TileIndex i = 0; i != size;) { SlCopy(buf.data(), MAP_SL_BUF_SIZE, SLE_UINT16); @@ -343,7 +343,7 @@ struct MAP8ChunkHandler : ChunkHandler { void Save() const override { std::array buf; - TileIndex size = MapSize(); + TileIndex size = Map::Size(); SlSetLength(size * sizeof(uint16)); for (TileIndex i = 0; i != size;) { diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 2ba0b9963e..f458f8a5cf 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -38,7 +38,7 @@ void RebuildTownCaches() town->cache.num_houses = 0; } - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (!IsTileType(t, MP_HOUSE)) continue; HouseID house_id = GetHouseType(t); @@ -66,7 +66,7 @@ void RebuildTownCaches() */ void UpdateHousesAndTowns() { - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (!IsTileType(t, MP_HOUSE)) continue; HouseID house_id = GetCleanHouseType(t); @@ -79,7 +79,7 @@ void UpdateHousesAndTowns() } /* Check for cases when a NewGRF has set a wrong house substitute type. */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (!IsTileType(t, MP_HOUSE)) continue; HouseID house_type = GetCleanHouseType(t); diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index e81148fa5c..bc765a9511 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -104,14 +104,14 @@ void MoveWaypointsToBaseStations() * the map array. If this is the case, try to locate the actual location in the map array */ if (!IsTileType(t, MP_RAILWAY) || GetRailTileType(t) != 2 /* RAIL_TILE_WAYPOINT */ || _m[t].m2 != wp.index) { Debug(sl, 0, "Found waypoint tile {} with invalid position", t); - for (t = 0; t < MapSize(); t++) { + for (t = 0; t < Map::Size(); t++) { if (IsTileType(t, MP_RAILWAY) && GetRailTileType(t) == 2 /* RAIL_TILE_WAYPOINT */ && _m[t].m2 == wp.index) { Debug(sl, 0, "Found actual waypoint position at {}", t); break; } } } - if (t == MapSize()) { + if (t == Map::Size()) { SlErrorCorrupt("Waypoint with invalid tile"); } diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 1a8d0d3c4e..54cd4f990a 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -753,7 +753,7 @@ void SetupScreenshotViewport(ScreenshotType t, Viewport *vp, uint32 width, uint3 vp->zoom = ZOOM_LVL_WORLD_SCREENSHOT; TileIndex north_tile = _settings_game.construction.freeform_edges ? TileXY(1, 1) : TileXY(0, 0); - TileIndex south_tile = MapSize() - 1; + TileIndex south_tile = Map::Size() - 1; /* We need to account for a hill or high building at tile 0,0. */ int extra_height_top = TilePixelHeight(north_tile) + 150; @@ -829,8 +829,8 @@ static void HeightmapCallback(void *userdata, void *buffer, uint y, uint pitch, { byte *buf = (byte *)buffer; while (n > 0) { - TileIndex ti = TileXY(MapMaxX(), y); - for (uint x = MapMaxX(); true; x--) { + TileIndex ti = TileXY(Map::MaxX(), y); + for (uint x = Map::MaxX(); true; x--) { *buf = 256 * TileHeight(ti) / (1 + _heightmap_highest_peak); buf++; if (x == 0) break; @@ -856,13 +856,13 @@ bool MakeHeightmapScreenshot(const char *filename) } _heightmap_highest_peak = 0; - for (TileIndex tile = 0; tile < MapSize(); tile++) { + for (TileIndex tile = 0; tile < Map::Size(); tile++) { uint h = TileHeight(tile); _heightmap_highest_peak = std::max(h, _heightmap_highest_peak); } const ScreenshotFormat *sf = _screenshot_formats + _cur_screenshot_format; - return sf->proc(filename, HeightmapCallback, nullptr, MapSizeX(), MapSizeY(), 8, palette); + return sf->proc(filename, HeightmapCallback, nullptr, Map::SizeX(), Map::SizeY(), 8, palette); } static ScreenshotType _confirmed_screenshot_type; ///< Screenshot type the current query is about to confirm. @@ -889,8 +889,8 @@ void MakeScreenshotWithConfirm(ScreenshotType t) SetupScreenshotViewport(t, &vp); bool heightmap_or_minimap = t == SC_HEIGHTMAP || t == SC_MINIMAP; - uint64_t width = (heightmap_or_minimap ? MapSizeX() : vp.width); - uint64_t height = (heightmap_or_minimap ? MapSizeY() : vp.height); + uint64_t width = (heightmap_or_minimap ? Map::SizeX() : vp.width); + uint64_t height = (heightmap_or_minimap ? Map::SizeY() : vp.height); if (width * height > 8192 * 8192) { /* Ask for confirmation */ @@ -1010,7 +1010,7 @@ static void MinimapScreenCallback(void *userdata, void *buf, uint y, uint pitch, uint num = (pitch * n); for (uint i = 0; i < num; i++) { uint row = y + (int)(i / pitch); - uint col = (MapSizeX() - 1) - (i % pitch); + uint col = (Map::SizeX() - 1) - (i % pitch); TileIndex tile = TileXY(col, row); byte val = GetSmallMapOwnerPixels(tile, GetTileType(tile), IncludeHeightmap::Never) & 0xFF; @@ -1031,5 +1031,5 @@ static void MinimapScreenCallback(void *userdata, void *buf, uint y, uint pitch, bool MakeMinimapWorldScreenshot() { const ScreenshotFormat *sf = _screenshot_formats + _cur_screenshot_format; - return sf->proc(MakeScreenshotName(SCREENSHOT_NAME, sf->extension), MinimapScreenCallback, nullptr, MapSizeX(), MapSizeY(), 32, _cur_palette.palette); + return sf->proc(MakeScreenshotName(SCREENSHOT_NAME, sf->extension), MinimapScreenCallback, nullptr, Map::SizeX(), Map::SizeY(), 32, _cur_palette.palette); } diff --git a/src/script/api/script_map.cpp b/src/script/api/script_map.cpp index da66de10f3..9e6b7d0a00 100644 --- a/src/script/api/script_map.cpp +++ b/src/script/api/script_map.cpp @@ -20,17 +20,17 @@ /* static */ TileIndex ScriptMap::GetMapSize() { - return ::MapSize(); + return ::Map::Size(); } /* static */ uint32 ScriptMap::GetMapSizeX() { - return ::MapSizeX(); + return ::Map::SizeX(); } /* static */ uint32 ScriptMap::GetMapSizeY() { - return ::MapSizeY(); + return ::Map::SizeY(); } /* static */ int32 ScriptMap::GetTileX(TileIndex t) diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index 7a11e18cfe..5c22a5c140 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -348,7 +348,7 @@ bool ScriptObject::ScriptDoCommandHelper } /* Do not even think about executing out-of-bounds tile-commands. */ - if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; + if (tile != 0 && (tile >= Map::Size() || (!IsValidTile(tile) && (GetCommandFlags() & CMD_ALL_TILES) == 0))) return false; /* Only set ClientID parameters when the command does not come from the network. */ if constexpr ((::GetCommandFlags() & CMD_CLIENT_ID) != 0) ScriptObjectInternal::SetClientIds(args, std::index_sequence_for{}); diff --git a/src/script/api/script_tilelist.cpp b/src/script/api/script_tilelist.cpp index 2050644ff5..4675c6fa82 100644 --- a/src/script/api/script_tilelist.cpp +++ b/src/script/api/script_tilelist.cpp @@ -61,9 +61,9 @@ static void FillIndustryCatchment(const Industry *i, int radius, BitmapTileArea int tx = TileX(cur_tile); int ty = TileY(cur_tile); for (int y = -radius; y <= radius; y++) { - if (ty + y < 0 || ty + y > (int)MapMaxY()) continue; + if (ty + y < 0 || ty + y > (int)Map::MaxY()) continue; for (int x = -radius; x <= radius; x++) { - if (tx + x < 0 || tx + x > (int)MapMaxX()) continue; + if (tx + x < 0 || tx + x > (int)Map::MaxX()) continue; TileIndex tile = TileXY(tx + x, ty + y); if (!IsValidTile(tile)) continue; if (::IsTileType(tile, MP_INDUSTRY) && ::GetIndustryIndex(tile) == i->index) continue; diff --git a/src/settings_table.cpp b/src/settings_table.cpp index 9b401774e9..ca1bcad3a7 100644 --- a/src/settings_table.cpp +++ b/src/settings_table.cpp @@ -360,26 +360,26 @@ static bool CheckFreeformEdges(int32 &new_value) } } } else { - for (uint i = 0; i < MapMaxX(); i++) { + for (uint i = 0; i < Map::MaxX(); i++) { if (TileHeight(TileXY(i, 1)) != 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_WATER, INVALID_STRING_ID, WL_ERROR); return false; } } - for (uint i = 1; i < MapMaxX(); i++) { - if (!IsTileType(TileXY(i, MapMaxY() - 1), MP_WATER) || TileHeight(TileXY(1, MapMaxY())) != 0) { + for (uint i = 1; i < Map::MaxX(); i++) { + if (!IsTileType(TileXY(i, Map::MaxY() - 1), MP_WATER) || TileHeight(TileXY(1, Map::MaxY())) != 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_WATER, INVALID_STRING_ID, WL_ERROR); return false; } } - for (uint i = 0; i < MapMaxY(); i++) { + for (uint i = 0; i < Map::MaxY(); i++) { if (TileHeight(TileXY(1, i)) != 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_WATER, INVALID_STRING_ID, WL_ERROR); return false; } } - for (uint i = 1; i < MapMaxY(); i++) { - if (!IsTileType(TileXY(MapMaxX() - 1, i), MP_WATER) || TileHeight(TileXY(MapMaxX(), i)) != 0) { + for (uint i = 1; i < Map::MaxY(); i++) { + if (!IsTileType(TileXY(Map::MaxX() - 1, i), MP_WATER) || TileHeight(TileXY(Map::MaxX(), i)) != 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_WATER, INVALID_STRING_ID, WL_ERROR); return false; } @@ -393,15 +393,15 @@ static void UpdateFreeformEdges(int32 new_value) if (_game_mode == GM_MENU) return; if (new_value != 0) { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); } else { /* Make tiles at the border water again. */ - for (uint i = 0; i < MapMaxX(); i++) { + for (uint i = 0; i < Map::MaxX(); i++) { SetTileHeight(TileXY(i, 0), 0); SetTileType(TileXY(i, 0), MP_WATER); } - for (uint i = 0; i < MapMaxY(); i++) { + for (uint i = 0; i < Map::MaxY(); i++) { SetTileHeight(TileXY(0, i), 0); SetTileType(TileXY(0, i), MP_WATER); } @@ -432,7 +432,7 @@ static bool CheckMaxHeightLevel(int32 &new_value) /* Check if at least one mountain on the map is higher than the new value. * If yes, disallow the change. */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if ((int32)TileHeight(t) > new_value) { ShowErrorMessage(STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN, INVALID_STRING_ID, WL_ERROR); /* Return old, unchanged value */ diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index dd2e0749cd..ef1f14a711 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -844,7 +844,7 @@ void SmallMapWindow::DrawSmallMapColumn(void *dst, uint xc, uint yc, int pitch, do { /* Check if the tile (xc,yc) is within the map range */ - if (xc >= MapMaxX() || yc >= MapMaxY()) continue; + if (xc >= Map::MaxX() || yc >= Map::MaxY()) continue; /* Check if the dst pointer points to a pixel inside the screen buffer */ if (dst < _screen.dst_ptr) continue; @@ -1629,16 +1629,16 @@ void SmallMapWindow::SetNewScroll(int sx, int sy, int sub) sx = -hv.x; sub = 0; } - if (sx > (int)(MapMaxX() * TILE_SIZE) - hv.x) { - sx = MapMaxX() * TILE_SIZE - hv.x; + if (sx > (int)(Map::MaxX() * TILE_SIZE) - hv.x) { + sx = Map::MaxX() * TILE_SIZE - hv.x; sub = 0; } if (sy < -hv.y) { sy = -hv.y; sub = 0; } - if (sy > (int)(MapMaxY() * TILE_SIZE) - hv.y) { - sy = MapMaxY() * TILE_SIZE - hv.y; + if (sy > (int)(Map::MaxY() * TILE_SIZE) - hv.y) { + sy = Map::MaxY() * TILE_SIZE - hv.y; sub = 0; } diff --git a/src/sound.cpp b/src/sound.cpp index 34807a1d3c..2c77e0fed8 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -268,8 +268,8 @@ static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, in void SndPlayTileFx(SoundID sound, TileIndex tile) { /* emits sound from center of the tile */ - int x = std::min(MapMaxX() - 1, TileX(tile)) * TILE_SIZE + TILE_SIZE / 2; - int y = std::min(MapMaxY() - 1, TileY(tile)) * TILE_SIZE - TILE_SIZE / 2; + int x = std::min(Map::MaxX() - 1, TileX(tile)) * TILE_SIZE + TILE_SIZE / 2; + int y = std::min(Map::MaxY() - 1, TileY(tile)) * TILE_SIZE - TILE_SIZE / 2; int z = (y < 0 ? 0 : GetSlopePixelZ(x, y)); Point pt = RemapCoords(x, y, z); y += 2 * TILE_SIZE; diff --git a/src/station.cpp b/src/station.cpp index 9c96b9b002..5230eeeaf5 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -346,8 +346,8 @@ Rect Station::GetCatchmentRect() const Rect ret = { std::max(this->rect.left - catchment_radius, 0), std::max(this->rect.top - catchment_radius, 0), - std::min(this->rect.right + catchment_radius, MapMaxX()), - std::min(this->rect.bottom + catchment_radius, MapMaxY()) + std::min(this->rect.right + catchment_radius, Map::MaxX()), + std::min(this->rect.bottom + catchment_radius, Map::MaxY()) }; return ret; diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 95c47ac2c8..0d9ad9da38 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1657,7 +1657,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, std::vector &affected_st CommandCost CmdRemoveFromRailStation(DoCommandFlag flags, TileIndex start, TileIndex end, bool keep_rail) { if (end == 0) end = start; - if (start >= MapSize() || end >= MapSize()) return CMD_ERROR; + if (start >= Map::Size() || end >= Map::Size()) return CMD_ERROR; TileArea ta(start, end); std::vector affected_stations; @@ -1690,7 +1690,7 @@ CommandCost CmdRemoveFromRailStation(DoCommandFlag flags, TileIndex start, TileI CommandCost CmdRemoveFromRailWaypoint(DoCommandFlag flags, TileIndex start, TileIndex end, bool keep_rail) { if (end == 0) end = start; - if (start >= MapSize() || end >= MapSize()) return CMD_ERROR; + if (start >= Map::Size() || end >= Map::Size()) return CMD_ERROR; TileArea ta(start, end); std::vector affected_stations; @@ -4071,10 +4071,10 @@ void UpdateStationDockingTiles(Station *st) /* Expand the area by a tile on each side while * making sure that we remain inside the map. */ - int x2 = std::min(x + area->w + 1, MapSizeX()); + int x2 = std::min(x + area->w + 1, Map::SizeX()); int x1 = std::max(x - 1, 0); - int y2 = std::min(y + area->h + 1, MapSizeY()); + int y2 = std::min(y + area->h + 1, Map::SizeY()); int y1 = std::max(y - 1, 0); TileArea ta(TileXY(x1, y1), TileXY(x2 - 1, y2 - 1)); diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 82575909c5..6f3cf7076f 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -56,7 +56,7 @@ int DrawStationCoverageAreaText(int left, int right, int top, StationCoverageTyp { TileIndex tile = TileVirtXY(_thd.pos.x, _thd.pos.y); CargoTypes cargo_mask = 0; - if (_thd.drawstyle == HT_RECT && tile < MapSize()) { + if (_thd.drawstyle == HT_RECT && tile < Map::Size()) { CargoArray cargoes; if (supplies) { cargoes = GetProductionAroundTiles(tile, _thd.size.x / TILE_SIZE, _thd.size.y / TILE_SIZE, rad); @@ -99,7 +99,7 @@ static void FindStationsAroundSelection() uint y = TileY(location.tile); int max_c = 1; - TileArea ta(TileXY(std::max(0, x - max_c), std::max(0, y - max_c)), TileXY(std::min(MapMaxX(), x + location.w + max_c), std::min(MapMaxY(), y + location.h + max_c))); + TileArea ta(TileXY(std::max(0, x - max_c), std::max(0, y - max_c)), TileXY(std::min(Map::MaxX(), x + location.w + max_c), std::min(Map::MaxY(), y + location.h + max_c))); Station *adjacent = nullptr; @@ -2187,7 +2187,7 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join) /* Check the inside, to return, if we sit on another station */ for (TileIndex t : ta) { - if (t < MapSize() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return T::GetByTile(t); + if (t < Map::Size() && IsTileType(t, MP_STATION) && T::IsValidID(GetStationIndex(t))) return T::GetByTile(t); } /* Look for deleted stations */ diff --git a/src/station_kdtree.h b/src/station_kdtree.h index 1c91ed3d2c..63d7c393ec 100644 --- a/src/station_kdtree.h +++ b/src/station_kdtree.h @@ -30,9 +30,9 @@ void ForAllStationsRadius(TileIndex center, uint radius, Func func) { uint16 x1, y1, x2, y2; x1 = (uint16)std::max(0, TileX(center) - radius); - x2 = (uint16)std::min(TileX(center) + radius + 1, MapSizeX()); + x2 = (uint16)std::min(TileX(center) + radius + 1, Map::SizeX()); y1 = (uint16)std::max(0, TileY(center) - radius); - y2 = (uint16)std::min(TileY(center) + radius + 1, MapSizeY()); + y2 = (uint16)std::min(TileY(center) + radius + 1, Map::SizeY()); _station_kdtree.FindContained(x1, y1, x2, y2, [&](StationID id) { func(Station::Get(id)); diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index 8ec602a4f0..742e8e201c 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -84,7 +84,7 @@ static void TerraformAddDirtyTile(TerraformerState *ts, TileIndex tile) */ static void TerraformAddDirtyTileAround(TerraformerState *ts, TileIndex tile) { - /* Make sure all tiles passed to TerraformAddDirtyTile are within [0, MapSize()] */ + /* Make sure all tiles passed to TerraformAddDirtyTile are within [0, Map::Size()] */ if (TileY(tile) >= 1) TerraformAddDirtyTile(ts, tile + TileDiffXY( 0, -1)); if (TileY(tile) >= 1 && TileX(tile) >= 1) TerraformAddDirtyTile(ts, tile + TileDiffXY(-1, -1)); if (TileX(tile) >= 1) TerraformAddDirtyTile(ts, tile + TileDiffXY(-1, 0)); @@ -101,7 +101,7 @@ static void TerraformAddDirtyTileAround(TerraformerState *ts, TileIndex tile) */ static std::tuple TerraformTileHeight(TerraformerState *ts, TileIndex tile, int height) { - assert(tile < MapSize()); + assert(tile < Map::Size()); /* Check range of destination height */ if (height < 0) return { CommandCost(STR_ERROR_ALREADY_AT_SEA_LEVEL), INVALID_TILE }; @@ -117,7 +117,7 @@ static std::tuple TerraformTileHeight(TerraformerState * /* Check "too close to edge of map". Only possible when freeform-edges is off. */ uint x = TileX(tile); uint y = TileY(tile); - if (!_settings_game.construction.freeform_edges && ((x <= 1) || (y <= 1) || (x >= MapMaxX() - 1) || (y >= MapMaxY() - 1))) { + if (!_settings_game.construction.freeform_edges && ((x <= 1) || (y <= 1) || (x >= Map::MaxX() - 1) || (y >= Map::MaxY() - 1))) { /* * Determine a sensible error tile */ @@ -152,10 +152,10 @@ static std::tuple TerraformTileHeight(TerraformerState * for (ttm = _terraform_tilepos; ttm != endof(_terraform_tilepos); ttm++) { tile += ToTileIndexDiff(*ttm); - if (tile >= MapSize()) continue; + if (tile >= Map::Size()) continue; /* Make sure we don't wrap around the map */ - if (Delta(TileX(orig_tile), TileX(tile)) == MapSizeX() - 1) continue; - if (Delta(TileY(orig_tile), TileY(tile)) == MapSizeY() - 1) continue; + if (Delta(TileX(orig_tile), TileX(tile)) == Map::SizeX() - 1) continue; + if (Delta(TileY(orig_tile), TileY(tile)) == Map::SizeY() - 1) continue; /* Get TileHeight of neighboured tile as of current terraform progress */ int r = TerraformGetHeightOfTile(ts, tile); @@ -190,21 +190,21 @@ std::tuple CmdTerraformLand(DoCommandFlag flags, TerraformerState ts; /* Compute the costs and the terraforming result in a model of the landscape */ - if ((slope & SLOPE_W) != 0 && tile + TileDiffXY(1, 0) < MapSize()) { + if ((slope & SLOPE_W) != 0 && tile + TileDiffXY(1, 0) < Map::Size()) { TileIndex t = tile + TileDiffXY(1, 0); auto [cost, err_tile] = TerraformTileHeight(&ts, t, TileHeight(t) + direction); if (cost.Failed()) return { cost, 0, err_tile }; total_cost.AddCost(cost); } - if ((slope & SLOPE_S) != 0 && tile + TileDiffXY(1, 1) < MapSize()) { + if ((slope & SLOPE_S) != 0 && tile + TileDiffXY(1, 1) < Map::Size()) { TileIndex t = tile + TileDiffXY(1, 1); auto [cost, err_tile] = TerraformTileHeight(&ts, t, TileHeight(t) + direction); if (cost.Failed()) return { cost, 0, err_tile }; total_cost.AddCost(cost); } - if ((slope & SLOPE_E) != 0 && tile + TileDiffXY(0, 1) < MapSize()) { + if ((slope & SLOPE_E) != 0 && tile + TileDiffXY(0, 1) < Map::Size()) { TileIndex t = tile + TileDiffXY(0, 1); auto [cost, err_tile] = TerraformTileHeight(&ts, t, TileHeight(t) + direction); if (cost.Failed()) return { cost, 0, err_tile }; @@ -225,7 +225,7 @@ std::tuple CmdTerraformLand(DoCommandFlag flags, for (TileIndexSet::const_iterator it = ts.dirty_tiles.begin(); it != ts.dirty_tiles.end(); it++) { TileIndex t = *it; - assert(t < MapSize()); + assert(t < Map::Size()); /* MP_VOID tiles can be terraformed but as tunnels and bridges * cannot go under / over these tiles they don't need checking. */ if (IsTileType(t, MP_VOID)) continue; @@ -334,7 +334,7 @@ std::tuple CmdTerraformLand(DoCommandFlag flags, */ std::tuple CmdLevelLand(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm) { - if (start_tile >= MapSize()) return { CMD_ERROR, 0, INVALID_TILE }; + if (start_tile >= Map::Size()) return { CMD_ERROR, 0, INVALID_TILE }; /* remember level height */ uint oldh = TileHeight(start_tile); diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index c76ab8ce8d..2429814518 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -113,8 +113,8 @@ bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_t if (!_settings_game.construction.freeform_edges) { /* When end_tile is MP_VOID, the error tile will not be visible to the * user. This happens when terraforming at the southern border. */ - if (TileX(end_tile) == MapMaxX()) end_tile += TileDiffXY(-1, 0); - if (TileY(end_tile) == MapMaxY()) end_tile += TileDiffXY(0, -1); + if (TileX(end_tile) == Map::MaxX()) end_tile += TileDiffXY(-1, 0); + if (TileY(end_tile) == Map::MaxY()) end_tile += TileDiffXY(0, -1); } switch (proc) { @@ -280,8 +280,8 @@ struct TerraformToolbarWindow : Window { if (!_settings_game.construction.freeform_edges) { /* When end_tile is MP_VOID, the error tile will not be visible to the * user. This happens when terraforming at the southern border. */ - if (TileX(end_tile) == MapMaxX()) end_tile += TileDiffXY(-1, 0); - if (TileY(end_tile) == MapMaxY()) end_tile += TileDiffXY(0, -1); + if (TileX(end_tile) == Map::MaxX()) end_tile += TileDiffXY(-1, 0); + if (TileY(end_tile) == Map::MaxY()) end_tile += TileDiffXY(0, -1); } Command::Post(STR_ERROR_CAN_T_PURCHASE_THIS_LAND, CcPlaySound_CONSTRUCTION_RAIL, end_tile, start_tile, OBJECT_OWNED_LAND, 0, (_ctrl_pressed ? true : false)); diff --git a/src/tgp.cpp b/src/tgp.cpp index 389f87f90a..8608febfd5 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -164,9 +164,9 @@ struct HeightMap std::vector h; //< array of heights /* Even though the sizes are always positive, there are many cases where * X and Y need to be signed integers due to subtractions. */ - int dim_x; //< height map size_x MapSizeX() + 1 - int size_x; //< MapSizeX() - int size_y; //< MapSizeY() + int dim_x; //< height map size_x Map::SizeX() + 1 + int size_x; //< Map::SizeX() + int size_y; //< Map::SizeY() /** * Height map accessor @@ -220,7 +220,7 @@ static height_t TGPGetMaxHeight() /** * Desired maximum height - indexed by: * - _settings_game.difficulty.terrain_type - * - min(MapLogX(), MapLogY()) - MIN_MAP_SIZE_BITS + * - min(Map::LogX(), Map::LogY()) - MIN_MAP_SIZE_BITS * * It is indexed by map size as well as terrain type since the map size limits the height of * a usable mountain. For example, on a 64x64 map a 24 high single peak mountain (as if you @@ -236,7 +236,7 @@ static height_t TGPGetMaxHeight() { 12, 19, 25, 31, 67, 75, 87 }, ///< Alpinist }; - int map_size_bucket = std::min(MapLogX(), MapLogY()) - MIN_MAP_SIZE_BITS; + int map_size_bucket = std::min(Map::LogX(), Map::LogY()) - MIN_MAP_SIZE_BITS; int max_height_from_table = max_height[_settings_game.difficulty.terrain_type][map_size_bucket]; /* If there is a manual map height limit, clamp to it. */ @@ -322,8 +322,8 @@ static inline bool AllocHeightMap() { assert(_height_map.h.empty()); - _height_map.size_x = MapSizeX(); - _height_map.size_y = MapSizeY(); + _height_map.size_x = Map::SizeX(); + _height_map.size_y = Map::SizeY(); /* Allocate memory block for height map row pointers */ size_t total_size = static_cast(_height_map.size_x + 1) * (_height_map.size_y + 1); @@ -362,7 +362,7 @@ static void HeightMapGenerate() /* Trying to apply noise to uninitialized height map */ assert(!_height_map.h.empty()); - int start = std::max(MAX_TGP_FREQUENCIES - (int)std::min(MapLogX(), MapLogY()), 0); + int start = std::max(MAX_TGP_FREQUENCIES - (int)std::min(Map::LogX(), Map::LogY()), 0); bool first = true; for (int frequency = start; frequency < MAX_TGP_FREQUENCIES; frequency++) { @@ -1004,8 +1004,8 @@ void GenerateTerrainPerlin() /* First make sure the tiles at the north border are void tiles if needed. */ if (_settings_game.construction.freeform_edges) { - for (uint x = 0; x < MapSizeX(); x++) MakeVoid(TileXY(x, 0)); - for (uint y = 0; y < MapSizeY(); y++) MakeVoid(TileXY(0, y)); + for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); + for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); } int max_height = H2I(TGPGetMaxHeight()); diff --git a/src/tile_map.cpp b/src/tile_map.cpp index 2b8db5e24d..09a95385b4 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -60,8 +60,8 @@ Slope GetTileSlope(TileIndex tile, int *h) { uint x1 = TileX(tile); uint y1 = TileY(tile); - uint x2 = std::min(x1 + 1, MapMaxX()); - uint y2 = std::min(y1 + 1, MapMaxY()); + uint x2 = std::min(x1 + 1, Map::MaxX()); + uint y2 = std::min(y1 + 1, Map::MaxY()); int hnorth = TileHeight(tile); // Height of the North corner. int hwest = TileHeight(TileXY(x2, y1)); // Height of the West corner. @@ -101,8 +101,8 @@ bool IsTileFlat(TileIndex tile, int *h) { uint x1 = TileX(tile); uint y1 = TileY(tile); - uint x2 = std::min(x1 + 1, MapMaxX()); - uint y2 = std::min(y1 + 1, MapMaxY()); + uint x2 = std::min(x1 + 1, Map::MaxX()); + uint y2 = std::min(y1 + 1, Map::MaxY()); uint z = TileHeight(tile); if (TileHeight(TileXY(x2, y1)) != z) return false; @@ -122,8 +122,8 @@ int GetTileZ(TileIndex tile) { uint x1 = TileX(tile); uint y1 = TileY(tile); - uint x2 = std::min(x1 + 1, MapMaxX()); - uint y2 = std::min(y1 + 1, MapMaxY()); + uint x2 = std::min(x1 + 1, Map::MaxX()); + uint y2 = std::min(y1 + 1, Map::MaxY()); return std::min({ TileHeight(tile), // N corner @@ -142,8 +142,8 @@ int GetTileMaxZ(TileIndex t) { uint x1 = TileX(t); uint y1 = TileY(t); - uint x2 = std::min(x1 + 1, MapMaxX()); - uint y2 = std::min(y1 + 1, MapMaxY()); + uint x2 = std::min(x1 + 1, Map::MaxX()); + uint y2 = std::min(y1 + 1, Map::MaxY()); return std::max({ TileHeight(t), // N corner diff --git a/src/tile_map.h b/src/tile_map.h index b6c715e8a8..b02b957fa2 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -24,11 +24,11 @@ * * @param tile The tile to get the height from * @return the height of the tile - * @pre tile < MapSize() + * @pre tile < Map::Size() */ static inline uint TileHeight(TileIndex tile) { - assert(tile < MapSize()); + assert(tile < Map::Size()); return _m[tile].height; } @@ -41,7 +41,7 @@ static inline uint TileHeight(TileIndex tile) */ static inline uint TileHeightOutsideMap(int x, int y) { - return TileHeight(TileXY(Clamp(x, 0, MapMaxX()), Clamp(y, 0, MapMaxY()))); + return TileHeight(TileXY(Clamp(x, 0, Map::MaxX()), Clamp(y, 0, Map::MaxY()))); } /** @@ -51,12 +51,12 @@ static inline uint TileHeightOutsideMap(int x, int y) * * @param tile The tile to change the height * @param height The new height value of the tile - * @pre tile < MapSize() + * @pre tile < Map::Size() * @pre height <= MAX_TILE_HEIGHT */ static inline void SetTileHeight(TileIndex tile, uint height) { - assert(tile < MapSize()); + assert(tile < Map::Size()); assert(height <= MAX_TILE_HEIGHT); _m[tile].height = height; } @@ -91,11 +91,11 @@ static inline uint TilePixelHeightOutsideMap(int x, int y) * * @param tile The tile to get the TileType * @return The tiletype of the tile - * @pre tile < MapSize() + * @pre tile < Map::Size() */ static inline TileType GetTileType(TileIndex tile) { - assert(tile < MapSize()); + assert(tile < Map::Size()); return (TileType)GB(_m[tile].type, 4, 4); } @@ -104,16 +104,16 @@ static inline TileType GetTileType(TileIndex tile) * * @param tile The tile to check * @return Whether the tile is in the interior of the map - * @pre tile < MapSize() + * @pre tile < Map::Size() */ static inline bool IsInnerTile(TileIndex tile) { - assert(tile < MapSize()); + assert(tile < Map::Size()); uint x = TileX(tile); uint y = TileY(tile); - return x < MapMaxX() && y < MapMaxY() && ((x > 0 && y > 0) || !_settings_game.construction.freeform_edges); + return x < Map::MaxX() && y < Map::MaxY() && ((x > 0 && y > 0) || !_settings_game.construction.freeform_edges); } /** @@ -125,12 +125,12 @@ static inline bool IsInnerTile(TileIndex tile) * * @param tile The tile to save the new type * @param type The type to save - * @pre tile < MapSize() + * @pre tile < Map::Size() * @pre type MP_VOID <=> tile is on the south-east or south-west edge. */ static inline void SetTileType(TileIndex tile, TileType type) { - assert(tile < MapSize()); + assert(tile < Map::Size()); /* VOID tiles (and no others) are exactly allowed at the lower left and right * edges of the map. If _settings_game.construction.freeform_edges is true, * the upper edges of the map are also VOID tiles. */ @@ -160,7 +160,7 @@ static inline bool IsTileType(TileIndex tile, TileType type) */ static inline bool IsValidTile(TileIndex tile) { - return tile < MapSize() && !IsTileType(tile, MP_VOID); + return tile < Map::Size() && !IsTileType(tile, MP_VOID); } /** @@ -220,11 +220,11 @@ static inline bool IsTileOwner(TileIndex tile, Owner owner) * Set the tropic zone * @param tile the tile to set the zone of * @param type the new type - * @pre tile < MapSize() + * @pre tile < Map::Size() */ static inline void SetTropicZone(TileIndex tile, TropicZone type) { - assert(tile < MapSize()); + assert(tile < Map::Size()); assert(!IsTileType(tile, MP_VOID) || type == TROPICZONE_NORMAL); SB(_m[tile].type, 0, 2, type); } @@ -232,12 +232,12 @@ static inline void SetTropicZone(TileIndex tile, TropicZone type) /** * Get the tropic zone * @param tile the tile to get the zone of - * @pre tile < MapSize() + * @pre tile < Map::Size() * @return the zone type */ static inline TropicZone GetTropicZone(TileIndex tile) { - assert(tile < MapSize()); + assert(tile < Map::Size()); return (TropicZone)GB(_m[tile].type, 0, 2); } diff --git a/src/tilearea.cpp b/src/tilearea.cpp index 6c943e8c87..974f121b6c 100644 --- a/src/tilearea.cpp +++ b/src/tilearea.cpp @@ -20,8 +20,8 @@ */ OrthogonalTileArea::OrthogonalTileArea(TileIndex start, TileIndex end) { - assert(start < MapSize()); - assert(end < MapSize()); + assert(start < Map::Size()); + assert(end < Map::Size()); uint sx = TileX(start); uint sy = TileY(start); @@ -127,8 +127,8 @@ OrthogonalTileArea &OrthogonalTileArea::Expand(int rad) int sx = std::max(x - rad, 0); int sy = std::max(y - rad, 0); - int ex = std::min(x + this->w + rad, MapSizeX()); - int ey = std::min(y + this->h + rad, MapSizeY()); + int ex = std::min(x + this->w + rad, Map::SizeX()); + int ey = std::min(y + this->h + rad, Map::SizeY()); this->tile = TileXY(sx, sy); this->w = ex - sx; @@ -141,9 +141,9 @@ OrthogonalTileArea &OrthogonalTileArea::Expand(int rad) */ void OrthogonalTileArea::ClampToMap() { - assert(this->tile < MapSize()); - this->w = std::min(this->w, MapSizeX() - TileX(this->tile)); - this->h = std::min(this->h, MapSizeY() - TileY(this->tile)); + assert(this->tile < Map::Size()); + this->w = std::min(this->w, Map::SizeX() - TileX(this->tile)); + this->h = std::min(this->h, Map::SizeY() - TileY(this->tile)); } /** @@ -171,8 +171,8 @@ OrthogonalTileIterator OrthogonalTileArea::end() const */ DiagonalTileArea::DiagonalTileArea(TileIndex start, TileIndex end) : tile(start) { - assert(start < MapSize()); - assert(end < MapSize()); + assert(start < Map::Size()); + assert(end < Map::Size()); /* Unfortunately we can't find a new base and make all a and b positive because * the new base might be a "flattened" corner where there actually is no single @@ -274,8 +274,8 @@ TileIterator &DiagonalTileIterator::operator++() uint x = this->base_x + (this->a_cur - this->b_cur) / 2; uint y = this->base_y + (this->b_cur + this->a_cur) / 2; /* Prevent wrapping around the map's borders. */ - this->tile = x >= MapSizeX() || y >= MapSizeY() ? INVALID_TILE : TileXY(x, y); - } while (this->tile > MapSize() && this->b_max != this->b_cur); + this->tile = x >= Map::SizeX() || y >= Map::SizeY() ? INVALID_TILE : TileXY(x, y); + } while (this->tile > Map::Size() && this->b_max != this->b_cur); if (this->b_max == this->b_cur) this->tile = INVALID_TILE; return *this; diff --git a/src/tilematrix_type.hpp b/src/tilematrix_type.hpp index 2ca165dc03..ee5792ea24 100644 --- a/src/tilematrix_type.hpp +++ b/src/tilematrix_type.hpp @@ -101,8 +101,8 @@ public: tile_x -= std::min(extend * N, tile_x); tile_y -= std::min(extend * N, tile_y); - w += std::min(extend * N, MapSizeX() - tile_x - w); - h += std::min(extend * N, MapSizeY() - tile_y - h); + w += std::min(extend * N, Map::SizeX() - tile_x - w); + h += std::min(extend * N, Map::SizeY() - tile_y - h); return TileArea(TileXY(tile_x, tile_y), w, h); } diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index c21e1ebaad..a69d32b4aa 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -121,7 +121,7 @@ Town::~Town() #endif /* WITH_ASSERT */ /* Check no tile is related to us. */ - for (TileIndex tile = 0; tile < MapSize(); ++tile) { + for (TileIndex tile = 0; tile < Map::Size(); ++tile) { switch (GetTileType(tile)) { case MP_HOUSE: assert(GetTownIndex(tile) != this->index); @@ -974,7 +974,7 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir) static bool TerraformTownTile(TileIndex tile, Slope edges, bool dir) { - assert(tile < MapSize()); + assert(tile < Map::Size()); CommandCost r = std::get<0>(Command::Do(DC_AUTO | DC_NO_WATER, tile, edges, dir)); if (r.Failed() || r.GetCost() >= (_price[PR_TERRAFORM] + 2) * 8) return false; @@ -984,7 +984,7 @@ static bool TerraformTownTile(TileIndex tile, Slope edges, bool dir) static void LevelTownLand(TileIndex tile) { - assert(tile < MapSize()); + assert(tile < Map::Size()); /* Don't terraform if land is plain or if there's a house there. */ if (IsTileType(tile, MP_HOUSE)) return; @@ -1384,7 +1384,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t RoadBits rcmd = ROAD_NONE; // RoadBits for the road construction command TileIndex tile = *tile_ptr; // The main tile on which we base our growth - assert(tile < MapSize()); + assert(tile < Map::Size()); if (cur_rb == ROAD_NONE) { /* Tile has no road. First reset the status counter @@ -1632,7 +1632,7 @@ static bool GrowTownAtRoad(Town *t, TileIndex tile) */ DiagDirection target_dir = DIAGDIR_END; // The direction in which we want to extend the town - assert(tile < MapSize()); + assert(tile < Map::Size()); /* Number of times to search. * Better roads, 2X2 and 3X3 grid grow quite fast so we give @@ -2231,7 +2231,7 @@ bool GenerateTowns(TownLayout layout) { uint current_number = 0; uint difficulty = (_game_mode != GM_EDITOR) ? _settings_game.difficulty.number_towns : 0; - uint total = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7)); + uint total = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : Map::ScaleBySize(_num_initial_towns[difficulty] + (Random() & 7)); total = std::min(TownPool::MAX_SIZE, total); uint32 townnameparts; TownNames town_names; @@ -2991,7 +2991,7 @@ CommandCost CmdDeleteTown(DoCommandFlag flags, TownID town_id) * these do not directly have an owner so we need to check adjacent * tiles. This won't work correctly in the same loop if the adjacent * tile was already deleted earlier in the loop. */ - for (TileIndex current_tile = 0; current_tile < MapSize(); ++current_tile) { + for (TileIndex current_tile = 0; current_tile < Map::Size(); ++current_tile) { if (IsTileType(current_tile, MP_TUNNELBRIDGE) && TestTownOwnsBridge(current_tile, t)) { CommandCost ret = Command::Do(flags, current_tile); if (ret.Failed()) return ret; @@ -2999,7 +2999,7 @@ CommandCost CmdDeleteTown(DoCommandFlag flags, TownID town_id) } /* Check all remaining tiles for town ownership. */ - for (TileIndex current_tile = 0; current_tile < MapSize(); ++current_tile) { + for (TileIndex current_tile = 0; current_tile < Map::Size(); ++current_tile) { bool try_clear = false; switch (GetTileType(current_tile)) { case MP_ROAD: @@ -3758,7 +3758,7 @@ void TownsMonthlyLoop() void TownsYearlyLoop() { /* Increment house ages */ - for (TileIndex t = 0; t < MapSize(); t++) { + for (TileIndex t = 0; t < Map::Size(); t++) { if (!IsTileType(t, MP_HOUSE)) continue; IncrementHouseAge(t); } diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 402be3e823..8df9ccd284 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1753,7 +1753,7 @@ void UpdateLevelCrossing(TileIndex tile, bool sound, bool force_bar) /* Check if an adjacent crossing is barred. */ for (DiagDirection dir : { dir1, dir2 }) { - for (TileIndex t = tile; !forced_state && t < MapSize() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == axis; t = TileAddByDiagDir(t, dir)) { + for (TileIndex t = tile; !forced_state && t < Map::Size() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == axis; t = TileAddByDiagDir(t, dir)) { forced_state |= CheckLevelCrossing(t); } } @@ -1762,7 +1762,7 @@ void UpdateLevelCrossing(TileIndex tile, bool sound, bool force_bar) * we need to update those tiles. We start with the tile itself, then look along the road axis. */ UpdateLevelCrossingTile(tile, sound, forced_state); for (DiagDirection dir : { dir1, dir2 }) { - for (TileIndex t = TileAddByDiagDir(tile, dir); t < MapSize() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == axis; t = TileAddByDiagDir(t, dir)) { + for (TileIndex t = TileAddByDiagDir(tile, dir); t < Map::Size() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == axis; t = TileAddByDiagDir(t, dir)) { UpdateLevelCrossingTile(t, sound, forced_state); } } @@ -1778,7 +1778,7 @@ void MarkDirtyAdjacentLevelCrossingTiles(TileIndex tile, Axis road_axis) const DiagDirection dir2 = ReverseDiagDir(dir1); for (DiagDirection dir : { dir1, dir2 }) { const TileIndex t = TileAddByDiagDir(tile, dir); - if (t < MapSize() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == road_axis) { + if (t < Map::Size() && IsLevelCrossingTile(t) && GetCrossingRoadAxis(t) == road_axis) { MarkTileDirtyByTile(t); } } diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 19c077168d..7ed2f163c6 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -250,7 +250,7 @@ void PlaceTreesRandomly() { int i, j, ht; - i = ScaleByMapSize(DEFAULT_TREE_STEPS); + i = Map::ScaleBySize(DEFAULT_TREE_STEPS); if (_game_mode == GM_EDITOR) i /= EDITOR_TREE_DIV; do { uint32 r = Random(); @@ -278,7 +278,7 @@ void PlaceTreesRandomly() /* place extra trees at rainforest area */ if (_settings_game.game_creation.landscape == LT_TROPIC) { - i = ScaleByMapSize(DEFAULT_RAINFOREST_TREE_STEPS); + i = Map::ScaleBySize(DEFAULT_RAINFOREST_TREE_STEPS); if (_game_mode == GM_EDITOR) i /= EDITOR_TREE_DIV; do { @@ -365,10 +365,10 @@ void GenerateTrees() default: NOT_REACHED(); } - total = ScaleByMapSize(DEFAULT_TREE_STEPS); - if (_settings_game.game_creation.landscape == LT_TROPIC) total += ScaleByMapSize(DEFAULT_RAINFOREST_TREE_STEPS); + total = Map::ScaleBySize(DEFAULT_TREE_STEPS); + if (_settings_game.game_creation.landscape == LT_TROPIC) total += Map::ScaleBySize(DEFAULT_RAINFOREST_TREE_STEPS); total *= i; - uint num_groups = (_settings_game.game_creation.landscape != LT_TOYLAND) ? ScaleByMapSize(GB(Random(), 0, 5) + 25) : 0; + uint num_groups = (_settings_game.game_creation.landscape != LT_TOYLAND) ? Map::ScaleBySize(GB(Random(), 0, 5) + 25) : 0; total += num_groups * DEFAULT_TREE_STEPS; SetGeneratingWorldProgress(GWP_TREE, total); @@ -393,7 +393,7 @@ CommandCost CmdPlantTree(DoCommandFlag flags, TileIndex tile, TileIndex start_ti StringID msg = INVALID_STRING_ID; CommandCost cost(EXPENSES_OTHER); - if (start_tile >= MapSize()) return CMD_ERROR; + if (start_tile >= Map::Size()) return CMD_ERROR; /* Check the tree type within the current climate */ if (tree_to_plant != TREE_INVALID && !IsInsideBS(tree_to_plant, _tree_base_by_landscape[_settings_game.game_creation.landscape], _tree_count_by_landscape[_settings_game.game_creation.landscape])) return CMD_ERROR; @@ -827,7 +827,7 @@ bool DecrementTreeCounter() /* byte underflow */ byte old_trees_tick_ctr = _trees_tick_ctr; - _trees_tick_ctr -= ScaleByMapSize(1); + _trees_tick_ctr -= Map::ScaleBySize(1); return old_trees_tick_ctr <= _trees_tick_ctr; } @@ -843,12 +843,12 @@ void OnTick_Trees() /* Skip some tree ticks for map sizes below 256 * 256. 64 * 64 is 16 times smaller, so * this is the maximum number of ticks that are skipped. Number of ticks to skip is * inversely proportional to map size, so that is handled to create a mask. */ - int skip = ScaleByMapSize(16); + int skip = Map::ScaleBySize(16); if (skip < 16 && (_tick_counter & (16 / skip - 1)) != 0) return; /* place a tree at a random rainforest spot */ if (_settings_game.game_creation.landscape == LT_TROPIC) { - for (uint c = ScaleByMapSize(1); c > 0; c--) { + for (uint c = Map::ScaleBySize(1); c > 0; c--) { if ((r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) && CanPlantTreesOnTile(tile, false) && (tree = GetRandomTreeType(tile, GB(r, 24, 8))) != TREE_INVALID) { diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 9de5235801..dc7c35e415 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -67,6 +67,6 @@ bool IsTunnelInWayDir(TileIndex tile, int z, DiagDirection dir) */ bool IsTunnelInWay(TileIndex tile, int z) { - return IsTunnelInWayDir(tile, z, (TileX(tile) > (MapMaxX() / 2)) ? DIAGDIR_NE : DIAGDIR_SW) || - IsTunnelInWayDir(tile, z, (TileY(tile) > (MapMaxY() / 2)) ? DIAGDIR_NW : DIAGDIR_SE); + return IsTunnelInWayDir(tile, z, (TileX(tile) > (Map::MaxX() / 2)) ? DIAGDIR_NE : DIAGDIR_SW) || + IsTunnelInWayDir(tile, z, (TileY(tile) > (Map::MaxY() / 2)) ? DIAGDIR_NW : DIAGDIR_SE); } diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index d154c4ad67..bb777eaddd 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -673,9 +673,9 @@ CommandCost CmdBuildTunnel(DoCommandFlag flags, TileIndex start_tile, TransportT TileIndexDiff delta = TileOffsByDiagDir(direction); DiagDirection tunnel_in_way_dir; if (DiagDirToAxis(direction) == AXIS_Y) { - tunnel_in_way_dir = (TileX(start_tile) < (MapMaxX() / 2)) ? DIAGDIR_SW : DIAGDIR_NE; + tunnel_in_way_dir = (TileX(start_tile) < (Map::MaxX() / 2)) ? DIAGDIR_SW : DIAGDIR_NE; } else { - tunnel_in_way_dir = (TileY(start_tile) < (MapMaxX() / 2)) ? DIAGDIR_SE : DIAGDIR_NW; + tunnel_in_way_dir = (TileY(start_tile) < (Map::MaxX() / 2)) ? DIAGDIR_SE : DIAGDIR_NW; } TileIndex end_tile = start_tile; diff --git a/src/viewport.cpp b/src/viewport.cpp index b32bca80d2..5310a02dc5 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1224,8 +1224,8 @@ static void ViewportAddLandscape() tile_info.x = tilecoord.x * TILE_SIZE; // FIXME tile_info should use signed integers tile_info.y = tilecoord.y * TILE_SIZE; - if (IsInsideBS(tilecoord.x, 0, MapSizeX()) && IsInsideBS(tilecoord.y, 0, MapSizeY())) { - /* This includes the south border at MapMaxX / MapMaxY. When terraforming we still draw tile selections there. */ + if (IsInsideBS(tilecoord.x, 0, Map::SizeX()) && IsInsideBS(tilecoord.y, 0, Map::SizeY())) { + /* This includes the south border at Map::MaxX / Map::MaxY. When terraforming we still draw tile selections there. */ tile_info.tile = TileXY(tilecoord.x, tilecoord.y); tile_type = GetTileType(tile_info.tile); } else { @@ -1892,7 +1892,7 @@ void UpdateViewportPosition(Window *w) bool update_overlay = false; if (delta_x != 0 || delta_y != 0) { if (_settings_client.gui.smooth_scroll) { - int max_scroll = ScaleByMapSize1D(512 * ZOOM_LVL_BASE); + int max_scroll = Map::ScaleBySize1D(512 * ZOOM_LVL_BASE); /* Not at our desired position yet... */ w->viewport->scrollpos_x += Clamp(DivAwayFromZero(delta_x, 4), -max_scroll, max_scroll); w->viewport->scrollpos_y += Clamp(DivAwayFromZero(delta_y, 4), -max_scroll, max_scroll); @@ -2034,11 +2034,11 @@ static void SetSelectionTilesDirty() assert(x_size >= 0); assert(y_size >= 0); - int x_end = Clamp(x_start + x_size, 0, MapSizeX() * TILE_SIZE - TILE_SIZE); - int y_end = Clamp(y_start + y_size, 0, MapSizeY() * TILE_SIZE - TILE_SIZE); + int x_end = Clamp(x_start + x_size, 0, Map::SizeX() * TILE_SIZE - TILE_SIZE); + int y_end = Clamp(y_start + y_size, 0, Map::SizeY() * TILE_SIZE - TILE_SIZE); - x_start = Clamp(x_start, 0, MapSizeX() * TILE_SIZE - TILE_SIZE); - y_start = Clamp(y_start, 0, MapSizeY() * TILE_SIZE - TILE_SIZE); + x_start = Clamp(x_start, 0, Map::SizeX() * TILE_SIZE - TILE_SIZE); + y_start = Clamp(y_start, 0, Map::SizeY() * TILE_SIZE - TILE_SIZE); /* make sure everything is multiple of TILE_SIZE */ assert((x_end | y_end | x_start | y_start) % TILE_SIZE == 0); @@ -2114,7 +2114,7 @@ static void SetSelectionTilesDirty() uint x = (_thd.pos.x + (a + b) / 2) / TILE_SIZE; uint y = (_thd.pos.y + (a - b) / 2) / TILE_SIZE; - if (x < MapMaxX() && y < MapMaxY()) { + if (x < Map::MaxX() && y < Map::MaxY()) { MarkTileDirtyByTile(TileXY(x, y)); } } @@ -2411,8 +2411,8 @@ bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant) { /* The slope cannot be acquired outside of the map, so make sure we are always within the map. */ if (z == -1) { - if ( x >= 0 && x <= (int)MapSizeX() * (int)TILE_SIZE - 1 - && y >= 0 && y <= (int)MapSizeY() * (int)TILE_SIZE - 1) { + if ( x >= 0 && x <= (int)Map::SizeX() * (int)TILE_SIZE - 1 + && y >= 0 && y <= (int)Map::SizeY() * (int)TILE_SIZE - 1) { z = GetSlopePixelZ(x, y); } else { z = TileHeightOutsideMap(x / (int)TILE_SIZE, y / (int)TILE_SIZE); @@ -2981,9 +2981,9 @@ static void CalcRaildirsDrawstyle(int x, int y, int method) /* Make sure we do not overflow the map! */ CheckUnderflow(x, y, 1); CheckUnderflow(y, x, 1); - CheckOverflow(x, y, (MapMaxX() - 1) * TILE_SIZE, 1); - CheckOverflow(y, x, (MapMaxY() - 1) * TILE_SIZE, 1); - assert(x >= 0 && y >= 0 && x <= (int)(MapMaxX() * TILE_SIZE) && y <= (int)(MapMaxY() * TILE_SIZE)); + CheckOverflow(x, y, (Map::MaxX() - 1) * TILE_SIZE, 1); + CheckOverflow(y, x, (Map::MaxY() - 1) * TILE_SIZE, 1); + assert(x >= 0 && y >= 0 && x <= (int)(Map::MaxX() * TILE_SIZE) && y <= (int)(Map::MaxY() * TILE_SIZE)); } break; @@ -3016,9 +3016,9 @@ static void CalcRaildirsDrawstyle(int x, int y, int method) /* Make sure we do not overflow the map! */ CheckUnderflow(x, y, -1); CheckUnderflow(y, x, -1); - CheckOverflow(x, y, (MapMaxX() - 1) * TILE_SIZE, -1); - CheckOverflow(y, x, (MapMaxY() - 1) * TILE_SIZE, -1); - assert(x >= 0 && y >= 0 && x <= (int)(MapMaxX() * TILE_SIZE) && y <= (int)(MapMaxY() * TILE_SIZE)); + CheckOverflow(x, y, (Map::MaxX() - 1) * TILE_SIZE, -1); + CheckOverflow(y, x, (Map::MaxY() - 1) * TILE_SIZE, -1); + assert(x >= 0 && y >= 0 && x <= (int)(Map::MaxX() * TILE_SIZE) && y <= (int)(Map::MaxY() * TILE_SIZE)); } break; @@ -3440,7 +3440,7 @@ Point GetViewportStationMiddle(const Viewport *vp, const Station *st) { int x = TileX(st->xy) * TILE_SIZE; int y = TileY(st->xy) * TILE_SIZE; - int z = GetSlopePixelZ(Clamp(x, 0, MapSizeX() * TILE_SIZE - 1), Clamp(y, 0, MapSizeY() * TILE_SIZE - 1)); + int z = GetSlopePixelZ(Clamp(x, 0, Map::SizeX() * TILE_SIZE - 1), Clamp(y, 0, Map::SizeY() * TILE_SIZE - 1)); Point p = RemapCoords(x, y, z); p.x = UnScaleByZoom(p.x - vp->virtual_left, vp->zoom) + vp->left; diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 0e23b7259c..e34c3c103c 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -450,7 +450,7 @@ void MakeRiverAndModifyDesertZoneAround(TileIndex tile) { */ CommandCost CmdBuildCanal(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, WaterClass wc, bool diagonal) { - if (start_tile >= MapSize() || !IsValidWaterClass(wc)) return CMD_ERROR; + if (start_tile >= Map::Size() || !IsValidWaterClass(wc)) return CMD_ERROR; /* Outside of the editor you can only build canals, not oceans */ if (wc != WATER_CLASS_CANAL && _game_mode != GM_EDITOR) return CMD_ERROR; @@ -528,8 +528,8 @@ static CommandCost ClearTile_Water(TileIndex tile, DoCommandFlag flags) Money base_cost = IsCanal(tile) ? _price[PR_CLEAR_CANAL] : _price[PR_CLEAR_WATER]; /* Make sure freeform edges are allowed or it's not an edge tile. */ - if (!_settings_game.construction.freeform_edges && (!IsInsideMM(TileX(tile), 1, MapMaxX() - 1) || - !IsInsideMM(TileY(tile), 1, MapMaxY() - 1))) { + if (!_settings_game.construction.freeform_edges && (!IsInsideMM(TileX(tile), 1, Map::MaxX() - 1) || + !IsInsideMM(TileY(tile), 1, Map::MaxY() - 1))) { return_cmd_error(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP); } @@ -1257,7 +1257,7 @@ void ConvertGroundTilesIntoWaterTiles() { int z; - for (TileIndex tile = 0; tile < MapSize(); ++tile) { + for (TileIndex tile = 0; tile < Map::Size(); ++tile) { Slope slope = GetTileSlope(tile, &z); if (IsTileType(tile, MP_CLEAR) && z == 0) { /* Make both water for tiles at level 0 From de6bc8e6922112f54c6e824535b3eec6aabd0103 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 11:05:19 +0100 Subject: [PATCH 10/17] Codechange: move TILE_MASK to Map::WrapToMap --- src/industry_cmd.cpp | 2 +- src/map.cpp | 2 +- src/map_func.h | 24 +++++++++++++----------- src/newgrf_commons.cpp | 2 +- src/newgrf_house.cpp | 2 +- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 25b47143ca..2ae899105f 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1010,7 +1010,7 @@ static void SetupFarmFieldFence(TileIndex tile, int size, byte type, DiagDirecti TileIndexDiff diff = (DiagDirToAxis(side) == AXIS_Y ? TileDiffXY(1, 0) : TileDiffXY(0, 1)); do { - tile = TILE_MASK(tile); + tile = Map::WrapToMap(tile); if (IsTileType(tile, MP_CLEAR) && IsClearGround(tile, CLEAR_FIELDS)) { byte or_ = type; diff --git a/src/map.cpp b/src/map.cpp index 98bf6eb614..9eda67005c 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -92,7 +92,7 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add, #endif } - assert(TileXY(x, y) == TILE_MASK(tile + add)); + assert(TileXY(x, y) == Map::WrapToMap(tile + add)); return TileXY(x, y); } diff --git a/src/map_func.h b/src/map_func.h index c5f5f8680a..daefdb54eb 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -15,16 +15,6 @@ #include "map_type.h" #include "direction_func.h" -extern uint _map_tile_mask; - -/** - * 'Wraps' the given tile to it is within the map. It does - * this by masking the 'high' bits of. - * @param x the tile to 'wrap' - */ - -#define TILE_MASK(x) ((x) & _map_tile_mask) - /** * Pointer to the tile-array. * @@ -117,6 +107,18 @@ struct Map { return Map::SizeY() - 1; } + + /** + * 'Wraps' the given "tile" so it is within the map. + * It does this by masking the 'high' bits of. + * @param tile the tile to 'wrap' + */ + static inline TileIndex WrapToMap(uint tile) + { + extern uint _map_tile_mask; + return tile & _map_tile_mask; + } + /** * Scales the given value by the map size, where the given value is * for a 256 by 256 map. @@ -429,7 +431,7 @@ bool CircularTileSearch(TileIndex *tile, uint radius, uint w, uint h, TestTileOn */ static inline TileIndex RandomTileSeed(uint32 r) { - return TILE_MASK(r); + return Map::WrapToMap(r); } /** diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 2af9d888cf..4fa37000a7 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -433,7 +433,7 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile, bool signed_offsets, Axi if (axis == AXIS_Y) Swap(x, y); /* Make sure we never roam outside of the map, better wrap in that case */ - return TILE_MASK(tile + TileDiffXY(x, y)); + return Map::WrapToMap(tile + TileDiffXY(x, y)); } /** diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 6a7d191f72..21a4413fa2 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -346,7 +346,7 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI /* Extract tile offset. */ int8 x_offs = GB(GetRegister(0x100), 0, 8); int8 y_offs = GB(GetRegister(0x100), 8, 8); - TileIndex testtile = TILE_MASK(this->tile + TileDiffXY(x_offs, y_offs)); + TileIndex testtile = Map::WrapToMap(this->tile + TileDiffXY(x_offs, y_offs)); StationFinder stations(TileArea(testtile, 1, 1)); const StationList *sl = stations.GetStations(); From 7cdc23fd64425d3528af64dfaa99fa0cc3112960 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 21 Jan 2023 12:14:28 +0100 Subject: [PATCH 11/17] Codechange: hide the map's size related fields in the Map structure --- src/crashlog.cpp | 4 ++-- src/map.cpp | 28 ++++++++++++------------- src/map_func.h | 39 ++++++++++++++++++++++------------- src/misc.cpp | 2 +- src/saveload/map_sl.cpp | 2 +- src/saveload/oldloader_sl.cpp | 2 +- 6 files changed, 44 insertions(+), 33 deletions(-) diff --git a/src/crashlog.cpp b/src/crashlog.cpp index c080ec241c..3ac2dd6035 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -413,9 +413,9 @@ bool CrashLog::WriteCrashLog(const char *buffer, char *filename, const char *fil */ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const { - /* If the map array doesn't exist, saving will fail too. If the map got + /* If the map doesn't exist, saving will fail too. If the map got * initialised, there is a big chance the rest is initialised too. */ - if (_m == nullptr) return false; + if (!Map::IsInitialized()) return false; try { GamelogEmergency(); diff --git a/src/map.cpp b/src/map.cpp index 9eda67005c..6400f15ab4 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -20,12 +20,12 @@ extern "C" _CRTIMP void __cdecl _assert(void *, void *, unsigned); #endif -uint _map_log_x; ///< 2^_map_log_x == _map_size_x -uint _map_log_y; ///< 2^_map_log_y == _map_size_y -uint _map_size_x; ///< Size of the map along the X -uint _map_size_y; ///< Size of the map along the Y -uint _map_size; ///< The number of tiles on the map -uint _map_tile_mask; ///< _map_size - 1 (to mask the mapsize) +/* static */ uint Map::log_x; ///< 2^_map_log_x == _map_size_x +/* static */ uint Map::log_y; ///< 2^_map_log_y == _map_size_y +/* static */ uint Map::size_x; ///< Size of the map along the X +/* static */ uint Map::size_y; ///< Size of the map along the Y +/* static */ uint Map::size; ///< The number of tiles on the map +/* static */ uint Map::tile_mask; ///< _map_size - 1 (to mask the mapsize) Tile *_m = nullptr; ///< Tiles of the map TileExtended *_me = nullptr; ///< Extended Tiles of the map @@ -49,18 +49,18 @@ TileExtended *_me = nullptr; ///< Extended Tiles of the map Debug(map, 1, "Allocating map of size {}x{}", size_x, size_y); - _map_log_x = FindFirstBit(size_x); - _map_log_y = FindFirstBit(size_y); - _map_size_x = size_x; - _map_size_y = size_y; - _map_size = size_x * size_y; - _map_tile_mask = _map_size - 1; + Map::log_x = FindFirstBit(size_x); + Map::log_y = FindFirstBit(size_y); + Map::size_x = size_x; + Map::size_y = size_y; + Map::size = size_x * size_y; + Map::tile_mask = Map::size - 1; free(_m); free(_me); - _m = CallocT(_map_size); - _me = CallocT(_map_size); + _m = CallocT(Map::size); + _me = CallocT(Map::size); } diff --git a/src/map_func.h b/src/map_func.h index daefdb54eb..f5279fe5b7 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -35,6 +35,15 @@ extern TileExtended *_me; * Size related data of the map. */ struct Map { +private: + static uint log_x; ///< 2^_map_log_x == _map_size_x + static uint log_y; ///< 2^_map_log_y == _map_size_y + static uint size_x; ///< Size of the map along the X + static uint size_y; ///< Size of the map along the Y + static uint size; ///< The number of tiles on the map + static uint tile_mask; ///< _map_size - 1 (to mask the mapsize) + +public: static void Allocate(uint size_x, uint size_y); /** @@ -44,8 +53,7 @@ struct Map { */ static inline uint LogX() { - extern uint _map_log_x; - return _map_log_x; + return Map::log_x; } /** @@ -55,8 +63,7 @@ struct Map { */ static inline uint LogY() { - extern uint _map_log_y; - return _map_log_y; + return Map::log_y; } /** @@ -65,8 +72,7 @@ struct Map { */ static inline uint SizeX() { - extern uint _map_size_x; - return _map_size_x; + return Map::size_x; } /** @@ -75,8 +81,7 @@ struct Map { */ static inline uint SizeY() { - extern uint _map_size_y; - return _map_size_y; + return Map::size_y; } /** @@ -85,8 +90,7 @@ struct Map { */ static inline uint Size() { - extern uint _map_size; - return _map_size; + return Map::size; } /** @@ -115,8 +119,7 @@ struct Map { */ static inline TileIndex WrapToMap(uint tile) { - extern uint _map_tile_mask; - return tile & _map_tile_mask; + return tile & Map::tile_mask; } /** @@ -145,9 +148,17 @@ struct Map { * just half of it. */ return CeilDiv((n << Map::LogX()) + (n << Map::LogY()), 1 << 9); } -}; -static inline void AllocateMap(uint size_x, uint size_y) { Map::Allocate(size_x, size_y); } + /** + * Check whether the map has been initialized, as to not try to save the map + * during crashlog when the map is not there yet. + * @return true when the map has been allocated/initialized. + */ + static bool IsInitialized() + { + return _m != nullptr; + } +}; /** * An offset value between two tiles. diff --git a/src/misc.cpp b/src/misc.cpp index c46a1c11d4..467c398d66 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -61,7 +61,7 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin * related to the new game we're about to start/load. */ UnInitWindowSystem(); - AllocateMap(size_x, size_y); + Map::Allocate(size_x, size_y); _pause_mode = PM_UNPAUSED; _game_speed = 100; diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index 8adbf7175f..363abfb9d5 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -49,7 +49,7 @@ struct MAPSChunkHandler : ChunkHandler { SlGlobList(slt); if (!IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY) && SlIterateArray() != -1) SlErrorCorrupt("Too many MAPS entries"); - AllocateMap(_map_dim_x, _map_dim_y); + Map::Allocate(_map_dim_x, _map_dim_y); } void LoadCheck(size_t) const override diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 380fe5ccaa..9e858572b5 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1465,7 +1465,7 @@ static bool LoadOldGameDifficulty(LoadgameState *ls, int num) static bool LoadOldMapPart1(LoadgameState *ls, int num) { if (_savegame_type == SGT_TTO) { - AllocateMap(OLD_MAP_SIZE, OLD_MAP_SIZE); + Map::Allocate(OLD_MAP_SIZE, OLD_MAP_SIZE); } for (uint i = 0; i < OLD_MAP_SIZE; i++) { From 8b5fa2cc7bf7fc70e23fcda3ab5b8fd9423a32a1 Mon Sep 17 00:00:00 2001 From: translators Date: Sat, 21 Jan 2023 18:42:26 +0000 Subject: [PATCH 12/17] Update: Translations from eints english (au): 4 changes by krysclarke --- src/lang/english_AU.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index 7b3a298fa4..669d72c50c 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -2698,6 +2698,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel From b2a5ebcfc4637d6d700beaa0b8012dd6ee75e8ee Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Sun, 22 Jan 2023 13:14:02 +0000 Subject: [PATCH 13/17] Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI (#10227) * Change: Store "all time" and "since minimum age" last year profits on groups * Fix: Update last year profit for groups when copying vehicle statistics on autoreplace * Codechange: Refactor profit last year * Change: Rename some group related items for clarity * Change: Reorder the fields in GroupStatistics That way less memory gets wasted. --- src/autoreplace_cmd.cpp | 1 + src/group.h | 20 ++++++++------- src/group_cmd.cpp | 56 +++++++++++++++++++++++++++-------------- src/group_gui.cpp | 10 ++++---- src/vehicle.cpp | 2 +- 5 files changed, 55 insertions(+), 34 deletions(-) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 4068e743e0..274a8cbcd2 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -422,6 +422,7 @@ static CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head, if (cost.Succeeded() && old_head != new_head && (flags & DC_EXEC) != 0) { /* Copy other things which cannot be copied by a command and which shall not stay resetted from the build vehicle command */ new_head->CopyVehicleConfigAndStatistics(old_head); + GroupStatistics::AddProfitLastYear(new_head); /* Switch vehicle windows/news to the new vehicle, so they are not closed/deleted when the old vehicle is sold */ ChangeVehicleViewports(old_head->index, new_head->index); diff --git a/src/group.h b/src/group.h index 6d55c93853..7cba5ac538 100644 --- a/src/group.h +++ b/src/group.h @@ -23,15 +23,14 @@ extern GroupPool _group_pool; ///< Pool of groups. /** Statistics and caches on the vehicles in a group. */ struct GroupStatistics { - uint16 num_vehicle; ///< Number of vehicles. + Money profit_last_year; ///< Sum of profits for all vehicles. + Money profit_last_year_min_age; ///< Sum of profits for vehicles considered for profit statistics. uint16 *num_engines; ///< Caches the number of engines of each type the company owns. - + uint16 num_vehicle; ///< Number of vehicles. + uint16 num_vehicle_min_age; ///< Number of vehicles considered for profit statistics; bool autoreplace_defined; ///< Are any autoreplace rules set? bool autoreplace_finished; ///< Have all autoreplacement finished? - uint16 num_profit_vehicle; ///< Number of vehicles considered for profit statistics; - Money profit_last_year; ///< Sum of profits for all vehicles. - GroupStatistics(); ~GroupStatistics(); @@ -39,8 +38,10 @@ struct GroupStatistics { void ClearProfits() { - this->num_profit_vehicle = 0; this->profit_last_year = 0; + + this->num_vehicle_min_age = 0; + this->profit_last_year_min_age = 0; } void ClearAutoreplace() @@ -55,7 +56,8 @@ struct GroupStatistics { static void CountVehicle(const Vehicle *v, int delta); static void CountEngine(const Vehicle *v, int delta); - static void VehicleReachedProfitAge(const Vehicle *v); + static void AddProfitLastYear(const Vehicle *v); + static void VehicleReachedMinAge(const Vehicle *v); static void UpdateProfits(); static void UpdateAfterLoad(); @@ -104,8 +106,8 @@ static inline bool IsAllGroupID(GroupID id_g) uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e); uint GetGroupNumVehicle(CompanyID company, GroupID id_g, VehicleType type); -uint GetGroupNumProfitVehicle(CompanyID company, GroupID id_g, VehicleType type); -Money GetGroupProfitLastYear(CompanyID company, GroupID id_g, VehicleType type); +uint GetGroupNumVehicleMinAge(CompanyID company, GroupID id_g, VehicleType type); +Money GetGroupProfitLastYearMinAge(CompanyID company, GroupID id_g, VehicleType type); void SetTrainGroupID(Train *v, GroupID grp); void UpdateTrainGroupID(Train *v); diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index b6d1927097..dd8033d4e0 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -43,8 +43,9 @@ GroupStatistics::~GroupStatistics() void GroupStatistics::Clear() { this->num_vehicle = 0; - this->num_profit_vehicle = 0; this->profit_last_year = 0; + this->num_vehicle_min_age = 0; + this->profit_last_year_min_age = 0; /* This is also called when NewGRF change. So the number of engines might have changed. Reallocate. */ free(this->num_engines); @@ -136,13 +137,15 @@ void GroupStatistics::Clear() GroupStatistics &stats = GroupStatistics::Get(v); stats_all.num_vehicle += delta; + stats_all.profit_last_year += v->GetDisplayProfitLastYear() * delta; stats.num_vehicle += delta; + stats.profit_last_year += v->GetDisplayProfitLastYear() * delta; if (v->age > VEHICLE_PROFIT_MIN_AGE) { - stats_all.num_profit_vehicle += delta; - stats_all.profit_last_year += v->GetDisplayProfitLastYear() * delta; - stats.num_profit_vehicle += delta; - stats.profit_last_year += v->GetDisplayProfitLastYear() * delta; + stats_all.num_vehicle_min_age += delta; + stats_all.profit_last_year_min_age += v->GetDisplayProfitLastYear() * delta; + stats.num_vehicle_min_age += delta; + stats.profit_last_year_min_age += v->GetDisplayProfitLastYear() * delta; } } @@ -159,19 +162,31 @@ void GroupStatistics::Clear() } /** - * Add a vehicle to the profit sum of its group. + * Add a vehicle's last year profit to the profit sum of its group. */ -/* static */ void GroupStatistics::VehicleReachedProfitAge(const Vehicle *v) +/* static */ void GroupStatistics::AddProfitLastYear(const Vehicle *v) { GroupStatistics &stats_all = GroupStatistics::GetAllGroup(v); GroupStatistics &stats = GroupStatistics::Get(v); - stats_all.num_profit_vehicle++; stats_all.profit_last_year += v->GetDisplayProfitLastYear(); - stats.num_profit_vehicle++; stats.profit_last_year += v->GetDisplayProfitLastYear(); } +/** + * Add a vehicle to the profit sum of its group. + */ +/* static */ void GroupStatistics::VehicleReachedMinAge(const Vehicle *v) +{ + GroupStatistics &stats_all = GroupStatistics::GetAllGroup(v); + GroupStatistics &stats = GroupStatistics::Get(v); + + stats_all.num_vehicle_min_age++; + stats_all.profit_last_year_min_age += v->GetDisplayProfitLastYear(); + stats.num_vehicle_min_age++; + stats.profit_last_year_min_age += v->GetDisplayProfitLastYear(); +} + /** * Recompute the profits for all groups. */ @@ -191,7 +206,10 @@ void GroupStatistics::Clear() } for (const Vehicle *v : Vehicle::Iterate()) { - if (v->IsPrimaryVehicle() && v->age > VEHICLE_PROFIT_MIN_AGE) GroupStatistics::VehicleReachedProfitAge(v); + if (v->IsPrimaryVehicle()) { + GroupStatistics::AddProfitLastYear(v); + if (v->age > VEHICLE_PROFIT_MIN_AGE) GroupStatistics::VehicleReachedMinAge(v); + } } } @@ -789,30 +807,30 @@ uint GetGroupNumVehicle(CompanyID company, GroupID id_g, VehicleType type) * @param type The vehicle type of the group * @return The number of vehicles above profit minimum age in the group */ -uint GetGroupNumProfitVehicle(CompanyID company, GroupID id_g, VehicleType type) +uint GetGroupNumVehicleMinAge(CompanyID company, GroupID id_g, VehicleType type) { uint count = 0; for (const Group *g : Group::Iterate()) { - if (g->parent == id_g) count += GetGroupNumProfitVehicle(company, g->index, type); + if (g->parent == id_g) count += GetGroupNumVehicleMinAge(company, g->index, type); } - return count + GroupStatistics::Get(company, id_g, type).num_profit_vehicle; + return count + GroupStatistics::Get(company, id_g, type).num_vehicle_min_age; } /** - * Get last year's profit for the group with GroupID - * id_g and its sub-groups. + * Get last year's profit of vehicles above minimum age + * for the group with GroupID id_g and its sub-groups. * @param company The company the group belongs to * @param id_g The GroupID of the group used * @param type The vehicle type of the group - * @return Last year's profit for the group + * @return Last year's profit of vehicles above minimum age for the group */ -Money GetGroupProfitLastYear(CompanyID company, GroupID id_g, VehicleType type) +Money GetGroupProfitLastYearMinAge(CompanyID company, GroupID id_g, VehicleType type) { Money sum = 0; for (const Group *g : Group::Iterate()) { - if (g->parent == id_g) sum += GetGroupProfitLastYear(company, g->index, type); + if (g->parent == id_g) sum += GetGroupProfitLastYearMinAge(company, g->index, type); } - return sum + GroupStatistics::Get(company, id_g, type).profit_last_year; + return sum + GroupStatistics::Get(company, id_g, type).profit_last_year_min_age; } void RemoveAllGroupsForCompany(const CompanyID company) diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 6b50133880..db000aba8e 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -302,13 +302,13 @@ private: /* draw the profit icon */ x = rtl ? x - WidgetDimensions::scaled.hsep_normal - this->column_size[VGC_PROFIT].width : x + WidgetDimensions::scaled.hsep_normal + this->column_size[VGC_AUTOREPLACE].width; SpriteID spr; - uint num_profit_vehicle = GetGroupNumProfitVehicle(this->vli.company, g_id, this->vli.vtype); - Money profit_last_year = GetGroupProfitLastYear(this->vli.company, g_id, this->vli.vtype); - if (num_profit_vehicle == 0) { + uint num_vehicle_min_age = GetGroupNumVehicleMinAge(this->vli.company, g_id, this->vli.vtype); + Money profit_last_year_min_age = GetGroupProfitLastYearMinAge(this->vli.company, g_id, this->vli.vtype); + if (num_vehicle_min_age == 0) { spr = SPR_PROFIT_NA; - } else if (profit_last_year < 0) { + } else if (profit_last_year_min_age < 0) { spr = SPR_PROFIT_NEGATIVE; - } else if (profit_last_year < VEHICLE_PROFIT_THRESHOLD * num_profit_vehicle) { + } else if (profit_last_year_min_age < VEHICLE_PROFIT_THRESHOLD * num_vehicle_min_age) { spr = SPR_PROFIT_SOME; } else { spr = SPR_PROFIT_LOT; diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 0f0e4d09e9..eb565a06c3 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1379,7 +1379,7 @@ void AgeVehicle(Vehicle *v) { if (v->age < MAX_DAY) { v->age++; - if (v->IsPrimaryVehicle() && v->age == VEHICLE_PROFIT_MIN_AGE + 1) GroupStatistics::VehicleReachedProfitAge(v); + if (v->IsPrimaryVehicle() && v->age == VEHICLE_PROFIT_MIN_AGE + 1) GroupStatistics::VehicleReachedMinAge(v); } if (!v->IsPrimaryVehicle() && (v->type != VEH_TRAIN || !Train::From(v)->IsEngine())) return; From 7d502e28575531903708a83ef4b0a1ff89e0fa60 Mon Sep 17 00:00:00 2001 From: translators Date: Sun, 22 Jan 2023 18:42:21 +0000 Subject: [PATCH 14/17] Update: Translations from eints english (us): 4 changes by 2TallTyler romanian: 10 changes by bnegrut russian: 4 changes by Ln-Wolf portuguese: 4 changes by azulcosta --- src/lang/english_US.txt | 4 ++++ src/lang/portuguese.txt | 4 ++++ src/lang/romanian.txt | 16 ++++++++++------ src/lang/russian.txt | 4 ++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 82c70d39eb..78bb6352c3 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -2698,6 +2698,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index 71d53c7326..ac331efa32 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -2699,6 +2699,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Seleccione Ponte Ferroviária STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Seleccionar Ponte Rodoviária STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selecção de ponte - clique na ponte desejada para a construir +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensa, Aço STR_BRIDGE_NAME_GIRDER_STEEL :Viga, Aço STR_BRIDGE_NAME_CANTILEVER_STEEL :Consola, Aço diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 11a8a5e407..d9c6299b0b 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -386,7 +386,7 @@ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Generare STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Generare industrii STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Construcţii rutiere STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Construcție tramvai -STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantează arbori. Shift comută între plantare/afişare cost estimat +STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantează arbori. Ctrl selectează zona în diagonală. Shift comută între plantare/afişare cost estimat STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Plasează semn STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Plasați obiectul. Ctrl selectează zona în diagonală. Shift comută construirea/afișarea estimării costurilor @@ -1925,13 +1925,13 @@ STR_CONFIG_SETTING_LINKGRAPH_TIME :Acordă {STRING STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Timpul necesar pentru fiecare recalculare a unei componente a graficului de legătură. Când se începe o recalculare, este generat un fir de execuție căruia i se permite să ruleze pentru acest număr de zile. Cu cât setați acest lucru mai scurt, cu atât este mai probabil ca firul să nu fie terminat atunci când trebuie. Apoi jocul se oprește până când este ("lag"). Cu cât îl setați mai mult, cu atât este nevoie de mai mult pentru ca distribuția să fie actualizată când se schimbă rutele. STR_CONFIG_SETTING_DISTRIBUTION_PAX :Modalitatea de distribuire a pasagerilor: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"simetric" înseamnă că aproximativ același număr de pasageri va fi transportat din stația A spre stația B, precum de la B la A. "asimetric" presupune transportul unui număr arbitrar de pasageri în fiecare direcție. "manual" înseamnă că repartizarea pasagerilor nu va fi automatizată. +STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"Simetric" înseamnă că aproximativ același număr de pasageri va fi transportat din stația A spre stația B, precum de la B la A. "Asimetric" presupune transportul unui număr arbitrar de pasageri în fiecare direcție. "Manual" înseamnă că repartizarea pasagerilor nu va fi automatizată. STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Modalitatea de distribuire a poştei: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"simetric" înseamnă că aproximativ aceeași cantitate de poștă va fi expediată din stația A spre stația B, precum de la B la A. "asimetric" presupune expedierea de cantități arbitrare de poștă în fiecare direcție. "manual" înseamnă că repartizarea poștei nu va fi automatizată. +STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"Simetric" înseamnă că aproximativ aceeași cantitate de poștă va fi expediată din stația A spre stația B, precum de la B la A. "Asimetric" presupune expedierea de cantități arbitrare de poștă în fiecare direcție. "Manual" înseamnă că repartizarea poștei nu va fi automatizată. STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Modalitatea de distribuire pentru clasa de cargo BLINDAT: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Clasa de marfă ARMORED conține obiecte de valoare în climat temperat, diamante în climat subtropical sau aur în climat subarctic. NewGRF-urile pot schimba asta. „simetric” înseamnă că aproximativ aceeași cantitate din acea marfă va fi trimisă de la o stație A la o stație B ca de la B la A. „asimetric” înseamnă că cantități arbitrare ale acelei mărfuri pot fi trimise în ambele direcții. „manual” înseamnă că nu va avea loc nicio distribuție automată pentru acea marfă. Este recomandat să setați acest lucru la asimetric sau manual atunci când jucați subarctic, deoarece băncile nu vor trimite aur înapoi la minele de aur. Pentru cele temperate și subtropicale, puteți alege și simetric, deoarece băncile vor trimite obiectele de valoare înapoi la banca de origine a unei încărcături de obiecte de valoare. +STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Clasa de marfă ARMORED conține obiecte de valoare în climat temperat, diamante în climat subtropical sau aur în climat subarctic. NewGRF-urile pot schimba asta. „Simetric” înseamnă că aproximativ aceeași cantitate din acea marfă va fi trimisă de la o stație A la o stație B ca de la B la A. „Asimetric” înseamnă că cantități arbitrare ale acelei mărfuri pot fi trimise în ambele direcții. „Manual” înseamnă că nu va avea loc nicio distribuție automată pentru acea marfă. Este recomandat să setați acest lucru la asimetric sau manual atunci când jucați subarctic sau subtropical, deoarece băncile doar primesc bunuri in aceste climate. Pentru climatul temperat, puteți alege și simetric, deoarece băncile vor trimite obiectele de valoare înapoi la banca de origine a unei încărcături. STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Modalitatea de distribuire pentru alte clase de cargo: {STRING} -STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"asimetric" înseamnă că pot fi trimise cantități diferite de marfă în ambele direcții. "manual" înseamnă că nu se va face distribuție automată pentru acele mărfuri. +STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimetric" înseamnă că pot fi trimise cantități diferite de marfă în ambele direcții. "Manual" înseamnă că nu se va face distribuție automată pentru acele mărfuri. ###length 3 STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimetric @@ -2698,6 +2698,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Creşte STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Alege pod de cale ferată STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Alege pod rutier STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Alegere pod - click pe podul preferat pentru a-l construi +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspensie, Oţel STR_BRIDGE_NAME_GIRDER_STEEL :Grindă, Oţel STR_BRIDGE_NAME_CANTILEVER_STEEL :Arc, Oţel @@ -2817,7 +2821,7 @@ STR_OBJECT_CLASS_TRNS :Transmiţătoar STR_PLANT_TREE_CAPTION :{WHITE}Arbori STR_PLANT_TREE_TOOLTIP :{BLACK}Alege specia de arbori de plantat. Dacă există deja un arbore în locația dorită, se vor adăuga arbori de tip mixt, indiferent de specia selectată STR_TREES_RANDOM_TYPE :{BLACK}Arbori din specii aleatoare -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Plantează arbori din diverse specii la întâmplare. Shift comută între plantare/afişare cost estimat +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Plantează arbori din diverse specii la întâmplare. Ctrl selectează zona în diagonală. Shift comută între plantare/afişare cost estimat STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Arbori aleatori STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plantează aleator arbori pe uscat STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal diff --git a/src/lang/russian.txt b/src/lang/russian.txt index 982d153952..1421d18ab9 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -2869,6 +2869,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Увел STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Выберите железнодорожный мост STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Выберите тип моста STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Выбор моста - щёлкните по изображению моста, который вы хотите построить +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Висячий стальной STR_BRIDGE_NAME_GIRDER_STEEL :Балочный стальной STR_BRIDGE_NAME_CANTILEVER_STEEL :Консольный стальной From 8aeef665c724f76a6f799f968dd20595afff313b Mon Sep 17 00:00:00 2001 From: Rubidium Date: Thu, 19 Jan 2023 20:07:10 +0100 Subject: [PATCH 15/17] Fix #10377, Fix 94167df: bad sorting of rail vehicles when primary variant is missing --- src/build_vehicle_gui.cpp | 13 ++++--------- src/engine_gui.cpp | 2 +- src/engine_gui.h | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 91b94d652f..6b5746ae4e 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1334,8 +1334,7 @@ struct BuildVehicleWindow : Window { { std::vector variants; EngineID sel_id = INVALID_ENGINE; - int num_engines = 0; - int num_wagons = 0; + size_t num_engines = 0; list.clear(); @@ -1356,12 +1355,7 @@ struct BuildVehicleWindow : Window { list.emplace_back(eid, e->info.variant_id, e->display_flags, 0); - if (rvi->railveh_type != RAILVEH_WAGON) { - num_engines++; - } else { - num_wagons++; - } - + if (rvi->railveh_type != RAILVEH_WAGON) num_engines++; if (e->info.variant_id != eid && e->info.variant_id != INVALID_ENGINE) variants.push_back(e->info.variant_id); if (eid == this->sel_engine) sel_id = eid; } @@ -1371,6 +1365,7 @@ struct BuildVehicleWindow : Window { if (std::find(list.begin(), list.end(), variant) == list.end()) { const Engine *e = Engine::Get(variant); list.emplace_back(variant, e->info.variant_id, e->display_flags | EngineDisplayFlags::Shaded, 0); + if (e->u.rail.railveh_type != RAILVEH_WAGON) num_engines++; } } @@ -1388,7 +1383,7 @@ struct BuildVehicleWindow : Window { EngList_SortPartial(&list, _engine_sort_functions[0][this->sort_criteria], 0, num_engines); /* and finally sort wagons */ - EngList_SortPartial(&list, _engine_sort_functions[0][this->sort_criteria], num_engines, num_wagons); + EngList_SortPartial(&list, _engine_sort_functions[0][this->sort_criteria], num_engines, list.size() - num_engines); } /* Figure out what road vehicle EngineIDs to put in the list */ diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 452b9b6eaa..6bad2fb331 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -337,7 +337,7 @@ void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare) * @param begin start of sorting * @param num_items count of items to be sorted */ -void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items) +void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, size_t begin, size_t num_items) { if (num_items < 2) return; assert(begin < el->size()); diff --git a/src/engine_gui.h b/src/engine_gui.h index 7a766bfc8a..87af6f3562 100644 --- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -32,7 +32,7 @@ typedef GUIList GUIEngineList; typedef bool EngList_SortTypeFunction(const GUIEngineListItem&, const GUIEngineListItem&); ///< argument type for #EngList_Sort. void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare); -void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); +void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, size_t begin, size_t num_items); StringID GetEngineCategoryName(EngineID engine); StringID GetEngineInfoString(EngineID engine); From 9c5de7fd722022f98d717ef2ee25a5855665fc3f Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Mon, 23 Jan 2023 12:08:19 -0500 Subject: [PATCH 16/17] Fix #10395: When loading old saves, don't forcibly bar level crossings (#10400) --- src/saveload/afterload.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index b1eafabbf3..7bbb2f8456 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1985,13 +1985,6 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(SLV_102)) { - for (TileIndex t = 0; t < map_size; t++) { - /* Now all crossings should be in correct state */ - if (IsLevelCrossingTile(t)) UpdateLevelCrossing(t, false); - } - } - if (IsSavegameVersionBefore(SLV_103)) { /* Non-town-owned roads now store the closest town */ UpdateNearestTownForRoadTiles(false); @@ -3196,9 +3189,9 @@ bool AfterLoadGame() } } - /* Refresh all level crossings to bar adjacent crossing tiles. */ + /* Refresh all level crossings to bar adjacent crossing tiles, if needed. */ for (TileIndex tile = 0; tile < Map::Size(); tile++) { - if (IsLevelCrossingTile(tile)) UpdateLevelCrossing(tile, false, true); + if (IsLevelCrossingTile(tile)) UpdateLevelCrossing(tile, false); } } From 97844df123d1888a042644097c873c3495ec54a4 Mon Sep 17 00:00:00 2001 From: translators Date: Mon, 23 Jan 2023 18:43:48 +0000 Subject: [PATCH 17/17] Update: Translations from eints spanish: 4 changes by MontyMontana --- src/lang/spanish.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index 809b406e77..bbe74b23b9 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -2699,6 +2699,10 @@ STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Incremen STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selección de Puente de Ferrocarril STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Selección de Cuente de Carretera STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Selección de puente - Clica en el puente elegido para construirlo +STR_SELECT_BRIDGE_INFO_NAME :{GOLD}{STRING} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED :{GOLD}{STRING},{} {VELOCITY} +STR_SELECT_BRIDGE_INFO_NAME_COST :{GOLD}{0:STRING},{} {WHITE}{2:CURRENCY_LONG} +STR_SELECT_BRIDGE_INFO_NAME_MAX_SPEED_COST :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG} STR_BRIDGE_NAME_SUSPENSION_STEEL :Colgante, Acero STR_BRIDGE_NAME_GIRDER_STEEL :Tirantes, Acero STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantiléver, Acero