diff --git a/changelog.txt b/changelog.txt index 395cfef8e5..87f2bf8f22 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,25 @@ +14.0 (2024-04-13) +------------------------------------------------------------------------ +Update: New title game for 14.0 +Fix #12477: Crash when launching OpenTTD from within a Dropbox folder (#12478) +Fix #12233: Mini order list overlaps vehicle group name (#12423) +Fix #12114: Viewport coords of crashed aircraft not updated when falling (#12424) +Fix #12395: Ensure president name widget is tall enough (#12419) +Fix #12415: Incorrect payment for aircraft secondary cargo (#12416) +Fix #12387: [NewGRF] Wrong tile offset passed to rail station CB 149 (slope check) +Fix #12388: Autoreplacing train heads slowly made the unit number grow (#12389) +Fix #12368: Incorrect offset for click position within industry chain window (#12370) +Fix: Aircraft can float above the ground when crashed (#12425) +Fix: Segfault when using -q without providing a . character (#12418) +Fix: Wrong scrolling dropdown list position with RTL (#12412) +Fix: [Win32] Force font mapper to only use TrueType fonts (#12406) +Fix: "-q" displays NewGRF IDs in the wrong byte-order (#12397) +Fix: Do not send chat to clients that have not authorized yet (#12377) +Fix: [NewGRF] Label for fruit incorrectly changed to `FRUI` from `FRUT` (#12367) +Fix: [Script] ScriptSubsidy::GetExpireDate should return an economy-date (#12372) +Revert #11603: [Script] AI/GSTimeMode was not the best solution for economy/calendar support (#12362) + + 14.0-RC3 (2024-03-23) ------------------------------------------------------------------------ Fix #12347: Crash attempting to find catchment tiles of a station with no catchment area (#12348) diff --git a/src/aircraft.h b/src/aircraft.h index 3ac5a6102e..c05d21a1ca 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -111,6 +111,7 @@ struct Aircraft final : public SpecializedVehicle { void OnNewEconomyDay() override; uint Crash(bool flooded = false) override; TileIndex GetOrderStationLocation(StationID station) override; + TileIndex GetCargoTile() const override { return this->First()->tile; } ClosestDepot FindClosestDepot() override; /** diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 7a47597f84..41208608d0 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1182,10 +1182,13 @@ static bool HandleCrashedAircraft(Aircraft *v) if (v->crashed_counter < 500 && st == nullptr && ((v->crashed_counter % 3) == 0) ) { 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) { + if (v->z_pos <= z) { v->crashed_counter = 500; - v->z_pos++; + v->z_pos = z + 1; + } else { + v->crashed_counter = 0; } + SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos); } if (v->crashed_counter < 650) { diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index e73ebedec4..f26e01e252 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1181,6 +1181,7 @@ CommandCost CmdRenamePresident(DoCommandFlag flags, const std::string &text) } } + InvalidateWindowClassesData(WC_COMPANY, 1); MarkWholeScreenDirty(); CompanyAdminUpdate(c); } diff --git a/src/company_gui.cpp b/src/company_gui.cpp index a58c00fdf0..9921817b0b 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -2497,6 +2497,14 @@ struct CompanyWindow : Window } } + void OnResize() override + { + NWidgetResizeBase *wid = this->GetWidget(WID_C_FACE_TITLE); + SetDParam(0, this->owner); + int y = GetStringHeight(STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE, wid->current_x); + if (wid->UpdateVerticalSize(y)) this->ReInit(0, 0); + } + void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override { switch (widget) { @@ -2632,6 +2640,14 @@ struct CompanyWindow : Window break; } } + + void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override + { + if (gui_scope && data == 1) { + /* Manually call OnResize to adjust minimum height of president name widget. */ + OnResize(); + } + } }; static WindowDesc _company_desc(__FILE__, __LINE__, diff --git a/src/economy.cpp b/src/economy.cpp index 27d43e1d63..e64b13735a 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1301,7 +1301,7 @@ void PrepareUnload(Vehicle *front_v) front_v->last_station_visited, next_station, front_v->current_order.GetUnloadType(), ge, front_v->cargo_payment, - v->tile); + v->GetCargoTile()); if (v->cargo.UnloadCount() > 0) SetBit(v->vehicle_flags, VF_CARGO_UNLOADING); } } @@ -1441,7 +1441,7 @@ struct ReturnCargoAction */ bool operator()(Vehicle *v) { - v->cargo.Return(UINT_MAX, &this->st->goods[v->cargo_type].cargo, this->next_hop, v->tile); + v->cargo.Return(UINT_MAX, &this->st->goods[v->cargo_type].cargo, this->next_hop, v->GetCargoTile()); return true; } }; @@ -1476,7 +1476,7 @@ struct FinalizeRefitAction { if (this->do_reserve) { this->st->goods[v->cargo_type].cargo.Reserve(v->cargo_cap - v->cargo.RemainingCount(), - &v->cargo, this->next_station, v->tile); + &v->cargo, this->next_station, v->GetCargoTile()); } this->consist_capleft[v->cargo_type] += v->cargo_cap - v->cargo.RemainingCount(); return true; @@ -1567,7 +1567,7 @@ struct ReserveCargoAction { { if (v->cargo_cap > v->cargo.RemainingCount() && MayLoadUnderExclusiveRights(st, v)) { st->goods[v->cargo_type].cargo.Reserve(v->cargo_cap - v->cargo.RemainingCount(), - &v->cargo, *next_station, v->tile); + &v->cargo, *next_station, v->GetCargoTile()); } return true; @@ -1701,7 +1701,7 @@ static void LoadUnloadVehicle(Vehicle *front) uint new_remaining = v->cargo.RemainingCount() + v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER); if (v->cargo_cap < new_remaining) { /* Return some of the reserved cargo to not overload the vehicle. */ - v->cargo.Return(new_remaining - v->cargo_cap, &ge->cargo, INVALID_STATION, v->tile); + v->cargo.Return(new_remaining - v->cargo_cap, &ge->cargo, INVALID_STATION, v->GetCargoTile()); } /* Keep instead of delivering. This may lead to no cargo being unloaded, so ...*/ @@ -1728,7 +1728,7 @@ static void LoadUnloadVehicle(Vehicle *front) } } - amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment, v->tile); + amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment, v->GetCargoTile()); remaining = v->cargo.UnloadCount() > 0; if (amount_unloaded > 0) { dirty_vehicle = true; @@ -1798,7 +1798,7 @@ static void LoadUnloadVehicle(Vehicle *front) if (v->cargo.StoredCount() == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO); if (_settings_game.order.gradual_loading) cap_left = std::min(cap_left, GetLoadAmount(v)); - uint loaded = ge->cargo.Load(cap_left, &v->cargo, next_station, v->tile); + uint loaded = ge->cargo.Load(cap_left, &v->cargo, next_station, v->GetCargoTile()); if (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0) { /* Remember if there are reservations left so that we don't stop * loading before they're loaded. */ diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 7a0a0a9618..62fd131b0b 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -164,14 +164,14 @@ static inline void GetAllCargoSuffixes(CargoSuffixInOut use_input, CargoSuffixTy uint cargotype = local_id << 16 | use_input; GetCargoSuffix(cargotype, cst, ind, ind_type, indspec, suffixes[j]); } else { - suffixes[j].text[0] = '\0'; + suffixes[j].text.clear(); suffixes[j].display = CSD_CARGO; } } } else { /* Compatible behaviour with old 3-in-2-out scheme */ for (uint j = 0; j < lengthof(suffixes); j++) { - suffixes[j].text[0] = '\0'; + suffixes[j].text.clear(); suffixes[j].display = CSD_CARGO; } switch (use_input) { @@ -203,7 +203,7 @@ static inline void GetAllCargoSuffixes(CargoSuffixInOut use_input, CargoSuffixTy */ void GetCargoSuffix(CargoSuffixInOut use_input, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, CargoID cargo, uint8_t slot, CargoSuffix &suffix) { - suffix.text[0] = '\0'; + suffix.text.clear(); suffix.display = CSD_CARGO; if (!IsValidCargoID(cargo)) return; if (indspec->behaviour & INDUSTRYBEH_CARGOTYPES_UNLIMITED) { diff --git a/src/ini.cpp b/src/ini.cpp index 8ce215d85b..4488c05eae 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -22,11 +22,7 @@ # include #endif -#ifdef _WIN32 -# include -# include -# include "core/mem_func.hpp" -#endif +#include #include "safeguards.h" @@ -91,30 +87,11 @@ bool IniFile::SaveToDisk(const std::string &filename) if (ret != 0) return false; #endif -#if defined(_WIN32) - /* Allocate space for one more \0 character. */ - wchar_t tfilename[MAX_PATH + 1], tfile_new[MAX_PATH + 1]; - wcsncpy(tfilename, OTTD2FS(filename).c_str(), MAX_PATH); - wcsncpy(tfile_new, OTTD2FS(file_new).c_str(), MAX_PATH); - /* SHFileOperation wants a double '\0' terminated string. */ - tfilename[MAX_PATH - 1] = '\0'; - tfile_new[MAX_PATH - 1] = '\0'; - tfilename[wcslen(tfilename) + 1] = '\0'; - tfile_new[wcslen(tfile_new) + 1] = '\0'; - - /* Rename file without any user confirmation. */ - SHFILEOPSTRUCT shfopt; - MemSetT(&shfopt, 0); - shfopt.wFunc = FO_MOVE; - shfopt.fFlags = FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_SILENT; - shfopt.pFrom = tfile_new; - shfopt.pTo = tfilename; - SHFileOperation(&shfopt); -#else - if (rename(file_new.c_str(), filename.c_str()) < 0) { - Debug(misc, 0, "Renaming {} to {} failed; configuration not saved", file_new, filename); + std::error_code ec; + std::filesystem::rename(OTTD2FS(file_new), OTTD2FS(filename), ec); + if (ec) { + Debug(misc, 0, "Renaming {} to {} failed; configuration not saved: {}", file_new, filename, ec.message()); } -#endif #ifdef __EMSCRIPTEN__ EM_ASM(if (window["openttd_syncfs"]) openttd_syncfs()); diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index bc4f5e8297..2304cc7585 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -188,7 +188,7 @@ STR_COLOUR_ORANGE :Laranja STR_COLOUR_BROWN :Marrom STR_COLOUR_GREY :Cinza STR_COLOUR_WHITE :Branco -STR_COLOUR_RANDOM :Aleatório +STR_COLOUR_RANDOM :Aleatória ###length 17 STR_COLOUR_SECONDARY_DARK_BLUE :Azul Escuro @@ -269,8 +269,8 @@ STR_UNITS_PERIODS :{NUM}{NBSP}per # Common window strings STR_LIST_FILTER_TITLE :{BLACK}Filtro: -STR_LIST_FILTER_OSKTITLE :{BLACK}Inserir uma ou mais palavras-chave para filtrar a lista -STR_LIST_FILTER_TOOLTIP :{BLACK}Digite uma ou mais palavras-chave para procurar na lista +STR_LIST_FILTER_OSKTITLE :{BLACK}Introduza uma palavra-chave para filtrar a lista +STR_LIST_FILTER_TOOLTIP :{BLACK}Introduzir uma ou mais palavras-chave para procurar na lista STR_TOOLTIP_GROUP_ORDER :{BLACK}Escolher a ordem de agrupamento STR_TOOLTIP_SORT_ORDER :{BLACK}Escolher a ordenação (descendente/ascendente) @@ -278,7 +278,7 @@ STR_TOOLTIP_SORT_CRITERIA :{BLACK}Escolher STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Escolher o critério de seleção STR_BUTTON_SORT_BY :{BLACK}Ordenar por STR_BUTTON_CATCHMENT :{BLACK}Cobertura -STR_TOOLTIP_CATCHMENT :{BLACK}Mostrar/Ocultar a área de cobertura +STR_TOOLTIP_CATCHMENT :{BLACK}Mostrar/Ocultar área de cobertura STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Fechar janela STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Título da janela - arraste isto para mover a janela @@ -384,7 +384,7 @@ STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pausar o STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Avanço rápido do jogo STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Opções e configurações STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Salvar, abrir ou abandonar o jogo, sair do programa -STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Abrir mapa, visualização extra, fluxo de cargas ou lista de placas +STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Abrir mapa, visualização extra, fluxo de carga ou lista de placas STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Abrir lista de localidades ou encontrar localidade STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Abrir lista de subsídios STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Abrir lista de estações da empresa @@ -405,12 +405,12 @@ STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construi STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Construir infraestrutura rodoviária STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construir infraestrutura para bondes STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construir infraestrutura hidroviária -STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construir aeroportos +STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construir aeroporto STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Abrir menu de paisagismo, menu de árvores ou colocar uma placa STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Abrir janela de som/música STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Abrir última mensagem/notícia, histórico de mensagens ou apagar todas as mensagens STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Abrir informações do terreno, menu de captura de tela, créditos do OpenTTD ou ferramentas de desenvolvedor -STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Trocar barras de ferramentas +STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Trocar barra de ferramentas # Extra tooltips for the scenario editor toolbar STR_SCENEDIT_TOOLBAR_TOOLTIP_SAVE_SCENARIO_LOAD_SCENARIO :{BLACK}Salvar cenário, abrir cenário, abandonar editor de cenário, sair @@ -418,7 +418,7 @@ STR_SCENEDIT_TOOLBAR_OPENTTD :{YELLOW}OpenTTD STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Editor de Cenário STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Mover a data inicial 1 ano para trás STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Mover a data inicial 1 ano para frente -STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Clique para digitar o ano de início +STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Clique para alterar o ano de início STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Abrir mapa, visualização extra, lista de placas, de localidades ou de indústrias STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Abrir menu de paisagismo ou gerar um novo mundo STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Construir ou gerar localidades @@ -499,14 +499,14 @@ STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Fundar nova ind STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Construção de ferrovia STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Construção de ferrovia eletrificada STR_RAIL_MENU_MONORAIL_CONSTRUCTION :Construção de monotrilho -STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Construção de MagLev +STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Construção de Maglev # Road construction menu STR_ROAD_MENU_ROAD_CONSTRUCTION :Construção de estrada STR_ROAD_MENU_TRAM_CONSTRUCTION :Construção de linha de bonde # Waterways construction menu -STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Construção de hidrovias +STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Construção de hidrovia # Aairport construction menu STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Construção de aeroporto @@ -533,8 +533,8 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de tela STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar taxa de quadros STR_ABOUT_MENU_ABOUT_OPENTTD :Sobre o 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alinhador de sprites -STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Mostrar/Ocultar as caixas delimitadoras -STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Ativar/Desativar coloração dos blocos sujos +STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Mostrar/Ocultar caixas delimitadoras +STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Ativar coloração dos blocos sujos STR_ABOUT_MENU_TOGGLE_WIDGET_OUTLINES :Mostrar/Ocultar contornos dos widgets ###length 31 @@ -668,7 +668,7 @@ STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}Total: STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP_YEARS :{BLACK}Número de veículos que geraram lucro no último ano. Isso inclui veículos rodoviários, trens, embarcações e aeronaves STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP_PERIODS :{BLACK}Número de veículos que geraram lucro no último período. Isso inclui veículos rodoviários, trens, embarcações e aeronaves -STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Número de estações atendidas recentemente. Estações de trem, paradas de ônibus, aeroportos, etc. são contados separadamente, mesmo que pertençam à mesma estação +STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Número de estações atendidas recentemente. Estações de trem, paradas de ônibus, aeroportos, etc., são contados separadamente, mesmo que pertençam à mesma estação STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP_YEARS :{BLACK}Lucro do veículo com o menor rendimento (apenas veículos com mais de dois anos são considerados) STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP_PERIODS :{BLACK}Lucro do veículo com o menor rendimento (apenas veículos com mais de dois períodos são considerados) STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Quantia de dinheiro obtida no trimestre com o menor lucro dos últimos 12 trimestres @@ -680,7 +680,7 @@ STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP :{BLACK}O montan STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP :{BLACK}Total de pontos de pontos possíveis # Music window -STR_MUSIC_JAZZ_JUKEBOX_CAPTION :{WHITE}Jukebox de Jazz +STR_MUSIC_JAZZ_JUKEBOX_CAPTION :{WHITE}Jukebox de Música STR_MUSIC_PLAYLIST_ALL :{TINY_FONT}{BLACK}Todos STR_MUSIC_PLAYLIST_OLD_STYLE :{TINY_FONT}{BLACK}Antigo STR_MUSIC_PLAYLIST_NEW_STYLE :{TINY_FONT}{BLACK}Moderno @@ -732,7 +732,7 @@ STR_HIGHSCORE_PERFORMANCE_TITLE_ENTREPRENEUR :Empreendedor STR_HIGHSCORE_PERFORMANCE_TITLE_INDUSTRIALIST :Industrial STR_HIGHSCORE_PERFORMANCE_TITLE_CAPITALIST :Capitalista STR_HIGHSCORE_PERFORMANCE_TITLE_MAGNATE :Magnata -STR_HIGHSCORE_PERFORMANCE_TITLE_MOGUL :Mandachuva +STR_HIGHSCORE_PERFORMANCE_TITLE_MOGUL :Grande magnata STR_HIGHSCORE_PERFORMANCE_TITLE_TYCOON_OF_THE_CENTURY :Magnata do Século STR_HIGHSCORE_NAME :{PRESIDENT_NAME}, {COMPANY} STR_HIGHSCORE_STATS :{BIG_FONT}'{STRING}' ({COMMA}) @@ -836,11 +836,11 @@ STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLAC STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeira embarcação chega em {STATION}! STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeira aeronave chega em {STATION}! -STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Acidente de Trem!{}{COMMA} morrem na explosão após a colisão +STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Acidente de Trem!{}{COMMA} morre{P "" m} na explosão após a colisão STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER :{BIG_FONT}{BLACK}Acidente Rodoviário!{}Condutor morre na explosão após a colisão com um trem -STR_NEWS_ROAD_VEHICLE_CRASH :{BIG_FONT}{BLACK}Acidente Rodoviário!{}{COMMA} morrem na explosão após a colisão com um trem -STR_NEWS_AIRCRAFT_CRASH :{BIG_FONT}{BLACK}Acidente Aéreo!{}{COMMA} morrem na explosão em {STATION} -STR_NEWS_PLANE_CRASH_OUT_OF_FUEL :{BIG_FONT}{BLACK}Acidente Aéreo!{}Aeronave ficou sem combustível, {COMMA} morrem na explosão +STR_NEWS_ROAD_VEHICLE_CRASH :{BIG_FONT}{BLACK}Acidente Rodoviário!{}{COMMA} morre{P "" m} na explosão após a colisão com um trem +STR_NEWS_AIRCRAFT_CRASH :{BIG_FONT}{BLACK}Acidente Aéreo!{}{COMMA} morre{P "" m} na explosão em {STATION} +STR_NEWS_PLANE_CRASH_OUT_OF_FUEL :{BIG_FONT}{BLACK}Acidente Aéreo!{}Aeronave ficou sem combustível, {COMMA} morre{P "" m} na explosão STR_NEWS_DISASTER_ZEPPELIN :{BIG_FONT}{BLACK}Desastre de Zepelim em {STATION}! STR_NEWS_DISASTER_SMALL_UFO :{BIG_FONT}{BLACK}Veículo rodoviário destruído em colisão com OVNI! @@ -988,7 +988,7 @@ STR_GAME_OPTIONS_CURRENCY_ISK :Coroa Islandesa STR_GAME_OPTIONS_CURRENCY_ITL :Lira Italiana STR_GAME_OPTIONS_CURRENCY_NLG :Florim Holandês STR_GAME_OPTIONS_CURRENCY_NOK :Coroa Norueguesa -STR_GAME_OPTIONS_CURRENCY_PLN :Złoty Polonês +STR_GAME_OPTIONS_CURRENCY_PLN :Zloty Polonês STR_GAME_OPTIONS_CURRENCY_RON :Leu Romeno STR_GAME_OPTIONS_CURRENCY_RUR :Rublo Russo STR_GAME_OPTIONS_CURRENCY_SIT :Tolar Esloveno @@ -1187,7 +1187,7 @@ STR_SUBSIDY_X4 :x4 ###length 4 STR_CLIMATE_TEMPERATE_LANDSCAPE :Clima temperado -STR_CLIMATE_SUB_ARCTIC_LANDSCAPE :Clima subárctico +STR_CLIMATE_SUB_ARCTIC_LANDSCAPE :Clima subártico STR_CLIMATE_SUB_TROPICAL_LANDSCAPE :Clima subtropical STR_CLIMATE_TOYLAND_LANDSCAPE :Terra dos Brinquedos @@ -1522,15 +1522,15 @@ STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Idade relativa STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE :{COMMA} m{P 0 ês eses} antes STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} m{P 0 ês eses} depois -STR_CONFIG_SETTING_AUTORENEW_MONEY :Quantia mínima de dinheiro necessária para fazer renovação automática: {STRING} -STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Quantia mínima de dinheiro que deve existir na conta bancária para a renovação automática de veículos ser considerada +STR_CONFIG_SETTING_AUTORENEW_MONEY :Dinheiro mínimo necessário para fazer renovação automática: {STRING} +STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Quantia mínima de dinheiro que deve permanecer no banco antes de considerar a renovação automática de veículos STR_CONFIG_SETTING_ERRMSG_DURATION :Duração da mensagem de erro: {STRING} STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT :Tempo de exibição de mensagens de erro numa janela vermelha. Algumas mensagens de erro (crítico) não são fechadas automaticamente após este tempo e precisam ser fechadas manualmente STR_CONFIG_SETTING_HOVER_DELAY :Mostrar textos de ajuda: {STRING} -STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Tempo que o cursor deve ficar sobre algum elemento da interface para que os textos de ajuda sejam mostrados. Outro modo de exibir os textos de ajuda é fixar este valor em 0 e clicar com o botão direito do mouse -STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Manter o cursor por {COMMA} milissegundo{P 0 "" s} +STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Tempo que o ponteiro do mouse deve ficar sobre algum elemento da interface para que os textos de ajuda sejam mostrados. Outro modo de exibir os textos de ajuda é fixar este valor em 0 e clicar com o botão direito do mouse +STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Manter o ponteiro por {COMMA} milissegundo{P 0 "" s} ###setting-zero-is-special STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Botão direito @@ -1619,7 +1619,7 @@ STR_CONFIG_SETTING_STATION_SPREAD_HELPTEXT :Área máxima q STR_CONFIG_SETTING_SERVICEATHELIPAD :Manutenção automática de helicópteros em heliportos: {STRING} STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT :Efetuar manutenção de helicópteros após cada pouso, mesmo se não existir um depósito no aeroporto -STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Ligar ferramentas de paisagismo com construção de trilhos/estradas/água/aeroportos: {STRING} +STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Ligar ferramentas de paisagismo com construção de trilhos/estrada/aeroporto: {STRING} STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR_HELPTEXT :Ao abrir a barra de ferramentas de construção para um tipo de transporte, abrir também a barra de ferramentas de paisagismo STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :Cor do solo usada no minimapa: {STRING} @@ -1641,9 +1641,9 @@ STR_CONFIG_SETTING_SCROLLMODE :Comportamento d STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportamento de movimentação do mapa. A opção "posição do mouse travada" não funciona em todos os sistemas, tais como versões baseadas na web, telas sensíveis ao toque, Linux com Wayland e outros ###length 4 STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Mover visualização com o Botão Direito, posição do mouse travada -STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mover mapa com o Botão Direito, posição do mouse travada -STR_CONFIG_SETTING_SCROLLMODE_RMB :Mover mapa com o Botão Direito do Mouse -STR_CONFIG_SETTING_SCROLLMODE_LMB :Mover mapa com o Botão Esquerdo do Mouse +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mover mapa com Botão Direito, posição do mouse travada +STR_CONFIG_SETTING_SCROLLMODE_RMB :Mover mapa com Botão Direito do Mouse +STR_CONFIG_SETTING_SCROLLMODE_LMB :Mover mapa com Botão Esquerdo do Mouse STR_CONFIG_SETTING_SMOOTH_SCROLLING :Suavizar deslocamento da visualização: {STRING} STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controlar como a visualização principal se move para uma localização específica ao clicar no minimapa ou quando é dado um comando para ir até um objeto específico no mapa. Se ativado, a visualização se move suavemente. Se desativado, a visualização salta diretamente para o destino escolhido @@ -1672,7 +1672,7 @@ STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :Mover o mapa STR_CONFIG_SETTING_SCROLLWHEEL_OFF :Desativado STR_CONFIG_SETTING_OSK_ACTIVATION :Teclado virtual: {STRING} -STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Escolher o método para mostrar o teclado virtual para inserir texto em caixas de diálogo usando o cursor. Isto é útil para dispositivos pequenos que não possuem teclados +STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Escolher o método para mostrar o teclado virtual para inserir texto em caixas de diálogo usando apenas o cursor. Isto é útil para dispositivos pequenos que não possuem teclados ###length 4 STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Desativado STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Clique duplo @@ -1735,7 +1735,7 @@ STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Mostrar chegada STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Mostrar os horários previstos de chegada e de partida nos quadros de horários STR_CONFIG_SETTING_QUICKGOTO :Criação rápida de ordens de veículos: {STRING} -STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Pré-selecionar o cursor 'Ir Para' ao abrir a janela de ordens +STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Pré-selecionar o 'cursor Ir para' ao abrir a janela de ordens STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE :Tipo de trilho padrão (ao iniciar novo/abrir jogo): {STRING} STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT :Tipo de trilho a ser selecionado ao iniciar novo/abrir um jogo. 'Primeiro disponível' seleciona o tipo de trilho mais antigo. 'Último disponível' seleciona o tipo mais novo de trilho e 'Mais utilizado' seleciona o tipo que é mais usado atualmente @@ -1748,7 +1748,7 @@ STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Mostrar caminho STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Usar uma cor diferente nos trajetos reservados para auxiliar na solução de problemas com trens que se recusam a entrar em seções controlados por sinais de caminho STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :Manter as ferramentas de construção ativas após o uso: {STRING} -STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Manter as ferramentas de construção de pontes, túneis, etc. abertas após o uso +STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Manter as ferramentas de construção de pontes, túneis, etc., abertas após o uso STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS :Remover automaticamente os sinais durante a construção de ferrovias: {STRING} STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS_HELPTEXT :Remover automaticamente os sinais durante a construção de ferrovias se os sinais estiverem no caminho. Isso pode, potencialmente, causar acidentes de trens @@ -1839,7 +1839,7 @@ STR_CONFIG_SETTING_SERVINT_DISABLED :Desativado STR_CONFIG_SETTING_NOSERVICE :Desativar manutenção quando as quebras estão desativadas: {STRING} STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Quando ativado, veículos não recebem manutenção se não podem quebrar -STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY :Penalizar a velocidade de carregamento para trens que são mais longos que a estação: {STRING} +STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY :Penalizar velocidade de carregamento para trens mais longos que a estação: {STRING} STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT :Quando ativado, os trens que são muito compridos para a estação são carregados mais lentamente do que um trem que cabe na estação. Esta configuração não afeta a geração de rotas STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Ativar limite de velocidade para vagões: {STRING} @@ -2419,8 +2419,8 @@ STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}Adiciona STR_NETWORK_SERVER_LIST_START_SERVER :{BLACK}Iniciar servidor STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP :{BLACK}Iniciar um servidor próprio -STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}Digitar o seu nome -STR_NETWORK_SERVER_LIST_ENTER_SERVER_ADDRESS :{BLACK}Digitar o endereço de servidor ou código de convite +STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}Introduza o seu nome +STR_NETWORK_SERVER_LIST_ENTER_SERVER_ADDRESS :{BLACK}Endereço do servidor ou código de convite # Start new multiplayer server STR_NETWORK_START_SERVER_CAPTION :{WHITE}Iniciar novo jogo multijogador @@ -2439,7 +2439,7 @@ STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} em STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Número máximo de empresas: STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES_TOOLTIP :{BLACK}Limitar o servidor a um certo número de empresas -STR_NETWORK_START_SERVER_NEW_GAME_NAME_OSKTITLE :{BLACK}Coloque o nome para o jogo em rede +STR_NETWORK_START_SERVER_NEW_GAME_NAME_OSKTITLE :{BLACK}Introduza um nome para o jogo em rede # Network connecting window STR_NETWORK_CONNECTING_CAPTION :{WHITE}Conectando... @@ -2559,7 +2559,7 @@ STR_NETWORK_CHAT_CLIENT :[Privado] {STRI STR_NETWORK_CHAT_TO_CLIENT :[Privado] Para {STRING}: {WHITE}{STRING} STR_NETWORK_CHAT_ALL :[Todos] {STRING}: {WHITE}{STRING} STR_NETWORK_CHAT_EXTERNAL :[{3:STRING}] {0:STRING}: {WHITE}{1:STRING} -STR_NETWORK_CHAT_OSKTITLE :{BLACK}Digitar a mensagem para conversar na rede +STR_NETWORK_CHAT_OSKTITLE :{BLACK}Introduza a mensagem para conversar na rede # Network messages STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Não foram encontradas interfaces de rede ou o jogo foi compilado sem ENABLE_NETWORK @@ -2643,14 +2643,14 @@ STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}O servid STR_NETWORK_MESSAGE_KICKED :*** {STRING} foi expulso. Motivo: ({STRING}) STR_NETWORK_ERROR_COORDINATOR_REGISTRATION_FAILED :{WHITE}Falha ao registrar o servidor -STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Outro servidor com o mesmo código de convite foi registrado. Mudando para o tipo de jogo "local". +STR_NETWORK_ERROR_COORDINATOR_REUSE_OF_INVITE_CODE :{WHITE}Outro servidor com o mesmo código de convite foi registrado. Mudando o jogo para o tipo "local". STR_NETWORK_ERROR_COORDINATOR_ISOLATED :{WHITE}O seu servidor não permite conexões remotas STR_NETWORK_ERROR_COORDINATOR_ISOLATED_DETAIL :{WHITE}Outros jogadores não poderão se conectar ao seu servidor # Content downloading window STR_CONTENT_TITLE :{WHITE}Download de conteúdo STR_CONTENT_TYPE_CAPTION :{BLACK}Tipo -STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}Tipo do conteúdo +STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}Tipo de conteúdo STR_CONTENT_NAME_CAPTION :{BLACK}Nome STR_CONTENT_NAME_CAPTION_TOOLTIP :{BLACK}Nome do conteúdo STR_CONTENT_MATRIX_TOOLTIP :{BLACK}Clique numa linha para ver os detalhes{}Clique na caixa de seleção para marcar e fazer o download @@ -2909,8 +2909,8 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Orienta STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Escolher a orientação da estação de bondes de carga # Waterways toolbar (last two for SE only) -STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Construção de Hidrovias -STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Hidrovias +STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Construção de Hidrovia +STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Hidrovia STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Construir canais. Pressione também Shift para só mostrar o custo estimado STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Construir eclusas. Pressione também Shift para só mostrar o custo estimado STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Construir depósito de embarcações (para compra e manutenção de embarcações). Pressione também Shift para só mostrar o custo estimado @@ -2979,11 +2979,11 @@ STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Plantar STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Plantar Aleatoriamente STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plantar árvores aleatoriamente no terreno STR_TREES_MODE_NORMAL_BUTTON :{BLACK}Normal -STR_TREES_MODE_NORMAL_TOOLTIP :{BLACK}Plantar árvores isoladas ao arrastar o cursor sobre o terreno +STR_TREES_MODE_NORMAL_TOOLTIP :{BLACK}Plantar árvores isoladas ao arrastar o ponteiro sobre o terreno STR_TREES_MODE_FOREST_SM_BUTTON :{BLACK}Bosque -STR_TREES_MODE_FOREST_SM_TOOLTIP :{BLACK}Plantar florestas pequenas ao arrastar o cursor sobre o terreno +STR_TREES_MODE_FOREST_SM_TOOLTIP :{BLACK}Plantar florestas pequenas ao arrastar o ponteiro sobre o terreno STR_TREES_MODE_FOREST_LG_BUTTON :{BLACK}Floresta -STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plantar florestas grandes ao arrastar o cursor sobre o terreno +STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}Plantar florestas grandes ao arrastar o ponteiro sobre o terreno # Land generation window (SE) STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Geração de Terreno @@ -3011,8 +3011,8 @@ STR_FOUND_TOWN_EXPAND_ALL_TOWNS :{BLACK}Expandir STR_FOUND_TOWN_EXPAND_ALL_TOWNS_TOOLTIP :{BLACK}Fazer com que todas as localidades cresçam ligeiramente STR_FOUND_TOWN_NAME_TITLE :{YELLOW}Nome da localidade: -STR_FOUND_TOWN_NAME_EDITOR_TITLE :{BLACK}Digitar o nome da localidade -STR_FOUND_TOWN_NAME_EDITOR_HELP :{BLACK}Clique para digitar o nome da localidade +STR_FOUND_TOWN_NAME_EDITOR_TITLE :{BLACK}Introduza o nome da localidade +STR_FOUND_TOWN_NAME_EDITOR_HELP :{BLACK}Clique para editar o nome da localidade STR_FOUND_TOWN_NAME_RANDOM_BUTTON :{BLACK}Nome aleatório STR_FOUND_TOWN_NAME_RANDOM_TOOLTIP :{BLACK}Gerar novo nome aleatório @@ -3084,7 +3084,7 @@ STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Constru STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Classe da estação: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Tipo de estação: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Classe do aeroporto: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Nome do aeroporto: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Tipo de aeroporto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Nome do quadrado do aeroporto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Carga aceita: {LTBLUE} @@ -3279,7 +3279,7 @@ STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Você q STR_SAVELOAD_DIRECTORY :{STRING} (Diretório) STR_SAVELOAD_PARENT_DIRECTORY :{STRING} (Diretório raiz) -STR_SAVELOAD_OSKTITLE :{BLACK}Digitar um nome para o jogo que será gravado +STR_SAVELOAD_OSKTITLE :{BLACK}Introduza um nome para o jogo que será gravado # World generation STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}Geração de Mapas @@ -3386,7 +3386,7 @@ STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT :{WHITE}Modifica STR_GENERATION_WORLD :{WHITE}Gerando Mundo... STR_GENERATION_ABORT :{BLACK}Cancelar STR_GENERATION_ABORT_CAPTION :{WHITE}Cancelar Geração de Mundo -STR_GENERATION_ABORT_MESSAGE :{YELLOW}Você realmente deseja cancelar a geração? +STR_GENERATION_ABORT_MESSAGE :{YELLOW}Você quer mesmo cancelar a geração? STR_GENERATION_PROGRESS :{WHITE}{NUM}% completo STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM} STR_GENERATION_WORLD_GENERATION :{BLACK}Geração de mundo @@ -3427,8 +3427,8 @@ STR_NEWGRF_SETTINGS_FILE_TOOLTIP :{BLACK}Uma list STR_NEWGRF_SETTINGS_SET_PARAMETERS :{BLACK}Definir parâmetros STR_NEWGRF_SETTINGS_SHOW_PARAMETERS :{BLACK}Mostrar parâmetros -STR_NEWGRF_SETTINGS_TOGGLE_PALETTE :{BLACK}Ativar/Desativar paleta -STR_NEWGRF_SETTINGS_TOGGLE_PALETTE_TOOLTIP :{BLACK}Ativar/Desativar a paleta do NewGRF selecionado.{}Faça isso quando os gráficos deste NewGRF ficarem cor de rosa no jogo +STR_NEWGRF_SETTINGS_TOGGLE_PALETTE :{BLACK}Comutar paleta +STR_NEWGRF_SETTINGS_TOGGLE_PALETTE_TOOLTIP :{BLACK}Comutar a paleta do NewGRF selecionado.{}Faça isso quando os gráficos deste NewGRF parecerem cor-de-rosa no jogo STR_NEWGRF_SETTINGS_APPLY_CHANGES :{BLACK}Aplicar modificações STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON :{BLACK}Procurar conteúdo em falta online @@ -3455,7 +3455,7 @@ STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Incompatí # NewGRF save preset window STR_SAVE_PRESET_CAPTION :{WHITE}Salvar predefinição STR_SAVE_PRESET_LIST_TOOLTIP :{BLACK}Lista de predefinições disponíveis, selecione uma para copiar o nome e usar na gravação abaixo -STR_SAVE_PRESET_TITLE :{BLACK}Digitar um nome para a predefinição +STR_SAVE_PRESET_TITLE :{BLACK}Introduza um nome para a predefinição STR_SAVE_PRESET_EDITBOX_TOOLTIP :{BLACK}Nome que está selecionado para salvar a predefinição STR_SAVE_PRESET_CANCEL :{BLACK}Cancelar STR_SAVE_PRESET_CANCEL_TOOLTIP :{BLACK}Não alterar a predefinição @@ -3584,14 +3584,14 @@ STR_INVALID_VEHICLE :InitNested(0); this->UpdateWarningStringSize(); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index b9f80c13ea..34952c845d 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -9501,7 +9501,7 @@ static void FinaliseIndustriesArray() for (auto &indtsp : _industry_tile_specs) { /* Apply default cargo translation map for unset cargo slots */ - for (uint i = 0; i < lengthof(indtsp.accepts_cargo); ++i) { + for (size_t i = 0; i < indtsp.accepts_cargo.size(); ++i) { if (!IsValidCargoID(indtsp.accepts_cargo[i])) indtsp.accepts_cargo[i] = GetCargoIDByLabel(GetActiveCargoLabel(indtsp.accepts_cargo_label[i])); } } diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 6175920ca5..0209ca2a7c 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -80,7 +80,7 @@ void ResetHouseClassIDs() HouseClassID AllocateHouseClassID(byte grf_class_id, uint32_t grfid) { /* Start from 1 because 0 means that no class has been assigned. */ - for (int i = 1; i != lengthof(_class_mapping); i++) { + for (uint i = 1; i != std::size(_class_mapping); i++) { HouseClassMapping *map = &_class_mapping[i]; if (map->class_id == grf_class_id && map->grfid == grfid) return (HouseClassID)i; diff --git a/src/openttd.cpp b/src/openttd.cpp index f904dd00bb..2f03838918 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -634,7 +634,8 @@ int openttd_main(int argc, char *argv[]) return ret; } - auto [_, title] = FiosGetSavegameListCallback(SLO_LOAD, mgo.opt, strrchr(mgo.opt, '.')); + std::string extension = std::filesystem::path(_file_to_saveload.name).extension().string(); + auto [_, title] = FiosGetSavegameListCallback(SLO_LOAD, mgo.opt, extension); _load_check_data.Clear(); SaveOrLoadResult res = SaveOrLoad(mgo.opt, SLO_CHECK, DFT_GAME_FILE, SAVE_DIR, false); diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index a16269aa6f..188cc47178 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1708,14 +1708,15 @@ bool AfterLoadGame() } } + /* At version 78, industry cargo types can be changed, and are stored with the industry. For older save versions + * copy the IndustrySpec's cargo types over to the Industry. */ if (IsSavegameVersionBefore(SLV_78)) { - uint j; - for (Industry * i : Industry::Iterate()) { + for (Industry *i : Industry::Iterate()) { const IndustrySpec *indsp = GetIndustrySpec(i->type); - for (j = 0; j < lengthof(i->produced); j++) { + for (uint j = 0; j < std::size(i->produced); j++) { i->produced[j].cargo = indsp->produced_cargo[j]; } - for (j = 0; j < lengthof(i->accepted); j++) { + for (uint j = 0; j < std::size(i->accepted); j++) { i->accepted[j].cargo = indsp->accepts_cargo[j]; } } diff --git a/src/settings.cpp b/src/settings.cpp index ff432187bb..bead270801 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1030,7 +1030,7 @@ static void GraphicsSetLoadConfig(IniFile &ini) if (const IniItem *item = group->GetItem("extra_params"); item != nullptr && item->value) { auto &extra_params = BaseGraphics::ini_data.extra_params; - extra_params.resize(lengthof(GRFConfig::param)); + extra_params.resize(0x80); // TODO: make ParseIntList work nicely with C++ containers int count = ParseIntList(item->value->c_str(), &extra_params.front(), extra_params.size()); if (count < 0) { SetDParamStr(0, BaseGraphics::ini_data.name); diff --git a/src/signature.cpp b/src/signature.cpp index a329410e35..2b64676e5d 100644 --- a/src/signature.cpp +++ b/src/signature.cpp @@ -205,6 +205,7 @@ static bool _ValidateSignatureFile(const std::string &filename) std::string text(filesize, '\0'); size_t len = fread(text.data(), filesize, 1, f); + FioFCloseFile(f); if (len != 1) { Debug(misc, 0, "Failed to validate signature: failed to read file: {}", filename); return false; diff --git a/src/stdafx.h b/src/stdafx.h index 5fc27f4dcc..9ff07ae5b4 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -289,6 +289,9 @@ static_assert(SIZE_MAX >= UINT32_MAX); #define M_PI 3.14159265358979323846 #endif /* M_PI_2 */ +template +char (&ArraySizeHelper(T (&array)[N]))[N]; + /** * Return the length of an fixed size array. * Unlike sizeof this function returns the number of elements @@ -297,7 +300,7 @@ static_assert(SIZE_MAX >= UINT32_MAX); * @param x The pointer to the first element of the array * @return The number of elements */ -#define lengthof(x) (sizeof(x) / sizeof(x[0])) +#define lengthof(array) (sizeof(ArraySizeHelper(array))) /** * Get the end element of an fixed size array. diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 7236987422..881365f0db 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -791,6 +791,8 @@ public: */ virtual TileIndex GetOrderStationLocation([[maybe_unused]] StationID station) { return INVALID_TILE; } + virtual TileIndex GetCargoTile() const { return this->tile; } + /** * Find the closest depot for this vehicle and tell us the location, * DestinationID and whether we should reverse. diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 72e65666e3..34ae71403e 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1673,7 +1673,7 @@ uint GetVehicleListHeight(VehicleType type, uint divisor) /* Name + vehicle + profit */ uint base = ScaleGUITrad(GetVehicleHeight(type)) + 2 * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical(); /* Drawing of the 4 small orders + profit*/ - if (type >= VEH_SHIP) base = std::max(base, 5U * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical()); + if (type >= VEH_SHIP) base = std::max(base, 6U * GetCharacterHeight(FS_SMALL) + WidgetDimensions::scaled.matrix.Vertical()); if (divisor == 1) return base; @@ -1766,7 +1766,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawString(tr.left, tr.right, ir.top, STR_GROUP_NAME, TC_BLACK, SA_LEFT, false, FS_SMALL); } - if (show_orderlist) DrawSmallOrderList(v, olr.left, olr.right, ir.top, this->order_arrow_width, v->cur_real_order_index); + if (show_orderlist) DrawSmallOrderList(v, olr.left, olr.right, ir.top + GetCharacterHeight(FS_SMALL), this->order_arrow_width, v->cur_real_order_index); TextColour tc; if (v->IsChainInDepot()) { @@ -1788,7 +1788,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawVehicleImage(vehgroup.vehicles_begin[i], {image_left + WidgetDimensions::scaled.hsep_wide * i, ir.top, image_right, ir.bottom}, selected_vehicle, EIT_IN_LIST, 0); } - if (show_orderlist) DrawSmallOrderList((vehgroup.vehicles_begin[0])->GetFirstOrder(), olr.left, olr.right, ir.top, this->order_arrow_width); + if (show_orderlist) DrawSmallOrderList((vehgroup.vehicles_begin[0])->GetFirstOrder(), olr.left, olr.right, ir.top + GetCharacterHeight(FS_SMALL), this->order_arrow_width); SetDParam(0, vehgroup.NumVehicles()); DrawString(ir.left, ir.right, ir.top + WidgetDimensions::scaled.framerect.top, STR_JUST_COMMA, TC_BLACK); diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index ffa7485e98..7bcc66bedb 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -165,7 +165,12 @@ struct DropdownWindow : Window { this->position.y = button_rect.bottom + 1; } - this->position.x = (_current_text_dir == TD_RTL) ? button_rect.right + 1 - (int)widget_dim.width : button_rect.left; + if (_current_text_dir == TD_RTL) { + /* In case the list is wider than the parent button, the list should be right aligned to the button and overflow to the left. */ + this->position.x = button_rect.right + 1 - (int)(widget_dim.width + (list_dim.height > widget_dim.height ? NWidgetScrollbar::GetVerticalDimension().width : 0)); + } else { + this->position.x = button_rect.left; + } this->items_dim = widget_dim; this->GetWidget(WID_DM_SHOW_SCROLL)->SetDisplayedPlane(list_dim.height > widget_dim.height ? 0 : SZSP_NONE);