From c7c3966eecf0933be9a7fcd0833e407c6497ba2d Mon Sep 17 00:00:00 2001 From: dP Date: Mon, 6 Jan 2020 18:49:34 +0300 Subject: [PATCH] Update to 1.10.0-beta2 --- CREDITS.md | 60 ++ Doxyfile | 2 - Makefile.bundle.in | 2 - Makefile.grf.in | 2 - Makefile.in | 2 - Makefile.lang.in | 2 - Makefile.msvc | 2 - Makefile.setting.in | 2 - Makefile.src.in | 2 - README.md | 796 ++++-------------- azure-pipelines/changelog.sh | 4 +- azure-pipelines/manifest.sh | 56 +- bin/ai/compat_0.7.nut | 2 - bin/ai/compat_1.0.nut | 2 - bin/ai/compat_1.1.nut | 2 - bin/ai/compat_1.10.nut | 2 - bin/ai/compat_1.2.nut | 2 - bin/ai/compat_1.3.nut | 2 - bin/ai/compat_1.4.nut | 2 - bin/ai/compat_1.5.nut | 2 - bin/ai/compat_1.6.nut | 2 - bin/ai/compat_1.7.nut | 2 - bin/ai/compat_1.8.nut | 2 - bin/ai/compat_1.9.nut | 2 - bin/ai/regression/completeness.sh | 2 - bin/ai/regression/regression_info.nut | 2 - bin/ai/regression/run.sh | 2 - bin/ai/regression/run.vbs | 2 - bin/ai/regression/tst_regression/main.nut | 2 - bin/ai/regression/tst_regression/require.nut | 2 - bin/ai/regression/tst_stationlist/main.nut | 2 - bin/game/compat_1.10.nut | 2 - bin/game/compat_1.2.nut | 2 - bin/game/compat_1.3.nut | 2 - bin/game/compat_1.4.nut | 2 - bin/game/compat_1.5.nut | 2 - bin/game/compat_1.6.nut | 2 - bin/game/compat_1.7.nut | 2 - bin/game/compat_1.8.nut | 2 - bin/game/compat_1.9.nut | 2 - changelog.txt | 26 +- config.lib | 10 +- configure | 2 - docs/debugging_desyncs.md | 56 ++ docs/directory_structure.md | 130 +++ docs/logging_and_performance_metrics.md | 101 +++ findversion.sh | 2 - known-bugs.txt | 4 +- media/baseset/no_music.obm | 2 - media/baseset/no_sound.obs | 2 - media/baseset/orig_dos.obg | 2 - media/baseset/orig_dos.obm | 2 - media/baseset/orig_dos.obs | 2 - media/baseset/orig_dos_de.obg | 2 - media/baseset/orig_tto.obm | 2 - media/baseset/orig_win.obg | 2 - media/baseset/orig_win.obm | 2 - media/baseset/orig_win.obs | 2 - media/baseset/translations.awk | 2 - media/extra_grf/2ccmap.nfo | 3 - media/extra_grf/airport_preview.nfo | 3 - media/extra_grf/airports.nfo | 3 - media/extra_grf/airports_orig_extra.nfo | 3 - media/extra_grf/aqueduct.nfo | 3 - media/extra_grf/assemble_nfo.awk | 2 - media/extra_grf/autorail.nfo | 3 - media/extra_grf/canals.nfo | 3 - media/extra_grf/canals_extra.nfo | 3 - media/extra_grf/chars.nfo | 3 - media/extra_grf/chars_orig_extra.nfo | 3 - media/extra_grf/elrails.nfo | 3 - media/extra_grf/fix_graphics.nfo | 3 - media/extra_grf/flags.nfo | 3 - media/extra_grf/foundations.nfo | 3 - media/extra_grf/mono.nfo | 3 - media/extra_grf/oneway.nfo | 3 - media/extra_grf/openttd.nfo | 2 - media/extra_grf/openttdgui.nfo | 3 - media/extra_grf/orig_extra.nfo | 2 - media/extra_grf/palette.nfo | 3 - media/extra_grf/rivers/arctic.nfo | 3 - media/extra_grf/rivers/rapids.nfo | 3 - media/extra_grf/rivers/temperate.nfo | 3 - media/extra_grf/rivers/toyland.nfo | 3 - media/extra_grf/rivers/tropic.nfo | 3 - media/extra_grf/roadstops.nfo | 3 - media/extra_grf/shore.nfo | 3 - media/extra_grf/signals.nfo | 3 - media/extra_grf/sloped_tracks.nfo | 3 - media/extra_grf/tramtracks.nfo | 3 - media/extra_grf/tunnel_portals.nfo | 3 - media/openttd.desktop.filter.awk | 2 - media/openttd.desktop.in | 1 - media/openttd.desktop.translation.awk | 2 - os/debian/changelog | 6 + os/macosx/plistgen.sh | 2 - os/rpm/openttd.spec | 4 +- os/windows/installer/install.nsi | 4 +- projects/determineversion.vbs | 2 - projects/gen-kdev4.sh | 2 - projects/generate | 2 - projects/generate.vbs | 2 - src/3rdparty/md5/md5.cpp | 2 - src/3rdparty/md5/md5.h | 2 - src/ai/ai.hpp | 2 - src/ai/ai_config.cpp | 2 - src/ai/ai_config.hpp | 2 - src/ai/ai_core.cpp | 8 +- src/ai/ai_gui.cpp | 11 +- src/ai/ai_gui.hpp | 2 - src/ai/ai_info.cpp | 2 - src/ai/ai_info.hpp | 2 - src/ai/ai_instance.cpp | 2 - src/ai/ai_instance.hpp | 2 - src/ai/ai_scanner.cpp | 2 - src/ai/ai_scanner.hpp | 2 - src/aircraft.h | 7 - src/aircraft_cmd.cpp | 35 +- src/aircraft_gui.cpp | 2 - src/airport.cpp | 2 - src/airport.h | 2 - src/airport_gui.cpp | 2 - src/animated_tile.cpp | 2 - src/animated_tile_func.h | 2 - src/articulated_vehicles.cpp | 2 - src/articulated_vehicles.h | 2 - src/autoreplace.cpp | 2 - src/autoreplace_base.h | 5 - src/autoreplace_cmd.cpp | 2 - src/autoreplace_func.h | 2 - src/autoreplace_gui.cpp | 5 +- src/autoreplace_gui.h | 2 - src/autoreplace_type.h | 2 - src/autoslope.h | 2 - src/base_consist.cpp | 2 - src/base_consist.h | 2 - src/base_media_base.h | 2 - src/base_media_func.h | 2 - src/base_station_base.h | 15 +- src/bitmap_type.h | 2 - src/blitter/32bpp_anim.cpp | 2 - src/blitter/32bpp_anim.hpp | 2 - src/blitter/32bpp_anim_sse2.cpp | 2 - src/blitter/32bpp_anim_sse2.hpp | 2 - src/blitter/32bpp_anim_sse4.cpp | 2 - src/blitter/32bpp_anim_sse4.hpp | 2 - src/blitter/32bpp_base.cpp | 2 - src/blitter/32bpp_base.hpp | 2 - src/blitter/32bpp_optimized.cpp | 2 - src/blitter/32bpp_optimized.hpp | 2 - src/blitter/32bpp_simple.cpp | 2 - src/blitter/32bpp_simple.hpp | 2 - src/blitter/32bpp_sse2.cpp | 2 - src/blitter/32bpp_sse2.hpp | 2 - src/blitter/32bpp_sse4.cpp | 2 - src/blitter/32bpp_sse4.hpp | 2 - src/blitter/32bpp_sse_func.hpp | 2 - src/blitter/32bpp_sse_type.h | 2 - src/blitter/32bpp_ssse3.cpp | 2 - src/blitter/32bpp_ssse3.hpp | 2 - src/blitter/8bpp_base.cpp | 2 - src/blitter/8bpp_base.hpp | 2 - src/blitter/8bpp_optimized.cpp | 2 - src/blitter/8bpp_optimized.hpp | 2 - src/blitter/8bpp_simple.cpp | 2 - src/blitter/8bpp_simple.hpp | 2 - src/blitter/base.hpp | 2 - src/blitter/common.hpp | 2 - src/blitter/factory.hpp | 2 - src/blitter/null.cpp | 2 - src/blitter/null.hpp | 2 - src/bmp.cpp | 2 - src/bmp.h | 2 - src/bootstrap_gui.cpp | 2 - src/bridge.h | 2 - src/bridge_gui.cpp | 2 - src/bridge_map.cpp | 2 - src/bridge_map.h | 2 - src/build_vehicle_gui.cpp | 14 +- src/cargo_type.h | 2 - src/cargoaction.cpp | 2 - src/cargoaction.h | 2 - src/cargomonitor.cpp | 2 - src/cargomonitor.h | 2 - src/cargopacket.cpp | 8 +- src/cargopacket.h | 15 - src/cargotype.cpp | 2 - src/cargotype.h | 2 - src/cheat.cpp | 2 - src/cheat_func.h | 2 - src/cheat_gui.cpp | 2 - src/cheat_type.h | 2 - src/clear_cmd.cpp | 2 - src/clear_func.h | 2 - src/clear_map.h | 2 - src/cmd_helper.h | 2 - src/command.cpp | 2 - src/command_func.h | 2 - src/command_type.h | 2 - src/company_base.h | 5 - src/company_cmd.cpp | 45 +- src/company_func.h | 2 - src/company_gui.cpp | 22 +- src/company_gui.h | 2 - src/company_manager_face.h | 2 - src/company_type.h | 2 - src/console.cpp | 2 - src/console_cmds.cpp | 8 +- src/console_func.h | 2 - src/console_gui.cpp | 7 +- src/console_gui.h | 2 - src/console_internal.h | 2 - src/console_type.h | 2 - src/core/alloc_func.cpp | 2 - src/core/alloc_func.hpp | 2 - src/core/alloc_type.hpp | 2 - src/core/backup_type.hpp | 2 - src/core/bitmath_func.cpp | 2 - src/core/bitmath_func.hpp | 2 - src/core/endian_func.hpp | 2 - src/core/endian_type.hpp | 2 - src/core/enum_type.hpp | 2 - src/core/geometry_func.cpp | 2 - src/core/geometry_func.hpp | 2 - src/core/geometry_type.hpp | 2 - src/core/math_func.cpp | 2 - src/core/math_func.hpp | 2 - src/core/mem_func.hpp | 2 - src/core/multimap.hpp | 2 - src/core/overflowsafe_type.hpp | 2 - src/core/pool_func.cpp | 2 - src/core/pool_func.hpp | 2 - src/core/pool_type.hpp | 62 +- src/core/random_func.cpp | 2 - src/core/random_func.hpp | 2 - src/core/smallmap_type.hpp | 2 - src/core/smallmatrix_type.hpp | 2 - src/core/smallstack_type.hpp | 2 - src/core/smallvec_type.hpp | 2 - src/core/string_compare_type.hpp | 2 - src/cpu.cpp | 6 +- src/cpu.h | 2 - src/crashlog.cpp | 5 +- src/crashlog.h | 2 - src/currency.cpp | 2 - src/currency.h | 2 - src/date.cpp | 9 +- src/date_func.h | 2 - src/date_gui.cpp | 2 - src/date_gui.h | 2 - src/date_type.h | 2 - src/debug.cpp | 2 - src/debug.h | 2 - src/dedicated.cpp | 2 - src/depend/depend.cpp | 2 - src/depot.cpp | 2 - src/depot_base.h | 5 - src/depot_cmd.cpp | 6 +- src/depot_func.h | 2 - src/depot_gui.cpp | 8 +- src/depot_map.h | 2 - src/depot_type.h | 2 - src/direction_func.h | 2 - src/direction_type.h | 2 - src/disaster_vehicle.cpp | 41 +- src/disaster_vehicle.h | 8 - src/dock_gui.cpp | 2 - src/driver.cpp | 2 - src/driver.h | 2 - src/economy.cpp | 150 ++-- src/economy_base.h | 15 - src/economy_func.h | 2 - src/economy_type.h | 2 - src/effectvehicle.cpp | 2 - src/effectvehicle_base.h | 8 - src/effectvehicle_func.h | 2 - src/elrail.cpp | 13 +- src/elrail_func.h | 2 - src/engine.cpp | 49 +- src/engine_base.h | 18 +- src/engine_func.h | 2 - src/engine_gui.cpp | 2 - src/engine_gui.h | 2 - src/engine_type.h | 2 - src/error.h | 2 - src/error_gui.cpp | 4 +- src/fileio.cpp | 2 - src/fileio_func.h | 2 - src/fileio_type.h | 2 - src/fios.cpp | 2 - src/fios.h | 2 - src/fios_gui.cpp | 2 - src/fontcache.cpp | 2 - src/fontcache.h | 2 - src/fontdetection.cpp | 56 +- src/fontdetection.h | 2 - src/framerate_gui.cpp | 2 - src/framerate_type.h | 2 - src/game/game.hpp | 2 - src/game/game_config.cpp | 2 - src/game/game_config.hpp | 2 - src/game/game_core.cpp | 2 - src/game/game_info.cpp | 2 - src/game/game_info.hpp | 2 - src/game/game_instance.cpp | 2 - src/game/game_instance.hpp | 2 - src/game/game_scanner.cpp | 2 - src/game/game_scanner.hpp | 2 - src/game/game_text.cpp | 2 - src/game/game_text.hpp | 2 - src/gamelog.cpp | 2 - src/gamelog.h | 2 - src/gamelog_internal.h | 2 - src/genworld.cpp | 10 +- src/genworld.h | 2 - src/genworld_gui.cpp | 2 - src/gfx.cpp | 19 +- src/gfx_func.h | 2 - src/gfx_layout.cpp | 2 - src/gfx_layout.h | 4 +- src/gfx_type.h | 3 +- src/gfxinit.cpp | 2 - src/gfxinit.h | 2 - src/goal.cpp | 2 - src/goal_base.h | 5 - src/goal_gui.cpp | 16 +- src/goal_type.h | 2 - src/graph_gui.cpp | 19 +- src/graph_gui.h | 2 - src/ground_vehicle.cpp | 2 - src/ground_vehicle.hpp | 2 - src/group.h | 5 - src/group_cmd.cpp | 64 +- src/group_gui.cpp | 62 +- src/group_gui.h | 5 +- src/group_type.h | 2 - src/gui.h | 2 - src/guitimer_func.h | 2 - src/heightmap.cpp | 2 - src/heightmap.h | 2 - src/highscore.cpp | 5 +- src/highscore.h | 2 - src/highscore_gui.cpp | 2 - src/hotkeys.cpp | 2 - src/hotkeys.h | 2 - src/house.h | 2 - src/house_type.h | 2 - src/industry.h | 5 - src/industry_cmd.cpp | 22 +- src/industry_gui.cpp | 45 +- src/industry_map.h | 2 - src/industry_type.h | 2 - src/industrytype.h | 2 - src/ini.cpp | 2 - src/ini_load.cpp | 2 - src/ini_type.h | 2 - src/intro_gui.cpp | 2 - src/landscape.cpp | 2 - src/landscape.h | 2 - src/landscape_type.h | 2 - src/lang/afrikaans.txt | 5 +- src/lang/arabic_egypt.txt | 5 +- src/lang/basque.txt | 5 +- src/lang/belarusian.txt | 5 +- src/lang/brazilian_portuguese.txt | 5 +- src/lang/bulgarian.txt | 5 +- src/lang/catalan.txt | 5 +- src/lang/croatian.txt | 14 +- src/lang/czech.txt | 11 +- src/lang/danish.txt | 5 +- src/lang/dutch.txt | 12 +- src/lang/english.txt | 11 +- src/lang/english_AU.txt | 5 +- src/lang/english_US.txt | 5 +- src/lang/esperanto.txt | 5 +- src/lang/estonian.txt | 5 +- src/lang/faroese.txt | 5 +- src/lang/finnish.txt | 10 +- src/lang/french.txt | 13 +- src/lang/gaelic.txt | 5 +- src/lang/galician.txt | 206 ++++- src/lang/german.txt | 25 +- src/lang/greek.txt | 5 +- src/lang/hebrew.txt | 5 +- src/lang/hungarian.txt | 6 +- src/lang/icelandic.txt | 5 +- src/lang/indonesian.txt | 5 +- src/lang/irish.txt | 5 +- src/lang/italian.txt | 5 +- src/lang/japanese.txt | 5 +- src/lang/korean.txt | 26 +- src/lang/latin.txt | 5 +- src/lang/latvian.txt | 5 +- src/lang/lithuanian.txt | 5 +- src/lang/luxembourgish.txt | 5 +- src/lang/malay.txt | 5 +- src/lang/norwegian_bokmal.txt | 5 +- src/lang/norwegian_nynorsk.txt | 5 +- src/lang/polish.txt | 143 +++- src/lang/portuguese.txt | 495 ++++++----- src/lang/romanian.txt | 5 +- src/lang/russian.txt | 10 +- src/lang/serbian.txt | 5 +- src/lang/simplified_chinese.txt | 5 +- src/lang/slovak.txt | 5 +- src/lang/slovenian.txt | 5 +- src/lang/spanish.txt | 5 +- src/lang/spanish_MX.txt | 10 +- src/lang/swedish.txt | 5 +- src/lang/tamil.txt | 28 +- src/lang/thai.txt | 5 +- src/lang/traditional_chinese.txt | 5 +- src/lang/turkish.txt | 5 +- src/lang/ukrainian.txt | 63 +- src/lang/unfinished/chuvash.txt | 3 +- src/lang/unfinished/frisian.txt | 5 +- src/lang/unfinished/ido.txt | 3 +- src/lang/unfinished/macedonian.txt | 3 +- src/lang/unfinished/maltese.txt | 3 +- src/lang/unfinished/marathi.txt | 3 +- src/lang/unfinished/persian.txt | 4 +- src/lang/unfinished/urdu.txt | 3 +- src/lang/vietnamese.txt | 167 +++- src/lang/welsh.txt | 5 +- src/language.h | 2 - src/linkgraph/flowmapper.cpp | 2 - src/linkgraph/flowmapper.h | 2 - src/linkgraph/linkgraph.cpp | 2 - src/linkgraph/linkgraph.h | 4 - src/linkgraph/linkgraph_base.h | 2 - src/linkgraph/linkgraph_gui.cpp | 5 +- src/linkgraph/linkgraph_gui.h | 2 - src/linkgraph/linkgraph_type.h | 2 - src/linkgraph/linkgraphjob.cpp | 2 - src/linkgraph/linkgraphjob.h | 4 - src/linkgraph/linkgraphjob_base.h | 2 - src/linkgraph/linkgraphschedule.cpp | 8 +- src/linkgraph/linkgraphschedule.h | 2 - src/linkgraph/refresh.cpp | 2 - src/linkgraph/refresh.h | 2 - src/livery.h | 2 - src/main_gui.cpp | 2 - src/map.cpp | 2 - src/map_func.h | 2 - src/map_type.h | 2 - src/misc.cpp | 2 - src/misc/array.hpp | 2 - src/misc/binaryheap.hpp | 2 - src/misc/blob.hpp | 2 - src/misc/countedobj.cpp | 2 - src/misc/countedptr.hpp | 2 - src/misc/dbg_helpers.cpp | 2 - src/misc/dbg_helpers.h | 2 - src/misc/fixedsizearray.hpp | 2 - src/misc/getoptdata.cpp | 2 - src/misc/getoptdata.h | 2 - src/misc/hashtable.hpp | 2 - src/misc/str.hpp | 2 - src/misc_cmd.cpp | 2 - src/misc_gui.cpp | 2 - src/mixer.cpp | 2 - src/mixer.h | 2 - src/music.cpp | 2 - src/music/allegro_m.cpp | 2 - src/music/allegro_m.h | 2 - src/music/bemidi.cpp | 2 - src/music/bemidi.h | 2 - src/music/cocoa_m.cpp | 12 +- src/music/cocoa_m.h | 2 - src/music/dmusic.cpp | 2 - src/music/dmusic.h | 2 - src/music/extmidi.cpp | 2 - src/music/extmidi.h | 2 - src/music/fluidsynth.cpp | 2 - src/music/fluidsynth.h | 2 - src/music/midi.h | 2 - src/music/midifile.cpp | 2 - src/music/midifile.hpp | 2 - src/music/music_driver.hpp | 2 - src/music/null_m.cpp | 2 - src/music/null_m.h | 2 - src/music/os2_m.cpp | 2 - src/music/os2_m.h | 2 - src/music/qtmidi.cpp | 2 - src/music/qtmidi.h | 2 - src/music/win32_m.cpp | 2 - src/music/win32_m.h | 2 - src/music_gui.cpp | 2 - src/network/core/address.cpp | 2 - src/network/core/address.h | 2 - src/network/core/config.h | 2 - src/network/core/core.cpp | 2 - src/network/core/core.h | 2 - src/network/core/game.h | 2 - src/network/core/host.cpp | 2 - src/network/core/host.h | 2 - src/network/core/os_abstraction.h | 2 - src/network/core/packet.cpp | 2 - src/network/core/packet.h | 2 - src/network/core/tcp.cpp | 2 - src/network/core/tcp.h | 2 - src/network/core/tcp_admin.cpp | 2 - src/network/core/tcp_admin.h | 2 - src/network/core/tcp_connect.cpp | 2 - src/network/core/tcp_content.cpp | 2 - src/network/core/tcp_content.h | 2 - src/network/core/tcp_game.cpp | 2 - src/network/core/tcp_game.h | 2 - src/network/core/tcp_http.cpp | 2 - src/network/core/tcp_http.h | 2 - src/network/core/tcp_listen.h | 7 +- src/network/core/udp.cpp | 2 - src/network/core/udp.h | 2 - src/network/network.cpp | 42 +- src/network/network.h | 2 - src/network/network_admin.cpp | 61 +- src/network/network_admin.h | 34 +- src/network/network_base.h | 15 - src/network/network_chat_gui.cpp | 9 +- src/network/network_client.cpp | 8 +- src/network/network_client.h | 2 - src/network/network_command.cpp | 12 +- src/network/network_content.cpp | 2 - src/network/network_content.h | 2 - src/network/network_content_gui.cpp | 2 - src/network/network_content_gui.h | 2 - src/network/network_func.h | 2 - src/network/network_gamelist.cpp | 2 - src/network/network_gamelist.h | 2 - src/network/network_gui.cpp | 22 +- src/network/network_gui.h | 2 - src/network/network_internal.h | 2 - src/network/network_server.cpp | 105 +-- src/network/network_server.h | 15 - src/network/network_type.h | 2 - src/network/network_udp.cpp | 8 +- src/network/network_udp.h | 2 - src/newgrf.cpp | 51 +- src/newgrf.h | 2 - src/newgrf_airport.cpp | 2 - src/newgrf_airport.h | 2 - src/newgrf_airporttiles.cpp | 2 - src/newgrf_airporttiles.h | 2 - src/newgrf_animation_base.h | 2 - src/newgrf_animation_type.h | 2 - src/newgrf_callbacks.h | 2 - src/newgrf_canal.cpp | 2 - src/newgrf_canal.h | 2 - src/newgrf_cargo.cpp | 2 - src/newgrf_cargo.h | 2 - src/newgrf_class.h | 2 - src/newgrf_class_func.h | 2 - src/newgrf_commons.cpp | 2 - src/newgrf_commons.h | 2 - src/newgrf_config.cpp | 2 - src/newgrf_config.h | 2 - src/newgrf_debug.h | 2 - src/newgrf_debug_gui.cpp | 2 - src/newgrf_engine.cpp | 5 +- src/newgrf_engine.h | 2 - src/newgrf_generic.cpp | 2 - src/newgrf_generic.h | 2 - src/newgrf_gui.cpp | 2 - src/newgrf_house.cpp | 5 +- src/newgrf_house.h | 2 - src/newgrf_industries.cpp | 8 +- src/newgrf_industries.h | 2 - src/newgrf_industrytiles.cpp | 2 - src/newgrf_industrytiles.h | 2 - src/newgrf_object.cpp | 5 +- src/newgrf_object.h | 2 - src/newgrf_properties.h | 2 - src/newgrf_railtype.cpp | 2 - src/newgrf_railtype.h | 2 - src/newgrf_roadtype.cpp | 2 - src/newgrf_roadtype.h | 2 - src/newgrf_sound.cpp | 2 - src/newgrf_sound.h | 2 - src/newgrf_spritegroup.cpp | 2 - src/newgrf_spritegroup.h | 2 - src/newgrf_station.cpp | 2 - src/newgrf_station.h | 2 - src/newgrf_storage.cpp | 2 - src/newgrf_storage.h | 5 - src/newgrf_text.cpp | 2 - src/newgrf_text.h | 2 - src/newgrf_town.cpp | 2 - src/newgrf_town.h | 2 - src/newgrf_townname.cpp | 2 - src/newgrf_townname.h | 2 - src/news_func.h | 2 - src/news_gui.cpp | 51 +- src/news_gui.h | 2 - src/news_type.h | 2 - src/object.h | 2 - src/object_base.h | 5 - src/object_cmd.cpp | 15 +- src/object_gui.cpp | 2 - src/object_map.h | 2 - src/object_type.h | 2 - src/openttd.cpp | 23 +- src/openttd.h | 2 - src/order_backup.cpp | 30 +- src/order_backup.h | 15 - src/order_base.h | 10 - src/order_cmd.cpp | 6 +- src/order_func.h | 2 - src/order_gui.cpp | 2 - src/order_type.h | 2 - src/os/macosx/G5_detector.cpp | 2 - src/os/macosx/crashlog_osx.cpp | 2 - src/os/macosx/macos.h | 15 +- src/os/macosx/macos.mm | 2 - src/os/macosx/osx_stdafx.h | 2 - src/os/macosx/splash.cpp | 2 - src/os/macosx/splash.h | 2 - src/os/macosx/string_osx.cpp | 104 +-- src/os/macosx/string_osx.h | 2 - src/os/os2/os2.cpp | 2 - src/os/unix/crashlog_unix.cpp | 2 - src/os/unix/unix.cpp | 2 - src/os/windows/crashlog_win.cpp | 71 +- src/os/windows/ottdres.rc.in | 2 - src/os/windows/string_uniscribe.cpp | 2 - src/os/windows/string_uniscribe.h | 2 - src/os/windows/win32.cpp | 2 - src/os/windows/win32.h | 2 - src/osk_gui.cpp | 2 - src/pathfinder/follow_track.hpp | 2 - src/pathfinder/npf/aystar.cpp | 2 - src/pathfinder/npf/aystar.h | 2 - src/pathfinder/npf/npf.cpp | 2 - src/pathfinder/npf/npf_func.h | 2 - src/pathfinder/npf/queue.cpp | 2 - src/pathfinder/npf/queue.h | 2 - src/pathfinder/pathfinder_func.h | 2 - src/pathfinder/pathfinder_type.h | 2 - src/pathfinder/pf_performance_timer.hpp | 2 - src/pathfinder/yapf/nodelist.hpp | 2 - src/pathfinder/yapf/yapf.h | 2 - src/pathfinder/yapf/yapf.hpp | 2 - src/pathfinder/yapf/yapf_base.hpp | 2 - src/pathfinder/yapf/yapf_cache.h | 2 - src/pathfinder/yapf/yapf_common.hpp | 2 - src/pathfinder/yapf/yapf_costbase.hpp | 2 - src/pathfinder/yapf/yapf_costcache.hpp | 2 - src/pathfinder/yapf/yapf_costrail.hpp | 2 - src/pathfinder/yapf/yapf_destrail.hpp | 2 - src/pathfinder/yapf/yapf_node.hpp | 2 - src/pathfinder/yapf/yapf_node_rail.hpp | 2 - src/pathfinder/yapf/yapf_node_road.hpp | 2 - src/pathfinder/yapf/yapf_node_ship.hpp | 2 - src/pathfinder/yapf/yapf_rail.cpp | 2 - src/pathfinder/yapf/yapf_road.cpp | 2 - src/pathfinder/yapf/yapf_ship.cpp | 2 - src/pathfinder/yapf/yapf_type.hpp | 2 - src/pbs.cpp | 2 - src/pbs.h | 2 - src/progress.cpp | 2 - src/progress.h | 2 - src/querystring_gui.h | 2 - src/rail.cpp | 23 +- src/rail.h | 3 - src/rail_cmd.cpp | 2 - src/rail_gui.cpp | 59 +- src/rail_gui.h | 2 - src/rail_map.h | 2 - src/rail_type.h | 6 - src/rev.cpp | 6 +- src/rev.cpp.in | 2 - src/rev.h | 2 - src/road.cpp | 17 +- src/road.h | 2 - src/road_cmd.cpp | 10 +- src/road_cmd.h | 2 - src/road_func.h | 2 - src/road_gui.cpp | 2 - src/road_gui.h | 2 - src/road_internal.h | 2 - src/road_map.cpp | 2 - src/road_map.h | 2 - src/road_type.h | 5 - src/roadstop.cpp | 2 - src/roadstop_base.h | 5 - src/roadveh.h | 4 - src/roadveh_cmd.cpp | 2 - src/roadveh_gui.cpp | 2 - src/safeguards.h | 2 - src/saveload/afterload.cpp | 319 +++---- src/saveload/ai_sl.cpp | 2 - src/saveload/airport_sl.cpp | 2 - src/saveload/animated_tile_sl.cpp | 2 - src/saveload/autoreplace_sl.cpp | 10 +- src/saveload/cargomonitor_sl.cpp | 2 - src/saveload/cargopacket_sl.cpp | 24 +- src/saveload/cheat_sl.cpp | 2 - src/saveload/company_sl.cpp | 15 +- src/saveload/depot_sl.cpp | 10 +- src/saveload/economy_sl.cpp | 8 +- src/saveload/engine_sl.cpp | 8 +- src/saveload/game_sl.cpp | 2 - src/saveload/gamelog_sl.cpp | 2 - src/saveload/goal_sl.cpp | 5 +- src/saveload/group_sl.cpp | 6 +- src/saveload/industry_sl.cpp | 10 +- src/saveload/labelmaps_sl.cpp | 2 - src/saveload/linkgraph_sl.cpp | 16 +- src/saveload/map_sl.cpp | 2 - src/saveload/misc_sl.cpp | 2 - src/saveload/newgrf_sl.cpp | 2 - src/saveload/newgrf_sl.h | 2 - src/saveload/object_sl.cpp | 9 +- src/saveload/oldloader.cpp | 2 - src/saveload/oldloader.h | 2 - src/saveload/oldloader_sl.cpp | 19 +- src/saveload/order_sl.cpp | 28 +- src/saveload/saveload.cpp | 5 +- src/saveload/saveload.h | 2 - src/saveload/saveload_filter.h | 2 - src/saveload/saveload_internal.h | 2 - src/saveload/signs_sl.cpp | 6 +- src/saveload/station_sl.cpp | 38 +- src/saveload/storage_sl.cpp | 6 +- src/saveload/story_sl.cpp | 8 +- src/saveload/strings_sl.cpp | 2 - src/saveload/subsidy_sl.cpp | 5 +- src/saveload/town_sl.cpp | 16 +- src/saveload/vehicle_sl.cpp | 71 +- src/saveload/waypoint_sl.cpp | 8 +- src/screenshot.cpp | 5 +- src/screenshot.h | 2 - src/script/api/Doxyfile_AI | 2 - src/script/api/Doxyfile_Game | 2 - src/script/api/ai/ai_accounting.hpp.sq | 2 - src/script/api/ai/ai_airport.hpp.sq | 2 - src/script/api/ai/ai_base.hpp.sq | 2 - src/script/api/ai/ai_basestation.hpp.sq | 2 - src/script/api/ai/ai_bridge.hpp.sq | 2 - src/script/api/ai/ai_bridgelist.hpp.sq | 2 - src/script/api/ai/ai_cargo.hpp.sq | 2 - src/script/api/ai/ai_cargolist.hpp.sq | 2 - src/script/api/ai/ai_company.hpp.sq | 2 - src/script/api/ai/ai_controller.hpp.sq | 2 - src/script/api/ai/ai_date.hpp.sq | 2 - src/script/api/ai/ai_depotlist.hpp.sq | 2 - src/script/api/ai/ai_engine.hpp.sq | 2 - src/script/api/ai/ai_enginelist.hpp.sq | 2 - src/script/api/ai/ai_error.hpp.sq | 5 +- src/script/api/ai/ai_event.hpp.sq | 2 - src/script/api/ai/ai_event_types.hpp.sq | 2 - src/script/api/ai/ai_execmode.hpp.sq | 2 - src/script/api/ai/ai_gamesettings.hpp.sq | 2 - src/script/api/ai/ai_group.hpp.sq | 2 - src/script/api/ai/ai_grouplist.hpp.sq | 2 - src/script/api/ai/ai_industry.hpp.sq | 2 - src/script/api/ai/ai_industrylist.hpp.sq | 2 - src/script/api/ai/ai_industrytype.hpp.sq | 2 - src/script/api/ai/ai_industrytypelist.hpp.sq | 2 - src/script/api/ai/ai_infrastructure.hpp.sq | 2 - src/script/api/ai/ai_list.hpp.sq | 2 - src/script/api/ai/ai_log.hpp.sq | 2 - src/script/api/ai/ai_map.hpp.sq | 2 - src/script/api/ai/ai_marine.hpp.sq | 2 - src/script/api/ai/ai_order.hpp.sq | 2 - src/script/api/ai/ai_rail.hpp.sq | 2 - src/script/api/ai/ai_railtypelist.hpp.sq | 2 - src/script/api/ai/ai_road.hpp.sq | 2 - src/script/api/ai/ai_roadtypelist.hpp.sq | 2 - src/script/api/ai/ai_sign.hpp.sq | 2 - src/script/api/ai/ai_signlist.hpp.sq | 2 - src/script/api/ai/ai_station.hpp.sq | 2 - src/script/api/ai/ai_stationlist.hpp.sq | 2 - src/script/api/ai/ai_subsidy.hpp.sq | 2 - src/script/api/ai/ai_subsidylist.hpp.sq | 2 - src/script/api/ai/ai_testmode.hpp.sq | 2 - src/script/api/ai/ai_tile.hpp.sq | 15 +- src/script/api/ai/ai_tilelist.hpp.sq | 2 - src/script/api/ai/ai_town.hpp.sq | 2 - src/script/api/ai/ai_townlist.hpp.sq | 2 - src/script/api/ai/ai_tunnel.hpp.sq | 2 - src/script/api/ai/ai_vehicle.hpp.sq | 2 - src/script/api/ai/ai_vehiclelist.hpp.sq | 2 - src/script/api/ai/ai_waypoint.hpp.sq | 2 - src/script/api/ai/ai_waypointlist.hpp.sq | 2 - src/script/api/ai_changelog.hpp | 2 - src/script/api/doxygen_filter.awk | 2 - src/script/api/doxygen_filter.sh | 2 - src/script/api/game/game_accounting.hpp.sq | 2 - src/script/api/game/game_admin.hpp.sq | 2 - src/script/api/game/game_airport.hpp.sq | 2 - src/script/api/game/game_base.hpp.sq | 2 - src/script/api/game/game_basestation.hpp.sq | 2 - src/script/api/game/game_bridge.hpp.sq | 2 - src/script/api/game/game_bridgelist.hpp.sq | 2 - src/script/api/game/game_cargo.hpp.sq | 2 - src/script/api/game/game_cargolist.hpp.sq | 2 - src/script/api/game/game_cargomonitor.hpp.sq | 2 - src/script/api/game/game_client.hpp.sq | 2 - src/script/api/game/game_clientlist.hpp.sq | 2 - src/script/api/game/game_company.hpp.sq | 2 - src/script/api/game/game_companymode.hpp.sq | 2 - src/script/api/game/game_controller.hpp.sq | 2 - src/script/api/game/game_date.hpp.sq | 2 - src/script/api/game/game_depotlist.hpp.sq | 2 - src/script/api/game/game_engine.hpp.sq | 2 - src/script/api/game/game_enginelist.hpp.sq | 2 - src/script/api/game/game_error.hpp.sq | 5 +- src/script/api/game/game_event.hpp.sq | 2 - src/script/api/game/game_event_types.hpp.sq | 2 - src/script/api/game/game_execmode.hpp.sq | 2 - src/script/api/game/game_game.hpp.sq | 2 - src/script/api/game/game_gamesettings.hpp.sq | 2 - src/script/api/game/game_goal.hpp.sq | 2 - src/script/api/game/game_industry.hpp.sq | 2 - src/script/api/game/game_industrylist.hpp.sq | 2 - src/script/api/game/game_industrytype.hpp.sq | 2 - .../api/game/game_industrytypelist.hpp.sq | 2 - .../api/game/game_infrastructure.hpp.sq | 2 - src/script/api/game/game_list.hpp.sq | 2 - src/script/api/game/game_log.hpp.sq | 2 - src/script/api/game/game_map.hpp.sq | 2 - src/script/api/game/game_marine.hpp.sq | 2 - src/script/api/game/game_news.hpp.sq | 2 - src/script/api/game/game_order.hpp.sq | 2 - src/script/api/game/game_rail.hpp.sq | 2 - src/script/api/game/game_railtypelist.hpp.sq | 2 - src/script/api/game/game_road.hpp.sq | 2 - src/script/api/game/game_roadtypelist.hpp.sq | 2 - src/script/api/game/game_sign.hpp.sq | 2 - src/script/api/game/game_signlist.hpp.sq | 2 - src/script/api/game/game_station.hpp.sq | 2 - src/script/api/game/game_stationlist.hpp.sq | 2 - src/script/api/game/game_story_page.hpp.sq | 2 - .../api/game/game_storypageelementlist.hpp.sq | 2 - src/script/api/game/game_storypagelist.hpp.sq | 2 - src/script/api/game/game_subsidy.hpp.sq | 2 - src/script/api/game/game_subsidylist.hpp.sq | 2 - src/script/api/game/game_testmode.hpp.sq | 2 - src/script/api/game/game_text.hpp.sq | 2 - src/script/api/game/game_tile.hpp.sq | 15 +- src/script/api/game/game_tilelist.hpp.sq | 2 - src/script/api/game/game_town.hpp.sq | 2 - src/script/api/game/game_townlist.hpp.sq | 2 - src/script/api/game/game_tunnel.hpp.sq | 2 - src/script/api/game/game_vehicle.hpp.sq | 2 - src/script/api/game/game_vehiclelist.hpp.sq | 2 - src/script/api/game/game_viewport.hpp.sq | 2 - src/script/api/game/game_waypoint.hpp.sq | 2 - src/script/api/game/game_waypointlist.hpp.sq | 2 - src/script/api/game/game_window.hpp.sq | 3 +- src/script/api/game_changelog.hpp | 2 - src/script/api/generate_widget.awk | 2 - src/script/api/generate_widget.sh | 2 - src/script/api/generate_widget.vbs | 2 - src/script/api/script_accounting.cpp | 2 - src/script/api/script_accounting.hpp | 2 - src/script/api/script_admin.cpp | 2 - src/script/api/script_admin.hpp | 2 - src/script/api/script_airport.cpp | 2 - src/script/api/script_airport.hpp | 2 - src/script/api/script_base.cpp | 2 - src/script/api/script_base.hpp | 2 - src/script/api/script_basestation.cpp | 2 - src/script/api/script_basestation.hpp | 2 - src/script/api/script_bridge.cpp | 2 - src/script/api/script_bridge.hpp | 2 - src/script/api/script_bridgelist.cpp | 2 - src/script/api/script_bridgelist.hpp | 2 - src/script/api/script_cargo.cpp | 2 - src/script/api/script_cargo.hpp | 2 - src/script/api/script_cargolist.cpp | 2 - src/script/api/script_cargolist.hpp | 2 - src/script/api/script_cargomonitor.cpp | 2 - src/script/api/script_cargomonitor.hpp | 2 - src/script/api/script_client.cpp | 2 - src/script/api/script_client.hpp | 2 - src/script/api/script_clientlist.cpp | 8 +- src/script/api/script_clientlist.hpp | 2 - src/script/api/script_company.cpp | 2 - src/script/api/script_company.hpp | 2 - src/script/api/script_companymode.cpp | 2 - src/script/api/script_companymode.hpp | 2 - src/script/api/script_controller.cpp | 2 - src/script/api/script_controller.hpp | 2 - src/script/api/script_date.cpp | 2 - src/script/api/script_date.hpp | 2 - src/script/api/script_depotlist.cpp | 8 +- src/script/api/script_depotlist.hpp | 2 - src/script/api/script_engine.cpp | 2 - src/script/api/script_engine.hpp | 2 - src/script/api/script_enginelist.cpp | 5 +- src/script/api/script_enginelist.hpp | 2 - src/script/api/script_error.cpp | 2 - src/script/api/script_error.hpp | 8 +- src/script/api/script_event.cpp | 2 - src/script/api/script_event.hpp | 2 - src/script/api/script_event_types.cpp | 2 - src/script/api/script_event_types.hpp | 2 - src/script/api/script_execmode.cpp | 2 - src/script/api/script_execmode.hpp | 2 - src/script/api/script_game.cpp | 2 - src/script/api/script_game.hpp | 2 - src/script/api/script_gamesettings.cpp | 2 - src/script/api/script_gamesettings.hpp | 2 - src/script/api/script_goal.cpp | 2 - src/script/api/script_goal.hpp | 2 - src/script/api/script_group.cpp | 8 +- src/script/api/script_group.hpp | 2 - src/script/api/script_grouplist.cpp | 5 +- src/script/api/script_grouplist.hpp | 2 - src/script/api/script_industry.cpp | 2 - src/script/api/script_industry.hpp | 2 - src/script/api/script_industrylist.cpp | 13 +- src/script/api/script_industrylist.hpp | 2 - src/script/api/script_industrytype.cpp | 2 - src/script/api/script_industrytype.hpp | 2 - src/script/api/script_industrytypelist.cpp | 2 - src/script/api/script_industrytypelist.hpp | 2 - src/script/api/script_info_docs.hpp | 2 - src/script/api/script_infrastructure.cpp | 2 - src/script/api/script_infrastructure.hpp | 2 - src/script/api/script_list.cpp | 2 - src/script/api/script_list.hpp | 2 - src/script/api/script_log.cpp | 2 - src/script/api/script_log.hpp | 2 - src/script/api/script_map.cpp | 2 - src/script/api/script_map.hpp | 2 - src/script/api/script_marine.cpp | 2 - src/script/api/script_marine.hpp | 2 - src/script/api/script_news.cpp | 2 - src/script/api/script_news.hpp | 2 - src/script/api/script_object.cpp | 2 - src/script/api/script_object.hpp | 2 - src/script/api/script_order.cpp | 2 - src/script/api/script_order.hpp | 2 - src/script/api/script_rail.cpp | 2 - src/script/api/script_rail.hpp | 2 - src/script/api/script_railtypelist.cpp | 2 - src/script/api/script_railtypelist.hpp | 2 - src/script/api/script_road.cpp | 2 - src/script/api/script_road.hpp | 2 - src/script/api/script_roadtypelist.cpp | 2 - src/script/api/script_roadtypelist.hpp | 2 - src/script/api/script_sign.cpp | 2 - src/script/api/script_sign.hpp | 2 - src/script/api/script_signlist.cpp | 5 +- src/script/api/script_signlist.hpp | 2 - src/script/api/script_station.cpp | 2 - src/script/api/script_station.hpp | 2 - src/script/api/script_stationlist.cpp | 5 +- src/script/api/script_stationlist.hpp | 2 - src/script/api/script_story_page.cpp | 2 - src/script/api/script_story_page.hpp | 2 - .../api/script_storypageelementlist.cpp | 5 +- .../api/script_storypageelementlist.hpp | 2 - src/script/api/script_storypagelist.cpp | 5 +- src/script/api/script_storypagelist.hpp | 2 - src/script/api/script_subsidy.cpp | 2 - src/script/api/script_subsidy.hpp | 2 - src/script/api/script_subsidylist.cpp | 5 +- src/script/api/script_subsidylist.hpp | 2 - src/script/api/script_testmode.cpp | 2 - src/script/api/script_testmode.hpp | 2 - src/script/api/script_text.cpp | 2 - src/script/api/script_text.hpp | 2 - src/script/api/script_tile.cpp | 2 - src/script/api/script_tile.hpp | 5 +- src/script/api/script_tilelist.cpp | 2 - src/script/api/script_tilelist.hpp | 2 - src/script/api/script_town.cpp | 13 +- src/script/api/script_town.hpp | 6 +- src/script/api/script_townlist.cpp | 5 +- src/script/api/script_townlist.hpp | 2 - src/script/api/script_tunnel.cpp | 2 - src/script/api/script_tunnel.hpp | 2 - src/script/api/script_types.hpp | 2 - src/script/api/script_vehicle.cpp | 2 - src/script/api/script_vehicle.hpp | 2 - src/script/api/script_vehiclelist.cpp | 17 +- src/script/api/script_vehiclelist.hpp | 2 - src/script/api/script_viewport.cpp | 2 - src/script/api/script_viewport.hpp | 2 - src/script/api/script_waypoint.cpp | 2 - src/script/api/script_waypoint.hpp | 2 - src/script/api/script_waypointlist.cpp | 5 +- src/script/api/script_waypointlist.hpp | 2 - src/script/api/script_window.cpp | 2 - src/script/api/script_window.hpp | 3 +- src/script/api/squirrel_export.awk | 5 - src/script/api/squirrel_export.sh | 2 - src/script/api/squirrel_export.vbs | 5 - .../api/template/template_accounting.hpp.sq | 2 - src/script/api/template/template_admin.hpp.sq | 2 - .../api/template/template_airport.hpp.sq | 2 - src/script/api/template/template_base.hpp.sq | 2 - .../api/template/template_basestation.hpp.sq | 2 - .../api/template/template_bridge.hpp.sq | 2 - .../api/template/template_bridgelist.hpp.sq | 2 - src/script/api/template/template_cargo.hpp.sq | 2 - .../api/template/template_cargolist.hpp.sq | 2 - .../api/template/template_cargomonitor.hpp.sq | 2 - .../api/template/template_client.hpp.sq | 2 - .../api/template/template_clientlist.hpp.sq | 2 - .../api/template/template_company.hpp.sq | 2 - .../api/template/template_companymode.hpp.sq | 2 - src/script/api/template/template_date.hpp.sq | 2 - .../api/template/template_depotlist.hpp.sq | 2 - .../api/template/template_engine.hpp.sq | 2 - .../api/template/template_enginelist.hpp.sq | 2 - src/script/api/template/template_error.hpp.sq | 2 - src/script/api/template/template_event.hpp.sq | 2 - .../api/template/template_event_types.hpp.sq | 2 - .../api/template/template_execmode.hpp.sq | 2 - src/script/api/template/template_game.hpp.sq | 2 - .../api/template/template_gamesettings.hpp.sq | 2 - src/script/api/template/template_goal.hpp.sq | 2 - src/script/api/template/template_group.hpp.sq | 2 - .../api/template/template_grouplist.hpp.sq | 2 - .../api/template/template_industry.hpp.sq | 2 - .../api/template/template_industrylist.hpp.sq | 2 - .../api/template/template_industrytype.hpp.sq | 2 - .../template/template_industrytypelist.hpp.sq | 2 - .../template/template_infrastructure.hpp.sq | 2 - src/script/api/template/template_list.hpp.sq | 2 - src/script/api/template/template_log.hpp.sq | 2 - src/script/api/template/template_map.hpp.sq | 2 - .../api/template/template_marine.hpp.sq | 2 - src/script/api/template/template_news.hpp.sq | 2 - src/script/api/template/template_order.hpp.sq | 2 - src/script/api/template/template_rail.hpp.sq | 2 - .../api/template/template_railtypelist.hpp.sq | 2 - src/script/api/template/template_road.hpp.sq | 2 - .../api/template/template_roadtypelist.hpp.sq | 2 - src/script/api/template/template_sign.hpp.sq | 2 - .../api/template/template_signlist.hpp.sq | 2 - .../api/template/template_station.hpp.sq | 2 - .../api/template/template_stationlist.hpp.sq | 2 - .../api/template/template_story_page.hpp.sq | 2 - .../template_storypageelementlist.hpp.sq | 2 - .../template/template_storypagelist.hpp.sq | 2 - .../api/template/template_subsidy.hpp.sq | 2 - .../api/template/template_subsidylist.hpp.sq | 2 - .../api/template/template_testmode.hpp.sq | 2 - src/script/api/template/template_text.hpp.sq | 2 - src/script/api/template/template_tile.hpp.sq | 2 - .../api/template/template_tilelist.hpp.sq | 2 - src/script/api/template/template_town.hpp.sq | 2 - .../api/template/template_townlist.hpp.sq | 2 - .../api/template/template_tunnel.hpp.sq | 2 - .../api/template/template_vehicle.hpp.sq | 2 - .../api/template/template_vehiclelist.hpp.sq | 2 - .../api/template/template_viewport.hpp.sq | 2 - .../api/template/template_waypoint.hpp.sq | 2 - .../api/template/template_waypointlist.hpp.sq | 2 - .../api/template/template_window.hpp.sq | 2 - src/script/script_config.cpp | 2 - src/script/script_config.hpp | 2 - src/script/script_fatalerror.hpp | 2 - src/script/script_info.cpp | 2 - src/script/script_info.hpp | 2 - src/script/script_info_dummy.cpp | 2 - src/script/script_instance.cpp | 11 +- src/script/script_instance.hpp | 2 - src/script/script_scanner.cpp | 2 - src/script/script_scanner.hpp | 2 - src/script/script_storage.hpp | 2 - src/script/script_suspend.hpp | 2 - src/script/squirrel.cpp | 2 - src/script/squirrel.hpp | 2 - src/script/squirrel_class.hpp | 2 - src/script/squirrel_helper.hpp | 2 - src/script/squirrel_helper_type.hpp | 2 - src/script/squirrel_std.cpp | 2 - src/script/squirrel_std.hpp | 2 - src/settings.cpp | 32 +- src/settings_func.h | 2 - src/settings_gui.cpp | 2 - src/settings_gui.h | 2 - src/settings_internal.h | 2 - src/settings_type.h | 2 - src/settingsgen/settingsgen.cpp | 2 - src/ship.h | 8 - src/ship_cmd.cpp | 5 +- src/ship_gui.cpp | 2 - src/signal.cpp | 2 - src/signal_func.h | 2 - src/signal_type.h | 2 - src/signs.cpp | 12 +- src/signs_base.h | 17 +- src/signs_cmd.cpp | 5 +- src/signs_func.h | 2 - src/signs_gui.cpp | 5 +- src/signs_type.h | 2 - src/slope_func.h | 2 - src/slope_type.h | 2 - src/smallmap_gui.cpp | 11 +- src/smallmap_gui.h | 2 - src/sortlist_type.h | 2 - src/sound.cpp | 2 - src/sound/allegro_s.cpp | 2 - src/sound/allegro_s.h | 2 - src/sound/cocoa_s.cpp | 2 - src/sound/cocoa_s.h | 2 - src/sound/null_s.cpp | 2 - src/sound/null_s.h | 2 - src/sound/sdl2_s.cpp | 2 - src/sound/sdl_s.cpp | 2 - src/sound/sdl_s.h | 2 - src/sound/sound_driver.hpp | 2 - src/sound/win32_s.cpp | 2 - src/sound/win32_s.h | 2 - src/sound/xaudio2_s.cpp | 2 - src/sound/xaudio2_s.h | 2 - src/sound_func.h | 2 - src/sound_type.h | 2 - src/sprite.cpp | 2 - src/sprite.h | 2 - src/spritecache.cpp | 2 - src/spritecache.h | 2 - src/spriteloader/grf.cpp | 2 - src/spriteloader/grf.hpp | 2 - src/spriteloader/spriteloader.hpp | 2 - src/station.cpp | 25 +- src/station_base.h | 4 - src/station_cmd.cpp | 103 +-- src/station_func.h | 2 - src/station_gui.cpp | 8 +- src/station_gui.h | 2 - src/station_map.h | 2 - src/station_type.h | 2 - src/statusbar_gui.cpp | 5 +- src/statusbar_gui.h | 2 - src/stdafx.h | 2 - src/story.cpp | 8 +- src/story_base.h | 11 +- src/story_gui.cpp | 8 +- src/story_type.h | 2 - src/strgen/strgen.cpp | 2 - src/strgen/strgen.h | 2 - src/strgen/strgen_base.cpp | 2 - src/string.cpp | 2 - src/string_base.h | 2 - src/string_func.h | 2 - src/string_type.h | 2 - src/stringfilter.cpp | 2 - src/stringfilter_type.h | 2 - src/strings.cpp | 2 - src/strings_func.h | 2 - src/strings_type.h | 2 - src/subsidy.cpp | 26 +- src/subsidy_base.h | 5 - src/subsidy_func.h | 2 - src/subsidy_gui.cpp | 15 +- src/subsidy_type.h | 2 - src/table/airport_defaults.h | 2 - src/table/airport_movement.h | 2 - src/table/airporttile_ids.h | 2 - src/table/airporttiles.h | 2 - src/table/animcursors.h | 2 - src/table/autorail.h | 2 - src/table/bridge_land.h | 2 - src/table/build_industry.h | 2 - src/table/cargo_const.h | 2 - src/table/clear_land.h | 2 - src/table/company_settings.ini | 2 - src/table/control_codes.h | 2 - src/table/currency_settings.ini | 2 - src/table/elrail_data.h | 2 - src/table/engines.h | 2 - src/table/gameopt_settings.ini | 2 - src/table/genland.h | 2 - src/table/heightmap_colours.h | 2 - src/table/industry_land.h | 2 - src/table/landscape_sprite.h | 2 - src/table/misc_settings.ini | 2 - src/table/newgrf_debug_data.h | 2 - src/table/object_land.h | 2 - src/table/palette_convert.h | 2 - src/table/palettes.h | 2 - src/table/pricebase.h | 2 - src/table/railtypes.h | 2 - src/table/road_land.h | 2 - src/table/roadtypes.h | 2 - src/table/roadveh_movement.h | 2 - src/table/settings.h.preamble | 2 - src/table/settings.ini | 9 +- src/table/sprites.h | 2 - src/table/station_land.h | 2 - src/table/strgen_tables.h | 2 - src/table/string_colours.h | 2 - src/table/town_land.h | 2 - src/table/townname.h | 2 - src/table/track_land.h | 2 - src/table/train_cmd.h | 2 - src/table/tree_land.h | 2 - src/table/unicode.h | 2 - src/table/water_land.h | 2 - src/table/win32_settings.ini | 2 - src/table/window_settings.ini | 2 - src/tar_type.h | 2 - src/terraform_cmd.cpp | 2 - src/terraform_gui.cpp | 8 +- src/terraform_gui.h | 2 - src/textbuf.cpp | 2 - src/textbuf_gui.h | 2 - src/textbuf_type.h | 2 - src/texteff.cpp | 2 - src/texteff.hpp | 2 - src/textfile_gui.cpp | 2 - src/textfile_gui.h | 2 - src/textfile_type.h | 2 - src/tgp.cpp | 2 - src/tgp.h | 2 - src/thread.h | 2 - src/tile_cmd.h | 2 - src/tile_map.cpp | 2 - src/tile_map.h | 2 - src/tile_type.h | 2 - src/tilearea.cpp | 2 - src/tilearea_type.h | 2 - src/tilehighlight_func.h | 2 - src/tilehighlight_type.h | 2 - src/tilematrix_type.hpp | 2 - src/timetable.h | 2 - src/timetable_cmd.cpp | 2 - src/timetable_gui.cpp | 2 - src/toolbar_gui.cpp | 5 +- src/toolbar_gui.h | 2 - src/town.h | 7 +- src/town_cmd.cpp | 65 +- src/town_gui.cpp | 11 +- src/town_map.h | 2 - src/town_type.h | 2 - src/townname.cpp | 5 +- src/townname_func.h | 2 - src/townname_type.h | 2 - src/track_func.h | 2 - src/track_type.h | 2 - src/train.h | 4 - src/train_cmd.cpp | 14 +- src/train_gui.cpp | 5 +- src/transparency.h | 2 - src/transparency_gui.cpp | 2 - src/transparency_gui.h | 2 - src/transport_type.h | 2 - src/tree_cmd.cpp | 2 - src/tree_gui.cpp | 2 - src/tree_map.h | 2 - src/tunnel_map.cpp | 2 - src/tunnel_map.h | 2 - src/tunnelbridge.h | 2 - src/tunnelbridge_cmd.cpp | 2 - src/tunnelbridge_map.h | 2 - src/vehicle.cpp | 35 +- src/vehicle_base.h | 29 +- src/vehicle_cmd.cpp | 6 +- src/vehicle_func.h | 2 - src/vehicle_gui.cpp | 16 +- src/vehicle_gui.h | 2 - src/vehicle_gui_base.h | 2 - src/vehicle_type.h | 2 - src/vehiclelist.cpp | 20 +- src/vehiclelist.h | 2 - src/video/allegro_v.cpp | 2 - src/video/allegro_v.h | 2 - src/video/cocoa/cocoa_keys.h | 2 - src/video/cocoa/cocoa_v.h | 2 - src/video/cocoa/cocoa_v.mm | 17 +- src/video/cocoa/event.mm | 2 - src/video/cocoa/fullscreen.mm | 2 - src/video/cocoa/wnd_quartz.mm | 2 - src/video/cocoa/wnd_quickdraw.mm | 2 - src/video/dedicated_v.cpp | 2 - src/video/dedicated_v.h | 2 - src/video/null_v.cpp | 2 - src/video/null_v.h | 2 - src/video/sdl2_v.cpp | 101 ++- src/video/sdl2_v.h | 11 +- src/video/sdl_v.cpp | 2 - src/video/sdl_v.h | 2 - src/video/video_driver.hpp | 7 +- src/video/win32_v.cpp | 2 - src/video/win32_v.h | 2 - src/viewport.cpp | 61 +- src/viewport_func.h | 2 - src/viewport_gui.cpp | 2 - src/viewport_sprite_sorter.h | 2 - src/viewport_sprite_sorter_sse4.cpp | 2 - src/viewport_type.h | 22 +- src/void_cmd.cpp | 2 - src/void_map.h | 2 - src/water.h | 2 - src/water_cmd.cpp | 2 - src/water_map.h | 2 - src/waypoint.cpp | 4 +- src/waypoint_base.h | 8 - src/waypoint_cmd.cpp | 26 +- src/waypoint_func.h | 2 - src/waypoint_gui.cpp | 2 - src/widget.cpp | 2 - src/widget_type.h | 2 - src/widgets/ai_widget.h | 2 - src/widgets/airport_widget.h | 2 - src/widgets/autoreplace_widget.h | 2 - src/widgets/bootstrap_widget.h | 2 - src/widgets/bridge_widget.h | 2 - src/widgets/build_vehicle_widget.h | 2 - src/widgets/cheat_widget.h | 2 - src/widgets/company_widget.h | 2 - src/widgets/console_widget.h | 2 - src/widgets/date_widget.h | 2 - src/widgets/depot_widget.h | 2 - src/widgets/dock_widget.h | 2 - src/widgets/dropdown.cpp | 2 - src/widgets/dropdown_func.h | 2 - src/widgets/dropdown_type.h | 2 - src/widgets/dropdown_widget.h | 2 - src/widgets/engine_widget.h | 2 - src/widgets/error_widget.h | 2 - src/widgets/fios_widget.h | 2 - src/widgets/framerate_widget.h | 2 - src/widgets/genworld_widget.h | 2 - src/widgets/goal_widget.h | 2 - src/widgets/graph_widget.h | 2 - src/widgets/group_widget.h | 2 - src/widgets/highscore_widget.h | 2 - src/widgets/industry_widget.h | 2 - src/widgets/intro_widget.h | 2 - src/widgets/link_graph_legend_widget.h | 2 - src/widgets/main_widget.h | 2 - src/widgets/misc_widget.h | 2 - src/widgets/music_widget.h | 2 - src/widgets/network_chat_widget.h | 2 - src/widgets/network_content_widget.h | 2 - src/widgets/network_widget.h | 2 - src/widgets/newgrf_debug_widget.h | 2 - src/widgets/newgrf_widget.h | 2 - src/widgets/news_widget.h | 3 +- src/widgets/object_widget.h | 2 - src/widgets/order_widget.h | 2 - src/widgets/osk_widget.h | 2 - src/widgets/rail_widget.h | 2 - src/widgets/road_widget.h | 2 - src/widgets/settings_widget.h | 2 - src/widgets/sign_widget.h | 2 - src/widgets/smallmap_widget.h | 2 - src/widgets/station_widget.h | 2 - src/widgets/statusbar_widget.h | 2 - src/widgets/story_widget.h | 2 - src/widgets/subsidy_widget.h | 2 - src/widgets/terraform_widget.h | 2 - src/widgets/timetable_widget.h | 2 - src/widgets/toolbar_widget.h | 2 - src/widgets/town_widget.h | 2 - src/widgets/transparency_widget.h | 2 - src/widgets/tree_widget.h | 2 - src/widgets/vehicle_widget.h | 2 - src/widgets/viewport_widget.h | 2 - src/widgets/waypoint_widget.h | 2 - src/window.cpp | 22 +- src/window_func.h | 3 +- src/window_gui.h | 7 +- src/window_type.h | 2 - src/zoom_func.h | 2 - src/zoom_type.h | 2 - update.sh | 18 + 1366 files changed, 2926 insertions(+), 5639 deletions(-) create mode 100644 CREDITS.md create mode 100644 docs/debugging_desyncs.md create mode 100644 docs/directory_structure.md create mode 100644 docs/logging_and_performance_metrics.md create mode 100755 update.sh diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 0000000000..8c20a4ac18 --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,60 @@ +### The OpenTTD team (in alphabetical order): + +- Grzegorz Duczyński (adf88) - General coding (since 1.7.2) +- Albert Hofkamp (Alberth) - GUI expert (since 0.7) +- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3) +- Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3) +- Christoph Elsenhans (frosch) - General coding (since 0.6) +- Loïc Guilloux (glx) - Windows Expert (since 0.4.5) +- Charles Pigott (LordAro) - General / Correctness police (since 1.9) +- Michael Lutz (michi_cc) - Path based signals (since 0.7) +- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9) +- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1) +- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5) +- Ingo von Borstel (planetmaker) - General coding, Support (since 1.1) +- Remko Bijker (Rubidium) - Lead coder and way more (since 0.4.5) +- José Soler (Terkhen) - General coding (since 1.0) +- Leif Linse (Zuu) - AI/Game Script (since 1.2) + +### Inactive Developers: + +- Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0) +- Bjarni Corfitzen (Bjarni) - macOS port, coder and vehicles (0.3 - 0.7) +- Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6) +- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6) +- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6) +- Attila Bán (MiHaMiX) - WebTranslator 1 and 2 (0.3 - 0.5) +- Zdeněk Sojka (SmatZ) - Bug finder and fixer (0.6 - 1.3) +- Christoph Mallon (Tron) - Programmer, code correctness police (0.3 - 0.5) +- Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active) +- Thijs Marinussen (Yexo) - AI Framework, General (0.6 - 1.3) + +### Retired Developers: + +- Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5) +- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3) +- Emil Djupfeld (egladil) - macOS port (0.4 - 0.6) +- Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5) +- Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3) +- Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3) +- Petr Baudiš (pasky) - Many patches, newgrf support, etc. (0.3 - 0.3) +- Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker (0.6 - 0.7) +- Serge Paquet (vurlix) - 2nd contributor after ludde (0.1 - 0.3) + +### Thanks to: + +- Josef Drexler - For his great work on TTDPatch. +- Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations +- Stefan Meißner (sign_de) - For his work on the console +- Mike Ragsdale - OpenTTD installer +- Christian Rosentreter (tokai) - MorphOS / AmigaOS port +- Richard Kempton (RichK67) - Additional airports, initial TGP implementation +- Alberto Demichelis - Squirrel scripting language +- L. Peter Deutsch - MD5 implementation +- Michael Blunck - For revolutionizing TTD with awesome graphics +- George - Canal graphics +- Andrew Parkhouse (andythenorth) - River graphics +- David Dallaston (Pikka) - Tram tracks +- All Translators - For their support to make OpenTTD a truly international game +- Bug Reporters - Thanks for all bug reports +- Chris Sawyer - For an amazing game! diff --git a/Doxyfile b/Doxyfile index 5677118c54..ef7ea3daa3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.bundle.in b/Makefile.bundle.in index 163f545ffb..276307c33e 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.grf.in b/Makefile.grf.in index 8e8113a033..be382d708d 100644 --- a/Makefile.grf.in +++ b/Makefile.grf.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.in b/Makefile.in index 17636f7958..38d7f53294 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.lang.in b/Makefile.lang.in index 2853ae3898..bce43b8466 100644 --- a/Makefile.lang.in +++ b/Makefile.lang.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.msvc b/Makefile.msvc index 0a02c8cf95..8070062acf 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.setting.in b/Makefile.setting.in index 1e2dc992f8..987a882db1 100644 --- a/Makefile.setting.in +++ b/Makefile.setting.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Makefile.src.in b/Makefile.src.in index 3a4db6c171..ef2d2bb503 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/README.md b/README.md index c59ebbca59..230bbf3b6e 100644 --- a/README.md +++ b/README.md @@ -3,215 +3,78 @@ ## Table of contents - 1.0) [About](#10-about) - - 1.1) [Compiling OpenTTD](#11-compiling-openttd) - - 1.2) [Contributing to OpenTTD](#12-contributing-to-openttd) -- 2.0) [Contacting](#20-contacting) - - 2.1) [Reporting bugs](#21-reporting-bugs) - - 2.2) [Reporting desyncs](#22-reporting-desyncs) -- 3.0) [Supported platforms](#30-supported-platforms) -- 4.0) [Installing and running OpenTTD](#40-installing-and-running-openttd) - - 4.1) [(Required) 3rd party files](#41-required-3rd-party-files) - - 4.2) [OpenTTD directories](#42-openttd-directories) - - 4.3) [Portable installations (portable media)](#43-portable-installations-portable-media) - - 4.4) [Files in tar (archives)](#44-files-in-tar-archives) -- 5.0) [OpenTTD features](#50-openttd-features) - - 5.1) [Logging of potentially dangerous actions](#51-logging-of-potentially-dangerous-actions) - - 5.2) [Frame rate and performance metrics](#52-frame-rate-and-performance-metrics) -- 6.0) [Configuration file](#60-configuration-file) -- 7.0) [Translating](#70-translating) - - 7.1) [Translation](#71-translation) - - 7.2) [Previewing](#72-previewing) -- 8.0) [Troubleshooting](#80-troubleshooting) -- 9.0) [Licensing](#90-licensing) -- X.X) [Credits](#xx-credits) + - 1.1) [Downloading OpenTTD](#11-downloading-openttd) + - 1.2) [OpenTTD gameplay manual](#12-openttd-gameplay-manual) + - 1.3) [Supported platforms](#13-supported-platforms) + - 1.4) [Installing and running OpenTTD](#14-installing-and-running-openttd) + - 1.5) [Add-on content / mods](#15-add-on-content--mods) + - 1.6) [OpenTTD directories](#16-openttd-directories) + - 1.7) [Compiling OpenTTD](#17-compiling-openttd) +- 2.0) [Contact and community](#20-contact-and-community) + - 2.1) [Contributing to OpenTTD](#21-contributing-to-openttd) + - 2.2) [Reporting bugs](#22-reporting-bugs) + - 2.3) [Translating](#23-translating) +- 3.0) [Licensing](#30-licensing) +- 4.0) [Credits](#40-credits) ## 1.0) About -OpenTTD is a transport simulation game based upon the popular game Transport -Tycoon Deluxe, written by Chris Sawyer. It attempts to mimic the original -game as closely as possible while extending it with new features. +OpenTTD is a transport simulation game based upon the popular game Transport Tycoon Deluxe, written by Chris Sawyer. +It attempts to mimic the original game as closely as possible while extending it with new features. -OpenTTD is licensed under the GNU General Public License version 2.0, -but includes some 3rd party software under different licenses. See the -section "Licensing" below for details. +OpenTTD is licensed under the GNU General Public License version 2.0, but includes some 3rd party software under different licenses. +See the section ["Licensing"](#30-licensing) below for details. -## 1.1) Compiling OpenTTD +## 1.1) Downloading OpenTTD -Instructions for compiling OpenTTD can be found in [./COMPILING.md](COMPILING.md) +OpenTTD can be downloaded from the [official OpenTTD website](https://www.openttd.org/). -## 1.2) Contributing to OpenTTD +Both 'stable' and 'nightly' versions are available for download: -We welcome contributors to OpenTTD. More information for contributors can be found in [./CONTRIBUTING.md](CONTRIBUTING.md) +- most people should choose the 'stable' version, as this has been more extensively tested +- the 'nightly' version includes the latest changes and features, but may sometimes be less reliable -## 2.0) Contacting +On some platforms OpenTTD will also be available via your OS package manager or a similar service. -The easiest way to contact the OpenTTD team is by submitting bug reports or -posting comments in our forums. You can also chat with us on IRC (#openttd -on irc.oftc.net). -The OpenTTD homepage is https://www.openttd.org. +## 1.2) OpenTTD gameplay manual -You can also find the OpenTTD forums at -[https://www.tt-forums.net](https://www.tt-forums.net/viewforum.php?f=55). +OpenTTD has a [community-maintained wiki](https://wiki.openttd.org/), including a gameplay manual and tips. -### 2.1) Reporting bugs -First of all, check whether the bug is not already known. Do this by looking -through the file called 'known-bugs.txt' which is distributed with OpenTTD -like this readme. +## 1.3) Supported platforms -For tracking our bugs we are using GitHub's issue tracker. You can find -the tracker at https://github.com/OpenTTD/OpenTTD/issues. Before actually -reporting take a look through the already reported bugs there to see if -the bug is already known. The 'known-bugs.txt' file might be a bit outdated -at the moment you are reading it as only bugs known before the release -are documented there. Also look through the recently closed bugs. +OpenTTD has been ported to several platforms and operating systems. -When you are sure it is not already reported you should: - -- Make sure you are running a recent version, i.e. run the latest stable or - nightly based on where you found the bug. -- Make sure you are not running a non-official binary, like a patch pack. - When you are playing with a patch pack you should report any bugs to the - forum thread related to that patch pack. -- Make it reproducible for the developers. In other words, create a savegame - in which you can reproduce the issue once loaded. It is very useful to give - us the crash.dmp, crash.sav, crash.log and crash screenshot which are - created on crashes. -- Check whether the bug is already reported on our bug tracker. This includes - searching for recently closed bug reports as the bug might already be fixed. - -After you have done all that you can report the bug. Please include the -following information in your bug report: - -- OpenTTD version (PLEASE test the latest Git revision/nightly build) -- Bug details, including instructions how to reproduce it -- Platform (Windows, Linux, FreeBSD, …) and compiler (including version) if - you compiled OpenTTD yourself. -- The processor architecture of your OS (32-bit Windows, 64-bit Windows, - Linux on an ARM, Mac OS X on a PowerPC, etc.) -- Attach a saved game **and** a screenshot if possible -- If this bug only occurred recently please note the last version without - the bug and the first version including the bug. That way we can fix it - quicker by looking at the changes made. -- Attach crash.dmp, crash.log and crash.sav. These files are usually created - next to your openttd.cfg. The crash handler will tell you the location. - -### 2.2) Reporting desyncs - -As desyncs are hard to make reproducible OpenTTD has the ability to log all -actions done by clients so we can replay the whole game in an effort to make -desyncs better reproducible. You need to turn this ability on. When turned -on an automatic savegame will be made once the map has been constructed in -the 'save/autosave' directory, see OpenTTD directories to know where to find -this directory. Furthermore the log file 'commands-out.log' will be created -and all actions will be written to there. - -To enable the desync debugging you need to set the debug level for 'desync' -to at least 1. You do this by starting OpenTTD with '`-d desync=`' as -parameter or by typing '`debug_level desync=`' in OpenTTD's internal -console. -The desync debug levels are: - -- 0: nothing. -- 1: dumping of commands to 'commands-out.log'. -- 2: same as 1 plus checking vehicle caches and dumping that too. -- 3: same as 2 plus monthly saves in autosave. -- 4 and higher: same as 3 - -Restarting OpenTTD will overwrite 'commands-out.log'. OpenTTD will not remove -the savegames (dmp_cmds_*.sav) made by the desync debugging system, so you -have to occasionally remove them yourself! - -The naming format of the desync savegames is as follows: -dmp_cmds_XXXXXXXX_YYYYYYYY.sav. The XXXXXXXX is the hexadecimal representation -of the generation seed of the game and YYYYYYYY is the hexadecimal -representation of the date of the game. This sorts the savegames by game and -then by date making it easier to find the right savegames. - -When a desync has occurred with the desync debugging turned on you should file -a bug report with the following files attached: - -- commands-out.log as it contains all the commands that were done -- the last saved savegame (search for the last line beginning with - 'save: dmp_cmds_' in commands-out.log). We use this savegame to check - whether we can quickly reproduce the desync. Otherwise we will need … -- the first saved savegame (search for the first line beginning with 'save' - where the first part, up to the last underscore '_', is the same). We need - this savegame to be able to reproduce the bug when the last savegame is not - old enough. If you loaded a scenario or savegame you need to attach that. -- optionally you can attach the savegames from around 50%, 75%, 85%, 90% and - 95% of the game's progression. We can use these savegames to speed up the - reproduction of the desync, but we should be able to reproduce these - savegames based on the first savegame and commands-out.log. -- in case you use any NewGRFs you should attach the ones you used unless - we can easily find them ourselves via bananas or when they are in the - #openttdcoop pack. - -Do NOT remove the dmp_cmds savegames of a desync you have reported until the -desync has been fixed; if you, by accident, send us the wrong savegames we -will not be able to reproduce the desync and thus will be unable to fix it. - -## 3.0) Supported platforms - -OpenTTD has been ported to several platforms and operating systems. It should -not be very difficult to port it to a new platform. The currently working -platforms are: +The currently working platforms are: - FreeBSD (SDL) - Haiku (SDL) -- Linux (SDL or Allegro) +- Linux (SDL) - macOS (universal) (Cocoa video and sound drivers) - OpenBSD (SDL) - OS/2 (SDL) -- Windows (Win32 GDI (faster) or SDL or Allegro) +- Windows (Win32 GDI (faster) or SDL) -## 4.0) Installing and running OpenTTD +### 1.3.1) Legacy support +Platforms, languages and compilers change. +We'll keep support going on old platforms as long as someone is interested in supporting them, except where it means the project can't move forward to keep up with language and compiler features. -Installing OpenTTD is fairly straightforward. Either you have downloaded an -archive which you have to extract to a directory where you want OpenTTD to -be installed, or you have downloaded an installer, which will automatically -extract OpenTTD in the given directory. +We guarantee that every revision of OpenTTD will be able to load savegames from every older revision (excepting where the savegame is corrupt). +Please report a bug if you find a save that doesn't load. -OpenTTD looks in multiple locations to find the required data files (described -in section 4.2). Installing any 3rd party files into a 'shared' location has -the advantage that you only need to do this step once, rather than copying the -data files into all OpenTTD versions you have. +## 1.4) Installing and running OpenTTD -Savegames, screenshots, etc are saved relative to the config file (openttd.cfg) -currently being used. This means that if you use a config file in one of the -shared directories, savegames will reside in the save/ directory next to the -openttd.cfg file there. +OpenTTD is usually straightforward to install, but for more help the wiki [includes an installation guide](https://wiki.openttd.org/Installation). -If you want savegames and screenshots in the directory where the OpenTTD binary -resides, simply have your config file in that location. But if you remove this -config file, savegames will still be in this directory (see notes in -section 4.2 'OpenTTD directories') +OpenTTD needs some additional graphics and sound files to run. -OpenTTD comes without AIs, so if you want to play with AIs you have to download -them. The easiest way is via the 'Check Online Content' button in the main menu. -You can select some AIs that you think are compatible with your playing style. -Another way is manually downloading the AIs from the forum although then you -need to make sure that you install all the required AI libraries too; they get -automatically selected (and downloaded) if you get the AIs via the 'Check -Online Content'. If you do not have an AI but have configured OpenTTD to start -an AI a message will be shown that the 'dummy' AI has been started. +For some platforms these will be downloaded during the installation process if required. -### 4.1) (Required) 3rd party files +For some platforms, you will need to refer to [the installation guide](https://wiki.openttd.org/Installation). -Before you run OpenTTD, you need to put the game's data files into a baseset/ -directory which can be located in various places addressed in the following -section. -For OpenTTD you need to acquire some third party data files. For this you have -the choice of using the original Transport Tycoon Deluxe data files or a set -of free data files. - -Do NOT copy files included with OpenTTD into 'shared' directories (explained in -the following sections) as sooner or later you will run into graphical glitches -when using other versions of the game. - -#### 4.1.1) Free graphics and sound files +### 1.4.1) Free graphics and sound files The free data files, split into OpenGFX for graphics, OpenSFX for sounds and OpenMSX for music can be found at: @@ -223,12 +86,13 @@ OpenMSX for music can be found at: Please follow the readme of these packages about the installation procedure. The Windows installer can optionally download and install these packages. -#### 4.1.2) Original Transport Tycoon Deluxe graphics and sound files -If you want to play with the original Transport Tycoon Deluxe data files you -have to copy the data files from the CD-ROM into the baseset/ directory. It -does not matter whether you copy them from the DOS or Windows version of -Transport Tycoon Deluxe. The Windows install can optionally copy these files. +### 1.4.2) Original Transport Tycoon Deluxe graphics and sound files + +If you want to play with the original Transport Tycoon Deluxe data files you have to copy the data files from the CD-ROM into the baseset/ directory. +It does not matter whether you copy them from the DOS or Windows version of Transport Tycoon Deluxe. +The Windows install can optionally copy these files. + You need to copy the following files: - sample.cat - trg1r.grf or TRG1.GRF @@ -237,469 +101,113 @@ You need to copy the following files: - trgir.grf or TRGI.GRF - trgtr.grf or TRGT.GRF -#### 4.1.3) Original Transport Tycoon Deluxe music -If you want the Transport Tycoon Deluxe music, copy the appropriate files from -the original game into the baseset folder. +### 1.4.3) Original Transport Tycoon Deluxe music + +If you want the Transport Tycoon Deluxe music, copy the appropriate files from the original game into the baseset folder. - TTD for Windows: All files in the gm/ folder (gm_tt00.gm up to gm_tt21.gm) - TTD for DOS: The GM.CAT file - Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT -#### 4.1.4) AIs - -If you want AIs use the in-game content downloader. If for some reason that is -not possible or you want to use an AI that has not been uploaded to the content -download system download the tar file and place it in the ai/ directory. If the -AI needs libraries you will have to download those too and put them in the -ai/library/ directory. All AIs and AI Libraries that have been uploaded to -the content download system can be found at https://noai.openttd.org/downloads. -The AIs and libraries can be found their in the form of .tar.gz packages. -OpenTTD can read inside tar files but it does not extract .tar.gz files by itself. - -To figure out which libraries you need for an AI you have to start the AI and -wait for an error message to pop up. The error message will tell you -'could not find library "lib-name"'. Download that library and try again. - -#### 4.1.5) Game scripts - -If you want an extra challenge in OpenTTD you can download so-called game -scripts via the in-game content downloader. These game scripts have varying -functionality, though they can generally influence town growth, subsidies, add -goals to reach or provide a different ranking system. - -If you download a game script manually you have to follow the same rules as for -AIs, except that game scripts are placed in the game/ directory instead of the -ai/ directory. - -### 4.2) OpenTTD directories - -OpenTTD uses its own directory to store its required 3rd party base set files -(see section 4.1 'Required 3rd party files') and non-compulsory extension and -configuration files. See below for their proper place within this OpenTTD main -data directory. - -The main OpenTTD directories can be found in various locations, depending on -your operating system: - -1. The current working directory (from where you started OpenTTD) - - For non-Windows operating systems OpenTTD will not scan for files in this - directory if it is your personal directory, i.e. '~/', or when it is the - root directory, i.e. '/'. - -2. Your personal directory - - Windows: - - `C:\My Documents\OpenTTD` (95, 98, ME) - - `C:\Documents and Settings\\My Documents\OpenTTD` (2000, XP) - - `C:\Users\\Documents\OpenTTD` (Vista, 7, 8.1, 10) - - macOS: `~/Documents/OpenTTD` - - Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd` - when built with XDG base directory support, otherwise `~/.openttd` -3. The shared directory - - Windows: - - `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP) - - `C:\Users\Public\Documents\OpenTTD` (Vista, 7, 8.1, 10) - - macOS: `/Library/Application Support/OpenTTD` - - Linux: not available -4. The binary directory (where the OpenTTD executable is) - - Windows: `C:\Program Files\OpenTTD` - - Linux: `/usr/games` -5. The installation directory (Linux only) - - Linux: `/usr/share/games/openttd` -6. The application bundle (macOS only) - - It includes the OpenTTD files (grf+lng) and it will work as long as they - are not touched - -Different types of data or extensions go into different subdirectories of the -chosen main OpenTTD directory: - -| data type | directory | additional info | -| ------------------- | ----------------- | --------------------------- | -| Config File | (no subdirectory) | | -| Screenshots | screenshot | | -| Base Graphics | baseset | (or a subdirectory thereof) | -| Sound Sets | baseset | (or a subdirectory thereof) | -| NewGRFs | newgrf | (or a subdirectory thereof) | -| 32bpp Sets | newgrf | (or a subdirectory thereof) | -| Music Sets | baseset | (or a subdirectory thereof) | -| AIs | ai | (or a subdirectory thereof) | -| AI Libraries | ai/library | (or a subdirectory thereof) | -| Game Scripts (GS) | game | (or a subdirectory thereof) | -| GS Libraries | game/library | (or a subdirectory thereof) | -| Savegames | save | | -| Automatic Savegames | save/autosave | | -| Scenarios | scenario | | - -The (automatically created) directory content_download is for OpenTTD's internal -use and no files should be added to it or its subdirectories manually. - -#### Notes: - -- Linux in the previous list means .deb, but most paths should be similar for - others. -- The previous search order is also used for NewGRFs and openttd.cfg. -- If openttd.cfg is not found, then it will be created using the 2, 4, 1, 3, - 5 order. When built with XDG base directory support, openttd.cfg will be - created in $XDG_CONFIG_HOME/openttd which is usually ~/.config/openttd. -- Savegames will be relative to the config file only if there is no save/ - directory in paths with higher priority than the config file path, but - autosaves and screenshots will always be relative to the config file. - Unless the configuration file is in $XDG_CONFIG_HOME/openttd, then all - other files will be saved under $XDG_DATA_HOME/openttd. - -#### The preferred setup: - -Place 3rd party files in shared directory (or in personal directory if you do -not have write access on shared directory) and have your openttd.cfg config -file in personal directory (where the game will then also place savegames and -screenshots). - -### 4.3) Portable installations (portable media) - -You can install OpenTTD on external media so you can take it with you, i.e. -using a USB key, or a USB HDD, etc. -Create a directory where you shall store the game in (i.e. OpenTTD/). -Copy the binary (OpenTTD.exe, OpenTTD.app, openttd, etc), baseset/ and your -openttd.cfg to this directory. -You can copy binaries for any operating system into this directory, which will -allow you to play the game on nearly any computer you can attach the external -media to. -As always - additional grf files are stored in the newgrf/ dir (for details, -again, see section 4.1). - -### 4.4) Files in tar (archives) - -OpenTTD can read files that are in an uncompressed tar (archive), which -makes it easy to bundle files belonging to the same script, NewGRF or base -set. Music sets are the only exception as they cannot be stored in a tar -file due to being played by external applications. - -OpenTTD sees each tar archive as the 'root' of its search path. This means that -having a file with the same path in two different tar files means that one -cannot be opened, after all only one file will be found first. As such it is -advisable to put an uniquely named folder in the root of the tar and put all the -content in that folder. For example, all downloaded content has a path that -concatenates the name of the content and the version, which makes the path -unique. For custom tar files it is advised to do this as well. - -The normal files are also referred to by their relative path from the search -directory, this means that also normal files could hide files in a tar as -long as the relative path from the search path of the normal file is the -same as the path in the tar file. Again it is advised to have an unique path -to the normal file so they do not collide with the files from other tar -files. - -## 5.0) OpenTTD features - -OpenTTD has a lot of features going beyond the original Transport Tycoon Deluxe -emulation. Unfortunately, there is currently no comprehensive list of features, -but there is a basic features list on the web, and some optional features can be -controlled through the Advanced Settings dialog. We also implement some -features known from [TTDPatch](https://www.ttdpatch.net). - -Several important non-standard controls: - -- Ctrl modifies many commands and makes them more powerful. For example Ctrl - clicking on signals with the build signal tool changes their behaviour, - holding Ctrl while the track build tool is activated changes it to the track - removal tool, and so on. See https://wiki.openttd.org/Hidden_features - for a non-comprehensive list or look at the tooltips. -- Ingame console. More information at https://wiki.openttd.org/Console -- Hovering over a GUI element shows tooltips. This can be changed to right click - via the advanced settings. - -### 5.1) Logging of potentially dangerous actions - -OpenTTD is a complex program, and together with NewGRF, it may show a buggy -behaviour. But not only bugs in code can cause problems. There are several -ways to affect game state possibly resulting in program crash or multiplayer -desyncs. - -Easier way would be to forbid all these unsafe actions, but that would affect -game usability for many players. We certainly do not want that. -However, we receive bug reports because of this. To reduce time spent with -solving these problems, these potentially unsafe actions are logged in -the savegame (including crash.sav). Log is stored in crash logs, too. - -Information logged: - -- Adding / removing / changing order of NewGRFs -- Changing NewGRF parameters, loading compatible NewGRF -- Changing game mode (scenario editor <-> normal game) -- Loading game saved in a different OpenTTD / TTDPatch / Transport Tycoon Deluxe / - original Transport Tycoon version -- Running a modified OpenTTD build -- Changing settings affecting NewGRF behaviour (non-network-safe settings) -- Triggering NewGRF bugs - -No personal information is stored. - -You can show the game log by typing 'gamelog' in the console or by running -OpenTTD in debug mode. - -### 5.2) Frame rate and performance metrics - -The Help menu in-game has a function to open the Frame rate window. This -window shows various real-time performance statistics, measuring what parts -of the game require the most processing power currently. - -A summary of the statistics can also be retrieved from the console with the -`fps` command. This is especially useful on dedicated servers, where the -administrator might want to determine what's limiting performance in a slow -game. - -The frame rate is given as two figures, the simulation rate and the graphics -frame rate. Usually these are identical, as the screen is rendered exactly -once per simulated tick, but in the future there might be support for graphics -and simulation running at different rates. When the game is paused, the -simulation rate drops to zero. - -In addition to the simulation rate, a game speed factor is also calculated. -This is based on the target simulation speed, which is 30 milliseconds per -game tick. At that speed, the expected frame rate is 33.33 frames/second, and -the game speed factor is how close to that target the actual rate is. When -the game is in fast forward mode, the game speed factor shows how much -speed up is achieved. - -The lower part of the window shows timing statistics for individual parts of -the game. The times shown are short-term and long-term averages of how long -it takes to process one tick of game time, all figures are in milliseconds. - -Clicking a line in the lower part of the window opens a graph window, giving -detailed readings on each tick simulated by the game. - -The following is an explanation of the different statistics: - -- *Game loop* - Total processing time used per simulated "tick" in the game. - This includes all pathfinding, world updates, and economy handling. -- *Cargo handling* - Time spent loading/unloading cargo at stations, and - industries and towns sending/retrieving cargo from stations. -- *Train ticks*, *Road vehicle ticks*, *Ship ticks*, *Aircraft ticks* - - Time spent on pathfinding and other processing for each player vehicle type. -- *World ticks* - Time spent on other world/landscape processing. This - includes towns growing, building animations, updates of farmland and trees, - and station rating updates. -- *GS/AI total*, *Game script*, and *AI players* - Time spent running logic - for game scripts and AI players. The total may show as less than the current - sum of the individual scripts, this is because AI players at lower - difficulty settings do not run every game tick, and hence contribute less - to the average across all ticks. Keep in mind that the "Current" figure is - also an average, just only over short term. -- *Link graph delay* - Time overruns of the cargo distribution link graph - update thread. Usually the link graph is updated in a background thread, - but these updates need to synchronise with the main game loop occasionally, - if the time spent on link graph updates is longer than the time taken to - otherwise simulate the game while it was updating, these delays are counted - in this figure. -- *Graphics rendering* - Total time spent rendering all graphics, including - both GUI and world viewports. This typically spikes when panning the view - around, and when more things are happening on screen at once. -- *World viewport rendering* - Isolated time spent rendering just world - viewports. If this figure is significantly lower than the total graphics - rendering time, most time is spent rendering GUI than rendering world. -- *Video output* - Speed of copying the rendered graphics to the display - adapter. Usually this should be very fast (in the range of 0-3 ms), large - values for this can indicate a graphics driver problem. -- *Sound mixing* - Speed of mixing active audio samples together. Usually - this should be very fast (in the range of 0-3 ms), if it is slow, consider - switching to the NoSound set. - -If the frame rate window is shaded, the title bar will instead show just the -current simulation rate and the game speed factor. - -## 6.0) Configuration file - -The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like -.INI format. It is mostly undocumented. Almost all settings can be changed -ingame by using the 'Advanced Settings' window. -When you cannot find openttd.cfg you should look in the directories as -described in section 4.2. If you do not have an openttd.cfg OpenTTD will -create one after closing. - -## 7.0) Translating - -See https://www.openttd.org/development for up-to-date information. - -The use of the online Translator service, located at -https://translator.openttd.org, is highly encouraged. For getting an account -simply follow the guidelines in the FAQ of the translator website. - -If for some reason the website is down for a longer period of time, the -information below might be of help. - -Please contact the translations manager (https://www.openttd.org/contact) -before beginning the translation process! This avoids double work, as -someone else may have already started translating to the same language. - -### 7.1) Translation - -So, now that you have notified the development team about your intention to -translate (You did, right? Of course you did.) you can pick up english.txt -(found in the Git repository under /src/lang) and translate. - -You must change the first two lines of the file appropriately: - - ##name English-Name-Of-Language - ##ownname Native-Name-Of-Language - -Note: Do not alter the following parts of the file: - -- String identifiers (the first word on each line) -- Parts of the strings which are in curly braces (such as {STRING}) -- Lines beginning with ## (such as ##id), other than the first two lines - of the file - -### 7.2) Previewing - -In order to view the translation in the game, you need to compile your language -file with the strgen utility. As this utility is tailored to a specific OpenTTD -version, you need to compile it yourself. Just take the normal OpenTTD sources -and build that. During the build process the strgen utility will be made. - -strgen is a command-line utility. It takes the language filename as parameter. - -Example: - - strgen lang/german.txt - -This results in compiling german.txt and produces another file named german.lng. -Any missing strings are replaced with the English strings. Note that it looks -for english.txt in the lang subdirectory, which is where your language file -should also be. - -That is all! You should now be able to select the language in the game options. - -## 8.0) Troubleshooting - -To see all startup options available to you, start OpenTTD with the -'`./openttd -h`' option. This might help you tweak some of the settings. - -If the game is acting strange and you feel adventurous you can try the -'`-d [[=]]`' flag, where the higher levels will give you more -debugging output. The 'name' variable can help you to display only some type of -debugging messages. This is mostly undocumented so best is to look in the -source code file debug.c for the various debugging types. For more information -look at https://wiki.openttd.org/Command_line. - -The most frequent problem is missing data files. Please install OpenGFX and -possibly OpenSFX and OpenMSX. See section 4.1.1 for more information. - -Under certain circumstance, especially on Ubuntu OpenTTD can be extremely slow -and/or freeze. See known-bugs.txt for more information and how to solve this -problem on your computer. - -Under Windows 98 and lower it is impossible to use a dedicated server; it will -fail to start. Perhaps this is for the better because those OSes are not known -for their stability. - -With the added support for font-based text selecting a non-latin language can -result in lots of question marks ('?') being shown on screen. Please open your -configuration file (openttd.cfg - see Section 4.2 for where to find it) -and add a suitable font for the small, medium and / or large font, e.g.: - - small_font = "Tahoma" - medium_font = "Tahoma" - large_font = "Tahoma" - -You should use a font name like 'Tahoma' or a path to the desired font. - -Any NewGRF file used in a game is stored inside the savegame and will refuse to -load if you do not have that NewGRF file available. A list of missing files can -be viewed in the NewGRF window accessible from the file load dialogue window. - -You can try to obtain the missing files from that NewGRF dialogue or – if they -are not available online – you can search manually through our -[forum's graphics development section](https://www.tt-forums.net/viewforum.php?f=66) -or [GRFCrawler](https://grfcrawler.tt-forums.net). Put the NewGRF files in -OpenTTD's newgrf folder (see section 4.2 'OpenTTD directories') and rescan the -list of available NewGRFs. Once you have all missing files, you are set to go. - -## 9.0) Licensing - -OpenTTD is licensed under the GNU General Public License version 2.0. For -the complete license text, see the file 'COPYING.md'. This license applies -to all files in this distribution, except as noted below. - -The squirrel implementation in src/3rdparty/squirrel is licensed under -the Zlib license. See src/3rdparty/squirrel/COPYRIGHT for the complete -license text. - -The md5 implementation in src/3rdparty/md5 is licensed under the Zlib -license. See the comments in the source files in src/3rdparty/md5 for -the complete license text. - -The implementations of Posix getaddrinfo and getnameinfo for OS/2 in -src/3rdparty/os2 are distributed partly under the GNU Lesser General Public -License 2.1, and partly under the (3-clause) BSD license. The exact licensing -terms can be found in src/3rdparty/os2/getaddrinfo.c resp. -src/3rdparty/os2/getnameinfo.c. - -CONTRIBUTING.md is adapted from -[Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) -under the [Creative Commons Attribution 3.0 Unported -License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE) -terms for Bootstrap documentation. - -## X.X) Credits - -### The OpenTTD team (in alphabetical order): - -- Grzegorz Duczyński (adf88) - General coding (since 1.7.2) -- Albert Hofkamp (Alberth) - GUI expert (since 0.7) -- Matthijs Kooijman (blathijs) - Pathfinder-guru, Debian port (since 0.3) -- Ulf Hermann (fonsinchen) - Cargo Distribution (since 1.3) -- Christoph Elsenhans (frosch) - General coding (since 0.6) -- Loïc Guilloux (glx) - Windows Expert (since 0.4.5) -- Charles Pigott (LordAro) - General / Correctness police (since 1.9) -- Michael Lutz (michi_cc) - Path based signals (since 0.7) -- Niels Martin Hansen (nielsm) - Music system, general coding (since 1.9) -- Owen Rudge (orudge) - Forum host, OS/2 port (since 0.1) -- Peter Nelson (peter1138) - Spiritual descendant from newGRF gods (since 0.4.5) -- Ingo von Borstel (planetmaker) - General coding, Support (since 1.1) -- Remko Bijker (Rubidium) - Lead coder and way more (since 0.4.5) -- José Soler (Terkhen) - General coding (since 1.0) -- Leif Linse (Zuu) - AI/Game Script (since 1.2) - -### Inactive Developers: - -- Jean-François Claeys (Belugas) - GUI, newindustries and more (0.4.5 - 1.0) -- Bjarni Corfitzen (Bjarni) - macOS port, coder and vehicles (0.3 - 0.7) -- Victor Fischer (Celestar) - Programming everywhere you need him to (0.3 - 0.6) -- Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;) (0.4.5 - 0.6) -- Jonathan Coome (Maedhros) - High priest of the NewGRF Temple (0.5 - 0.6) -- Attila Bán (MiHaMiX) - WebTranslator 1 and 2 (0.3 - 0.5) -- Zdeněk Sojka (SmatZ) - Bug finder and fixer (0.6 - 1.3) -- Christoph Mallon (Tron) - Programmer, code correctness police (0.3 - 0.5) -- Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active) -- Thijs Marinussen (Yexo) - AI Framework, General (0.6 - 1.3) - -### Retired Developers: - -- Tamás Faragó (Darkvater) - Ex-Lead coder (0.3 - 0.5) -- Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3 - 0.3) -- Emil Djupfeld (egladil) - macOS port (0.4 - 0.6) -- Simon Sasburg (HackyKid) - Bug fixer (0.4 - 0.4.5) -- Ludvig Strigeus (ludde) - Original author of OpenTTD, main coder (0.1 - 0.3) -- Cian Duffy (MYOB) - BeOS port / manual writing (0.1 - 0.3) -- Petr Baudiš (pasky) - Many patches, newgrf support, etc. (0.3 - 0.3) -- Benedikt Brüggemeier (skidd13) - Bug fixer and code reworker (0.6 - 0.7) -- Serge Paquet (vurlix) - 2nd contributor after ludde (0.1 - 0.3) - -### Thanks to: - -- Josef Drexler - For his great work on TTDPatch. -- Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations -- Stefan Meißner (sign_de) - For his work on the console -- Mike Ragsdale - OpenTTD installer -- Christian Rosentreter (tokai) - MorphOS / AmigaOS port -- Richard Kempton (RichK67) - Additional airports, initial TGP implementation -- Alberto Demichelis - Squirrel scripting language -- L. Peter Deutsch - MD5 implementation -- Michael Blunck - For revolutionizing TTD with awesome graphics -- George - Canal graphics -- Andrew Parkhouse (andythenorth) - River graphics -- David Dallaston (Pikka) - Tram tracks -- All Translators - For their support to make OpenTTD a truly international game -- Bug Reporters - Thanks for all bug reports -- Chris Sawyer - For an amazing game! + +## 1.5) Add-on content / mods + +OpenTTD features multiple types of add-on content, which modify gameplay in different ways. + +Most types of add-on content can be downloaded within OpenTTD via the 'Check Online Content' button in the main menu. + +Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/OpenTTD) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md). + +### 1.5.1) AI opponents + +OpenTTD comes without AI opponents, so if you want to play with AIs you have to download them. + +The easiest way is via the 'Check Online Content' button in the main menu. + +You can select some AIs that you think are compatible with your playing style. + +AI help and discussions may also be found in the [AI section of the forum](https://www.tt-forums.net/viewforum.php?f=65). + +### 1.5.2) Scenarios and height maps + +Scenarios and heightmaps can be added via the 'Check Online Content' button in the main menu. + +### 1.5.3) NewGRFs + +A wide range of add-content is available as NewGRFs, including vehicles, industries, stations, landscape objects, town names and more. + +NewGRFs can be added via the 'Check Online Content' button in the main menu. + +See also the wiki [guide to NewGRFs](https://wiki.openttd.org/NewGRF) and [the forum graphics development section](https://www.tt-forums.net/viewforum.php?f=66). + +### 1.5.4) Game scripts + +Game scripts can provide additional challenges or changes to the standard OpenTTD gameplay, for example setting transport goals, or changing town growth behaviour. + +Game scripts can be added via the 'Check Online Content' button in the main menu. + +See also the wiki [guide to game scripts](https://wiki.openttd.org/Game_script) and [the forum graphics game script section](https://www.tt-forums.net/viewforum.php?f=65). + +### 1.6) OpenTTD directories + +OpenTTD uses its own directory structure to store game data, add-on content etc. + +For more information, see the [directory structure guide](./docs/directory_structure.md). + +### 1.7) Compiling OpenTTD + +If you want to compile OpenTTD from source, instructions can be found in [COMPILING.md](./COMPILING.md). + + +## 2.0) Contact and Community + +'Official' channels + +- [OpenTTD website](https://www.openttd.org) +- IRC chat using #openttd on irc.oftc.net [more info about our irc channel](https://wiki.openttd.org/Irc) +- [OpenTTD on Github](https://github.com/openTTD/) for code repositories and for reporting issues +- [forum.openttd.org](https://forum.openttd.org/) - the primary community forum site for discussing OpenTTD and related games +- [OpenTTD wiki](https://wiki.openttd.org/) community-maintained wiki, including topics like gameplay guide, detailed explanation of some game mechanics, how to use add-on content (mods) and much more + +'Unofficial' channels + +- the OpenTTD wiki has a [page listing OpenTTD communities](https://wiki.openttd.org/Community) including some in languages other than English + + +### 2.1) Contributing to OpenTTD + +We welcome contributors to OpenTTD. More information for contributors can be found in [CONTRIBUTING.md](./CONTRIBUTING.md) + + +### 2.2) Reporting bugs + +Good bug reports are very helpful. We have a [guide to reporting bugs](./CONTRIBUTING.md#bug-reports) to help with this. + +Desyncs in multiplayer are complex to debug and report (some software development skils are required). +Instructions can be found in [debugging and reporting desyncs](./docs/debugging_desyncs.md). + + +### 2.3) Translating + +OpenTTD is translated into many languages. Translations are added and updated via the [online translation tool](https://translator.openttd.org). + + +## 3.0) Licensing + +OpenTTD is licensed under the GNU General Public License version 2.0. +For the complete license text, see the file '[COPYING.md](./COPYING.md)'. +This license applies to all files in this distribution, except as noted below. + +The squirrel implementation in `src/3rdparty/squirrel` is licensed under the Zlib license. +See `src/3rdparty/squirrel/COPYRIGHT` for the complete license text. + +The md5 implementation in `src/3rdparty/md5` is licensed under the Zlib license. +See the comments in the source files in `src/3rdparty/md5` for the complete license text. + +The implementations of Posix `getaddrinfo` and `getnameinfo` for OS/2 in `src/3rdparty/os2` are distributed partly under the GNU Lesser General Public License 2.1, and partly under the (3-clause) BSD license. +The exact licensing terms can be found in `src/3rdparty/os2/getaddrinfo.c` resp. `src/3rdparty/os2/getnameinfo.c`. + + +## 4.0 Credits + +See [CREDITS.md](./CREDITS.md) diff --git a/azure-pipelines/changelog.sh b/azure-pipelines/changelog.sh index 33eb8a78d4..be665a5a08 100755 --- a/azure-pipelines/changelog.sh +++ b/azure-pipelines/changelog.sh @@ -4,9 +4,9 @@ tag=$(git describe --tags 2>/dev/null) # If we are a tag, show the part of the changelog till (but excluding) the last stable if [ -n "$tag" ]; then - grep='^[0-9]\.[0-9]\.[0-9][^-]' + grep='^[0-9]\+\.[0-9]\+\.[0-9]\+[^-]' next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//') - cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9].[0-9].[0-9]/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }' + cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9]+.[0-9]+.[0-9]+/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }' exit 0 fi diff --git a/azure-pipelines/manifest.sh b/azure-pipelines/manifest.sh index d8f4f9aac9..730a09283f 100755 --- a/azure-pipelines/manifest.sh +++ b/azure-pipelines/manifest.sh @@ -31,29 +31,55 @@ DATE=$(cat .release_date | tr ' ' T | sed 's/TUTC/:00-00:00/') VERSION=$(cat .version) BASE="openttd-${VERSION}" -echo "name: ${NAME}" >> manifest.yaml +echo "name: ${NAME}" > manifest.yaml echo "date: ${DATE}" >> manifest.yaml echo "base: ${BASE}-" >> manifest.yaml -echo "files:" >> manifest.yaml error="" -for i in $(ls ${FOLDER} | grep -v ".txt$\|.md$\|sum$" | sort); do - if [ -n "$(echo $i | grep pdb.xz)" ]; then continue; fi - if [ -n "$(echo $i | grep dbg.deb)" ]; then continue; fi - if [ ! -e ${FOLDER}/$i.md5sum ] || [ ! -e ${FOLDER}/$i.sha1sum ] || [ ! -e ${FOLDER}/$i.sha256sum ]; then - echo "ERROR: missing checksum file for ${i}" 1>&2 - error="y" - continue - fi +FILES= +DEV_FILES= +for filename in $(ls ${FOLDER} | grep -v ".txt$\|.md$\|sum$" | sort); do + case ${filename} in + *docs* |\ + *source* |\ + *dbg.deb |\ + *pdb.xz ) + DEV_FILES="${DEV_FILES} ${filename}" + ;; - echo "- id: $i" >> manifest.yaml - echo " size: $(stat -c"%s" ${FOLDER}/$i)" >> manifest.yaml - echo " md5sum: $(cat ${FOLDER}/$i.md5sum | cut -d\ -f1)" >> manifest.yaml - echo " sha1sum: $(cat ${FOLDER}/$i.sha1sum | cut -d\ -f1)" >> manifest.yaml - echo " sha256sum: $(cat ${FOLDER}/$i.sha256sum | cut -d\ -f1)" >> manifest.yaml + *) + FILES="${FILES} ${filename}" + ;; + esac done +# output_files key filename... +output_files() { + if [ "$#" -lt 2 ]; then return; fi + key=$1 + echo "${key}:" >> manifest.yaml + shift + while [ "$#" -gt 0 ]; do + filename=$1 + if [ ! -e ${FOLDER}/${filename}.md5sum ] || [ ! -e ${FOLDER}/${filename}.sha1sum ] || [ ! -e ${FOLDER}/${filename}.sha256sum ]; then + echo "ERROR: missing checksum file for ${filename}" 1>&2 + error="y" + continue + fi + + echo "- id: ${filename}" >> manifest.yaml + echo " size: $(stat -c"%s" ${FOLDER}/${filename})" >> manifest.yaml + echo " md5sum: $(cat ${FOLDER}/${filename}.md5sum | cut -d\ -f1)" >> manifest.yaml + echo " sha1sum: $(cat ${FOLDER}/${filename}.sha1sum | cut -d\ -f1)" >> manifest.yaml + echo " sha256sum: $(cat ${FOLDER}/${filename}.sha256sum | cut -d\ -f1)" >> manifest.yaml + shift + done +} + +output_files files ${FILES} +output_files dev_files ${DEV_FILES} + if [ -n "${error}" ]; then echo "ERROR: exiting due to earlier errors" 1>&2 exit 1 diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 86ab06bba5..c40308592c 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index 6aa0e1a973..b8da71a194 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.1.nut b/bin/ai/compat_1.1.nut index 3d7b7553ee..f1bda9c7fe 100644 --- a/bin/ai/compat_1.1.nut +++ b/bin/ai/compat_1.1.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.10.nut b/bin/ai/compat_1.10.nut index fe985b90d0..3081fb58e8 100644 --- a/bin/ai/compat_1.10.nut +++ b/bin/ai/compat_1.10.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.2.nut b/bin/ai/compat_1.2.nut index 594ba98352..550f79969c 100644 --- a/bin/ai/compat_1.2.nut +++ b/bin/ai/compat_1.2.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.3.nut b/bin/ai/compat_1.3.nut index fb0f41d308..6b2c7e8a71 100644 --- a/bin/ai/compat_1.3.nut +++ b/bin/ai/compat_1.3.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.4.nut b/bin/ai/compat_1.4.nut index 4bbb971604..a9ab5a4757 100644 --- a/bin/ai/compat_1.4.nut +++ b/bin/ai/compat_1.4.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.5.nut b/bin/ai/compat_1.5.nut index b006f1733e..23944149f6 100644 --- a/bin/ai/compat_1.5.nut +++ b/bin/ai/compat_1.5.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.6.nut b/bin/ai/compat_1.6.nut index e57a3cb980..bcbe91455c 100644 --- a/bin/ai/compat_1.6.nut +++ b/bin/ai/compat_1.6.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.7.nut b/bin/ai/compat_1.7.nut index ae403d104b..7c2fd9b825 100644 --- a/bin/ai/compat_1.7.nut +++ b/bin/ai/compat_1.7.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.8.nut b/bin/ai/compat_1.8.nut index ecf4accdde..a118a63b57 100644 --- a/bin/ai/compat_1.8.nut +++ b/bin/ai/compat_1.8.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/compat_1.9.nut b/bin/ai/compat_1.9.nut index 6dae3ebc0b..a3d0941327 100644 --- a/bin/ai/compat_1.9.nut +++ b/bin/ai/compat_1.9.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/ai/regression/completeness.sh b/bin/ai/regression/completeness.sh index 2e42401550..46cee4ed3e 100755 --- a/bin/ai/regression/completeness.sh +++ b/bin/ai/regression/completeness.sh @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - if ! [ -f ai/regression/completeness.sh ]; then echo "Make sure you are in the root of OpenTTD before starting this script." exit 1 diff --git a/bin/ai/regression/regression_info.nut b/bin/ai/regression/regression_info.nut index d5c3f7dd29..020b186faf 100644 --- a/bin/ai/regression/regression_info.nut +++ b/bin/ai/regression/regression_info.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - class Regression extends AIInfo { function GetAuthor() { return "OpenTTD NoAI Developers Team"; } function GetName() { return "Regression"; } diff --git a/bin/ai/regression/run.sh b/bin/ai/regression/run.sh index c9197c4d56..7574b0b388 100755 --- a/bin/ai/regression/run.sh +++ b/bin/ai/regression/run.sh @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - if ! [ -f ai/regression/run.sh ]; then echo "Make sure you are in the root of OpenTTD before starting this script." exit 1 diff --git a/bin/ai/regression/run.vbs b/bin/ai/regression/run.vbs index 930562ec68..b4bdef4c17 100644 --- a/bin/ai/regression/run.vbs +++ b/bin/ai/regression/run.vbs @@ -1,7 +1,5 @@ Option Explicit -' $Id$ -' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/bin/ai/regression/tst_regression/main.nut b/bin/ai/regression/tst_regression/main.nut index baece09d08..5ace44eec7 100644 --- a/bin/ai/regression/tst_regression/main.nut +++ b/bin/ai/regression/tst_regression/main.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - class Regression extends AIController { function Start(); }; diff --git a/bin/ai/regression/tst_regression/require.nut b/bin/ai/regression/tst_regression/require.nut index 360e1c23b0..d8dc4baa7d 100644 --- a/bin/ai/regression/tst_regression/require.nut +++ b/bin/ai/regression/tst_regression/require.nut @@ -1,4 +1,2 @@ -/* $Id$ */ - print(" Required this file"); diff --git a/bin/ai/regression/tst_stationlist/main.nut b/bin/ai/regression/tst_stationlist/main.nut index 60f3e4a4a7..2f00ea1d6f 100644 --- a/bin/ai/regression/tst_stationlist/main.nut +++ b/bin/ai/regression/tst_stationlist/main.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - class Regression extends AIController { function Start(); }; diff --git a/bin/game/compat_1.10.nut b/bin/game/compat_1.10.nut index fe985b90d0..3081fb58e8 100644 --- a/bin/game/compat_1.10.nut +++ b/bin/game/compat_1.10.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.2.nut b/bin/game/compat_1.2.nut index 7822a44d01..c042e988b5 100644 --- a/bin/game/compat_1.2.nut +++ b/bin/game/compat_1.2.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.3.nut b/bin/game/compat_1.3.nut index 0d7a2afb60..161f4fd0a0 100644 --- a/bin/game/compat_1.3.nut +++ b/bin/game/compat_1.3.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.4.nut b/bin/game/compat_1.4.nut index 3ff887727e..0ebb850675 100644 --- a/bin/game/compat_1.4.nut +++ b/bin/game/compat_1.4.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.5.nut b/bin/game/compat_1.5.nut index b29a8ed2f3..86283cc0dd 100644 --- a/bin/game/compat_1.5.nut +++ b/bin/game/compat_1.5.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.6.nut b/bin/game/compat_1.6.nut index a3f5975287..4a091b81ea 100644 --- a/bin/game/compat_1.6.nut +++ b/bin/game/compat_1.6.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.7.nut b/bin/game/compat_1.7.nut index b4c4d1bb35..febd335c36 100644 --- a/bin/game/compat_1.7.nut +++ b/bin/game/compat_1.7.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.8.nut b/bin/game/compat_1.8.nut index 5aac3f8c1d..bd33b79f09 100644 --- a/bin/game/compat_1.8.nut +++ b/bin/game/compat_1.8.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/bin/game/compat_1.9.nut b/bin/game/compat_1.9.nut index c2acf9e909..ab9ffbccaf 100644 --- a/bin/game/compat_1.9.nut +++ b/bin/game/compat_1.9.nut @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/changelog.txt b/changelog.txt index cec584eaf7..143513dbe3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,28 @@ +1.10.0-beta2 (2019-12-25) +------------------------------------------------------------------------ +- Feature: [Script] More error mappings (#7857) +- Feature: Ctrl+Click on a vehicle in the vehicle group window selects and scrolls to the vehicle's group (#7800) +- Feature: Ctrl+Click on the vehicle details button in the vehicle view window opens the vehicle group window focused on the vehicle (#7800) +- Feature: Add a button to the vehicle advisory news window to open the vehicle's group window (#7800) +- Feature: Ctrl+Click on a vehicle in the vehicle list window opens the vehicle group window focused on the vehicle's group (#7800) +- Fix: Custom sea level default value is now equal to minimum value (#7866) +- Fix: [NewGRF] Various tracktype fixes (#7863) +- Fix: Infrastructure total update when removing tram road stop (#7856) +- Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849) +- Fix #7836: Check coherency of NewGRF parameter min/max (#7840) +- Fix #7673: [Script] Allow removal of custom town text (#7834) +- Fix: Crash when displaying an error message at map edges (#7833) +- Fix #7783, #7816: [SDL2] Fix input handling in edit context (#7825) +- Fix #7697: Tile query on HQs did not display cargo correctly (#7824) +- Fix #7820: Possible game crash when removing oil rig (#7821) +- Fix #7606: Rare crash when trying to clean up a crashed script (#7819) +- Fix #7784: [SDL2] up/down/home/end key behaviour (#7815) +- Fix #7631: 16 out cargo support for industry directory (#7809) +- Fix #7646: Crash on random map generation failure (#7805) +- Fix #7430: Only reset time since pickup when train visits station if it has room to load (#7595) +- Fix #5405: Aircraft could route to depots outside their range (#7104) + + 1.10.0-beta1 (2019-10-29) ------------------------------------------------------------------------ - Feature: Configurable minimum age for companies before allowing share trading (#7780) @@ -11,7 +36,6 @@ - Feature: Improved performance for road vehicle pathfinding (#7261) - Feature: Option to show local authority boundary of towns (#7025) - Feature: Experimental method of town cargo generation that scales linearly with population (#6965) -- Feature: [NewGRF] Houses and industries can accept/produce up to 16 different cargo types (#6867, #6872) - Feature: [NewGRF] RoadTypes (NRT) (#6811) - Add: [Win32] Select MIDI device by port name (#7666) - Add: 'getsysdate' console command (#7658) diff --git a/config.lib b/config.lib index dbee012207..df3b23fed1 100644 --- a/config.lib +++ b/config.lib @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1518,12 +1516,20 @@ make_cflags_and_ldflags() { # extensions in a way that breaks build with at least ICC. # This requires -O1 or more, so debug level 3 (-O0) is excluded. CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" + if [ "$os" = "MINGW" ]; then + # Prevent undefined references when _FORTIFY_SOURCE > 0 + LDFLAGS="$LDFLAGS -fstack-protector" + fi fi cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null` if [ -n "$cc_build_is_gcc" ]; then # Just add -O1 to the tools needed for building. CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1" + if [ "$os" = "MINGW" ]; then + # Prevent undefined references when _FORTIFY_SOURCE > 0 + LDFLAGS_BUILD="$LDFLAGS_BUILD -fstack-protector" + fi fi fi diff --git a/configure b/configure index 239b162ea3..991e8f1432 100755 --- a/configure +++ b/configure @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/docs/debugging_desyncs.md b/docs/debugging_desyncs.md new file mode 100644 index 0000000000..f5ea06e082 --- /dev/null +++ b/docs/debugging_desyncs.md @@ -0,0 +1,56 @@ +# Debugging / reporting desyncs + +As desyncs are hard to make reproducible OpenTTD has the ability to log all +actions done by clients so we can replay the whole game in an effort to make +desyncs better reproducible. You need to turn this ability on. When turned +on an automatic savegame will be made once the map has been constructed in +the 'save/autosave' directory, see OpenTTD directories to know where to find +this directory. Furthermore the log file 'commands-out.log' will be created +and all actions will be written to there. + +To enable the desync debugging you need to set the debug level for 'desync' +to at least 1. You do this by starting OpenTTD with '`-d desync=`' as +parameter or by typing '`debug_level desync=`' in OpenTTD's internal +console. +The desync debug levels are: + +- 0: nothing. +- 1: dumping of commands to 'commands-out.log'. +- 2: same as 1 plus checking vehicle caches and dumping that too. +- 3: same as 2 plus monthly saves in autosave. +- 4 and higher: same as 3 + +Restarting OpenTTD will overwrite 'commands-out.log'. OpenTTD will not remove +the savegames (dmp_cmds_*.sav) made by the desync debugging system, so you +have to occasionally remove them yourself! + +The naming format of the desync savegames is as follows: +dmp_cmds_XXXXXXXX_YYYYYYYY.sav. The XXXXXXXX is the hexadecimal representation +of the generation seed of the game and YYYYYYYY is the hexadecimal +representation of the date of the game. This sorts the savegames by game and +then by date making it easier to find the right savegames. + +When a desync has occurred with the desync debugging turned on you should file +a bug report with the following files attached: + +- commands-out.log as it contains all the commands that were done +- the last saved savegame (search for the last line beginning with + 'save: dmp_cmds_' in commands-out.log). We use this savegame to check + whether we can quickly reproduce the desync. Otherwise we will need … +- the first saved savegame (search for the first line beginning with 'save' + where the first part, up to the last underscore '_', is the same). We need + this savegame to be able to reproduce the bug when the last savegame is not + old enough. If you loaded a scenario or savegame you need to attach that. +- optionally you can attach the savegames from around 50%, 75%, 85%, 90% and + 95% of the game's progression. We can use these savegames to speed up the + reproduction of the desync, but we should be able to reproduce these + savegames based on the first savegame and commands-out.log. +- in case you use any NewGRFs you should attach the ones you used unless + we can easily find them ourselves via bananas or when they are in the + #openttdcoop pack. + +Do NOT remove the dmp_cmds savegames of a desync you have reported until the +desync has been fixed; if you, by accident, send us the wrong savegames we +will not be able to reproduce the desync and thus will be unable to fix it. + + diff --git a/docs/directory_structure.md b/docs/directory_structure.md new file mode 100644 index 0000000000..51ad1c5a3e --- /dev/null +++ b/docs/directory_structure.md @@ -0,0 +1,130 @@ +# OpenTTD directory structure + +OpenTTD uses its own directory to store its required 3rd party base set files +(see section 4.1 'Required 3rd party files') and non-compulsory extension and +configuration files. + +See below for their proper place within this OpenTTD main data directory. + +The main OpenTTD directories can be found in various locations, depending on +your operating system: + +1. The current working directory (from where you started OpenTTD) + + For non-Windows operating systems OpenTTD will not scan for files in this + directory if it is your personal directory, i.e. '~/', or when it is the + root directory, i.e. '/'. + +2. Your personal directory + - Windows: + - `C:\My Documents\OpenTTD` (95, 98, ME) + - `C:\Documents and Settings\\My Documents\OpenTTD` (2000, XP) + - `C:\Users\\Documents\OpenTTD` (Vista, 7, 8.1, 10) + - macOS: `~/Documents/OpenTTD` + - Linux: `$XDG_DATA_HOME/openttd` which is usually `~/.local/share/openttd` + when built with XDG base directory support, otherwise `~/.openttd` +3. The shared directory + - Windows: + - `C:\Documents and Settings\All Users\Shared Documents\OpenTTD` (2000, XP) + - `C:\Users\Public\Documents\OpenTTD` (Vista, 7, 8.1, 10) + - macOS: `/Library/Application Support/OpenTTD` + - Linux: not available +4. The binary directory (where the OpenTTD executable is) + - Windows: `C:\Program Files\OpenTTD` + - Linux: `/usr/games` +5. The installation directory (Linux only) + - Linux: `/usr/share/games/openttd` +6. The application bundle (macOS only) + + It includes the OpenTTD files (grf+lng) and it will work as long as they + are not touched + +Different types of data or extensions go into different subdirectories of the +chosen main OpenTTD directory: + +| data type | directory | additional info | +| ------------------- | ----------------- | --------------------------- | +| Config File | (no subdirectory) | | +| Screenshots | screenshot | | +| Base Graphics | baseset | (or a subdirectory thereof) | +| Sound Sets | baseset | (or a subdirectory thereof) | +| NewGRFs | newgrf | (or a subdirectory thereof) | +| 32bpp Sets | newgrf | (or a subdirectory thereof) | +| Music Sets | baseset | (or a subdirectory thereof) | +| AIs | ai | (or a subdirectory thereof) | +| AI Libraries | ai/library | (or a subdirectory thereof) | +| Game Scripts (GS) | game | (or a subdirectory thereof) | +| GS Libraries | game/library | (or a subdirectory thereof) | +| Savegames | save | | +| Automatic Savegames | save/autosave | | +| Scenarios | scenario | | + +The (automatically created) directory content_download is for OpenTTD's internal +use and no files should be added to it or its subdirectories manually. + +## Notes: + +- Linux in the previous list means .deb, but most paths should be similar for + others. +- The previous search order is also used for NewGRFs and openttd.cfg. +- If openttd.cfg is not found, then it will be created using the 2, 4, 1, 3, + 5 order. When built with XDG base directory support, openttd.cfg will be + created in $XDG_CONFIG_HOME/openttd which is usually ~/.config/openttd. +- Savegames will be relative to the config file only if there is no save/ + directory in paths with higher priority than the config file path, but + autosaves and screenshots will always be relative to the config file. + Unless the configuration file is in $XDG_CONFIG_HOME/openttd, then all + other files will be saved under $XDG_DATA_HOME/openttd. + +## The preferred setup: + +Place 3rd party files in shared directory (or in personal directory if you do +not have write access on shared directory) and have your openttd.cfg config +file in personal directory (where the game will then also place savegames and +screenshots). + +## Portable installations (portable media) + +You can install OpenTTD on external media so you can take it with you, i.e. +using a USB key, or a USB HDD, etc. +Create a directory where you shall store the game in (i.e. OpenTTD/). +Copy the binary (OpenTTD.exe, OpenTTD.app, openttd, etc), baseset/ and your +openttd.cfg to this directory. +You can copy binaries for any operating system into this directory, which will +allow you to play the game on nearly any computer you can attach the external +media to. +As always - additional grf files are stored in the newgrf/ dir (for details, +again, see section 4.1). + +## Files in tar (archives) + +OpenTTD can read files that are in an uncompressed tar (archive), which +makes it easy to bundle files belonging to the same script, NewGRF or base +set. Music sets are the only exception as they cannot be stored in a tar +file due to being played by external applications. + +OpenTTD sees each tar archive as the 'root' of its search path. This means that +having a file with the same path in two different tar files means that one +cannot be opened, after all only one file will be found first. As such it is +advisable to put an uniquely named folder in the root of the tar and put all the +content in that folder. For example, all downloaded content has a path that +concatenates the name of the content and the version, which makes the path +unique. For custom tar files it is advised to do this as well. + +The normal files are also referred to by their relative path from the search +directory, this means that also normal files could hide files in a tar as +long as the relative path from the search path of the normal file is the +same as the path in the tar file. Again it is advised to have an unique path +to the normal file so they do not collide with the files from other tar +files. + +## Configuration file + +The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like +.INI format. It is mostly undocumented. Almost all settings can be changed +ingame by using the 'Advanced Settings' window. + +When you cannot find openttd.cfg you should look in the directories as +described in this document. If you do not have an openttd.cfg OpenTTD will +create one after closing. + diff --git a/docs/logging_and_performance_metrics.md b/docs/logging_and_performance_metrics.md new file mode 100644 index 0000000000..9f0679acde --- /dev/null +++ b/docs/logging_and_performance_metrics.md @@ -0,0 +1,101 @@ +# Logging, frame rate and performance metrics + +## 1.0) Logging of potentially dangerous actions + +OpenTTD is a complex program, and together with NewGRF, it may show a buggy +behaviour. But not only bugs in code can cause problems. There are several +ways to affect game state possibly resulting in program crash or multiplayer +desyncs. + +Easier way would be to forbid all these unsafe actions, but that would affect +game usability for many players. We certainly do not want that. +However, we receive bug reports because of this. To reduce time spent with +solving these problems, these potentially unsafe actions are logged in +the savegame (including crash.sav). Log is stored in crash logs, too. + +Information logged: + +- Adding / removing / changing order of NewGRFs +- Changing NewGRF parameters, loading compatible NewGRF +- Changing game mode (scenario editor <-> normal game) +- Loading game saved in a different OpenTTD / TTDPatch / Transport Tycoon Deluxe / + original Transport Tycoon version +- Running a modified OpenTTD build +- Changing settings affecting NewGRF behaviour (non-network-safe settings) +- Triggering NewGRF bugs + +No personal information is stored. + +You can show the game log by typing 'gamelog' in the console or by running +OpenTTD in debug mode. + +## 2.0) Frame rate and performance metrics + +The Help menu in-game has a function to open the Frame rate window. This +window shows various real-time performance statistics, measuring what parts +of the game require the most processing power currently. + +A summary of the statistics can also be retrieved from the console with the +`fps` command. This is especially useful on dedicated servers, where the +administrator might want to determine what's limiting performance in a slow +game. + +The frame rate is given as two figures, the simulation rate and the graphics +frame rate. Usually these are identical, as the screen is rendered exactly +once per simulated tick, but in the future there might be support for graphics +and simulation running at different rates. When the game is paused, the +simulation rate drops to zero. + +In addition to the simulation rate, a game speed factor is also calculated. +This is based on the target simulation speed, which is 30 milliseconds per +game tick. At that speed, the expected frame rate is 33.33 frames/second, and +the game speed factor is how close to that target the actual rate is. When +the game is in fast forward mode, the game speed factor shows how much +speed up is achieved. + +The lower part of the window shows timing statistics for individual parts of +the game. The times shown are short-term and long-term averages of how long +it takes to process one tick of game time, all figures are in milliseconds. + +Clicking a line in the lower part of the window opens a graph window, giving +detailed readings on each tick simulated by the game. + +The following is an explanation of the different statistics: + +- *Game loop* - Total processing time used per simulated "tick" in the game. + This includes all pathfinding, world updates, and economy handling. +- *Cargo handling* - Time spent loading/unloading cargo at stations, and + industries and towns sending/retrieving cargo from stations. +- *Train ticks*, *Road vehicle ticks*, *Ship ticks*, *Aircraft ticks* - + Time spent on pathfinding and other processing for each player vehicle type. +- *World ticks* - Time spent on other world/landscape processing. This + includes towns growing, building animations, updates of farmland and trees, + and station rating updates. +- *GS/AI total*, *Game script*, and *AI players* - Time spent running logic + for game scripts and AI players. The total may show as less than the current + sum of the individual scripts, this is because AI players at lower + difficulty settings do not run every game tick, and hence contribute less + to the average across all ticks. Keep in mind that the "Current" figure is + also an average, just only over short term. +- *Link graph delay* - Time overruns of the cargo distribution link graph + update thread. Usually the link graph is updated in a background thread, + but these updates need to synchronise with the main game loop occasionally, + if the time spent on link graph updates is longer than the time taken to + otherwise simulate the game while it was updating, these delays are counted + in this figure. +- *Graphics rendering* - Total time spent rendering all graphics, including + both GUI and world viewports. This typically spikes when panning the view + around, and when more things are happening on screen at once. +- *World viewport rendering* - Isolated time spent rendering just world + viewports. If this figure is significantly lower than the total graphics + rendering time, most time is spent rendering GUI than rendering world. +- *Video output* - Speed of copying the rendered graphics to the display + adapter. Usually this should be very fast (in the range of 0-3 ms), large + values for this can indicate a graphics driver problem. +- *Sound mixing* - Speed of mixing active audio samples together. Usually + this should be very fast (in the range of 0-3 ms), if it is slow, consider + switching to the NoSound set. + +If the frame rate window is shaded, the title bar will instead show just the +current simulation rate and the game speed factor. + diff --git a/findversion.sh b/findversion.sh index 0da382476a..ce1390ab53 100755 --- a/findversion.sh +++ b/findversion.sh @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/known-bugs.txt b/known-bugs.txt index 2053a6ad37..440a4709ff 100644 --- a/known-bugs.txt +++ b/known-bugs.txt @@ -1,6 +1,6 @@ OpenTTD's known bugs -Last updated: 2019-10-29 -Release version: 1.10.0-beta1 +Last updated: 2019-12-25 +Release version: 1.10.0-beta2 ------------------------------------------------------------------------ diff --git a/media/baseset/no_music.obm b/media/baseset/no_music.obm index fd75cfef32..e395ba0b0e 100644 --- a/media/baseset/no_music.obm +++ b/media/baseset/no_music.obm @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents more or less nothingness ; [metadata] diff --git a/media/baseset/no_sound.obs b/media/baseset/no_sound.obs index e9d5741a0c..fd2430de54 100644 --- a/media/baseset/no_sound.obs +++ b/media/baseset/no_sound.obs @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents more or less nothingness ; [metadata] diff --git a/media/baseset/orig_dos.obg b/media/baseset/orig_dos.obg index f9db843af1..d56a63712f 100644 --- a/media/baseset/orig_dos.obg +++ b/media/baseset/orig_dos.obg @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original graphics as on the non-German Transport ; Tycoon Deluxe DOS CD. ; diff --git a/media/baseset/orig_dos.obm b/media/baseset/orig_dos.obm index 9920bfdbe1..0b51c2db84 100644 --- a/media/baseset/orig_dos.obm +++ b/media/baseset/orig_dos.obm @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original music as on the Transport ; Tycoon Deluxe for DOS CD. ; diff --git a/media/baseset/orig_dos.obs b/media/baseset/orig_dos.obs index e095b62210..60afc854f0 100644 --- a/media/baseset/orig_dos.obs +++ b/media/baseset/orig_dos.obs @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original sounds as on the Transport ; Tycoon Deluxe DOS CD. ; diff --git a/media/baseset/orig_dos_de.obg b/media/baseset/orig_dos_de.obg index 4e12582727..388d685025 100644 --- a/media/baseset/orig_dos_de.obg +++ b/media/baseset/orig_dos_de.obg @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original graphics as on the German Transport ; Tycoon Deluxe DOS CD. It contains one broken sprite. ; diff --git a/media/baseset/orig_tto.obm b/media/baseset/orig_tto.obm index ff600d00f6..c572bcf34b 100644 --- a/media/baseset/orig_tto.obm +++ b/media/baseset/orig_tto.obm @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original music as on the Transport ; Tycoon (with World Editor) for DOS CD. ; diff --git a/media/baseset/orig_win.obg b/media/baseset/orig_win.obg index 393b5d3013..f01624a25d 100644 --- a/media/baseset/orig_win.obg +++ b/media/baseset/orig_win.obg @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original graphics as on the Transport ; Tycoon Deluxe for Windows CD. ; diff --git a/media/baseset/orig_win.obm b/media/baseset/orig_win.obm index 2171417830..11e363fabd 100644 --- a/media/baseset/orig_win.obm +++ b/media/baseset/orig_win.obm @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original music as on the Transport ; Tycoon Deluxe for Windows CD. ; diff --git a/media/baseset/orig_win.obs b/media/baseset/orig_win.obs index e1c2c4e11d..7b02372207 100644 --- a/media/baseset/orig_win.obs +++ b/media/baseset/orig_win.obs @@ -1,5 +1,3 @@ -; $Id$ -; ; This represents the original sounds as on the Transport ; Tycoon Deluxe for Windows CD. ; diff --git a/media/baseset/translations.awk b/media/baseset/translations.awk index f15cb43ffe..af5f2b4a8d 100644 --- a/media/baseset/translations.awk +++ b/media/baseset/translations.awk @@ -1,5 +1,3 @@ -# $Id: openttd.desktop.translation.awk 24100 2012-04-08 14:29:31Z rubidium $ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/2ccmap.nfo b/media/extra_grf/2ccmap.nfo index 0e99ff8850..39f3fe4947 100644 --- a/media/extra_grf/2ccmap.nfo +++ b/media/extra_grf/2ccmap.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/airport_preview.nfo b/media/extra_grf/airport_preview.nfo index a98fe67000..6efac6e910 100644 --- a/media/extra_grf/airport_preview.nfo +++ b/media/extra_grf/airport_preview.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/airports.nfo b/media/extra_grf/airports.nfo index 45cd25de04..fc03f1d7f3 100644 --- a/media/extra_grf/airports.nfo +++ b/media/extra_grf/airports.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/airports_orig_extra.nfo b/media/extra_grf/airports_orig_extra.nfo index f2a8dc8327..2d649fbd10 100644 --- a/media/extra_grf/airports_orig_extra.nfo +++ b/media/extra_grf/airports_orig_extra.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/aqueduct.nfo b/media/extra_grf/aqueduct.nfo index d9ba739f53..3f9bb97f3d 100644 --- a/media/extra_grf/aqueduct.nfo +++ b/media/extra_grf/aqueduct.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/assemble_nfo.awk b/media/extra_grf/assemble_nfo.awk index cf6b425c1d..f39e6b6b43 100644 --- a/media/extra_grf/assemble_nfo.awk +++ b/media/extra_grf/assemble_nfo.awk @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/autorail.nfo b/media/extra_grf/autorail.nfo index 08aa5ef9fc..9633064c8a 100644 --- a/media/extra_grf/autorail.nfo +++ b/media/extra_grf/autorail.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/canals.nfo b/media/extra_grf/canals.nfo index e464762ee6..7bf8e5ae49 100644 --- a/media/extra_grf/canals.nfo +++ b/media/extra_grf/canals.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/canals_extra.nfo b/media/extra_grf/canals_extra.nfo index 3103886233..e412e2da47 100644 --- a/media/extra_grf/canals_extra.nfo +++ b/media/extra_grf/canals_extra.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/chars.nfo b/media/extra_grf/chars.nfo index 32462f8c1c..8d1acb814f 100644 --- a/media/extra_grf/chars.nfo +++ b/media/extra_grf/chars.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/chars_orig_extra.nfo b/media/extra_grf/chars_orig_extra.nfo index 7979e79450..c5e3efe269 100644 --- a/media/extra_grf/chars_orig_extra.nfo +++ b/media/extra_grf/chars_orig_extra.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/elrails.nfo b/media/extra_grf/elrails.nfo index 7b8e9dace4..93456ecb30 100644 --- a/media/extra_grf/elrails.nfo +++ b/media/extra_grf/elrails.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/fix_graphics.nfo b/media/extra_grf/fix_graphics.nfo index 1144742230..aaad79c0a9 100644 --- a/media/extra_grf/fix_graphics.nfo +++ b/media/extra_grf/fix_graphics.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/flags.nfo b/media/extra_grf/flags.nfo index ab792ef525..3c125ec79a 100644 --- a/media/extra_grf/flags.nfo +++ b/media/extra_grf/flags.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/foundations.nfo b/media/extra_grf/foundations.nfo index 437fcd99eb..7cb4e5e400 100644 --- a/media/extra_grf/foundations.nfo +++ b/media/extra_grf/foundations.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/mono.nfo b/media/extra_grf/mono.nfo index a5f0fe5eaa..f855e8f0ec 100644 --- a/media/extra_grf/mono.nfo +++ b/media/extra_grf/mono.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/oneway.nfo b/media/extra_grf/oneway.nfo index 74264219ec..46f3b8f947 100644 --- a/media/extra_grf/oneway.nfo +++ b/media/extra_grf/oneway.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/openttd.nfo b/media/extra_grf/openttd.nfo index 460007d68e..b0d80824e8 100644 --- a/media/extra_grf/openttd.nfo +++ b/media/extra_grf/openttd.nfo @@ -2,8 +2,6 @@ // (Info version 32) // Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags // -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/openttdgui.nfo b/media/extra_grf/openttdgui.nfo index b01a70f795..b458073bef 100644 --- a/media/extra_grf/openttdgui.nfo +++ b/media/extra_grf/openttdgui.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/orig_extra.nfo b/media/extra_grf/orig_extra.nfo index a1173a58c1..903d96a572 100644 --- a/media/extra_grf/orig_extra.nfo +++ b/media/extra_grf/orig_extra.nfo @@ -2,8 +2,6 @@ // (Info version 32) // Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags // -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/palette.nfo b/media/extra_grf/palette.nfo index 4a6ae69505..2a5b8400fc 100644 --- a/media/extra_grf/palette.nfo +++ b/media/extra_grf/palette.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/rivers/arctic.nfo b/media/extra_grf/rivers/arctic.nfo index 646c9ed139..375946fa5f 100644 --- a/media/extra_grf/rivers/arctic.nfo +++ b/media/extra_grf/rivers/arctic.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/rivers/rapids.nfo b/media/extra_grf/rivers/rapids.nfo index f66f3dc445..e03d96ca17 100644 --- a/media/extra_grf/rivers/rapids.nfo +++ b/media/extra_grf/rivers/rapids.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/rivers/temperate.nfo b/media/extra_grf/rivers/temperate.nfo index a5af841b25..261f727be8 100644 --- a/media/extra_grf/rivers/temperate.nfo +++ b/media/extra_grf/rivers/temperate.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/rivers/toyland.nfo b/media/extra_grf/rivers/toyland.nfo index ca65ce1e3b..8b6dedd386 100644 --- a/media/extra_grf/rivers/toyland.nfo +++ b/media/extra_grf/rivers/toyland.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/rivers/tropic.nfo b/media/extra_grf/rivers/tropic.nfo index b1fa4cf3cf..1041bff54c 100644 --- a/media/extra_grf/rivers/tropic.nfo +++ b/media/extra_grf/rivers/tropic.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/roadstops.nfo b/media/extra_grf/roadstops.nfo index dbb70211da..15ede7027a 100644 --- a/media/extra_grf/roadstops.nfo +++ b/media/extra_grf/roadstops.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/shore.nfo b/media/extra_grf/shore.nfo index 7b7c12ad3b..6dccb8487e 100644 --- a/media/extra_grf/shore.nfo +++ b/media/extra_grf/shore.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/signals.nfo b/media/extra_grf/signals.nfo index a2d2591470..8e612ae66c 100644 --- a/media/extra_grf/signals.nfo +++ b/media/extra_grf/signals.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/sloped_tracks.nfo b/media/extra_grf/sloped_tracks.nfo index ed17bc8445..42c257d316 100644 --- a/media/extra_grf/sloped_tracks.nfo +++ b/media/extra_grf/sloped_tracks.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/tramtracks.nfo b/media/extra_grf/tramtracks.nfo index 89c3e5c6ea..f9a190bd75 100644 --- a/media/extra_grf/tramtracks.nfo +++ b/media/extra_grf/tramtracks.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/extra_grf/tunnel_portals.nfo b/media/extra_grf/tunnel_portals.nfo index 711229aab5..ce09308ef6 100644 --- a/media/extra_grf/tunnel_portals.nfo +++ b/media/extra_grf/tunnel_portals.nfo @@ -1,6 +1,3 @@ -// -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/openttd.desktop.filter.awk b/media/openttd.desktop.filter.awk index 06cf1106da..125e21b0d7 100644 --- a/media/openttd.desktop.filter.awk +++ b/media/openttd.desktop.filter.awk @@ -1,5 +1,3 @@ -# $Id: openttd.desktop.translation.awk 19884 2010-05-22 19:59:37Z rubidium $ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/media/openttd.desktop.in b/media/openttd.desktop.in index 513ff712df..4a251114c4 100644 --- a/media/openttd.desktop.in +++ b/media/openttd.desktop.in @@ -1,4 +1,3 @@ -# $Id$ # http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html [Desktop Entry] Type=Application diff --git a/media/openttd.desktop.translation.awk b/media/openttd.desktop.translation.awk index ee8fdd9700..3187f9ddf1 100644 --- a/media/openttd.desktop.translation.awk +++ b/media/openttd.desktop.translation.awk @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/os/debian/changelog b/os/debian/changelog index a523172234..6b24aaa7d5 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -1,3 +1,9 @@ +openttd (1.10.0~beta2-0) unstable; urgency=low + + * New upstream release 1.10.0-beta2 + + -- OpenTTD Wed, 25 Dec 2019 00:00:00 +0000 + openttd (1.10.0~beta1-0) unstable; urgency=low * New upstream release 1.10.0-beta1 diff --git a/os/macosx/plistgen.sh b/os/macosx/plistgen.sh index b6116d9102..f492bcdcf9 100755 --- a/os/macosx/plistgen.sh +++ b/os/macosx/plistgen.sh @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - # sets VERSION to the value if RELEASE if there are any, # otherwise it sets VERSION to revision number if [ "$3" ]; then diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec index 4ba8c00672..340a9886b9 100644 --- a/os/rpm/openttd.spec +++ b/os/rpm/openttd.spec @@ -17,9 +17,9 @@ # Name: openttd -Version: 1.10.beta1 +Version: 1.10.beta2 Release: 0 -%define srcver 1.10.0-beta1 +%define srcver 1.10.0-beta2 Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe License: GPL-2.0 Group: Amusements/Games/Strategy/Other diff --git a/os/windows/installer/install.nsi b/os/windows/installer/install.nsi index a4dd610d93..2561b76d55 100644 --- a/os/windows/installer/install.nsi +++ b/os/windows/installer/install.nsi @@ -2,8 +2,8 @@ !define APPV_MAJOR 1 !define APPV_MINOR 10 !define APPV_MAINT 0 -!define APPV_BUILD 0 -!define APPV_EXTRA "-beta1" +!define APPV_BUILD 1 +!define APPV_EXTRA "-beta2" !define APPNAME "OpenTTD" ; Define application name !define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs index 10b38d35a1..a85a085f29 100755 --- a/projects/determineversion.vbs +++ b/projects/determineversion.vbs @@ -1,7 +1,5 @@ Option Explicit -' $Id$ -' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/projects/gen-kdev4.sh b/projects/gen-kdev4.sh index 4ea5dbc2a8..2062d9686a 100755 --- a/projects/gen-kdev4.sh +++ b/projects/gen-kdev4.sh @@ -1,7 +1,5 @@ #!/bin/sh -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/projects/generate b/projects/generate index 2ab89e8f1b..2078809c88 100755 --- a/projects/generate +++ b/projects/generate @@ -1,7 +1,5 @@ #!/bin/bash -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/projects/generate.vbs b/projects/generate.vbs index 06e037c4cd..169f8b6890 100644 --- a/projects/generate.vbs +++ b/projects/generate.vbs @@ -1,7 +1,5 @@ Option Explicit -' $Id$ -' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/3rdparty/md5/md5.cpp b/src/3rdparty/md5/md5.cpp index 2111a8eb81..d8e5eeb515 100644 --- a/src/3rdparty/md5/md5.cpp +++ b/src/3rdparty/md5/md5.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /** @file md5.cpp Creating MD5 checksums of files. */ /* diff --git a/src/3rdparty/md5/md5.h b/src/3rdparty/md5/md5.h index 9748dc444f..049c001d8d 100644 --- a/src/3rdparty/md5/md5.h +++ b/src/3rdparty/md5/md5.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /** @file md5.h Functions to create MD5 checksums. */ /* diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp index bd9544b9f3..59886486fe 100644 --- a/src/ai/ai.hpp +++ b/src/ai/ai.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 93db571586..2afa69d39e 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_config.hpp b/src/ai/ai_config.hpp index 9f667a6127..6c861126e0 100644 --- a/src/ai/ai_config.hpp +++ b/src/ai/ai_config.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 23ee16c83f..95c971af8e 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -77,8 +75,7 @@ if ((AI::frame_counter & ((1 << (4 - _settings_game.difficulty.competitor_speed)) - 1)) != 0) return; Backup cur_company(_current_company, FILE_LINE); - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai) { PerformanceMeasurer framerate((PerformanceElement)(PFE_AI0 + c->index)); cur_company.Change(c->index); @@ -156,8 +153,7 @@ /* It might happen there are no companies .. than we have nothing to loop */ if (Company::GetPoolSize() == 0) return; - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai) AI::Stop(c->index); } } diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 91f8969046..a684e4a350 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1054,8 +1052,7 @@ struct AIDebugWindow : public Window { ai_debug_company = INVALID_COMPANY; - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai) { ChangeToAI(c->index); return; @@ -1314,8 +1311,7 @@ struct AIDebugWindow : public Window { if ((_pause_mode & PM_PAUSED_NORMAL) == PM_PAUSED_NORMAL) { bool all_unpaused = !Game::IsPaused(); if (all_unpaused) { - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai && AI::IsPaused(c->index)) { all_unpaused = false; break; @@ -1554,8 +1550,7 @@ void ShowAIDebugWindowIfAIError() /* Network clients can't debug AIs. */ if (_networking && !_network_server) return; - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai && c->ai_instance->IsDead()) { ShowAIDebugWindow(c->index); break; diff --git a/src/ai/ai_gui.hpp b/src/ai/ai_gui.hpp index ad6eed8fd1..12c8ca859b 100644 --- a/src/ai/ai_gui.hpp +++ b/src/ai/ai_gui.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index af7ae57299..2d80003f6b 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp index ddf1edc6cd..8f236e09ab 100644 --- a/src/ai/ai_info.hpp +++ b/src/ai/ai_info.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index 44e84325b7..a4d06763fa 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index 06998558b3..f8d2100b1c 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 8bd3a43853..ee14fd2147 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp index 2e0532d00d..4faee9c62f 100644 --- a/src/ai/ai_scanner.hpp +++ b/src/ai/ai_scanner.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/aircraft.h b/src/aircraft.h index 3abb86b4f0..d201743a6f 100644 --- a/src/aircraft.h +++ b/src/aircraft.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -138,11 +136,6 @@ struct Aircraft FINAL : public SpecializedVehicle { } }; -/** - * Macro for iterating over all aircraft. - */ -#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var) - void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result); Station *GetTargetAirportIfValid(const Aircraft *v); diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index cf176668bf..e13658d6fe 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -121,13 +119,27 @@ enum HelicopterRotorStates { */ static StationID FindNearestHangar(const Aircraft *v) { - const Station *st; uint best = 0; StationID index = INVALID_STATION; TileIndex vtile = TileVirtXY(v->x_pos, v->y_pos); const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); + uint max_range = v->acache.cached_max_range_sqr; - FOR_ALL_STATIONS(st) { + /* Determine destinations where it's coming from and where it's heading to */ + const Station *last_dest = nullptr; + const Station *next_dest = nullptr; + if (max_range != 0) { + if (v->current_order.IsType(OT_GOTO_STATION) || + (v->current_order.IsType(OT_GOTO_DEPOT) && v->current_order.GetDepotActionType() != ODATFB_NEAREST_DEPOT)) { + last_dest = Station::GetIfValid(v->last_station_visited); + next_dest = Station::GetIfValid(v->current_order.GetDestination()); + } else { + last_dest = GetTargetAirportIfValid(v); + next_dest = Station::GetIfValid(v->GetNextStoppingStation().value); + } + } + + for (const Station *st : Station::Iterate()) { if (st->owner != v->owner || !(st->facilities & FACIL_AIRPORT) || !st->airport.HasHangar()) continue; const AirportFTAClass *afc = st->airport.GetFTA(); @@ -138,13 +150,15 @@ static StationID FindNearestHangar(const Aircraft *v) /* the plane won't land at any helicopter station */ if (!(afc->flags & AirportFTAClass::AIRPLANES) && (avi->subtype & AIR_CTOL)) continue; + /* Check if our last and next destinations can be reached from the depot airport. */ + if (max_range != 0) { + uint last_dist = (last_dest != nullptr && last_dest->airport.tile != INVALID_TILE) ? DistanceSquare(st->airport.tile, last_dest->airport.tile) : 0; + uint next_dist = (next_dest != nullptr && next_dest->airport.tile != INVALID_TILE) ? DistanceSquare(st->airport.tile, next_dest->airport.tile) : 0; + if (last_dist > max_range || next_dist > max_range) continue; + } + /* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */ uint distance = DistanceSquare(vtile, st->airport.tile); - if (v->acache.cached_max_range_sqr != 0) { - /* Check if our current destination can be reached from the depot airport. */ - const Station *cur_dest = GetTargetAirportIfValid(v); - if (cur_dest != nullptr && DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue; - } if (distance < best || index == INVALID_STATION) { best = distance; index = st->index; @@ -2099,8 +2113,7 @@ void UpdateAirplanesOnNewStation(const Station *st) const AirportFTAClass *ap = st->airport.GetFTA(); Direction rotation = st->airport.tile == INVALID_TILE ? DIR_N : st->airport.rotation; - Aircraft *v; - FOR_ALL_AIRCRAFT(v) { + for (Aircraft *v : Aircraft::Iterate()) { if (!v->IsNormalAircraft() || v->targetairport != st->index) continue; assert(v->state == FLYING); diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index 76121a5dd9..311bc497bf 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/airport.cpp b/src/airport.cpp index 15e18035f0..808d14d6ba 100644 --- a/src/airport.cpp +++ b/src/airport.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/airport.h b/src/airport.h index 079268f665..6b87dd1852 100644 --- a/src/airport.h +++ b/src/airport.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index ecf9147a99..0e44357bfb 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/animated_tile.cpp b/src/animated_tile.cpp index 24543529df..5329b2b506 100644 --- a/src/animated_tile.cpp +++ b/src/animated_tile.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/animated_tile_func.h b/src/animated_tile_func.h index 9634ecdee3..6a871f1bc5 100644 --- a/src/animated_tile_func.h +++ b/src/animated_tile_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index e7956f5390..7e828bf439 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/articulated_vehicles.h b/src/articulated_vehicles.h index 77322fb4c7..a98833b003 100644 --- a/src/articulated_vehicles.h +++ b/src/articulated_vehicles.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp index 968bfe91cb..59980546ee 100644 --- a/src/autoreplace.cpp +++ b/src/autoreplace.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoreplace_base.h b/src/autoreplace_base.h index 5d265866d8..c342223a71 100644 --- a/src/autoreplace_base.h +++ b/src/autoreplace_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -43,7 +41,4 @@ struct EngineRenew : EngineRenewPool::PoolItem<&_enginerenew_pool> { ~EngineRenew() {} }; -#define FOR_ALL_ENGINE_RENEWS_FROM(var, start) FOR_ALL_ITEMS_FROM(EngineRenew, enginerenew_index, var, start) -#define FOR_ALL_ENGINE_RENEWS(var) FOR_ALL_ENGINE_RENEWS_FROM(var, 0) - #endif /* AUTOREPLACE_BASE_H */ diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 27149010be..4b444ae196 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoreplace_func.h b/src/autoreplace_func.h index 22287cd8c0..72b551436f 100644 --- a/src/autoreplace_func.h +++ b/src/autoreplace_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index a1a152cf69..19df0f1d80 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -126,8 +124,7 @@ class ReplaceVehicleWindow : public Window { GUIEngineList *list = &this->engines[side]; list->clear(); - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, type) { + for (const Engine *e : Engine::IterateType(type)) { if (!draw_left && !this->show_hidden_engines && e->IsHidden(_local_company)) continue; EngineID eid = e->index; switch (type) { diff --git a/src/autoreplace_gui.h b/src/autoreplace_gui.h index 046ac89921..634629ec4c 100644 --- a/src/autoreplace_gui.h +++ b/src/autoreplace_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoreplace_type.h b/src/autoreplace_type.h index 30ba7e2b44..458ee571b7 100644 --- a/src/autoreplace_type.h +++ b/src/autoreplace_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/autoslope.h b/src/autoslope.h index e504610c39..83d775b1fb 100644 --- a/src/autoslope.h +++ b/src/autoslope.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/base_consist.cpp b/src/base_consist.cpp index 7abb083f74..462f63f2e5 100644 --- a/src/base_consist.cpp +++ b/src/base_consist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/base_consist.h b/src/base_consist.h index 8e1bc93e75..619229d2a6 100644 --- a/src/base_consist.h +++ b/src/base_consist.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/base_media_base.h b/src/base_media_base.h index 1e251b36a7..0b006efbea 100644 --- a/src/base_media_base.h +++ b/src/base_media_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/base_media_func.h b/src/base_media_func.h index 98f8552173..01e184f8ca 100644 --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/base_station_base.h b/src/base_station_base.h index eaeb246ef1..a1c935fce5 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -53,7 +51,7 @@ struct StationRect : public Rect { /** Base class for all station-ish types */ struct BaseStation : StationPool::PoolItem<&_station_pool> { TileIndex xy; ///< Base tile of the station - ViewportSign sign; ///< NOSAVE: Dimensions of sign + TrackedViewportSign sign; ///< NOSAVE: Dimensions of sign byte delete_ctr; ///< Delete counter. If greater than 0 then it is decremented until it reaches 0; the waypoint is then is deleted. char *name; ///< Custom name @@ -165,8 +163,6 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> { static void PostDestructor(size_t index); }; -#define FOR_ALL_BASE_STATIONS(var) FOR_ALL_ITEMS_FROM(BaseStation, station_index, var, 0) - /** * Class defining several overloaded accessors so we don't * have to cast base stations that often @@ -254,8 +250,13 @@ struct SpecializedStation : public BaseStation { assert(IsExpected(st)); return (const T *)st; } + + /** + * Returns an iterable ensemble of all valid stations of type T + * @param from index of the first station to consider + * @return an iterable ensemble of all valid stations of type T + */ + static Pool::IterateWrapper Iterate(size_t from = 0) { return Pool::IterateWrapper(from); } }; -#define FOR_ALL_BASE_STATIONS_OF_TYPE(name, var) FOR_ALL_ITEMS_FROM(name, station_index, var, 0) if (name::IsExpected(var)) - #endif /* BASE_STATION_BASE_H */ diff --git a/src/bitmap_type.h b/src/bitmap_type.h index 655c8f3baa..99c29bf181 100644 --- a/src/bitmap_type.h +++ b/src/bitmap_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp index af2755cd74..a5228bc327 100644 --- a/src/blitter/32bpp_anim.cpp +++ b/src/blitter/32bpp_anim.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp index ea66234939..230b7e8342 100644 --- a/src/blitter/32bpp_anim.hpp +++ b/src/blitter/32bpp_anim.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim_sse2.cpp b/src/blitter/32bpp_anim_sse2.cpp index d5fa4268a8..5596d91af0 100644 --- a/src/blitter/32bpp_anim_sse2.cpp +++ b/src/blitter/32bpp_anim_sse2.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim_sse2.hpp b/src/blitter/32bpp_anim_sse2.hpp index aed11026c0..8b84f703e7 100644 --- a/src/blitter/32bpp_anim_sse2.hpp +++ b/src/blitter/32bpp_anim_sse2.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim_sse4.cpp b/src/blitter/32bpp_anim_sse4.cpp index 24d1d7531f..566ef0c0ff 100644 --- a/src/blitter/32bpp_anim_sse4.cpp +++ b/src/blitter/32bpp_anim_sse4.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_anim_sse4.hpp b/src/blitter/32bpp_anim_sse4.hpp index 1a39a26fb6..7674182a8f 100644 --- a/src/blitter/32bpp_anim_sse4.hpp +++ b/src/blitter/32bpp_anim_sse4.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_base.cpp b/src/blitter/32bpp_base.cpp index b2e66b0be1..6fe11c2350 100644 --- a/src/blitter/32bpp_base.cpp +++ b/src/blitter/32bpp_base.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp index e481c15ccb..f09719450a 100644 --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index c6fa762e5a..59b857254d 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_optimized.hpp b/src/blitter/32bpp_optimized.hpp index fc8a406537..a9c732902e 100644 --- a/src/blitter/32bpp_optimized.hpp +++ b/src/blitter/32bpp_optimized.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp index 92375be165..7e7ef14530 100644 --- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_simple.hpp b/src/blitter/32bpp_simple.hpp index 3d43971e9e..6437a1a5cf 100644 --- a/src/blitter/32bpp_simple.hpp +++ b/src/blitter/32bpp_simple.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse2.cpp b/src/blitter/32bpp_sse2.cpp index ae2b3ccc52..2e5d32d655 100644 --- a/src/blitter/32bpp_sse2.cpp +++ b/src/blitter/32bpp_sse2.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse2.hpp b/src/blitter/32bpp_sse2.hpp index 1628f1fa26..4103eed487 100644 --- a/src/blitter/32bpp_sse2.hpp +++ b/src/blitter/32bpp_sse2.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse4.cpp b/src/blitter/32bpp_sse4.cpp index 723264f03f..aab9edb65d 100644 --- a/src/blitter/32bpp_sse4.cpp +++ b/src/blitter/32bpp_sse4.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse4.hpp b/src/blitter/32bpp_sse4.hpp index 36b5b16d4c..7d44926b88 100644 --- a/src/blitter/32bpp_sse4.hpp +++ b/src/blitter/32bpp_sse4.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse_func.hpp b/src/blitter/32bpp_sse_func.hpp index fb0ce9eb6e..083839b959 100644 --- a/src/blitter/32bpp_sse_func.hpp +++ b/src/blitter/32bpp_sse_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_sse_type.h b/src/blitter/32bpp_sse_type.h index 49c7a68c20..1d63d8052d 100644 --- a/src/blitter/32bpp_sse_type.h +++ b/src/blitter/32bpp_sse_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_ssse3.cpp b/src/blitter/32bpp_ssse3.cpp index ab6c9eba5d..7d38272c00 100644 --- a/src/blitter/32bpp_ssse3.cpp +++ b/src/blitter/32bpp_ssse3.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/32bpp_ssse3.hpp b/src/blitter/32bpp_ssse3.hpp index 3d6152e9e7..cc710ed05b 100644 --- a/src/blitter/32bpp_ssse3.hpp +++ b/src/blitter/32bpp_ssse3.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_base.cpp b/src/blitter/8bpp_base.cpp index dccfda3d70..501ffc64e5 100644 --- a/src/blitter/8bpp_base.cpp +++ b/src/blitter/8bpp_base.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_base.hpp b/src/blitter/8bpp_base.hpp index 7ab3f6378a..f6f67ad1a6 100644 --- a/src/blitter/8bpp_base.hpp +++ b/src/blitter/8bpp_base.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp index 21bca67e17..5c34bf0674 100644 --- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_optimized.hpp b/src/blitter/8bpp_optimized.hpp index 509edb8c40..a305c954da 100644 --- a/src/blitter/8bpp_optimized.hpp +++ b/src/blitter/8bpp_optimized.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_simple.cpp b/src/blitter/8bpp_simple.cpp index 2131a04682..d40530536e 100644 --- a/src/blitter/8bpp_simple.cpp +++ b/src/blitter/8bpp_simple.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/8bpp_simple.hpp b/src/blitter/8bpp_simple.hpp index e48bc37585..7f3c0a8aad 100644 --- a/src/blitter/8bpp_simple.hpp +++ b/src/blitter/8bpp_simple.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index 388359441f..10dfce84b2 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/common.hpp b/src/blitter/common.hpp index 3e4911d003..b5040b1275 100644 --- a/src/blitter/common.hpp +++ b/src/blitter/common.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index 5def16ea53..e97fe53de7 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/null.cpp b/src/blitter/null.cpp index e968abe13f..29747b0f96 100644 --- a/src/blitter/null.cpp +++ b/src/blitter/null.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/blitter/null.hpp b/src/blitter/null.hpp index dff4992ccf..7d5a672c56 100644 --- a/src/blitter/null.hpp +++ b/src/blitter/null.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bmp.cpp b/src/bmp.cpp index a121782be7..2877d01470 100644 --- a/src/bmp.cpp +++ b/src/bmp.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bmp.h b/src/bmp.h index adfbfa5fef..3d5ded2a16 100644 --- a/src/bmp.h +++ b/src/bmp.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp index d62a2266f4..29b066cd12 100644 --- a/src/bootstrap_gui.cpp +++ b/src/bootstrap_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bridge.h b/src/bridge.h index badf045e39..3da95751df 100644 --- a/src/bridge.h +++ b/src/bridge.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index fc4df84abb..f10b52f66b 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index b738895065..eb28673867 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/bridge_map.h b/src/bridge_map.h index be37dfd71c..575af60470 100644 --- a/src/bridge_map.h +++ b/src/bridge_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 7e8eea4c54..c457b0f195 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1262,8 +1260,7 @@ struct BuildVehicleWindow : Window { * Also check to see if the previously selected engine is still available, * and if not, reset selection to INVALID_ENGINE. This could be the case * when engines become obsolete and are removed */ - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { if (!this->show_hidden_engines && e->IsHidden(_local_company)) continue; EngineID eid = e->index; const RailVehicleInfo *rvi = &e->u.rail; @@ -1306,8 +1303,7 @@ struct BuildVehicleWindow : Window { this->eng_list.clear(); - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { if (!this->show_hidden_engines && e->IsHidden(_local_company)) continue; EngineID eid = e->index; if (!IsEngineBuildable(eid, VEH_ROAD, _local_company)) continue; @@ -1326,8 +1322,7 @@ struct BuildVehicleWindow : Window { EngineID sel_id = INVALID_ENGINE; this->eng_list.clear(); - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_SHIP) { + for (const Engine *e : Engine::IterateType(VEH_SHIP)) { if (!this->show_hidden_engines && e->IsHidden(_local_company)) continue; EngineID eid = e->index; if (!IsEngineBuildable(eid, VEH_SHIP, _local_company)) continue; @@ -1351,8 +1346,7 @@ struct BuildVehicleWindow : Window { * Also check to see if the previously selected plane is still available, * and if not, reset selection to INVALID_ENGINE. This could be the case * when planes become obsolete and are removed */ - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_AIRCRAFT) { + for (const Engine *e : Engine::IterateType(VEH_AIRCRAFT)) { if (!this->show_hidden_engines && e->IsHidden(_local_company)) continue; EngineID eid = e->index; if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _local_company)) continue; diff --git a/src/cargo_type.h b/src/cargo_type.h index 78c04ae727..89e6f13808 100644 --- a/src/cargo_type.h +++ b/src/cargo_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargoaction.cpp b/src/cargoaction.cpp index 73908d3390..5853b87da9 100644 --- a/src/cargoaction.cpp +++ b/src/cargoaction.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargoaction.h b/src/cargoaction.h index 0311efcae1..58c866ef65 100644 --- a/src/cargoaction.h +++ b/src/cargoaction.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargomonitor.cpp b/src/cargomonitor.cpp index 82f8d8e4cb..2941a29556 100644 --- a/src/cargomonitor.cpp +++ b/src/cargomonitor.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargomonitor.h b/src/cargomonitor.h index c7e5da135b..9a6a0c44d8 100644 --- a/src/cargomonitor.h +++ b/src/cargomonitor.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 846af4680d..f5f7c0c033 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -128,8 +126,7 @@ void CargoPacket::Reduce(uint count) */ /* static */ void CargoPacket::InvalidateAllFrom(SourceType src_type, SourceID src) { - CargoPacket *cp; - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { if (cp->source_type == src_type && cp->source_id == src) cp->source_id = INVALID_SOURCE; } } @@ -140,8 +137,7 @@ void CargoPacket::Reduce(uint count) */ /* static */ void CargoPacket::InvalidateAllFrom(StationID sid) { - CargoPacket *cp; - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { if (cp->source == sid) cp->source = INVALID_STATION; } } diff --git a/src/cargopacket.h b/src/cargopacket.h index 4eda6a79ae..c058bafdbb 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -194,19 +192,6 @@ public: static void AfterLoad(); }; -/** - * Iterate over all _valid_ cargo packets from the given start. - * @param var Variable used as "iterator". - * @param start Cargo packet ID of the first packet to iterate over. - */ -#define FOR_ALL_CARGOPACKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(CargoPacket, cargopacket_index, var, start) - -/** - * Iterate over all _valid_ cargo packets from the begin of the pool. - * @param var Variable used as "iterator". - */ -#define FOR_ALL_CARGOPACKETS(var) FOR_ALL_CARGOPACKETS_FROM(var, 0) - /** * Simple collection class for a list of cargo packets. * @tparam Tinst Actual instantiation of this cargo list. diff --git a/src/cargotype.cpp b/src/cargotype.cpp index 4a2dd6a32d..52dd196c84 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cargotype.h b/src/cargotype.h index aa67561d88..9645bf7c59 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cheat.cpp b/src/cheat.cpp index 8b300c9668..9fba889da0 100644 --- a/src/cheat.cpp +++ b/src/cheat.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cheat_func.h b/src/cheat_func.h index e774abc686..6d26e71c4a 100644 --- a/src/cheat_func.h +++ b/src/cheat_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 3d338e91a6..7290414c00 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cheat_type.h b/src/cheat_type.h index a75acf35e3..3d70d527f9 100644 --- a/src/cheat_type.h +++ b/src/cheat_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index bfe5c66b3c..06953884e1 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/clear_func.h b/src/clear_func.h index b128288d1b..2232b56747 100644 --- a/src/clear_func.h +++ b/src/clear_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/clear_map.h b/src/clear_map.h index d24916de35..159f5c6a40 100644 --- a/src/clear_map.h +++ b/src/clear_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cmd_helper.h b/src/cmd_helper.h index 569708dfc5..ee5d445c28 100644 --- a/src/cmd_helper.h +++ b/src/cmd_helper.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/command.cpp b/src/command.cpp index 66509cf307..dd65fa36ea 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/command_func.h b/src/command_func.h index 7a6b6d6bbe..7a0a77e8d8 100644 --- a/src/command_func.h +++ b/src/command_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/command_type.h b/src/command_type.h index 4b4f0cec6c..41f2360d8d 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/company_base.h b/src/company_base.h index 728d4ffeca..095f7d9e6c 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -170,9 +168,6 @@ struct Company : CompanyPool::PoolItem<&_company_pool>, CompanyProperties { static void PostDestructor(size_t index); }; -#define FOR_ALL_COMPANIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Company, company_index, var, start) -#define FOR_ALL_COMPANIES(var) FOR_ALL_COMPANIES_FROM(var, 0) - Money CalculateCompanyValue(const Company *c, bool including_loan = true); extern uint _next_competitor_start; diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index f4eb7fb3e1..6308c14472 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -265,8 +263,7 @@ void SubtractMoneyFromCompanyFract(CompanyID company, CommandCost cst) /** Update the landscaping limits per company. */ void UpdateLandscapingLimits() { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->terraform_limit = min(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint32)_settings_game.construction.terraform_frame_burst << 16); c->clear_limit = min(c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint32)_settings_game.construction.clear_frame_burst << 16); c->tree_limit = min(c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint32)_settings_game.construction.tree_frame_burst << 16); @@ -362,8 +359,7 @@ static void GenerateCompanyName(Company *c) verify_name:; /* No companies must have this name already */ - Company *cc; - FOR_ALL_COMPANIES(cc) { + for (const Company *cc : Company::Iterate()) { if (cc->name_1 == str && cc->name_2 == strp) goto bad_town_name; } @@ -449,8 +445,7 @@ static Colours GenerateCompanyColour() } /* Move the colours that look similar to each company's colour to the side */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { Colours pcolour = (Colours)c->colour; for (uint i = 0; i < COLOUR_END; i++) { @@ -496,8 +491,7 @@ restart:; GetString(buffer, STR_PRESIDENT_NAME, lastof(buffer)); if (Utf8StringLength(buffer) >= MAX_LENGTH_PRESIDENT_NAME_CHARS) continue; - Company *cc; - FOR_ALL_COMPANIES(cc) { + for (const Company *cc : Company::Iterate()) { if (c != cc) { /* Reserve extra space so even overlength president names can be compared. */ char buffer2[(MAX_LENGTH_PRESIDENT_NAME_CHARS + 1) * MAX_CHAR_LENGTH]; @@ -523,8 +517,7 @@ void ResetCompanyLivery(Company *c) c->livery[scheme].colour2 = c->colour; } - Group *g; - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { if (g->owner == c->index) { g->livery.in_use = 0; g->livery.colour1 = c->colour; @@ -600,11 +593,9 @@ static bool MaybeStartNewCompany() { if (_networking && Company::GetNumItems() >= _settings_client.network.max_companies) return false; - Company *c; - /* count number of competitors */ uint n = 0; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai) n++; } @@ -673,11 +664,11 @@ static void HandleBankruptcyTakeover(Company *c) /* Did we ask everyone for bankruptcy? If so, bail out. */ if (c->bankrupt_asked == MAX_UVALUE(CompanyMask)) return; - Company *c2, *best = nullptr; + Company *best = nullptr; int32 best_performance = -1; /* Ask the company with the highest performance history first */ - FOR_ALL_COMPANIES(c2) { + for (Company *c2 : Company::Iterate()) { if (c2->bankrupt_asked == 0 && // Don't ask companies going bankrupt themselves !HasBit(c->bankrupt_asked, c2->index) && best_performance < c2->old_economy[1].performance_history && @@ -739,10 +730,8 @@ void OnTick_Companies() */ void CompaniesYearlyLoop() { - Company *c; - /* Copy statistics */ - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { memmove(&c->yearly_expenses[1], &c->yearly_expenses[0], sizeof(c->yearly_expenses) - sizeof(c->yearly_expenses[0])); memset(&c->yearly_expenses[0], 0, sizeof(c->yearly_expenses[0])); SetWindowDirty(WC_FINANCES, c->index); @@ -750,7 +739,7 @@ void CompaniesYearlyLoop() if (_settings_client.gui.show_finances && _local_company != COMPANY_SPECTATOR) { ShowCompanyFinances(_local_company); - c = Company::Get(_local_company); + Company *c = Company::Get(_local_company); if (c->num_valid_stat_ent > 5 && c->old_economy[0].performance_history < c->old_economy[4].performance_history) { if (_settings_client.sound.new_year) SndPlayFx(SND_01_BAD_YEAR); } else { @@ -973,8 +962,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, /* Ensure no two companies have the same primary colour */ if (scheme == LS_DEFAULT && !second) { - const Company *cc; - FOR_ALL_COMPANIES(cc) { + for (const Company *cc : Company::Iterate()) { if (cc != c && cc->colour == colour) return CMD_ERROR; } } @@ -1037,8 +1025,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, InvalidateWindowData(WC_SMALLMAP, 0, 1); /* Company colour data is indirectly cached. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == _current_company) v->InvalidateNewGRFCache(); } @@ -1055,9 +1042,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, */ static bool IsUniqueCompanyName(const char *name) { - const Company *c; - - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->name != nullptr && strcmp(c->name, name) == 0) return false; } @@ -1100,9 +1085,7 @@ CommandCost CmdRenameCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uin */ static bool IsUniquePresidentName(const char *name) { - const Company *c; - - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->president_name != nullptr && strcmp(c->president_name, name) == 0) return false; } diff --git a/src/company_func.h b/src/company_func.h index 99041b6d42..cec6110044 100644 --- a/src/company_func.h +++ b/src/company_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/company_gui.cpp b/src/company_gui.cpp index eaa7ad55a3..423efcb01f 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -576,7 +574,7 @@ private: /* Disallow other company colours for the primary colour */ if (this->livery_class < LC_GROUP_RAIL && HasBit(this->sel, LS_DEFAULT) && primary) { - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->index != _local_company) SetBit(used_colours, c->colour); } } @@ -660,8 +658,7 @@ private: GUIGroupList list; VehicleType vtype = (VehicleType)(this->livery_class - LC_GROUP_RAIL); - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->owner == owner && g->vehicle_type == vtype) { list.push_back(g); } @@ -752,8 +749,7 @@ public: } /* And group names */ - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->owner == (CompanyID)this->window_number) { SetDParam(0, g->index); d = maxdim(d, GetStringBoundingBox(STR_GROUP_NAME)); @@ -1827,8 +1823,7 @@ struct CompanyInfrastructureWindow : Window this->roadtypes = ROADTYPES_NONE; /* Find the used railtypes. */ - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; this->railtypes |= GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes; @@ -1838,7 +1833,7 @@ struct CompanyInfrastructureWindow : Window this->railtypes = AddDateIntroducedRailTypes(this->railtypes, MAX_DAY); /* Find the used roadtypes. */ - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; this->roadtypes |= GetRoadTypeInfo(e->u.road.roadtype)->introduces_roadtypes; @@ -2398,9 +2393,7 @@ struct CompanyWindow : Window break; case WID_C_DESC_OWNERS: { - const Company *c2; - - FOR_ALL_COMPANIES(c2) { + for (const Company *c2 : Company::Iterate()) { SetDParamMaxValue(0, 75); SetDParam(1, c2->index); @@ -2502,10 +2495,9 @@ struct CompanyWindow : Window } case WID_C_DESC_OWNERS: { - const Company *c2; uint y = r.top; - FOR_ALL_COMPANIES(c2) { + for (const Company *c2 : Company::Iterate()) { uint amt = GetAmountOwnedBy(c, c2->index); if (amt != 0) { SetDParam(0, amt * 25); diff --git a/src/company_gui.h b/src/company_gui.h index c5593d15d3..d5c69f6964 100644 --- a/src/company_gui.h +++ b/src/company_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/company_manager_face.h b/src/company_manager_face.h index 511f85b7d5..2f16656d56 100644 --- a/src/company_manager_face.h +++ b/src/company_manager_face.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/company_type.h b/src/company_type.h index 576a57bf16..de2556b914 100644 --- a/src/company_type.h +++ b/src/company_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/console.cpp b/src/console.cpp index eedf604bab..b777bf2c05 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index cdc6c10e09..f4d0626a5b 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1144,9 +1142,8 @@ DEF_CONSOLE_CMD(ConStartAI) } int n = 0; - Company *c; /* Find the next free slot */ - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->index != n) break; n++; } @@ -1537,8 +1534,7 @@ DEF_CONSOLE_CMD(ConCompanies) return true; } - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { /* Grab the company name */ char company_name[512]; SetDParam(0, c->index); diff --git a/src/console_func.h b/src/console_func.h index 6f58bdf544..1dad477b8a 100644 --- a/src/console_func.h +++ b/src/console_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 916a2ec74f..3841a59544 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -374,6 +372,11 @@ struct IConsoleWindow : Window this->Scroll(-wheel); } + void OnFocus() override + { + VideoDriver::GetInstance()->EditBoxGainedFocus(); + } + void OnFocusLost() override { VideoDriver::GetInstance()->EditBoxLostFocus(); diff --git a/src/console_gui.h b/src/console_gui.h index 54e8dc2bc8..96a3a1a5d3 100644 --- a/src/console_gui.h +++ b/src/console_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/console_internal.h b/src/console_internal.h index 4c07a96f24..630f69607b 100644 --- a/src/console_internal.h +++ b/src/console_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/console_type.h b/src/console_type.h index 18da4131db..b64acc93d0 100644 --- a/src/console_type.h +++ b/src/console_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/alloc_func.cpp b/src/core/alloc_func.cpp index b78023f4d6..86ba76623f 100644 --- a/src/core/alloc_func.cpp +++ b/src/core/alloc_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp index c4ea1f561f..e8436e28d7 100644 --- a/src/core/alloc_func.hpp +++ b/src/core/alloc_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp index e351bf360d..773de58837 100644 --- a/src/core/alloc_type.hpp +++ b/src/core/alloc_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/backup_type.hpp b/src/core/backup_type.hpp index 7e3771b70f..8c9c73851b 100644 --- a/src/core/backup_type.hpp +++ b/src/core/backup_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/bitmath_func.cpp b/src/core/bitmath_func.cpp index 7763227315..803eb9e1ca 100644 --- a/src/core/bitmath_func.cpp +++ b/src/core/bitmath_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/bitmath_func.hpp b/src/core/bitmath_func.hpp index 8fdc7100e8..4af46d3430 100644 --- a/src/core/bitmath_func.hpp +++ b/src/core/bitmath_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/endian_func.hpp b/src/core/endian_func.hpp index ab5b181500..b1a584785b 100644 --- a/src/core/endian_func.hpp +++ b/src/core/endian_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp index 1cacf6c0cb..b674928ee6 100644 --- a/src/core/endian_type.hpp +++ b/src/core/endian_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp index 8526a91a56..d4ea82eff1 100644 --- a/src/core/enum_type.hpp +++ b/src/core/enum_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/geometry_func.cpp b/src/core/geometry_func.cpp index 86f317a372..162f2eae57 100644 --- a/src/core/geometry_func.cpp +++ b/src/core/geometry_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/geometry_func.hpp b/src/core/geometry_func.hpp index e7c53251c7..cd136488ac 100644 --- a/src/core/geometry_func.hpp +++ b/src/core/geometry_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 2927cd9804..0e9f86e674 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/math_func.cpp b/src/core/math_func.cpp index d927702083..98fac81aa7 100644 --- a/src/core/math_func.cpp +++ b/src/core/math_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 570f54c232..d36dc55f9c 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp index 5b3fe4caba..12acce13fc 100644 --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/multimap.hpp b/src/core/multimap.hpp index e906677141..026488b355 100644 --- a/src/core/multimap.hpp +++ b/src/core/multimap.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/overflowsafe_type.hpp b/src/core/overflowsafe_type.hpp index edc25d2755..2b1edeeded 100644 --- a/src/core/overflowsafe_type.hpp +++ b/src/core/overflowsafe_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp index 7a65bf77a4..79ea4b21ce 100644 --- a/src/core/pool_func.cpp +++ b/src/core/pool_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/pool_func.hpp b/src/core/pool_func.hpp index ee49992862..db79ab2857 100644 --- a/src/core/pool_func.hpp +++ b/src/core/pool_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index 8102d580c6..035607a8fb 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -14,6 +12,7 @@ #include "smallvec_type.hpp" #include "enum_type.hpp" +#include /** Various types of a pool. */ enum PoolType { @@ -138,6 +137,49 @@ struct Pool : PoolBase { return ret; } + /** + * Iterator to iterate all valid T of a pool + * @tparam T Type of the class/struct that is going to be iterated + */ + template + struct PoolIterator { + typedef T value_type; + typedef T* pointer; + typedef T& reference; + typedef size_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + explicit PoolIterator(size_t index, std::function filter = nullptr) : index(index), filter(filter) + { + if (this->filter == nullptr) this->filter = [](size_t) { return true; }; + this->ValidateIndex(); + }; + + bool operator==(const PoolIterator &other) const { return this->index == other.index; } + bool operator!=(const PoolIterator &other) const { return !(*this == other); } + T * operator*() const { return T::Get(this->index); } + PoolIterator & operator++() { this->index++; this->ValidateIndex(); return *this; } + + private: + size_t index; + std::function filter; + void ValidateIndex() { while (this->index < T::GetPoolSize() && !(T::IsValidID(this->index) && this->filter(this->index))) this->index++; } + }; + + /* + * Iterable ensemble of all valid T + * @tparam T Type of the class/struct that is going to be iterated + */ + template + struct IterateWrapper { + size_t from; + std::function filter; + IterateWrapper(size_t from = 0, std::function filter = nullptr) : from(from), filter(filter) {} + PoolIterator begin() { return PoolIterator(this->from, this->filter); } + PoolIterator end() { return PoolIterator(T::GetPoolSize()); } + bool empty() { return this->begin() == this->end(); } + }; + /** * Base class for all PoolItems * @tparam Tpool The pool this item is going to be part of @@ -146,6 +188,9 @@ struct Pool : PoolBase { struct PoolItem { Tindex index; ///< Index of this pool item + /** Type of the pool this item is going to be part of */ + typedef struct Pool Pool; + /** * Allocates space for new Titem * @param size size of Titem @@ -286,6 +331,13 @@ struct Pool : PoolBase { * @note it's called only when !CleaningPool() */ static inline void PostDestructor(size_t index) { } + + /** + * Returns an iterable ensemble of all valid Titem + * @param from index of the first Titem to consider + * @return an iterable ensemble of all valid Titem + */ + static Pool::IterateWrapper Iterate(size_t from = 0) { return Pool::IterateWrapper(from); } }; private: @@ -313,10 +365,4 @@ private: void FreeItem(size_t index); }; -#define FOR_ALL_ITEMS_FROM(type, iter, var, start) \ - for (size_t iter = start; var = nullptr, iter < type::GetPoolSize(); iter++) \ - if ((var = type::Get(iter)) != nullptr) - -#define FOR_ALL_ITEMS(type, iter, var) FOR_ALL_ITEMS_FROM(type, iter, var, 0) - #endif /* POOL_TYPE_HPP */ diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index e4593c4076..439f95d158 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp index ae476624e8..7a40c9b740 100644 --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp index d050522821..478e7515a6 100644 --- a/src/core/smallmap_type.hpp +++ b/src/core/smallmap_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/smallmatrix_type.hpp b/src/core/smallmatrix_type.hpp index faa531d5fd..0aeac10e13 100644 --- a/src/core/smallmatrix_type.hpp +++ b/src/core/smallmatrix_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/smallstack_type.hpp b/src/core/smallstack_type.hpp index 6aded5a759..bf44f00c8f 100644 --- a/src/core/smallstack_type.hpp +++ b/src/core/smallstack_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 3cf33f8b7e..2f65f02926 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/core/string_compare_type.hpp b/src/core/string_compare_type.hpp index 77180747ba..1c6a411d09 100644 --- a/src/core/string_compare_type.hpp +++ b/src/core/string_compare_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/cpu.cpp b/src/cpu.cpp index 8d5eb5e5e7..87aa841324 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -18,7 +16,7 @@ /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc * from external win64.asm because VS2005 does not support inline assembly */ -#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) +#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && !defined(RDTSC_AVAILABLE) #include uint64 ottd_rdtsc() { @@ -87,7 +85,7 @@ uint64 ottd_rdtsc() {return 0;} * Other platforms/architectures don't have CPUID, so zero the info and then * most (if not all) of the features are set as if they do not exist. */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) void ottd_cpuid(int info[4], int type) { __cpuid(info, type); diff --git a/src/cpu.h b/src/cpu.h index 08495dfc14..13eaa4f991 100644 --- a/src/cpu.h +++ b/src/cpu.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/crashlog.cpp b/src/crashlog.cpp index b56c18e8ff..c7cf48154c 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -195,8 +193,7 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const ); buffer += seprintf(buffer, last, "AI Configuration (local: %i) (current: %i):\n", (int)_local_company, (int)_current_company); - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->ai_info == nullptr) { buffer += seprintf(buffer, last, " %2i: Human\n", (int)c->index); } else { diff --git a/src/crashlog.h b/src/crashlog.h index 03acdc5aae..7f1ff47edd 100644 --- a/src/crashlog.h +++ b/src/crashlog.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/currency.cpp b/src/currency.cpp index 7bffdd0edd..b6d6821055 100644 --- a/src/currency.cpp +++ b/src/currency.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/currency.h b/src/currency.h index a3772951d2..58c385a8b4 100644 --- a/src/currency.h +++ b/src/currency.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/date.cpp b/src/date.cpp index 8b8fab5b0a..c45396efea 100644 --- a/src/date.cpp +++ b/src/date.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -204,16 +202,13 @@ static void OnNewYear() ShowEndGameChart(); /* check if we reached the maximum year, decrement dates by a year */ } else if (_cur_year == MAX_YEAR + 1) { - Vehicle *v; int days_this_year; _cur_year--; days_this_year = IsLeapYear(_cur_year) ? DAYS_IN_LEAP_YEAR : DAYS_IN_YEAR; _date -= days_this_year; - FOR_ALL_VEHICLES(v) v->date_of_last_service -= days_this_year; - - LinkGraph *lg; - FOR_ALL_LINK_GRAPHS(lg) lg->ShiftDates(-days_this_year); + for (Vehicle *v : Vehicle::Iterate()) v->date_of_last_service -= days_this_year; + for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year); /* Because the _date wraps here, and text-messages expire by game-days, we have to clean out * all of them if the date is set back, else those messages will hang for ever */ diff --git a/src/date_func.h b/src/date_func.h index 6bbde59556..58b16bafdc 100644 --- a/src/date_func.h +++ b/src/date_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/date_gui.cpp b/src/date_gui.cpp index 86c09087c3..4d8ff2a89e 100644 --- a/src/date_gui.cpp +++ b/src/date_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/date_gui.h b/src/date_gui.h index 314baba3ca..8d41ee3e71 100644 --- a/src/date_gui.h +++ b/src/date_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/date_type.h b/src/date_type.h index b20ace91ec..d05b44008e 100644 --- a/src/date_type.h +++ b/src/date_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/debug.cpp b/src/debug.cpp index c300c9fac1..ded6bf1ccd 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/debug.h b/src/debug.h index 337fe86394..1a0955b55b 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/dedicated.cpp b/src/dedicated.cpp index 2ceab0752c..8ab035e61d 100644 --- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/depend/depend.cpp b/src/depend/depend.cpp index a5d35c6356..5a3bd868de 100644 --- a/src/depend/depend.cpp +++ b/src/depend/depend.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/depot.cpp b/src/depot.cpp index 821399fd2b..05e2af3d4a 100644 --- a/src/depot.cpp +++ b/src/depot.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/depot_base.h b/src/depot_base.h index e5eb3b622c..aab2b2ae42 100644 --- a/src/depot_base.h +++ b/src/depot_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -46,7 +44,4 @@ struct Depot : DepotPool::PoolItem<&_depot_pool> { } }; -#define FOR_ALL_DEPOTS_FROM(var, start) FOR_ALL_ITEMS_FROM(Depot, depot_index, var, start) -#define FOR_ALL_DEPOTS(var) FOR_ALL_DEPOTS_FROM(var, 0) - #endif /* DEPOT_BASE_H */ diff --git a/src/depot_cmd.cpp b/src/depot_cmd.cpp index 710878b28c..a142fbe7d3 100644 --- a/src/depot_cmd.cpp +++ b/src/depot_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -30,9 +28,7 @@ */ static bool IsUniqueDepotName(const char *name) { - const Depot *d; - - FOR_ALL_DEPOTS(d) { + for (const Depot *d : Depot::Iterate()) { if (d->name != nullptr && strcmp(d->name, name) == 0) return false; } diff --git a/src/depot_func.h b/src/depot_func.h index f0d65e7640..42ac476ec3 100644 --- a/src/depot_func.h +++ b/src/depot_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 8e7ad3ecd0..f525e714c5 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -172,8 +170,7 @@ static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_typ int max_extend_right = 0; uint max_height = 0; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, type) { + for (const Engine *e : Engine::IterateType(type)) { if (!e->IsEnabled()) continue; EngineID eid = e->index; @@ -224,8 +221,7 @@ void InitDepotWindowBlockSizes() _consistent_train_width = TRAININFO_DEFAULT_VEHICLE_WIDTH; bool first = true; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { if (!e->IsEnabled()) continue; uint w = TRAININFO_DEFAULT_VEHICLE_WIDTH; diff --git a/src/depot_map.h b/src/depot_map.h index c304790f8a..f92ca9f6e4 100644 --- a/src/depot_map.h +++ b/src/depot_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/depot_type.h b/src/depot_type.h index d6374bed51..a2326794a0 100644 --- a/src/depot_type.h +++ b/src/depot_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/direction_func.h b/src/direction_func.h index 12aee58639..e1bad998aa 100644 --- a/src/direction_func.h +++ b/src/direction_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/direction_type.h b/src/direction_type.h index cf6b9f5cf1..55e430e8cd 100644 --- a/src/direction_type.h +++ b/src/direction_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/disaster_vehicle.cpp b/src/disaster_vehicle.cpp index 57ca0e9f8b..1244f99aba 100644 --- a/src/disaster_vehicle.cpp +++ b/src/disaster_vehicle.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -333,8 +331,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v) v->current_order.SetDestination(1); uint n = 0; // Total number of targetable road vehicles. - RoadVehicle *u; - FOR_ALL_ROADVEHICLES(u) { + for (const RoadVehicle *u : RoadVehicle::Iterate()) { if (u->IsFrontEngine()) n++; } @@ -345,14 +342,16 @@ static bool DisasterTick_Ufo(DisasterVehicle *v) } n = RandomRange(n); // Choose one of them. - FOR_ALL_ROADVEHICLES(u) { + for (const RoadVehicle *u : RoadVehicle::Iterate()) { /* Find (n+1)-th road vehicle. */ - if (u->IsFrontEngine() && (n-- == 0)) break; + if (u->IsFrontEngine() && (n-- == 0)) { + /* Target it. */ + v->dest_tile = u->index; + v->age = 0; + break; + } } - /* Target it. */ - v->dest_tile = u->index; - v->age = 0; return true; } else { /* Target a vehicle */ @@ -542,8 +541,7 @@ static bool DisasterTick_Big_Ufo(DisasterVehicle *v) v->current_order.SetDestination(2); - Vehicle *target; - FOR_ALL_VEHICLES(target) { + for (Vehicle *target : Vehicle::Iterate()) { if (target->IsGroundVehicle()) { if (Delta(target->x_pos, v->x_pos) + Delta(target->y_pos, v->y_pos) <= 12 * (int)TILE_SIZE) { target->breakdown_ctr = 5; @@ -710,8 +708,7 @@ static void Disaster_Zeppeliner_Init() /* Pick a random place, unless we find a small airport */ int x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2; - Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->airport.tile != INVALID_TILE && (st->airport.type == AT_SMALL || st->airport.type == AT_LARGE)) { x = (TileX(st->airport.tile) + 2) * TILE_SIZE; break; @@ -748,9 +745,9 @@ static void Disaster_Airplane_Init() { if (!Vehicle::CanAllocateItem(2)) return; - Industry *i, *found = nullptr; + Industry *found = nullptr; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_AIRPLANE_ATTACKS) && (found == nullptr || Chance16(1, 2))) { found = i; @@ -774,9 +771,9 @@ static void Disaster_Helicopter_Init() { if (!Vehicle::CanAllocateItem(3)) return; - Industry *i, *found = nullptr; + Industry *found = nullptr; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CHOPPER_ATTACKS) && (found == nullptr || Chance16(1, 2))) { found = i; @@ -861,9 +858,7 @@ static void Disaster_CoalMine_Init() uint m; for (m = 0; m < 15; m++) { - const Industry *i; - - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CAN_SUBSIDENCE) && --index < 0) { SetDParam(0, i->town->index); AddTileNewsItem(STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE, NT_ACCIDENT, i->location.tile + TileDiffXY(1, 1)); // keep the news, even when the mine closes @@ -942,8 +937,7 @@ void StartupDisasters() */ void ReleaseDisastersTargetingIndustry(IndustryID i) { - DisasterVehicle *v; - FOR_ALL_DISASTERVEHICLES(v) { + for (DisasterVehicle *v : DisasterVehicle::Iterate()) { /* primary disaster vehicles that have chosen target */ if (v->subtype == ST_AIRPLANE || v->subtype == ST_HELICOPTER) { /* if it has chosen target, and it is this industry (yes, dest_tile is IndustryID here), set order to "leaving map peacefully" */ @@ -958,8 +952,7 @@ void ReleaseDisastersTargetingIndustry(IndustryID i) */ void ReleaseDisastersTargetingVehicle(VehicleID vehicle) { - DisasterVehicle *v; - FOR_ALL_DISASTERVEHICLES(v) { + for (DisasterVehicle *v : DisasterVehicle::Iterate()) { /* primary disaster vehicles that have chosen target */ if (v->subtype == ST_SMALL_UFO) { if (v->current_order.GetDestination() != 0 && v->dest_tile == vehicle) { diff --git a/src/disaster_vehicle.h b/src/disaster_vehicle.h index e86d96e97d..dff97a69e9 100644 --- a/src/disaster_vehicle.h +++ b/src/disaster_vehicle.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -53,10 +51,4 @@ struct DisasterVehicle FINAL : public SpecializedVehicleindex; - Station *st; uint num = 0; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->owner == owner) num += CountBits((byte)st->facilities); } Money value = num * _price[PR_STATION_VALUE] * 25; - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->owner != owner) continue; if (v->type == VEH_TRAIN || @@ -159,12 +155,11 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) /* Count vehicles */ { - Vehicle *v; Money min_profit = 0; bool min_profit_first = true; uint num = 0; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->owner != owner) continue; if (IsCompanyBuildableVehicleType(v->type) && v->IsPrimaryVehicle()) { if (v->profit_last_year > 0) num++; // For the vehicle score only count profitable vehicles @@ -190,9 +185,7 @@ int UpdateCompanyRatingAndValue(Company *c, bool update) /* Count stations */ { uint num = 0; - const Station *st; - - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { /* Only count stations that are actually serviced */ if (st->owner == owner && (st->time_since_load <= 20 || st->time_since_unload <= 20)) num += CountBits((byte)st->facilities); } @@ -299,8 +292,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) * There are no spectators in single player, so we must pick some other company. */ assert(!_networking); Backup cur_company2(_current_company, FILE_LINE); - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->index != old_owner) { SetLocalCompany(c->index); break; @@ -310,16 +302,13 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) assert(old_owner != _local_company); } - Town *t; - assert(old_owner != new_owner); { - Company *c; uint i; /* See if the old_owner had shares in other companies */ - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { for (i = 0; i < 4; i++) { if (c->share_owners[i] == old_owner) { /* Sell his shares */ @@ -333,7 +322,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) /* Sell all the shares that people have on this company */ Backup cur_company2(_current_company, FILE_LINE); - c = Company::Get(old_owner); + const Company *c = Company::Get(old_owner); for (i = 0; i < 4; i++) { cur_company2.Change(c->share_owners[i]); if (_current_company != INVALID_OWNER) { @@ -354,8 +343,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) Company::Get(old_owner)->money = UINT64_MAX >> 2; // jackpot ;p } - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { if (s->awarded == old_owner) { if (new_owner == INVALID_OWNER) { delete s; @@ -367,7 +355,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) if (new_owner == INVALID_OWNER) RebuildSubsidisedSourceAndDestinationCache(); /* Take care of rating and transport rights in towns */ - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { /* If a company takes over, give the ratings to that company. */ if (new_owner != INVALID_OWNER) { if (HasBit(t->have_ratings, old_owner)) { @@ -397,8 +385,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) } { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) { if (new_owner == INVALID_OWNER) { if (v->Previous() == nullptr) delete v; @@ -417,8 +404,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) if (new_owner == INVALID_OWNER) { RemoveAllGroupsForCompany(old_owner); } else { - Group *g; - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { if (g->owner == old_owner) g->owner = new_owner; } } @@ -443,8 +429,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) old_company->settings.vehicle.servint_ispercent = new_company->settings.vehicle.servint_ispercent; } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) { assert(new_owner != INVALID_OWNER); @@ -518,8 +503,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) if (new_owner != INVALID_OWNER) Company::Get(new_owner)->infrastructure.airport += Company::Get(old_owner)->infrastructure.airport; /* convert owner of stations (including deleted ones, but excluding buoys) */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->owner == old_owner) { /* if a company goes bankrupt, set owner to OWNER_NONE so the sign doesn't disappear immediately * also, drawing station window would cause reading invalid company's colour */ @@ -528,29 +512,25 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) } /* do the same for waypoints (we need to do this here so deleted waypoints are converted too) */ - Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { if (wp->owner == old_owner) { wp->owner = new_owner == INVALID_OWNER ? OWNER_NONE : new_owner; } } - Sign *si; - FOR_ALL_SIGNS(si) { + for (Sign *si : Sign::Iterate()) { if (si->owner == old_owner) si->owner = new_owner == INVALID_OWNER ? OWNER_NONE : new_owner; } /* Remove Game Script created Goals, CargoMonitors and Story pages. */ - Goal *g; - FOR_ALL_GOALS(g) { + for (Goal *g : Goal::Iterate()) { if (g->company == old_owner) delete g; } ClearCargoPickupMonitoring(old_owner); ClearCargoDeliveryMonitoring(old_owner); - StoryPage *sp; - FOR_ALL_STORY_PAGES(sp) { + for (StoryPage *sp : StoryPage::Iterate()) { if (sp->company == old_owner) delete sp; } @@ -660,23 +640,21 @@ static void CompanyCheckBankrupt(Company *c) static void CompaniesGenStatistics() { /* Check for bankruptcy each month */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { CompanyCheckBankrupt(c); } Backup cur_company(_current_company, FILE_LINE); if (!_settings_game.economy.infrastructure_maintenance) { - Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { cur_company.Change(st->owner); CommandCost cost(EXPENSES_PROPERTY, _price[PR_STATION_VALUE] >> 1); SubtractMoneyFromCompany(cost); } } else { /* Improved monthly infrastructure costs. */ - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { cur_company.Change(c->index); CommandCost cost(EXPENSES_PROPERTY); @@ -702,7 +680,7 @@ static void CompaniesGenStatistics() /* Only run the economic statics and update company stats every 3rd month (1st of quarter). */ if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, _cur_month)) return; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { /* Drop the oldest history off the end */ std::copy_backward(c->old_economy, c->old_economy + MAX_HISTORY_QUARTERS - 1, c->old_economy + MAX_HISTORY_QUARTERS); c->old_economy[0] = c->cur_economy; @@ -835,10 +813,8 @@ void RecomputePrices() /** Let all companies pay the monthly interest on their loan. */ static void CompaniesPayInterest() { - const Company *c; - Backup cur_company(_current_company, FILE_LINE); - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { cur_company.Change(c->index); /* Over a year the paid interest should be "loan * interest percentage", @@ -1768,53 +1744,59 @@ static void LoadUnloadVehicle(Vehicle *front) /* if last speed is 0, we treat that as if no vehicle has ever visited the station. */ ge->last_speed = min(t, 255); ge->last_age = min(_cur_year - front->build_year, 255); - ge->time_since_pickup = 0; assert(v->cargo_cap >= v->cargo.StoredCount()); - /* If there's goods waiting at the station, and the vehicle - * has capacity for it, load it on the vehicle. */ + /* Capacity available for loading more cargo. */ uint cap_left = v->cargo_cap - v->cargo.StoredCount(); - if (cap_left > 0 && (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0 || ge->cargo.AvailableCount() > 0) && MayLoadUnderExclusiveRights(st, v)) { - if (v->cargo.StoredCount() == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO); - if (_settings_game.order.gradual_loading) cap_left = min(cap_left, GetLoadAmount(v)); - uint loaded = ge->cargo.Load(cap_left, &v->cargo, st->xy, next_station); - 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. */ - SetBit(reservation_left, v->cargo_type); - } + if (cap_left > 0) { + /* If vehicle can load cargo, reset time_since_pickup. */ + ge->time_since_pickup = 0; - /* Store whether the maximum possible load amount was loaded or not.*/ - if (loaded == cap_left) { - SetBit(full_load_amount, v->cargo_type); - } else { - ClrBit(full_load_amount, v->cargo_type); - } + /* If there's goods waiting at the station, and the vehicle + * has capacity for it, load it on the vehicle. */ + if ((v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0 || ge->cargo.AvailableCount() > 0) && MayLoadUnderExclusiveRights(st, v)) { + if (v->cargo.StoredCount() == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO); + if (_settings_game.order.gradual_loading) cap_left = min(cap_left, GetLoadAmount(v)); - /* TODO: Regarding this, when we do gradual loading, we - * should first unload all vehicles and then start - * loading them. Since this will cause - * VEHICLE_TRIGGER_EMPTY to be called at the time when - * the whole vehicle chain is really totally empty, the - * completely_emptied assignment can then be safely - * removed; that's how TTDPatch behaves too. --pasky */ - if (loaded > 0) { - completely_emptied = false; - anything_loaded = true; - - st->time_since_load = 0; - st->last_vehicle_type = v->type; - - if (ge->cargo.TotalCount() == 0) { - TriggerStationRandomisation(st, st->xy, SRT_CARGO_TAKEN, v->cargo_type); - TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type); - AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type); + uint loaded = ge->cargo.Load(cap_left, &v->cargo, st->xy, next_station); + 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. */ + SetBit(reservation_left, v->cargo_type); } - new_load_unload_ticks += loaded; + /* Store whether the maximum possible load amount was loaded or not.*/ + if (loaded == cap_left) { + SetBit(full_load_amount, v->cargo_type); + } else { + ClrBit(full_load_amount, v->cargo_type); + } - dirty_vehicle = dirty_station = true; + /* TODO: Regarding this, when we do gradual loading, we + * should first unload all vehicles and then start + * loading them. Since this will cause + * VEHICLE_TRIGGER_EMPTY to be called at the time when + * the whole vehicle chain is really totally empty, the + * completely_emptied assignment can then be safely + * removed; that's how TTDPatch behaves too. --pasky */ + if (loaded > 0) { + completely_emptied = false; + anything_loaded = true; + + st->time_since_load = 0; + st->last_vehicle_type = v->type; + + if (ge->cargo.TotalCount() == 0) { + TriggerStationRandomisation(st, st->xy, SRT_CARGO_TAKEN, v->cargo_type); + TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type); + AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type); + } + + new_load_unload_ticks += loaded; + + dirty_vehicle = dirty_station = true; + } } } diff --git a/src/economy_base.h b/src/economy_base.h index 60b0964a95..5c9d79b8c8 100644 --- a/src/economy_base.h +++ b/src/economy_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -49,17 +47,4 @@ struct CargoPayment : CargoPaymentPool::PoolItem<&_cargo_payment_pool> { void SetCargo(CargoID ct) { this->ct = ct; } }; -/** - * Iterate over all cargo payments from a given start position. - * @param var The variable used for iterating. - * @param start The start of the iteration. - */ -#define FOR_ALL_CARGO_PAYMENTS_FROM(var, start) FOR_ALL_ITEMS_FROM(CargoPayment, cargo_payment_index, var, start) - -/** - * Iterate over all cargo payments. - * @param var The variable used for iterating. - */ -#define FOR_ALL_CARGO_PAYMENTS(var) FOR_ALL_CARGO_PAYMENTS_FROM(var, 0) - #endif /* ECONOMY_BASE_H */ diff --git a/src/economy_func.h b/src/economy_func.h index 7b369b7d60..d26b344e9a 100644 --- a/src/economy_func.h +++ b/src/economy_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/economy_type.h b/src/economy_type.h index aa5ab5daeb..87e4482672 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp index 76c06a181d..f11a92e5d6 100644 --- a/src/effectvehicle.cpp +++ b/src/effectvehicle.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/effectvehicle_base.h b/src/effectvehicle_base.h index d809657fab..73a49046bf 100644 --- a/src/effectvehicle_base.h +++ b/src/effectvehicle_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -37,10 +35,4 @@ struct EffectVehicle FINAL : public SpecializedVehicleu.rail; /* if it is an electric rail engine and its railtype is the wrong one */ if (rv_info->engclass == 2 && rv_info->railtype == old_railtype) { @@ -615,7 +610,7 @@ bool SettingsDisableElrail(int32 p1) /* when disabling elrails, make sure that all existing trains can run on * normal rail too */ if (disable) { - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (t->railtype == RAILTYPE_ELECTRIC) { /* this railroad vehicle is now compatible only with elrail, * so add there also normal rail compatibility */ @@ -627,14 +622,14 @@ bool SettingsDisableElrail(int32 p1) } /* Fix the total power and acceleration for trains */ - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { /* power and acceleration is cached only for front engines */ if (t->IsFrontEngine()) { t->ConsistChanged(CCF_TRACK); } } - FOR_ALL_COMPANIES(c) c->avail_railtypes = GetCompanyRailtypes(c->index); + for (Company *c : Company::Iterate()) c->avail_railtypes = GetCompanyRailtypes(c->index); /* This resets the _last_built_railtype, which will be invalid for electric * rails. It may have unintended consequences if that function is ever diff --git a/src/elrail_func.h b/src/elrail_func.h index 5cdae20c54..0438437241 100644 --- a/src/elrail_func.h +++ b/src/elrail_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/engine.cpp b/src/engine.cpp index f9363b6014..66e68fd3c6 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -528,8 +526,7 @@ EngineID EngineOverrideManager::GetID(VehicleType type, uint16 grf_local_id, uin */ bool EngineOverrideManager::ResetToCurrentNewGRFConfig() { - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (IsCompanyBuildableVehicleType(v)) return false; } @@ -620,8 +617,7 @@ void SetYearEngineAgingStops() /* Determine last engine aging year, default to 2050 as previously. */ _year_engine_aging_stops = 2050; - const Engine *e; - FOR_ALL_ENGINES(e) { + for (const Engine *e : Engine::Iterate()) { const EngineInfo *ei = &e->info; /* Exclude certain engines */ @@ -696,17 +692,15 @@ void StartupOneEngine(Engine *e, Date aging_date) */ void StartupEngines() { - Engine *e; /* Aging of vehicles stops, so account for that when starting late */ const Date aging_date = min(_date, ConvertYMDToDate(_year_engine_aging_stops, 0, 1)); - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { StartupOneEngine(e, aging_date); } /* Update the bitmasks for the vehicle lists */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->avail_railtypes = GetCompanyRailtypes(c->index); c->avail_roadtypes = GetCompanyRoadTypes(c->index); } @@ -765,14 +759,12 @@ static CompanyID GetPreviewCompany(Engine *e) CargoTypes cargomask = e->type != VEH_TRAIN ? GetUnionOfArticulatedRefitMasks(e->index, true) : ALL_CARGOTYPES; int32 best_hist = -1; - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->block_preview == 0 && !HasBit(e->preview_asked, c->index) && c->old_economy[0].performance_history > best_hist) { /* Check whether the company uses similar vehicles */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->owner != c->index || v->type != e->type) continue; if (!v->GetEngine()->CanCarryCargo() || !HasBit(cargomask, v->cargo_type)) continue; @@ -808,16 +800,14 @@ static bool IsVehicleTypeDisabled(VehicleType type, bool ai) /** Daily check to offer an exclusive engine preview to the companies. */ void EnginesDailyLoop() { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, _date); c->avail_roadtypes = AddDateIntroducedRoadTypes(c->avail_roadtypes, _date); } if (_cur_year >= _year_engine_aging_stops) return; - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { EngineID i = e->index; if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) { if (e->preview_company != INVALID_COMPANY) { @@ -853,8 +843,7 @@ void EnginesDailyLoop() */ void ClearEnginesHiddenFlagOfCompany(CompanyID cid) { - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { SB(e->company_hidden, cid, 1, 0); } } @@ -909,14 +898,12 @@ CommandCost CmdWantEnginePreview(TileIndex tile, DoCommandFlag flags, uint32 p1, */ static void NewVehicleAvailable(Engine *e) { - Vehicle *v; - Company *c; EngineID index = e->index; /* In case the company didn't build the vehicle during the intro period, * prevent that company from getting future intro periods for a while. */ if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) { - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { uint block_preview = c->block_preview; if (!HasBit(e->company_avail, c->index)) continue; @@ -924,7 +911,7 @@ static void NewVehicleAvailable(Engine *e) /* We assume the user did NOT build it.. prove me wrong ;) */ c->block_preview = 20; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == VEH_TRAIN || v->type == VEH_ROAD || v->type == VEH_SHIP || (v->type == VEH_AIRCRAFT && Aircraft::From(v)->IsNormalAircraft())) { if (v->owner == c->index && v->engine_type == index) { @@ -950,11 +937,11 @@ static void NewVehicleAvailable(Engine *e) /* maybe make another rail type available */ RailType railtype = e->u.rail.railtype; assert(railtype < RAILTYPE_END); - FOR_ALL_COMPANIES(c) c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date); + for (Company *c : Company::Iterate()) c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date); } else if (e->type == VEH_ROAD) { /* maybe make another road type available */ assert(e->u.road.roadtype < ROADTYPE_END); - FOR_ALL_COMPANIES(c) c->avail_roadtypes = AddDateIntroducedRoadTypes(c->avail_roadtypes | GetRoadTypeInfo(e->u.road.roadtype)->introduces_roadtypes, _date); + for (Company* c : Company::Iterate()) c->avail_roadtypes = AddDateIntroducedRoadTypes(c->avail_roadtypes | GetRoadTypeInfo(e->u.road.roadtype)->introduces_roadtypes, _date); } /* Only broadcast event if AIs are able to build this vehicle type. */ @@ -979,8 +966,7 @@ static void NewVehicleAvailable(Engine *e) void EnginesMonthlyLoop() { if (_cur_year < _year_engine_aging_stops) { - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { /* Age the vehicle */ if ((e->flags & ENGINE_AVAILABLE) && e->age != MAX_DAY) { e->age++; @@ -1021,9 +1007,7 @@ void EnginesMonthlyLoop() */ static bool IsUniqueEngineName(const char *name) { - const Engine *e; - - FOR_ALL_ENGINES(e) { + for (const Engine *e : Engine::Iterate()) { if (e->name != nullptr && strcmp(e->name, name) == 0) return false; } @@ -1144,10 +1128,9 @@ bool IsEngineRefittable(EngineID engine) */ void CheckEngines() { - const Engine *e; Date min_date = INT32_MAX; - FOR_ALL_ENGINES(e) { + for (const Engine *e : Engine::Iterate()) { if (!e->IsEnabled()) continue; /* We have an available engine... yay! */ diff --git a/src/engine_base.h b/src/engine_base.h index a8dbb873c1..1328f66a18 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -143,6 +141,17 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> { } uint32 GetGRFID() const; + + /** + * Returns an iterable ensemble of all valid engines of the given type + * @param vt the VehicleType for engines to be valid + * @param from index of the first engine to consider + * @return an iterable ensemble of all valid engines of the given type + */ + static Pool::IterateWrapper IterateType(VehicleType vt, size_t from = 0) + { + return Pool::IterateWrapper(from, [vt](size_t index) { return Engine::Get(index)->type == vt; }); + } }; struct EngineIDMapping { @@ -167,11 +176,6 @@ struct EngineOverrideManager : std::vector { extern EngineOverrideManager _engine_mngr; -#define FOR_ALL_ENGINES_FROM(var, start) FOR_ALL_ITEMS_FROM(Engine, engine_index, var, start) -#define FOR_ALL_ENGINES(var) FOR_ALL_ENGINES_FROM(var, 0) - -#define FOR_ALL_ENGINES_OF_TYPE(e, engine_type) FOR_ALL_ENGINES(e) if (e->type == engine_type) - static inline const EngineInfo *EngInfo(EngineID e) { return &Engine::Get(e)->info; diff --git a/src/engine_func.h b/src/engine_func.h index 79dad18c72..472600cf77 100644 --- a/src/engine_func.h +++ b/src/engine_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 90cba6ed18..b71fa7a6bd 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/engine_gui.h b/src/engine_gui.h index e95cc13e4d..f987f57d35 100644 --- a/src/engine_gui.h +++ b/src/engine_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/engine_type.h b/src/engine_type.h index 6cc8dc68eb..83f8dc307e 100644 --- a/src/engine_type.h +++ b/src/engine_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/error.h b/src/error.h index fe1ed659e4..78ee9c5918 100644 --- a/src/error.h +++ b/src/error.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/error_gui.cpp b/src/error_gui.cpp index 807bd48e18..de24be3dda 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -226,7 +224,7 @@ public: int scr_top = GetMainViewTop() + 20; int scr_bot = GetMainViewBottom() - 20; - Point pt = RemapCoords2(this->position.x, this->position.y); + Point pt = RemapCoords(this->position.x, this->position.y, GetSlopePixelZOutsideMap(this->position.x, this->position.y)); const ViewPort *vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport; if (this->face == INVALID_COMPANY) { /* move x pos to opposite corner */ diff --git a/src/fileio.cpp b/src/fileio.cpp index a1a8db8d32..dc3813bcaa 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fileio_func.h b/src/fileio_func.h index 9c287d12c9..dec1931939 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fileio_type.h b/src/fileio_type.h index fd3ac84554..15f886d050 100644 --- a/src/fileio_type.h +++ b/src/fileio_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fios.cpp b/src/fios.cpp index c717c1f4f7..24487174b8 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fios.h b/src/fios.h index 7b10dea4ca..6a7b6bf01f 100644 --- a/src/fios.h +++ b/src/fios.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 754dc45350..7b13aa1db1 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fontcache.cpp b/src/fontcache.cpp index d63b90e86a..9102f356ad 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fontcache.h b/src/fontcache.h index 7416103953..716b3e7d77 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/fontdetection.cpp b/src/fontdetection.cpp index 75806c8fe8..d147415487 100644 --- a/src/fontdetection.cpp +++ b/src/fontdetection.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -394,7 +392,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) /* Get font reference from name. */ UInt8 file_path[PATH_MAX]; OSStatus os_err = -1; - CFStringRef name = CFStringCreateWithCString(kCFAllocatorDefault, font_name, kCFStringEncodingUTF8); + CFAutoRelease name(CFStringCreateWithCString(kCFAllocatorDefault, font_name, kCFStringEncodingUTF8)); #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) if (MacOSVersionIsAtLeast(10, 6, 0)) { @@ -402,28 +400,21 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face) * something, no matter the name. As such, we can't use it to check for existence. * We instead query the list of all font descriptors that match the given name which * does not do this stupid name fallback. */ - CTFontDescriptorRef name_desc = CTFontDescriptorCreateWithNameAndSize(name, 0.0); - CFSetRef mandatory_attribs = CFSetCreate(kCFAllocatorDefault, (const void **)&kCTFontNameAttribute, 1, &kCFTypeSetCallBacks); - CFArrayRef descs = CTFontDescriptorCreateMatchingFontDescriptors(name_desc, mandatory_attribs); - CFRelease(mandatory_attribs); - CFRelease(name_desc); - CFRelease(name); + CFAutoRelease name_desc(CTFontDescriptorCreateWithNameAndSize(name.get(), 0.0)); + CFAutoRelease mandatory_attribs(CFSetCreate(kCFAllocatorDefault, (const void **)&kCTFontNameAttribute, 1, &kCFTypeSetCallBacks)); + CFAutoRelease descs(CTFontDescriptorCreateMatchingFontDescriptors(name_desc.get(), mandatory_attribs.get())); /* Loop over all matches until we can get a path for one of them. */ - for (CFIndex i = 0; descs != nullptr && i < CFArrayGetCount(descs) && os_err != noErr; i++) { - CTFontRef font = CTFontCreateWithFontDescriptor((CTFontDescriptorRef)CFArrayGetValueAtIndex(descs, i), 0.0, nullptr); - CFURLRef fontURL = (CFURLRef)CTFontCopyAttribute(font, kCTFontURLAttribute); - if (CFURLGetFileSystemRepresentation(fontURL, true, file_path, lengthof(file_path))) os_err = noErr; - CFRelease(font); - CFRelease(fontURL); + for (CFIndex i = 0; descs.get() != nullptr && i < CFArrayGetCount(descs.get()) && os_err != noErr; i++) { + CFAutoRelease font(CTFontCreateWithFontDescriptor((CTFontDescriptorRef)CFArrayGetValueAtIndex(descs.get(), i), 0.0, nullptr)); + CFAutoRelease fontURL((CFURLRef)CTFontCopyAttribute(font.get(), kCTFontURLAttribute)); + if (CFURLGetFileSystemRepresentation(fontURL.get(), true, file_path, lengthof(file_path))) os_err = noErr; } - if (descs != nullptr) CFRelease(descs); } else #endif { #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) - ATSFontRef font = ATSFontFindFromName(name, kATSOptionFlagsDefault); - CFRelease(name); + ATSFontRef font = ATSFontFindFromName(name.get(), kATSOptionFlagsDefault); if (font == kInvalidFont) return err; /* Get a file system reference for the font. */ @@ -480,31 +471,28 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i if (sep != nullptr) *sep = '\0'; } - /* Create a font descriptor matching the wanted language and latin (english) glyphs. */ + /* Create a font descriptor matching the wanted language and latin (english) glyphs. + * Can't use CFAutoRelease here for everything due to the way the dictionary has to be created. */ CFStringRef lang_codes[2]; lang_codes[0] = CFStringCreateWithCString(kCFAllocatorDefault, lang, kCFStringEncodingUTF8); lang_codes[1] = CFSTR("en"); CFArrayRef lang_arr = CFArrayCreate(kCFAllocatorDefault, (const void **)lang_codes, lengthof(lang_codes), &kCFTypeArrayCallBacks); - CFDictionaryRef lang_attribs = CFDictionaryCreate(kCFAllocatorDefault, (const void**)&kCTFontLanguagesAttribute, (const void **)&lang_arr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CTFontDescriptorRef lang_desc = CTFontDescriptorCreateWithAttributes(lang_attribs); + CFAutoRelease lang_attribs(CFDictionaryCreate(kCFAllocatorDefault, (const void**)&kCTFontLanguagesAttribute, (const void **)&lang_arr, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + CFAutoRelease lang_desc(CTFontDescriptorCreateWithAttributes(lang_attribs.get())); CFRelease(lang_arr); - CFRelease(lang_attribs); CFRelease(lang_codes[0]); /* Get array of all font descriptors for the wanted language. */ - CFSetRef mandatory_attribs = CFSetCreate(kCFAllocatorDefault, (const void **)&kCTFontLanguagesAttribute, 1, &kCFTypeSetCallBacks); - CFArrayRef descs = CTFontDescriptorCreateMatchingFontDescriptors(lang_desc, mandatory_attribs); - CFRelease(mandatory_attribs); - CFRelease(lang_desc); + CFAutoRelease mandatory_attribs(CFSetCreate(kCFAllocatorDefault, (const void **)&kCTFontLanguagesAttribute, 1, &kCFTypeSetCallBacks)); + CFAutoRelease descs(CTFontDescriptorCreateMatchingFontDescriptors(lang_desc.get(), mandatory_attribs.get())); - for (CFIndex i = 0; descs != nullptr && i < CFArrayGetCount(descs); i++) { - CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(descs, i); + for (CFIndex i = 0; descs.get() != nullptr && i < CFArrayGetCount(descs.get()); i++) { + CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(descs.get(), i); /* Get font traits. */ - CFDictionaryRef traits = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute); + CFAutoRelease traits((CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)); CTFontSymbolicTraits symbolic_traits; - CFNumberGetValue((CFNumberRef)CFDictionaryGetValue(traits, kCTFontSymbolicTrait), kCFNumberIntType, &symbolic_traits); - CFRelease(traits); + CFNumberGetValue((CFNumberRef)CFDictionaryGetValue(traits.get(), kCTFontSymbolicTrait), kCFNumberIntType, &symbolic_traits); /* Skip symbol fonts and vertical fonts. */ if ((symbolic_traits & kCTFontClassMaskTrait) == (CTFontStylisticClass)kCTFontSymbolicClass || (symbolic_traits & kCTFontVerticalTrait)) continue; @@ -515,9 +503,8 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i /* Get font name. */ char name[128]; - CFStringRef font_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontDisplayNameAttribute); - CFStringGetCString(font_name, name, lengthof(name), kCFStringEncodingUTF8); - CFRelease(font_name); + CFAutoRelease font_name((CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontDisplayNameAttribute)); + CFStringGetCString(font_name.get(), name, lengthof(name), kCFStringEncodingUTF8); /* There are some special fonts starting with an '.' and the last * resort font that aren't usable. Skip them. */ @@ -531,7 +518,6 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i break; } } - if (descs != nullptr) CFRelease(descs); } else #endif { diff --git a/src/fontdetection.h b/src/fontdetection.h index 01e0223cd6..70b2fe236e 100644 --- a/src/fontdetection.h +++ b/src/fontdetection.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 5c54eed5b1..d34f59e09f 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/framerate_type.h b/src/framerate_type.h index 3c54e03078..1fa6e35ac8 100644 --- a/src/framerate_type.h +++ b/src/framerate_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game.hpp b/src/game/game.hpp index 95d9aa0a13..8381a6c148 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_config.cpp b/src/game/game_config.cpp index f96985ef7e..89283129e7 100644 --- a/src/game/game_config.cpp +++ b/src/game/game_config.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_config.hpp b/src/game/game_config.hpp index dfae62c3a9..a01128e671 100644 --- a/src/game/game_config.hpp +++ b/src/game/game_config.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp index 394b77fb83..fbe233c9f0 100644 --- a/src/game/game_core.cpp +++ b/src/game/game_core.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp index d815e6fd20..91a463bed5 100644 --- a/src/game/game_info.cpp +++ b/src/game/game_info.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_info.hpp b/src/game/game_info.hpp index 8a2215d52f..cfa900767c 100644 --- a/src/game/game_info.hpp +++ b/src/game/game_info.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp index 8d4f5f2b22..57b2213ea9 100644 --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_instance.hpp b/src/game/game_instance.hpp index dd0e7950aa..7b3b12b379 100644 --- a/src/game/game_instance.hpp +++ b/src/game/game_instance.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_scanner.cpp b/src/game/game_scanner.cpp index 862c867cf4..68efa350c2 100644 --- a/src/game/game_scanner.cpp +++ b/src/game/game_scanner.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_scanner.hpp b/src/game/game_scanner.hpp index 2530ec792a..6c96bccfdf 100644 --- a/src/game/game_scanner.hpp +++ b/src/game/game_scanner.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp index b69b8f46be..64281c60cb 100644 --- a/src/game/game_text.cpp +++ b/src/game/game_text.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/game/game_text.hpp b/src/game/game_text.hpp index c662e28f4b..20cccff54c 100644 --- a/src/game/game_text.hpp +++ b/src/game/game_text.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 025d2ab8dd..b325dc7fd3 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gamelog.h b/src/gamelog.h index 83694e3ea8..0f21fe0f1b 100644 --- a/src/gamelog.h +++ b/src/gamelog.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gamelog_internal.h b/src/gamelog_internal.h index 261a8cd579..2b5c6ed0a1 100644 --- a/src/gamelog_internal.h +++ b/src/gamelog_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/genworld.cpp b/src/genworld.cpp index 6aaf1a6fe0..c76fe309d9 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -135,11 +133,17 @@ static void _GenerateWorld() GenerateLandscape(_gw.mode); GenerateClearTile(); - /* only generate towns, tree and industries in newgame mode. */ + /* Only generate towns, tree and industries in newgame mode. */ if (_game_mode != GM_EDITOR) { if (!GenerateTowns(_settings_game.economy.town_layout)) { _cur_company.Restore(); HandleGeneratingWorldAbortion(); + BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP); + if (_network_dedicated) { + /* Exit the game to prevent a return to main menu. */ + DEBUG(net, 0, "Generating map failed, aborting"); + _exit_game = true; + } return; } GenerateIndustries(); diff --git a/src/genworld.h b/src/genworld.h index 56664bc0c6..8014797125 100644 --- a/src/genworld.h +++ b/src/genworld.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 550a193d79..154097e722 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gfx.cpp b/src/gfx.cpp index 6814165d42..db024c9c75 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -318,7 +316,7 @@ static void SetColourRemap(TextColour colour) * would be invisible at best, but it actually makes it illegible. */ bool no_shade = (colour & TC_NO_SHADE) != 0 || colour == TC_BLACK; bool raw_colour = (colour & TC_IS_PALETTE_COLOUR) != 0; - colour &= ~(TC_NO_SHADE | TC_IS_PALETTE_COLOUR); + colour &= ~(TC_NO_SHADE | TC_IS_PALETTE_COLOUR | TC_FORCED); _string_colourremap[1] = raw_colour ? (byte)colour : _string_colourmap[colour]; _string_colourremap[2] = no_shade ? 0 : 1; @@ -487,7 +485,8 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left, * @param right The right most position to draw on. * @param top The top most position to draw on. * @param str String to draw. - * @param colour Colour used for drawing the string, see DoDrawString() for details + * @param colour Colour used for drawing the string, for details see _string_colourmap in + * table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h * @param align The alignment of the string when drawing left-to-right. In the * case a right-to-left language is chosen this is inverted so it * will be drawn in the right direction. @@ -522,7 +521,8 @@ int DrawString(int left, int right, int top, const char *str, TextColour colour, * @param right The right most position to draw on. * @param top The top most position to draw on. * @param str String to draw. - * @param colour Colour used for drawing the string, see DoDrawString() for details + * @param colour Colour used for drawing the string, for details see _string_colourmap in + * table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h * @param align The alignment of the string when drawing left-to-right. In the * case a right-to-left language is chosen this is inverted so it * will be drawn in the right direction. @@ -610,7 +610,8 @@ Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &sugges * @param top The top most position to draw on. * @param bottom The bottom most position to draw on. * @param str String to draw. - * @param colour Colour used for drawing the string, see DoDrawString() for details + * @param colour Colour used for drawing the string, for details see _string_colourmap in + * table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h * @param align The horizontal and vertical alignment of the string. * @param underline Whether to underline all strings * @param fontsize The size of the initial characters. @@ -671,7 +672,8 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, const char *st * @param top The top most position to draw on. * @param bottom The bottom most position to draw on. * @param str String to draw. - * @param colour Colour used for drawing the string, see DoDrawString() for details + * @param colour Colour used for drawing the string, for details see _string_colourmap in + * table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h * @param align The horizontal and vertical alignment of the string. * @param underline Whether to underline all strings * @param fontsize The size of the initial characters. @@ -749,7 +751,8 @@ const char *GetCharAtPosition(const char *str, int x, FontSize start_fontsize) * @param c Character (glyph) to draw * @param x X position to draw character * @param y Y position to draw character - * @param colour Colour to use, see DoDrawString() for details + * @param colour Colour to use, for details see _string_colourmap in + * table/palettes.h or docs/ottd-colourtext-palette.png or the enum TextColour in gfx_type.h */ void DrawCharCentered(WChar c, int x, int y, TextColour colour) { diff --git a/src/gfx_func.h b/src/gfx_func.h index 7b6529564e..5da0ff0cab 100644 --- a/src/gfx_func.h +++ b/src/gfx_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp index 502eccbbc3..f093a53863 100644 --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gfx_layout.h b/src/gfx_layout.h index 0539376473..4854be6e55 100644 --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -48,7 +46,7 @@ struct FontState { inline void SetColour(TextColour c) { assert(c >= TC_BLUE && c <= TC_BLACK); - this->cur_colour = c; + if ((this->cur_colour & TC_FORCED) == 0) this->cur_colour = c; } /** diff --git a/src/gfx_type.h b/src/gfx_type.h index cc884b06df..6fca2228df 100644 --- a/src/gfx_type.h +++ b/src/gfx_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -269,6 +267,7 @@ enum TextColour { TC_IS_PALETTE_COLOUR = 0x100, ///< Colour value is already a real palette colour index, not an index of a StringColour. TC_NO_SHADE = 0x200, ///< Do not add shading to this text colour. + TC_FORCED = 0x400, ///< Ignore colour changes from strings. }; DECLARE_ENUM_AS_BIT_SET(TextColour) diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 81cbd91218..86dc868e6b 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gfxinit.h b/src/gfxinit.h index 5bf0bff5ca..76f19135c3 100644 --- a/src/gfxinit.h +++ b/src/gfxinit.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/goal.cpp b/src/goal.cpp index 407b3a398b..9c9441e9ee 100644 --- a/src/goal.cpp +++ b/src/goal.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/goal_base.h b/src/goal_base.h index fee4ddce7b..ceeb0ef933 100644 --- a/src/goal_base.h +++ b/src/goal_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -39,7 +37,4 @@ struct Goal : GoalPool::PoolItem<&_goal_pool> { inline ~Goal() { free(this->text); free(this->progress); } }; -#define FOR_ALL_GOALS_FROM(var, start) FOR_ALL_ITEMS_FROM(Goal, goal_index, var, start) -#define FOR_ALL_GOALS(var) FOR_ALL_GOALS_FROM(var, 0) - #endif /* GOAL_BASE_H */ diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index 758eae9ad5..7a77b30146 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -68,8 +66,7 @@ struct GoalListWindow : public Window { int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GOAL_LIST, WD_FRAMERECT_TOP); int num = 0; - const Goal *s; - FOR_ALL_GOALS(s) { + for (const Goal *s : Goal::Iterate()) { if (s->company == INVALID_COMPANY) { y--; if (y == 0) { @@ -88,7 +85,7 @@ struct GoalListWindow : public Window { y -= 2; // "Company specific goals:" line. if (y < 0) return; - FOR_ALL_GOALS(s) { + for (const Goal *s : Goal::Iterate()) { if (s->company == this->window_number) { y--; if (y == 0) { @@ -160,8 +157,7 @@ struct GoalListWindow : public Window { /* Count number of (non) awarded goals. */ uint num_global = 0; uint num_company = 0; - const Goal *s; - FOR_ALL_GOALS(s) { + for (const Goal *s : Goal::Iterate()) { if (s->company == INVALID_COMPANY) { num_global++; } else if (s->company == this->window_number) { @@ -209,8 +205,7 @@ struct GoalListWindow : public Window { bool rtl = _current_text_dir == TD_RTL; uint num = 0; - const Goal *s; - FOR_ALL_GOALS(s) { + for (const Goal *s : Goal::Iterate()) { if (global_section ? s->company == INVALID_COMPANY : (s->company == this->window_number && s->company != INVALID_COMPANY)) { if (IsInsideMM(pos, 0, cap)) { switch (column) { @@ -280,8 +275,7 @@ struct GoalListWindow : public Window { /* Calculate progress column width. */ uint max_width = 0; - Goal *s; - FOR_ALL_GOALS(s) { + for (const Goal *s : Goal::Iterate()) { if (s->progress != nullptr) { SetDParamStr(0, s->progress); StringID str = s->completed ? STR_GOALS_PROGRESS_COMPLETE : STR_GOALS_PROGRESS; diff --git a/src/goal_type.h b/src/goal_type.h index 4321a42b7a..b422e14d99 100644 --- a/src/goal_type.h +++ b/src/goal_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 8981e2e792..d454d8a9b5 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -569,8 +567,7 @@ public: } byte nums = 0; - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { nums = min(this->num_vert_lines, max(nums, c->num_valid_stat_ent)); } @@ -594,7 +591,7 @@ public: int numd = 0; for (CompanyID k = COMPANY_FIRST; k < MAX_COMPANIES; k++) { - c = Company::GetIfValid(k); + const Company *c = Company::GetIfValid(k); if (c != nullptr) { this->colours[numd] = _colour_gradient[c->colour][6]; for (int j = this->num_on_x_axis, i = 0; --j >= 0;) { @@ -1138,8 +1135,7 @@ private: this->companies.clear(); - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { this->companies.push_back(c); } @@ -1221,8 +1217,7 @@ public: this->icon_width = d.width + 2; this->line_height = max(d.height + 2, FONT_HEIGHT_NORMAL); - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { SetDParam(0, c->index); SetDParam(1, c->index); SetDParam(2, _performance_titles[widest_title]); @@ -1301,8 +1296,7 @@ struct PerformanceRatingDetailWindow : Window { { /* Update all company stats with the current data * (this is because _score_info is not saved to a savegame) */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { UpdateCompanyRatingAndValue(c, false); } @@ -1499,8 +1493,7 @@ struct PerformanceRatingDetailWindow : Window { } if (this->company == INVALID_COMPANY) { - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { this->company = c->index; break; } diff --git a/src/graph_gui.h b/src/graph_gui.h index acc23421f4..8338878c01 100644 --- a/src/graph_gui.h +++ b/src/graph_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp index a7869d9589..74095fc576 100644 --- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index 5268651348..af6e25c806 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/group.h b/src/group.h index 57488d394b..aeb7f581a8 100644 --- a/src/group.h +++ b/src/group.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -97,9 +95,6 @@ static inline bool IsAllGroupID(GroupID id_g) return id_g == ALL_GROUP; } -#define FOR_ALL_GROUPS_FROM(var, start) FOR_ALL_ITEMS_FROM(Group, group_index, var, start) -#define FOR_ALL_GROUPS(var) FOR_ALL_GROUPS_FROM(var, 0) - uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e); uint GetGroupNumVehicle(CompanyID company, GroupID id_g, VehicleType type); diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index a9451ee8f8..497d74d68b 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -103,8 +101,7 @@ void GroupStatistics::Clear() /* static */ void GroupStatistics::UpdateAfterLoad() { /* Set up the engine count for all companies */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { for (VehicleType type = VEH_BEGIN; type < VEH_COMPANY_END; type++) { c->group_all[type].Clear(); c->group_default[type].Clear(); @@ -112,20 +109,18 @@ void GroupStatistics::Clear() } /* Recalculate */ - Group *g; - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { g->statistics.Clear(); } - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (!v->IsEngineCountable()) continue; GroupStatistics::CountEngine(v, 1); if (v->IsPrimaryVehicle()) GroupStatistics::CountVehicle(v, 1); } - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { GroupStatistics::UpdateAutoreplace(c->index); } } @@ -185,8 +180,7 @@ void GroupStatistics::Clear() /* static */ void GroupStatistics::UpdateProfits() { /* Set up the engine count for all companies */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { for (VehicleType type = VEH_BEGIN; type < VEH_COMPANY_END; type++) { c->group_all[type].ClearProfits(); c->group_default[type].ClearProfits(); @@ -194,13 +188,11 @@ void GroupStatistics::Clear() } /* Recalculate */ - Group *g; - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { g->statistics.ClearProfits(); } - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->IsPrimaryVehicle() && v->age > VEHICLE_PROFIT_MIN_AGE) GroupStatistics::VehicleReachedProfitAge(v); } } @@ -219,8 +211,7 @@ void GroupStatistics::Clear() } /* Recalculate */ - Group *g; - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { if (g->owner != company) continue; g->statistics.ClearAutoreplace(); } @@ -274,8 +265,7 @@ const Livery *GetParentLivery(const Group *g) void PropagateChildLivery(const Group *g) { /* Company colour data is indirectly cached. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->group_id == g->index && (!v->IsGroundVehicle() || v->IsFrontEngine())) { for (Vehicle *u = v; u != nullptr; u = u->Next()) { u->colourmap = PAL_NONE; @@ -284,8 +274,7 @@ void PropagateChildLivery(const Group *g) } } - Group *cg; - FOR_ALL_GROUPS(cg) { + for (Group *cg : Group::Iterate()) { if (cg->parent == g->index) { if (!HasBit(cg->livery.in_use, 0)) cg->livery.colour1 = g->livery.colour1; if (!HasBit(cg->livery.in_use, 1)) cg->livery.colour2 = g->livery.colour2; @@ -374,8 +363,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 DoCommand(0, p1, 0, flags, CMD_REMOVE_ALL_VEHICLES_GROUP); /* Delete sub-groups */ - Group *gp; - FOR_ALL_GROUPS(gp) { + for (const Group *gp : Group::Iterate()) { if (gp->parent == g->index) { DoCommand(0, gp->index, 0, flags, CMD_DELETE_GROUP); } @@ -388,10 +376,9 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 /* If we set an autoreplace for the group we delete, remove it. */ if (_current_company < MAX_COMPANIES) { Company *c; - EngineRenew *er; c = Company::Get(_current_company); - FOR_ALL_ENGINE_RENEWS(er) { + for (EngineRenew *er : EngineRenew::Iterate()) { if (er->group_id == g->index) RemoveEngineReplacementForCompany(c, er->from, g->index, flags); } } @@ -583,11 +570,9 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 if (!Group::IsValidID(id_g) || !IsCompanyBuildableVehicleType(type)) return CMD_ERROR; if (flags & DC_EXEC) { - Vehicle *v; - /* Find the first front engine which belong to the group id_g * then add all shared vehicles of this front engine to the group id_g */ - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == type && v->IsPrimaryVehicle()) { if (v->group_id != id_g) continue; @@ -623,10 +608,8 @@ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint3 if (g == nullptr || g->owner != _current_company) return CMD_ERROR; if (flags & DC_EXEC) { - Vehicle *v; - /* Find each Vehicle that belongs to the group old_g and add it to the default group */ - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->IsPrimaryVehicle()) { if (v->group_id != old_g) continue; @@ -688,8 +671,7 @@ static void SetGroupReplaceProtection(Group *g, bool protect) { g->replace_protection = protect; - Group *pg; - FOR_ALL_GROUPS(pg) { + for (Group *pg : Group::Iterate()) { if (pg->parent == g->index) SetGroupReplaceProtection(pg, protect); } } @@ -802,8 +784,7 @@ uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e) { uint count = 0; const Engine *e = Engine::Get(id_e); - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->parent == id_g) count += GetGroupNumEngines(company, g->index, id_e); } return count + GroupStatistics::Get(company, id_g, e->type).num_engines[id_e]; @@ -820,8 +801,7 @@ uint GetGroupNumEngines(CompanyID company, GroupID id_g, EngineID id_e) uint GetGroupNumVehicle(CompanyID company, GroupID id_g, VehicleType type) { uint count = 0; - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->parent == id_g) count += GetGroupNumVehicle(company, g->index, type); } return count + GroupStatistics::Get(company, id_g, type).num_vehicle; @@ -838,8 +818,7 @@ uint GetGroupNumVehicle(CompanyID company, GroupID id_g, VehicleType type) uint GetGroupNumProfitVehicle(CompanyID company, GroupID id_g, VehicleType type) { uint count = 0; - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->parent == id_g) count += GetGroupNumProfitVehicle(company, g->index, type); } return count + GroupStatistics::Get(company, id_g, type).num_profit_vehicle; @@ -856,8 +835,7 @@ uint GetGroupNumProfitVehicle(CompanyID company, GroupID id_g, VehicleType type) Money GetGroupProfitLastYear(CompanyID company, GroupID id_g, VehicleType type) { Money sum = 0; - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->parent == id_g) sum += GetGroupProfitLastYear(company, g->index, type); } return sum + GroupStatistics::Get(company, id_g, type).profit_last_year; @@ -865,9 +843,7 @@ Money GetGroupProfitLastYear(CompanyID company, GroupID id_g, VehicleType type) void RemoveAllGroupsForCompany(const CompanyID company) { - Group *g; - - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { if (company == g->owner) delete g; } } diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 828a061606..842e3fbb0e 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -180,8 +178,7 @@ private: GUIGroupList list; - const Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->owner == owner && g->vehicle_type == this->vli.vtype) { list.push_back(g); } @@ -371,6 +368,7 @@ public: this->groups.ForceRebuild(); this->groups.NeedResort(); this->BuildGroupList(vli.company); + this->group_sb->SetCount((uint)this->groups.size()); this->GetWidget(WID_GL_CAPTION)->widget_data = STR_VEHICLE_LIST_TRAIN_CAPTION + this->vli.vtype; this->GetWidget(WID_GL_LIST_VEHICLE)->tool_tip = STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP + this->vli.vtype; @@ -736,6 +734,10 @@ public: this->vehicle_sel = v->index; + if (_ctrl_pressed) { + this->SelectGroup(v->group_id); + } + SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this); SetMouseCursorVehicle(v, EIT_IN_LIST); _cursor.vehchain = true; @@ -794,7 +796,7 @@ public: switch (widget) { case WID_GL_ALL_VEHICLES: // All vehicles - case WID_GL_DEFAULT_VEHICLES: // Ungroupd vehicles + case WID_GL_DEFAULT_VEHICLES: // Ungrouped vehicles if (g->parent != INVALID_GROUP) { DoCommandP(0, this->group_sel | (1 << 16), INVALID_GROUP, CMD_ALTER_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_SET_PARENT)); } @@ -994,6 +996,35 @@ public: { if (this->vehicle_sel == vehicle) ResetObjectToPlace(); } + + /** + * Selects the specified group in the list + * + * @param g_id The ID of the group to be selected + */ + void SelectGroup(const GroupID g_id) + { + if (g_id == INVALID_GROUP || g_id == this->vli.index) return; + + this->vli.index = g_id; + if (g_id != ALL_GROUP && g_id != DEFAULT_GROUP) { + const Group *g = Group::Get(g_id); + int id_g = find_index(this->groups, g); + // The group's branch is maybe collapsed, so try to expand it + if (id_g == -1) { + for (auto pg = Group::GetIfValid(g->parent); pg != nullptr; pg = Group::GetIfValid(pg->parent)) { + pg->folded = false; + } + this->groups.ForceRebuild(); + this->BuildGroupList(this->owner); + id_g = find_index(this->groups, g); + } + this->group_sb->ScrollTowards(id_g); + } + this->vehicles.ForceRebuild(); + this->SetDirty(); + } + }; @@ -1015,18 +1046,31 @@ static WindowDesc _train_group_desc( * Show the group window for the given company and vehicle type. * @param company The company to show the window for. * @param vehicle_type The type of vehicle to show it for. + * @param group The group to be selected. Defaults to INVALID_GROUP. + * @param need_existing_window Whether the existing window is needed. Defaults to false. */ -void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type) +void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type, GroupID group = INVALID_GROUP, bool need_existing_window = false) { if (!Company::IsValidID(company)) return; - WindowNumber num = VehicleListIdentifier(VL_GROUP_LIST, vehicle_type, company).Pack(); + const WindowNumber num = VehicleListIdentifier(VL_GROUP_LIST, vehicle_type, company).Pack(); + VehicleGroupWindow *w; if (vehicle_type == VEH_TRAIN) { - AllocateWindowDescFront(&_train_group_desc, num); + w = AllocateWindowDescFront(&_train_group_desc, num, need_existing_window); } else { _other_group_desc.cls = GetWindowClassForVehicleType(vehicle_type); - AllocateWindowDescFront(&_other_group_desc, num); + w = AllocateWindowDescFront(&_other_group_desc, num, need_existing_window); } + if (w != nullptr) w->SelectGroup(group); +} + +/** + * Show the group window for the given vehicle. + * @param v The vehicle to show the window for. + */ +void ShowCompanyGroupForVehicle(const Vehicle *v) +{ + ShowCompanyGroup(v->owner, v->type, v->group_id, true); } /** diff --git a/src/group_gui.h b/src/group_gui.h index 108d611e75..d42704663e 100644 --- a/src/group_gui.h +++ b/src/group_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -15,7 +13,8 @@ #include "company_type.h" #include "vehicle_type.h" -void ShowCompanyGroup(CompanyID company, VehicleType veh); +void ShowCompanyGroup(CompanyID company, VehicleType veh, GroupID group = INVALID_GROUP, bool need_existing_window = false); +void ShowCompanyGroupForVehicle(const Vehicle *v); void DeleteGroupHighlightOfVehicle(const Vehicle *v); #endif /* GROUP_GUI_H */ diff --git a/src/group_type.h b/src/group_type.h index 530f31f1ea..d3a0487a61 100644 --- a/src/group_type.h +++ b/src/group_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/gui.h b/src/gui.h index 39f1ea661e..181472f555 100644 --- a/src/gui.h +++ b/src/gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/guitimer_func.h b/src/guitimer_func.h index 44ce042287..f37bd5dbbc 100644 --- a/src/guitimer_func.h +++ b/src/guitimer_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 4609dceeb9..fab93c9802 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/heightmap.h b/src/heightmap.h index 67349df483..9c3e71bbee 100644 --- a/src/heightmap.h +++ b/src/heightmap.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/highscore.cpp b/src/highscore.cpp index 687417229b..d8fe348fe0 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -89,13 +87,12 @@ static bool HighScoreSorter(const Company * const &a, const Company * const &b) */ int8 SaveHighScoreValueNetwork() { - const Company *c; const Company *cl[MAX_COMPANIES]; uint count = 0; int8 company = -1; /* Sort all active companies with the highest score first */ - FOR_ALL_COMPANIES(c) cl[count++] = c; + for (const Company *c : Company::Iterate()) cl[count++] = c; std::sort(std::begin(cl), std::begin(cl) + count, HighScoreSorter); diff --git a/src/highscore.h b/src/highscore.h index 5d4b919ee5..8993e83afa 100644 --- a/src/highscore.h +++ b/src/highscore.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index c353f6ebcc..68b823966f 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index 38ac4325de..11be10b302 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/hotkeys.h b/src/hotkeys.h index 00e8c0c3fd..59fec34570 100644 --- a/src/hotkeys.h +++ b/src/hotkeys.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/house.h b/src/house.h index c1cfe61041..7d3b8dc5e8 100644 --- a/src/house.h +++ b/src/house.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/house_type.h b/src/house_type.h index 9c9c41702c..c1623598b1 100644 --- a/src/house_type.h +++ b/src/house_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/industry.h b/src/industry.h index b03b696549..932104ff45 100644 --- a/src/industry.h +++ b/src/industry.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -169,9 +167,6 @@ void ReleaseDisastersTargetingIndustry(IndustryID); bool IsTileForestIndustry(TileIndex tile); -#define FOR_ALL_INDUSTRIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Industry, industry_index, var, start) -#define FOR_ALL_INDUSTRIES(var) FOR_ALL_INDUSTRIES_FROM(var, 0) - /** Data for managing the number of industries of a single industry type. */ struct IndustryTypeBuildData { uint32 probability; ///< Relative probability of building this industry. diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 4f11d1debc..c6602b0877 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -146,6 +144,8 @@ Industry::~Industry() * Also we must not decrement industry counts in that case. */ if (this->location.w == 0) return; + const bool has_neutral_station = this->neutral_station != nullptr; + TILE_AREA_LOOP(tile_cur, this->location) { if (IsTileType(tile_cur, MP_INDUSTRY)) { if (GetIndustryIndex(tile_cur) == this->index) { @@ -159,7 +159,7 @@ Industry::~Industry() } } - if (this->neutral_station != nullptr) { + if (has_neutral_station) { /* Remove possible docking tiles */ TILE_AREA_LOOP(tile_cur, this->location) { ClearDockingTilesCheckingNeighbours(tile_cur); @@ -1203,8 +1203,7 @@ void OnTick_Industry() if (_game_mode == GM_EDITOR) return; - Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { ProduceIndustryGoods(i); } } @@ -1391,8 +1390,7 @@ static CommandCost FindTownForIndustry(TileIndex tile, int type, Town **t) if (_settings_game.economy.multiple_industry_per_town) return CommandCost(); - const Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { if (i->type == (byte)type && i->town == *t) { *t = nullptr; return_cmd_error(STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN); @@ -1629,11 +1627,11 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags, static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int type) { const IndustrySpec *indspec = GetIndustrySpec(type); - const Industry *i = nullptr; /* On a large map with many industries, it may be faster to check an area. */ static const int dmax = 14; if (Industry::GetNumItems() > (size_t) (dmax * dmax * 2)) { + const Industry* i = nullptr; TileArea tile_area = TileArea(tile, 1, 1).Expand(dmax); TILE_AREA_LOOP(atile, tile_area) { if (GetTileType(atile) == MP_INDUSTRY) { @@ -1651,7 +1649,7 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t return CommandCost(); } - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { /* Within 14 tiles from another industry is considered close */ if (DistanceMax(tile, i->location.tile) > 14) continue; @@ -2504,9 +2502,8 @@ static int WhoCanServiceIndustry(Industry *ind) { if (ind->stations_near.size() == 0) return 0; // No stations found at all => nobody services - const Vehicle *v; int result = 0; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { /* Is it worthwhile to try this vehicle? */ if (v->owner != _local_company && result != 0) continue; @@ -2833,8 +2830,7 @@ void IndustryMonthlyLoop() _industry_builder.MonthlyLoop(); - Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { UpdateIndustryStatistics(i); if (i->prod_level == PRODLEVEL_CLOSURE) { delete i; diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index a9f3f51d2b..2461061ccd 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1205,8 +1203,7 @@ protected: if (this->industries.NeedRebuild()) { this->industries.clear(); - const Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { this->industries.push_back(i); } @@ -1317,25 +1314,41 @@ protected: static CargoSuffix cargo_suffix[lengthof(i->produced_cargo)]; GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_DIR, i, i->type, indsp, i->produced_cargo, cargo_suffix); - /* Industry productions */ + /* Get industry productions (CargoID, production, suffix, transported) */ + typedef std::tuple CargoInfo; + std::vector cargos; + for (byte j = 0; j < lengthof(i->produced_cargo); j++) { if (i->produced_cargo[j] == CT_INVALID) continue; - SetDParam(p++, i->produced_cargo[j]); - SetDParam(p++, i->last_month_production[j]); - SetDParamStr(p++, cargo_suffix[j].text); + cargos.emplace_back(i->produced_cargo[j], i->last_month_production[j], cargo_suffix[j].text, ToPercent8(i->last_month_pct_transported[j])); } - /* Transported productions */ - for (byte j = 0; j < lengthof(i->produced_cargo); j++) { - if (i->produced_cargo[j] == CT_INVALID) continue; - SetDParam(p++, ToPercent8(i->last_month_pct_transported[j])); + /* Sort by descending production, then descending transported */ + std::sort(cargos.begin(), cargos.end(), [](const CargoInfo a, const CargoInfo b) { + if (std::get<1>(a) != std::get<1>(b)) return std::get<1>(a) > std::get<1>(b); + return std::get<3>(a) > std::get<3>(b); + }); + + /* Display first 3 cargos */ + for (size_t j = 0; j < min(3, cargos.size()); j++) { + CargoInfo ci = cargos[j]; + SetDParam(p++, STR_INDUSTRY_DIRECTORY_ITEM_INFO); + SetDParam(p++, std::get<0>(ci)); + SetDParam(p++, std::get<1>(ci)); + SetDParamStr(p++, std::get<2>(ci)); + SetDParam(p++, std::get<3>(ci)); } + /* Undisplayed cargos if any */ + SetDParam(p++, cargos.size() - 3); + /* Drawing the right string */ - switch (p) { - case 1: return STR_INDUSTRY_DIRECTORY_ITEM_NOPROD; - case 5: return STR_INDUSTRY_DIRECTORY_ITEM; - default: return STR_INDUSTRY_DIRECTORY_ITEM_TWO; + switch (cargos.size()) { + case 0: return STR_INDUSTRY_DIRECTORY_ITEM_NOPROD; + case 1: return STR_INDUSTRY_DIRECTORY_ITEM_PROD1; + case 2: return STR_INDUSTRY_DIRECTORY_ITEM_PROD2; + case 3: return STR_INDUSTRY_DIRECTORY_ITEM_PROD3; + default: return STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE; } } diff --git a/src/industry_map.h b/src/industry_map.h index 9d2e3de211..1cdf90e59a 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/industry_type.h b/src/industry_type.h index 9a8a469017..cac99043e0 100644 --- a/src/industry_type.h +++ b/src/industry_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/industrytype.h b/src/industrytype.h index c17bf795e2..ec4f8f85df 100644 --- a/src/industrytype.h +++ b/src/industrytype.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ini.cpp b/src/ini.cpp index 05ddc0386e..a02d4c14da 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ini_load.cpp b/src/ini_load.cpp index 5980b459d3..dd72831308 100644 --- a/src/ini_load.cpp +++ b/src/ini_load.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ini_type.h b/src/ini_type.h index a2ff765020..679969efda 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp index 804ada8d75..1fea69ea5b 100644 --- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/landscape.cpp b/src/landscape.cpp index 0d5df5f874..e97d9cff03 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/landscape.h b/src/landscape.h index 1209c5c1a9..850ab482b4 100644 --- a/src/landscape.h +++ b/src/landscape.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/landscape_type.h b/src/landscape_type.h index 0742a32bbf..80b541bea4 100644 --- a/src/landscape_type.h +++ b/src/landscape_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/lang/afrikaans.txt b/src/lang/afrikaans.txt index 8340207dc3..bf30bdc8ad 100644 --- a/src/lang/afrikaans.txt +++ b/src/lang/afrikaans.txt @@ -11,8 +11,6 @@ ##gender male -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -859,6 +857,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nuwe {STRING} nou beskikbaar! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} aanvaar nie meer {STRING} nie STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} aanvaar nie meer {STRING} of {STRING} nie STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} aanvaar nou {STRING} @@ -3267,8 +3266,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Nywerhede STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Geen - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% vervoer) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% vervoer) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nywerheidsname - klik op 'n naam om skerm na nywerheid te skuif. Ctrl+klik maak 'n nuwe venster vir die nywerheid oop diff --git a/src/lang/arabic_egypt.txt b/src/lang/arabic_egypt.txt index cb558aa3a4..b49778ae1b 100644 --- a/src/lang/arabic_egypt.txt +++ b/src/lang/arabic_egypt.txt @@ -10,8 +10,6 @@ ##grflangid 0x14 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -827,6 +825,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}جديد {STRING} الآن متاح ! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} لم تعد تقبل {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION}لم تعد تقبل {STRING} او {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} الآن تقبل {STRING} @@ -2799,8 +2798,6 @@ STR_BUY_COMPANY_MESSAGE :{WHITE}نحن # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}صناعات STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}-بدون- -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW}({COMMA}% صدرت) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW}({COMMA}%/{COMMA}% صدرت) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}اسماء المصانع - اضغط على اسم المصنع لتوسيط الشاشة عليه. اضغط + كنترول لفتح شاشة عرض جديدة لمنطقة المصنع. diff --git a/src/lang/basque.txt b/src/lang/basque.txt index f6d5cbeb48..4f817e8052 100644 --- a/src/lang/basque.txt +++ b/src/lang/basque.txt @@ -10,8 +10,6 @@ ##grflangid 0x21 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -848,6 +846,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} berri bat orain erabilgarri! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ez du gehiago {STRING} onartzen STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ez du gehiago {STRING} edo {STRING} onartzen STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} orain {STRING} onartzen du @@ -3155,8 +3154,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Idustriak STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ezer ez - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} (%{COMMA} garraiatua) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} (%{COMMA}/%{COMMA} garraiatua) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industria izenak - Klikatu izenean ikuspegi nagusia industrian kokatzeko. Ktrl+Klik ikuspegi lehio berri bat irekitzen du industriaren kokapenarekin diff --git a/src/lang/belarusian.txt b/src/lang/belarusian.txt index 5a7011e3b2..8293e9f999 100644 --- a/src/lang/belarusian.txt +++ b/src/lang/belarusian.txt @@ -12,8 +12,6 @@ ##case m f n p nom gen dat acc abl pre -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1175,6 +1173,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}З'явіўся новы {STRING}! — {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} больш не прымае {STRING.acc} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} больш не прымае {STRING.acc} ды {STRING.acc} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} цяпер прымае {STRING.acc} @@ -3616,8 +3615,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Прамысловасьць STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Няма - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% перавезена) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% перавезена) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Сьпіс прадпрыемстваў: пстрычка па назьве паказвае прадпрыемства ў асноўным вакне. Ctrl+клік - у дадатковым вакне. diff --git a/src/lang/brazilian_portuguese.txt b/src/lang/brazilian_portuguese.txt index 5e688f006b..9ab5e03feb 100644 --- a/src/lang/brazilian_portuguese.txt +++ b/src/lang/brazilian_portuguese.txt @@ -11,8 +11,6 @@ ##gender m f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -865,6 +863,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G o a} {STRING} já está disponível! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} não aceita mais {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} não aceita mais {STRING} ou {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} agora aceita {STRING} @@ -3326,8 +3325,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Indústrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nenhum - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportado) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomes das indústrias - clique no nome para centralizar a visçao principal na indústria. Ctrl+Clique abre uma nova janela na localização da indústria diff --git a/src/lang/bulgarian.txt b/src/lang/bulgarian.txt index 974557ff9c..ed3ef49fee 100644 --- a/src/lang/bulgarian.txt +++ b/src/lang/bulgarian.txt @@ -12,8 +12,6 @@ ##case m f n p -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -856,6 +854,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Нов {STRING} е на разположение! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} вече не приема {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} вече не приема {STRING} или {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} вече приема {STRING} @@ -3232,8 +3231,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Индустрии STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Отсъства - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% превозено) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% превозено) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Имена на индустриите - натисни за да фокусираш върху индустрията. Ctrl+Click отваря нов прозорец на изглед върху индустрията. diff --git a/src/lang/catalan.txt b/src/lang/catalan.txt index 52fed2d757..fb3346e0ea 100644 --- a/src/lang/catalan.txt +++ b/src/lang/catalan.txt @@ -11,8 +11,6 @@ ##gender Masculin Femenin -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -868,6 +866,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}No{G u va} {STRING} disponible! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ja no accepta més {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ja no accepta més {STRING} ni {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} ara accepta {STRING} @@ -3365,8 +3364,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Indústries STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Cap - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportat) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportat) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nom de les indústries - clica al nom per centrar la vista en la indústria. Ctrl+Clic obre una nova vista al lloc de la indústria diff --git a/src/lang/croatian.txt b/src/lang/croatian.txt index 344702819c..3e099abba1 100644 --- a/src/lang/croatian.txt +++ b/src/lang/croatian.txt @@ -12,8 +12,6 @@ ##case nom gen dat aku vok lok ins -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -968,6 +966,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Novi {STRING} je sada dostupan! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} više ne prihvaća {STRING.aku} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} više ne prihvaća {STRING.aku} ili {STRING.aku} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} od sada prihvaća {STRING.aku} @@ -1652,6 +1651,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Uključi stabil STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Kada je uključeno, promjene u industrijskoj proizvodnji su češće ali u manjim rasponima. Ova postavka obično nema efekta ukoliko su industrije postavljene iz nekog NewGRF-a STR_CONFIG_SETTING_ALLOW_SHARES :Dopusti kupovanje udjela u drugim tvrtkama: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Kada je uključeno, dopušta se kupnja i prodaja dionica tvrtki. Dionice će postati dostupne samo za tvrtke određene starosti +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Najmanja starost tvrtke za trgovanje udjelima: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Odredite najmanju starost tvtke da bi drugi mogli kupovati i prodavati dionice. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Postotak dobiti za dionicu koji se plaća kod sustava feedera: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Postotak prihoda koji će biti predan srednjim dionicama prijevoza feeder sustavima, daje više kontrole nad prihodima STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Kod povlačenja, postavi signale svakih: {STRING} @@ -3218,6 +3219,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Preimenuj grad # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Lokalna samouprava grada {TOWN}a +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zona +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Pokaži područje sa granicama lokalne vlasti STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Ocjene prijevoznih tvrtki: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Dostupne radnje: @@ -3486,9 +3489,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrije STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ništa - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% prevezeno) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% prevezeno) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% prevezeno){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} i {NUM} više... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Imena industrija - za centriranje pogleda klikni na ime. Ctrl+klik otvara novi prozor sa lokacijom industrije # Industry view diff --git a/src/lang/czech.txt b/src/lang/czech.txt index 79973c8de2..b42c0a84aa 100644 --- a/src/lang/czech.txt +++ b/src/lang/czech.txt @@ -12,8 +12,6 @@ ##case nom gen dat acc voc loc ins big small -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -959,6 +957,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G ý á é í é é á} {STRING} k dispozici! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} už dále nepřijímá {STRING.acc} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} už dále nepřijímá {STRING.acc} ani {STRING.acc} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} nyní přijímá {STRING.acc} @@ -1642,7 +1641,9 @@ STR_CONFIG_SETTING_STARTING_YEAR :Počáteční d STR_CONFIG_SETTING_SMOOTH_ECONOMY :Plynulé změny ekonomiky (více menších změn): {STRING} STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Pokud je zapnuto, produkce průmyslu se mění častěji ale změny jsou menší. Toto nastavení většinou nemá vliv na průmysl, který je přidaný novou grafikou STR_CONFIG_SETTING_ALLOW_SHARES :Povolit kupování podílu z ostatních společností: {STRING} -STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Pokud je zapnuto, umožní kupovaní podílů ve společnostech. Podíly jsou k dispozici pouze u společností určitého stáří +STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Pokud je zapnuto, umožní kupovaní akcií ve společnostech. Akcie jsou k dispozici pouze u společností od určitého stáří +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Minimální stáří společnosti pro obchod s akciemi: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Určuje stáří společnosti, od kterého mohou ostatní společnosti kupovat a prodávat její akcie. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Podíl ze zisku při překládce: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Procentuální podíl příjmu, který je předán mezistanicím v překládacích systémech, předá větší kontrolu nad příjmem STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Při tažení umisťovat návěstidla každých: {STRING} @@ -3115,6 +3116,7 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Čtení konce p STR_NEWGRF_ERROR_GRM_FAILED :Požadované zdroje GRF nejsou dostupné (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} byla vypnuta {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Neplatný/neznámý sprite layout formát (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Příliš mnoho prvků v seznamu hodnot vlastností (sprite {3:NUM}, vlastnost {4:HEX}) # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Varování! @@ -3471,6 +3473,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Infrastr STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Železniční oblasti: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Semafory STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Silniční oblasti: +STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT :{GOLD}Tramvajové tratě: STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Vodní oblasti: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Průplavy STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Stanice: @@ -3481,8 +3484,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Průmysl STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nic - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% přepraveno) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% přepraveno) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Název průmyslu - pohled na něj zaměříš kliknutím na jeho jméno. Při stisknutém Ctrl otevřeš nový pohled diff --git a/src/lang/danish.txt b/src/lang/danish.txt index 090997d49f..4256899e4f 100644 --- a/src/lang/danish.txt +++ b/src/lang/danish.txt @@ -10,8 +10,6 @@ ##grflangid 0x2d -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -868,6 +866,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny {STRING} er nu tilgængelig! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} accepterer ikke længere {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} accepterer ikke længere {STRING} eller {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} accepterer nu {STRING} @@ -3369,8 +3368,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrier STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ingen - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transporteret) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transporteret) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrinavne - klik på navn for at centrere visningen over en industri. Ctrl+Klik åbner et nyt vindue ved industriens lokalitet. diff --git a/src/lang/dutch.txt b/src/lang/dutch.txt index 6ab4d95992..d42501a8ce 100644 --- a/src/lang/dutch.txt +++ b/src/lang/dutch.txt @@ -10,8 +10,6 @@ ##grflangid 0x1f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -872,6 +870,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nieuw {STRING} nu beschikbaar! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} accepteert geen {STRING} meer STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} accepteert geen {STRING} of {STRING} meer STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} accepteert voortaan {STRING} @@ -3394,15 +3393,18 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrielijst STR_INDUSTRY_DIRECTORY_NONE :{ORANGE} Geen -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% vervoerd) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% vervoerd) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% vervoerd){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} en {NUM} meer... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrienamen - klik op een naam om het scherm te centreren op de industrie. Ctrl+klik opent een nieuw venster op de locatie van de industrie. # Industry view STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY} STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Productie vorige maand: -STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% getransporteerd) +STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} ({COMMA}% vervoerd) STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centreer het scherm op de locatie van de industrie. Ctrl+klik opent een nieuws venster op de locatie van de industrie STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Productieniveau: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}De industrie heeft een dreigende sluiting aangekondigd! diff --git a/src/lang/english.txt b/src/lang/english.txt index bb3da82cc7..bc89cfee3d 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -10,8 +10,6 @@ ##grflangid 0x01 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -872,6 +870,8 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}New {STRING} now available! - {ENGINE} +STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Open the group window focused on the vehicle's group + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} no longer accepts {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} no longer accepts {STRING} or {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} now accepts {STRING} @@ -3394,9 +3394,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- None - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{RAW_STRING}){YELLOW} ({COMMA}% transported) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{RAW_STRING}/{CARGO_LONG}{RAW_STRING}){YELLOW} ({COMMA}%/{COMMA}% transported) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{RAW_STRING}{YELLOW} ({COMMA}% transported){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING4} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING4}, {STRING4}, {STRING4} and {NUM} more... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click opens a new viewport on industry location # Industry view diff --git a/src/lang/english_AU.txt b/src/lang/english_AU.txt index f20c10058f..9f7eea532d 100644 --- a/src/lang/english_AU.txt +++ b/src/lang/english_AU.txt @@ -10,8 +10,6 @@ ##grflangid 0x3d -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -849,6 +847,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}New {STRING} now available! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} no longer accepts {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} no longer accepts {STRING} or {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} now accepts {STRING} @@ -3233,8 +3232,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- None - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transported) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transported) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click opens a new viewport on industry location diff --git a/src/lang/english_US.txt b/src/lang/english_US.txt index 52c53b6b28..19e94d21c0 100644 --- a/src/lang/english_US.txt +++ b/src/lang/english_US.txt @@ -10,8 +10,6 @@ ##grflangid 0x00 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -872,6 +870,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}New {STRING} now available! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} no longer accepts {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} no longer accepts {STRING} or {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} now accepts {STRING} @@ -3390,8 +3389,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- None - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transported) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transported) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to center main view on industry. Ctrl+Click opens a new viewport on industry location diff --git a/src/lang/esperanto.txt b/src/lang/esperanto.txt index b7f657523c..9a415bb124 100644 --- a/src/lang/esperanto.txt +++ b/src/lang/esperanto.txt @@ -11,8 +11,6 @@ ##case n -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -846,6 +844,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nova {STRING} nun haveblas! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ne plu akceptas {STRING.n} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ne plu akceptas {STRING.n} aŭ {STRING.n} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} nun akceptas {STRING.n} @@ -2711,8 +2710,6 @@ STR_BUY_COMPANY_MESSAGE :{WHITE}Ni serĉ # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrioj STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Neniu - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportite) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportite) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrionomoj - klaku nomon por centri vidon ĉe la industrio. Ctrl+Klak por malfermi novan vidujon ĉe la loko diff --git a/src/lang/estonian.txt b/src/lang/estonian.txt index d08868d79f..4580752096 100644 --- a/src/lang/estonian.txt +++ b/src/lang/estonian.txt @@ -11,8 +11,6 @@ ##case g in sü -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -916,6 +914,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Uus {STRING} saadaval! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Jaam {STATION} ei võta enam vastu veost {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Jaam {STATION} ei võta enam vastu veoseid {STRING}, ega {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}Jaam {STATION} võtab nüüd vastu veost {STRING} @@ -3351,8 +3350,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Tööstused STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Puudub - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% veetud) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% veetud) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Tööstuste nimed - klõpsates keskendatakse vaade tööstusele. Ctrl+klõps avab uue vaate ettevõtte asukohast diff --git a/src/lang/faroese.txt b/src/lang/faroese.txt index 890f085fca..813b27eecf 100644 --- a/src/lang/faroese.txt +++ b/src/lang/faroese.txt @@ -11,8 +11,6 @@ ##gender m f n -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -830,6 +828,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nýtt {STRING} til sølu! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tekur ikki longur ímóti {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tekur ikki longur ímóti hvørki {STRING} ella {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} tekur nú ímóti {STRING} @@ -2900,8 +2899,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Ídnaðir STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Einki - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% flutt) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% flutt) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Ídnaðar nøvn - trýst á eitt navn fyri at savna høvuðs sýni á ídnað. Ctrl+trýst letur ein nýggjan sýnisglugga upp á ídnaðin diff --git a/src/lang/finnish.txt b/src/lang/finnish.txt index c53ad92781..aa3d8f9650 100644 --- a/src/lang/finnish.txt +++ b/src/lang/finnish.txt @@ -10,8 +10,6 @@ ##grflangid 0x35 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -872,6 +870,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Uusi {STRING} on nyt saatavilla! – {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ei ota enää vastaan {STRING}. STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ei ota enää vastaan {STRING} tai {STRING}. STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} ottaa nyt vastaan {STRING}. @@ -3394,9 +3393,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Teollisuusala STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ei mitään - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}% kuljetettu) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}% / {COMMA}{NBSP}% kuljetettu) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% kuljetettu){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} ja {NUM} muuta STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Teollisuusmuotojen nimet - kohdista päänäkymä teollisuuslaitokseen napsauttamalla nimeä. Ctrl+Klik avaa uuden näkymäikkunan teollisuuslaitoksen sijaintiin # Industry view diff --git a/src/lang/french.txt b/src/lang/french.txt index 442b94b17d..f7320f15f3 100644 --- a/src/lang/french.txt +++ b/src/lang/french.txt @@ -11,8 +11,6 @@ ##gender m m2 f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -873,6 +871,8 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nouv{G 0 eau el elle} {STRING} disponible{NBSP}! - {ENGINE} +STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP :{BLACK}Ouvrir la fenêtre de groupe de ce véhicule + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} n'accepte plus {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} n'accepte plus {STRING} ou {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} accepte désormais {STRING} @@ -1557,6 +1557,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Permettre une STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Lorsqu'il est activé, la production des industries change plus souvent, et plus faiblement. Ce paramètre est généralement sans effets si les types d'industries sont fournis par un NewGRF STR_CONFIG_SETTING_ALLOW_SHARES :Permettre d'acheter des actions d'autres compagnies{NBSP}: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Lorsqu'il est activé, l'achat et la vente des parts de compagnie sont autorisées. Les parts ne seront disponibles que pour les compagnies ayant atteint un certain âge +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Âge minimum de la compagnie pour la vente d'actions{NBSP}: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Définir l'âge minimum qu'une compagnie doit avoir pour que les autres puissent acheter ou vendre ses parts. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Pourcentage du profit de branche à payer dans les systèmes multimodaux{NBSP}: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Pourcentage du profit donné aux branches intermédiaires dans les systèmes multimodaux, donnant plus de contrôle sur les profits STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Espacement des signaux en mode glisser-déposer{NBSP}: {STRING} @@ -3393,9 +3395,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}− Aucune − -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}% transporté{P "" s}) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}%/{COMMA}{NBSP}% transporté{P "" s}) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% transporté{P "" s}){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} et {NUM} autre{P "" s}... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Noms des industries - Cliquer sur un nom pour centrer la vue principale sur l'industrie. Ctrl-clic pour ouvrir une nouvelle vue sur l'industrie. # Industry view diff --git a/src/lang/gaelic.txt b/src/lang/gaelic.txt index 056bbe387a..565b08748a 100644 --- a/src/lang/gaelic.txt +++ b/src/lang/gaelic.txt @@ -12,8 +12,6 @@ ##case nom gen dat voc -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1063,6 +1061,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Tha {STRING} ùr ri fhaighinn a-nis! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Cha ghabh {STATION} ri {STRING} tuilleadh STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Cha ghabh {STATION} ri {STRING} no {STRING} tuilleadh STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}Gabhaidh {STATION} ri {STRING} a-nis @@ -3545,8 +3544,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Gnìomhachasan STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Gun ghnìomhachas - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% air a ghiùlan) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% air a ghiùlan) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Ainmean nan gnìomhachasan - briog air an ainm gus am prìomh-shealladh a mheadhanachadh air a' ghnìomhachais. Fosglaidh Ctrl+briogadh port-seallaidh ùr air ionad a' ghnìomhachais diff --git a/src/lang/galician.txt b/src/lang/galician.txt index 65f6f4c7b1..0423a415ae 100644 --- a/src/lang/galician.txt +++ b/src/lang/galician.txt @@ -11,8 +11,6 @@ ##gender m f n -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -190,6 +188,8 @@ STR_COLOUR_ORANGE :Laranxa STR_COLOUR_BROWN :Marrón STR_COLOUR_GREY :Gris STR_COLOUR_WHITE :Branco +STR_COLOUR_RANDOM :Ao chou +STR_COLOUR_DEFAULT :Por defecto # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA} mph @@ -236,6 +236,8 @@ STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Seleccio STR_BUTTON_SORT_BY :{BLACK}Ordenar por STR_BUTTON_LOCATION :{BLACK}Situación STR_BUTTON_RENAME :{BLACK}Renomear +STR_BUTTON_CATCHMENT :{BLACK}Cobertura +STR_TOOLTIP_CATCHMENT :{BLACK}Alternar amosar área de cobertura STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Pechar xanela STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Título da xanela - arrástrao para move-la xanela @@ -264,6 +266,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}Habilita STR_BUTTON_DEFAULT :{BLACK}Por defecto STR_BUTTON_CANCEL :{BLACK}Cancelar STR_BUTTON_OK :{BLACK}OK +STR_WARNING_PASSWORD_SECURITY :{YELLOW}Ollo: Os administradores do servidor poderían ler calquer texto escrito aquí. # On screen keyboard window STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ . @@ -337,6 +340,7 @@ STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Achega-l STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Alonxa-la vista STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construír vía ferroviaria STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Construír estradas +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construír vías de tranvía STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construír portos STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construír aeroportos STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Abri-la ferramenta de terreo para subir/baixar terreo, plantar árbores, etc. @@ -357,6 +361,7 @@ STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Xeració STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Xeración de cidades STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Xeración de industrias STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Construción de estradas +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Construción de tranvía STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantar árbores. Shift alterna entre construir/amosar custo estimado STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Colocar rótulo STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Colocar obxecto. Shift alterna entre construir/amosar custo estimado @@ -465,6 +470,7 @@ STR_TOOLBAR_SOUND_MUSIC :Son/música ############ range for message menu starts STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Última mensaxe/nova STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Historial de mensaxes +STR_NEWS_MENU_DELETE_ALL_MESSAGES :Borrar tódalas mensaxes ############ range ends here ############ range for about menu starts @@ -476,6 +482,7 @@ STR_ABOUT_MENU_SCREENSHOT :Captura de pant STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Achegar área capturada STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Zoom de captura de pantalla por defecto STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de pantalla do mapa completo +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar frame rate STR_ABOUT_MENU_ABOUT_OPENTTD :Acerca de 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Aliñador de sprites STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Activa/desactiva caixas delimitadoras @@ -651,6 +658,7 @@ STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLA STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}-- STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM} STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------ +STR_MUSIC_TITLE_NOMUSIC :{TINY_FONT}{DKGREEN}Non hai música dispoñible STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{STRING}" STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Pista STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Título @@ -671,11 +679,14 @@ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Activar/ STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Amosar a fiestra de selección de pista musical # Playlist window +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Programa de música - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Índice de pistas STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programa - '{STRING}' STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Limpar +STR_PLAYLIST_CHANGE_SET :{BLACK}Mudar conxunto STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Limpa-lo programa actual (só Persoal 1 ou Persoal 2) +STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Cambia a música seleccionada por outra instalada STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Pincha nunha pista de música para engadila ao programa actual (só Persoal 1 ou Persoal 2) STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Pincha nunha pista de música para borrala do programa actual (só Persoal1 ou Persoal2) @@ -811,6 +822,7 @@ STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLAC STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Presidente) STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{STRING} promoveu a construción dunha nova cidade: {TOWN}! +STR_NEWS_NEW_TOWN_UNSPONSORED :{BLACK}{BIG_FONT}Unha nova vila chamada {TOWN} foi construída! STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}Nova {STRING} en construción cerca de {TOWN}! STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}Nova {STRING} asentada preto de {TOWN}! @@ -820,7 +832,7 @@ STR_NEWS_INDUSTRY_CLOSURE_SUPPLY_PROBLEMS :{BIG_FONT}{BLAC STR_NEWS_INDUSTRY_CLOSURE_LACK_OF_TREES :{BIG_FONT}{BLACK}A falta de árbores cercanos provoca que {STRING} anuncie o peche inminente! STR_NEWS_EURO_INTRODUCTION :{BIG_FONT}{BLACK}Unión Económica e Monetaria Europea!{}{}O Euro introdúcese como a única moeda para as transaccións diarias no teu país! -STR_NEWS_BEGIN_OF_RECESSION :{BLACK}{BIG_FONT}Recesión mundial!{}{}Os expertos financeiros temen o peor a medida que a economía afúndese! +STR_NEWS_BEGIN_OF_RECESSION :{BLACK}{BIG_FONT}Recesión mundial!{}{}Os expertos financieiros temen o peor a medida que a economía se afunde! STR_NEWS_END_OF_RECESSION :{BLACK}{BIG_FONT}Fin da recesión!{}{}A mellora no comercio inspira confianza nas industrias a media que a economía se reforza! STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL :{BIG_FONT}{BLACK}{INDUSTRY} incrementa a súa producción! @@ -859,6 +871,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nova {STRING} dispoñíbel! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} xa non acepta máis {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} xa non acepta máis {STRING} nin {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} agora acepta {STRING} @@ -878,10 +891,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Vista {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copiar á vista +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Cambiar xanela STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copia-la sitaución da vista principal a esta vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Pegar dende vista -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Pega-la a situación desta vista na vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Cambia a vista principal +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Copia a localización desta xanela na vista principal # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opcións da partida @@ -923,6 +936,11 @@ STR_GAME_OPTIONS_CURRENCY_ZAR :Rand sudafrican STR_GAME_OPTIONS_CURRENCY_CUSTOM :Persoal... STR_GAME_OPTIONS_CURRENCY_GEL :Lari xeorxiano (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Real iraniano (IRR) +STR_GAME_OPTIONS_CURRENCY_RUB :Novo rublo ruso (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso mexicano (MXN) +STR_GAME_OPTIONS_CURRENCY_NTD :Novo dólar taiwanés (NTD) +STR_GAME_OPTIONS_CURRENCY_CNY :Renminbi chinés (CNY) +STR_GAME_OPTIONS_CURRENCY_HKD :Dólar de Hong Kong (HKD) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Vehículos de estrada @@ -985,7 +1003,12 @@ STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_NORMAL :Normal STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_2X_ZOOM :Dobre tamaño STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_4X_ZOOM :Tamaño do cadro +STR_GAME_OPTIONS_FONT_ZOOM :{BLACK}Tamaño da letra +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_TOOLTIP :{BLACK}Escoller o tamaño de fonte da interfaz +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_NORMAL :Normal +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Tamaño doble +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :Tamaño do cadro STR_GAME_OPTIONS_BASE_GRF :{BLACK}Conxunto básico de gráficos STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Selecciona o conxunto de gráficos básico a empregar @@ -1144,7 +1167,7 @@ STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Cantidade máxi STR_CONFIG_SETTING_INTEREST_RATE :Taxa de interés: {STRING} STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :A taxa de interés do préstamo; controla tamén a inflación, se está activada STR_CONFIG_SETTING_RUNNING_COSTS :Custos de explotación: {STRING} -STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Fixa o nivel de mantemento e custo de operación de vehículos e infraestrutura +STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Establece o nivel de mantemento e custo de operación de vehículos e infraestrutura STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Velocidade de construción: {STRING} STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Limita a cantidade de accións construtivas das IAs STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :Avarías en vehículos: {STRING} @@ -1169,6 +1192,8 @@ STR_CONFIG_SETTING_AUTOSLOPE :Permitir modifi STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Permite modificar o terreo baixo edificacións e vías sen retiralos STR_CONFIG_SETTING_CATCHMENT :Permitir áreas de captación máis realistas: {STRING} STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Áreas de influencia e captación de diferentes tamaños para os diferentes tipos de estacións e aeroportos +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :As estacións da compañía poden atender a industrias con estacións neutrais incorporadas: {STRING} +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :Cando se activa, as industrias con estacións incorporadas (coma plataformas petrolíferas) poden ser atendidas por estacións cercanas propiedade da compañía. Cando se desactiva, estas industrias só poden ser atendidas polas estacións incorporadas. Calquera estación cercana dunha compañía non poderá atendelas, e a estación incorporada non poderá servir a nada máis que á industria STR_CONFIG_SETTING_EXTRADYNAMITE :Permiti-la eliminación de máis estradas, pontes e túneis de titularidade municipal: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Facilita a destrución de infraestrutura e edificacións de titularidade municipal STR_CONFIG_SETTING_TRAIN_LENGTH :Lonxitude máxima dos trens: {STRING} @@ -1185,8 +1210,8 @@ STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Inclinación du STR_CONFIG_SETTING_PERCENTAGE :{COMMA}% STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Inclinación das pendentes para os vehículos de carretera: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Inclinación dun cadro en pendente para un vehículo de carretera. Valores máis elevados dificultan ascender unha colina -STR_CONFIG_SETTING_FORBID_90_DEG :Prohibir xiros de 90° a trens e barcos: {STRING} -STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Os xiros de 90 graos ocorren cando unha vía horizontal vai seguida directamente dun tramo vertical no cadro adxancete, facendo que o tren vire 90 graos cando pasa o límite do cadro en vez dos 45 graos habituais noutras combinacións de vías. Esto tamén se aplica ao radio de xiro dos barcos +STR_CONFIG_SETTING_FORBID_90_DEG :Prohibir xiros de 90° a trens: {STRING} +STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :Os xiros de 90 graos ocorren cando unha vía horizontal vai seguida directamente dun tramo vertical no cadro adxancete, facendo que o tren vire 90 graos cando pasa o límite do cadro en vez dos 45 graos habituais noutras combinacións de vías. STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Permitir a unión de estacións non adxacentes {STRING} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Permite engadir partes a unha estación sen que estén en contacto directo coas partes existente. Necesita facer Ctrl+Click ao colocar as partes novas STR_CONFIG_SETTING_INFLATION :Inflación: {STRING} @@ -1242,8 +1267,8 @@ STR_CONFIG_SETTING_PLANE_SPEED :Factor de veloc STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Fixa a velocidade relativa dos avións comparada coa dos outros tipos de vehículos, para reduci-los ingresos do transporte aéreo STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA} STR_CONFIG_SETTING_PLANE_CRASHES :Número de accidentes de avión: {STRING} -STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Fixa a posibilidade de que ocorra un accidente aéreo -STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Ningún +STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Establece a probabilidade de que ocorra un accidente aéreo.{}* Os avións de gran tamaño sempre teñen risco de accidente ao aterrar en aeroportos pequenos +STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Ningún* STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Reducido STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normal STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Permiti-la construción de estacións pasantes nas rúas de titularidade municipal: {STRING} @@ -1254,6 +1279,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Non é p STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Mantemento de infraestrutura: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Cando se activa, a infraestrutura provoca custos de mantemento. O custo aumenta sobre-proporcionadamente co tamaño da rede, e afecta máis ás compañías máis grandes cás pequenas +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Cor inicial da compañía: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Escolle a cor inicial da túa compañía STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Os aeroportos nunca caducan: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activar esta opción fai que cada tipo de aeroporto siga estando dispoñíbel para sempre dende a súa aparición @@ -1300,7 +1327,7 @@ STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(TerraGenesis s STR_CONFIG_SETTING_INDUSTRY_DENSITY :Densidade industrial: {STRING} STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Establece cantas industrias deben xerarse e que nivel se debe manter durante o xogo STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Distancia máxima das refinarías ao borde do mundo: {STRING} -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :As refinarías de petróleo só se constrúen preto do borde do mapa, isto é na costa para mapas de illas +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Limita a qué distancia dos bordes do mundo as refinerías e pozos petrolíferos poden construirse. En mapas con illas asegura que estean situadas preto da costa. En mapas maiores de 256 unidades, o valor escálase acorde ao tamaño do mapa. STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Cota de neve: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Controla a que altitude comeza a nevar en paisaxes subárticas. A neve afecta tamén á xeración industrial e aos requirimentos de crecemento dos pobos STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Desigualdade do terreo (só TerraGenesis) : {STRING} @@ -1338,8 +1365,14 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Cor do terreo n STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Verde STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Verde escuro STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violeta +STR_CONFIG_SETTING_SCROLLMODE :Comportamento do desprazamento das xanelas: {STRING} +STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Comportamento cando te desplazas polo mapa +STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Mover xanela co botón dereito do rato, posición do cursor bloqueada +STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Mover mapa co botón dereito do rato, posición do cursor bloqueada +STR_CONFIG_SETTING_SCROLLMODE_RMB :Mover mapa co botón dereito do rato +STR_CONFIG_SETTING_SCROLLMODE_LMB :Move-lo mapa co botón esquerdo do rato STR_CONFIG_SETTING_SMOOTH_SCROLLING :Desprazamento de vista suave: {STRING} -STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a vista principal se despraza a unah posición específica cando se fai clic no minimapa ou cando se emprega un comando para desprazarse a un obxecto específico sobre o mapa. Se se activa, a vista desprázase suavemente, se se desactiva salta directamente +STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Controla como a vista principal se despraza a unha posición específica cando se fai clic no minimapa ou cando se emprega un comando para desprazarse a un obxecto específico sobre o mapa. Se se activa, a vista desprázase suavemente, se se desactiva salta directamente STR_CONFIG_SETTING_MEASURE_TOOLTIP :Mostrar medidas ao usar as ferramentas de construción: {STRING} STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Amosa as distancias en cadros e as diferencias de cota ao arrastrar durante as operacións de construción STR_CONFIG_SETTING_LIVERIES :Mostrar esquemas de cor das compañías: {STRING} @@ -1458,6 +1491,9 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Permitir IA en STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Permitir aos xogadores controlados pola computadora participar en partidas multixogador STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes antes de que os scripts sexan suspendidos: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Número máximo de operacións de computación que un scrpit pode realizar nun turno +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY :Uso máximo de memoria por script: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Canta memoria pode consumir un só script antes de terminalo forzosamente. Pode que se necesite incrementar en mapas grandes +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE :{COMMA} MiB STR_CONFIG_SETTING_SERVINT_ISPERCENT :Intervalos de servizo en porcentaxes: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Permite escoller se o mantemento de vehículos comezará debido ao tempo transcurrido dende o último mantemento ou por unha redución da fiabilidade cando se sobrepase unha porcentaxe determinado @@ -1520,6 +1556,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Habilita-la eco STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Cando se activa, as producións industriais cambian máis frecuentemente, e a pasos máis curtos STR_CONFIG_SETTING_ALLOW_SHARES :Permiti-la compra de accións de outras compañías: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Cando se activa, permite comprar ou vender accións da compañía. As accións só estarán dispoñíbeis para compañías que acaden certa idade +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Idade mínima da compañía para compraventa de accións: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Establece a idade mínima dunha compañía para que outros poidan comprar e vender accións dela. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Porcentaxe do beneficio parcial a pagar en sistemas transitivos: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Porcentaxe dos beneficios asignados ás partes intermedias da ruta en sistemas transitivos, dando un maior control sobre os ingresos STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Colocar sinais cada {STRING} ao arrastrar @@ -1560,6 +1598,10 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_HELPTEXT :Activando esta STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :Prohibido STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Permitido STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Permitido, patrón de estradas personalizado +STR_CONFIG_SETTING_TOWN_CARGOGENMODE :Xeración de mercadorías da vila: {STRING} +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT :Cantidade de mercadorías producidas nas casas da vila, segundo a poboación total da mesma.{}Crecemento cadrático: Unha vila o dobre de grande produce catro veces máis pasaxeiros.{}Linear growth: Unha vila o dobre de grande produce dúas veces máis pasaxeiros. +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :Cadrático (orixinal) +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :Lineal STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :Colocación de árbores durante a partida: {STRING} STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Controla a aparición aleatoria de árbores durante a partida. Isto pode afectar ás industrias que dependan do crecemento arbóreo, por exemplo o serradoiro @@ -1801,6 +1843,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Cambiar STR_CHEAT_SETUP_PROD :{LTBLUE}Permitir a modificación dos valores de producción: {ORANGE}{STRING} # Livery window +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Novo esquema de cor STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Mostra-los esquemas de cor xerais STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Mostra-los esquemas de cor dos trens @@ -2060,6 +2103,7 @@ STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Desconec STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}O servidor está protexido. Introduce o contrasinal STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}A compañía está protexida. Introduce o contrasinal +STR_NETWORK_COMPANY_LIST_CLIENT_LIST_CAPTION :{WHITE}Lista de clientes # Network company list added strings STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Lista de clientes @@ -2108,7 +2152,7 @@ STR_NETWORK_CHAT_ALL :[Todos] {STRING STR_NETWORK_CHAT_OSKTITLE :{BLACK}Escribe o texto para a parola en rede # Network messages -STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Non se atoparon dispositivos de rede ou compilouse sen ENABLE_NETWORK +STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Non se atoparon dispositivos de rede STR_NETWORK_ERROR_NOSERVER :{WHITE}Non se atoparon xogos en rede STR_NETWORK_ERROR_NOCONNECTION :{WHITE}O servidor non respondeu á solicitude STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Non se pode conectar debido a un problema cos NewGRF @@ -2275,6 +2319,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Lenda de STR_LINKGRAPH_LEGEND_ALL :{BLACK}Todos STR_LINKGRAPH_LEGEND_NONE :{BLACK}Ningún STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Selecciona as compañías para mostrar +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}en desuso @@ -2359,9 +2404,9 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sinal co STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sinal de ruta (eléctrico){}Un sinal de ruta permite entrar a máis dun tren nun cantón ao mesmo tempo, se o tren pode atopar unha ruta a un punto de parada seguro. Os sinais de ruta estándar poden rebasarse en sentido contrario. STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Sinal de ruta de sentido único (eléctrico){}Un sinal de ruta permite entrar a máis dun tren nun cantón ao mesmo tempo, se o tren pode atopar unha ruta a un punto de parada seguro. Os de un sentido non se poden atravesar en sentido contrario. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Convertir sinal{}Cando está seleccionado, convertirá o sinal no que se pinche ao tipo e variante seleccionados, Ctrl+click cambiará a variante existente. Shift+click amosa o custo estimado de conversión -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Densidade de sinais ao arrastrar -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Diminuír a densidade de sinais ao arrastrar -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar a densidade de sinais ao arrastrar +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distancia de sinais ao arrastrar +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Diminuír a distancia de sinais ao arrastrar +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Aumentar a distancia de sinais ao arrastrar # Bridge selection window STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Selecciona ponte ferroviaria @@ -2399,7 +2444,11 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Constru STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Construír túnel de tranvía. Shift alterna entre construír/mostrar estimación de custo STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Intecambiar construír/eliminar para a construción de estradas STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Cambia entre construír/quitar para a construción de tranvías +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Convertir/Actualizar o tipo de estrada. Shift alterna entre construír/amosar custo estimado +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convertir/Actualizar o tipo de tranvía. Shift conmuta entre construcción e mostrar unha estimación do coste +STR_ROAD_NAME_ROAD :Estrada +STR_ROAD_NAME_TRAM :Tranvía # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Orientación do depósito de estrada @@ -2584,8 +2633,11 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Carga aceptada: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Tipo de vía: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_ROAD_TYPE :{BLACK}Tipo de estrada: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}Tipo de tranvía: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Límite de velocidade da vía: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Límite de velocidade da estrada: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Límite de velocidade do tranvía: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Cons @@ -2685,9 +2737,62 @@ STR_ABOUT_VERSION :{BLACK}OpenTTD STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT}2002-2019 O equipo de OpenTTD # Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}Frame rate +STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Velocidade de simulación: {STRING} +STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Número de ticks do xogo simulados por segundo. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Velocidade de refresco: {STRING} +STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Número de frames renderizados por segundo. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Factor de velocidade do xogo actual: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Como de rápido está a correr o xogo, comparado coa velocidade esperada a unha velocidade de simulación normal. +STR_FRAMERATE_CURRENT :{WHITE}Actual +STR_FRAMERATE_AVERAGE :{WHITE}Media +STR_FRAMERATE_MEMORYUSE :{WHITE}Memoria +STR_FRAMERATE_DATA_POINTS :{BLACK}Datos baseados en {COMMA} medicións +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} frames por segundo +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} frames por segundo +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} frames por segundo +STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} +STR_FRAMERATE_BYTES_WARN :{YELLOW}{BYTES} +STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} +STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms +STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Total de loop do xogo: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Manexo de mercadorías: +STR_FRAMERATE_GL_TRAINS :{BLACK} Marcas de vehículos ferroviarios: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Marcas de vehículos de estrada: +STR_FRAMERATE_GL_SHIPS :{BLACK} Marcas de barcos: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Marcas na aeronave: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Marcas no mundo: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Retardo do gráfico de ligazóns +STR_FRAMERATE_DRAWING :{BLACK}Renderizado de gráficos: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Xanelas globais: +STR_FRAMERATE_VIDEO :{BLACK}Saída de vídeo: +STR_FRAMERATE_SOUND :{BLACK}Mestura de sons: +STR_FRAMERATE_ALLSCRIPTS :{BLACK} Total GS/AI: +STR_FRAMERATE_GAMESCRIPT :{BLACK} Script do xogo: +STR_FRAMERATE_AI :{BLACK} AI {NUM} {STRING} ############ End of leave-in-this-order ############ Leave those lines in this order!! +STR_FRAMETIME_CAPTION_GAMELOOP :Bucle do xogo +STR_FRAMETIME_CAPTION_GL_ECONOMY :Manexo de mercadorías +STR_FRAMETIME_CAPTION_GL_TRAINS :Marcas de vehículos ferroviarios +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Marcas de vehículos de estrada +STR_FRAMETIME_CAPTION_GL_SHIPS :Marcas de barcos +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Marcas de avións +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Marcas do mundo +STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Acoplar retardo gráfico +STR_FRAMETIME_CAPTION_DRAWING :Renderizado dos gráficos +STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderizado da xanela do mundo +STR_FRAMETIME_CAPTION_VIDEO :Saída de gráficos +STR_FRAMETIME_CAPTION_SOUND :Mestura de son +STR_FRAMETIME_CAPTION_ALLSCRIPTS :Scripts GS/AI totais +STR_FRAMETIME_CAPTION_GAMESCRIPT :Script do xogo +STR_FRAMETIME_CAPTION_AI :AI {NUM} {STRING} ############ End of leave-in-this-order @@ -2713,6 +2818,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalles STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Non hai información dispoñíbel STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}String de filtrado: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Sobrescribir arquivo +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Estás seguro de que queres rescribir este arquivo? STR_SAVELOAD_OSKTITLE :{BLACK}Escribe un nome para a partida @@ -2830,7 +2938,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Versión STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Mínima versión compatíbel: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}Suma MD5: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Por defecto (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Por defecto (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Legado (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Legado (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parámetros: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Ningún STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Non hai información dispoñíbel STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Arquivo correspondente non atopado @@ -2911,6 +3024,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Lectura máis a STR_NEWGRF_ERROR_GRM_FAILED :Os recursos GRF solicitados non están disponíbeis (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} foi desactivado por {2:STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Formato de colocación de sprites inválido ou descoñecido (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Demasiados elementos na lista de valor de propiedades (sprite {3:NUM}, propiedade {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Tipo de produción inválida (sprite {3:NUM}, "{2:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Coidado! @@ -2942,6 +3057,7 @@ STR_NEWGRF_BUGGY :{WHITE}O NewGRF STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Información de carga/reforma para '{1:ENGINE}' difiire da lista de compra despois da construción. Isto pode causar que a renovación/reemprazo automáticos non reformen correctamente STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' produciu un bucle sen fin na chamada de retorno de produción STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}A chamada {1:HEX} devolveu o resultado inválido ou descoñecido {2:HEX} +STR_NEWGRF_BUGGY_INVALID_CARGO_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' tipo de produción inválido {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs STR_NEWGRF_INVALID_CARGO : @@ -2975,6 +3091,7 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Escribe STR_TOWN_DIRECTORY_CAPTION :{WHITE}Cidades STR_TOWN_DIRECTORY_NONE :{ORANGE}- Ningunha - STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA}) +STR_TOWN_DIRECTORY_CITY :{ORANGE}{TOWN}{YELLOW} (Vila){BLACK} ({COMMA}) STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Nomes de cidades - pincha no nome para centrar a vista na cidade. CTRL+Click abre unha nova fiestra na localización da cidade STR_TOWN_POPULATION :{BLACK}Poboación mundial: {COMMA} @@ -2982,6 +3099,7 @@ STR_TOWN_POPULATION :{BLACK}Poboaci STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN} STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (Cidade) STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Poboación: {ORANGE}{COMMA}{BLACK} Casas: {ORANGE}{COMMA} +STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX :{BLACK}{CARGO_LIST} último mes: {ORANGE}{COMMA}{BLACK} máximo: {ORANGE}{COMMA} STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Carga necesaria para o crecemento da cidade: STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} necesario STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} necesarios en inverno @@ -3006,6 +3124,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Renomear cidade # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Autoridade local de {TOWN} +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zona +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Amosar a zona dentro dos límites do concello STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Puntuacións das compañías de transporte: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Accións dispoñíbeis: @@ -3017,7 +3137,7 @@ STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN :Pequena campañ STR_LOCAL_AUTHORITY_ACTION_MEDIUM_ADVERTISING_CAMPAIGN :Campaña publicitaria mediana STR_LOCAL_AUTHORITY_ACTION_LARGE_ADVERTISING_CAMPAIGN :Gran campaña publicitaria STR_LOCAL_AUTHORITY_ACTION_ROAD_RECONSTRUCTION :Financia-la reparación das fochancas nas rúas da cidade -STR_LOCAL_AUTHORITY_ACTION_STATUE_OF_COMPANY :Construír unha estatua do propietario da compañía +STR_LOCAL_AUTHORITY_ACTION_STATUE_OF_COMPANY :Construír unha estatua a Manuel Fraga STR_LOCAL_AUTHORITY_ACTION_NEW_BUILDINGS :Financiar novos edificios STR_LOCAL_AUTHORITY_ACTION_EXCLUSIVE_TRANSPORT :Compra-los dereitos exclusivos de transporte STR_LOCAL_AUTHORITY_ACTION_BRIBE :Suborna-la autoridade local @@ -3034,6 +3154,7 @@ STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE :{YELLOW}Suborna # Goal window STR_GOALS_CAPTION :{WHITE}{COMPANY} Obxectivos STR_GOALS_SPECTATOR_CAPTION :{WHITE}Obxectivos globais +STR_GOALS_SPECTATOR :Obxectivos globais STR_GOALS_GLOBAL_TITLE :{BLACK}Obxectivos globais: STR_GOALS_TEXT :{ORANGE}{STRING} STR_GOALS_NONE :{ORANGE}- Ningún - @@ -3082,6 +3203,7 @@ STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Pincha n # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Historial STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Historial global +STR_STORY_BOOK_SPECTATOR :Álbum global STR_STORY_BOOK_TITLE :{YELLOW}{STRING} STR_STORY_BOOK_GENERIC_PAGE_ITEM :Páxina {NUM} STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Vai a unha páxina específica seleccionandoa nesta lista despregable. @@ -3261,6 +3383,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Infraest STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Segmentos de vía de ferrocarril: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Sinais STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Segmentos de estrada: +STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT :{GOLD}Partes de tranvía: STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Cadros de auga: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Canles STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Estacións: @@ -3271,9 +3394,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ningunha - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportado) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% transportado){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} e {NUM} máis... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomes das industrias - pincha nun nome para centrar a vista nela. Ctrl+Click abre una nova fiestra na situación da industria # Industry view @@ -3284,6 +3410,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centrar STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Nivel de produción: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}A industria anunció un peche inminente +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Require: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Produce: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Require: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} @@ -3337,11 +3466,13 @@ STR_GROUP_DEFAULT_ROAD_VEHICLES :Vehículos de e STR_GROUP_DEFAULT_SHIPS :Barcos sen agrupar STR_GROUP_DEFAULT_AIRCRAFTS :Avións sen agrupar +STR_GROUP_COUNT_WITH_SUBGROUP :{TINY_FONT}{COMMA} (+{COMMA}) STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupos - Pincha nun grupo para ver unha lista de tódolos vehículos dese grupo STR_GROUP_CREATE_TOOLTIP :{BLACK}Pincha para crear un grupo STR_GROUP_DELETE_TOOLTIP :{BLACK}Borrar o grupo seleccionado STR_GROUP_RENAME_TOOLTIP :{BLACK}Renomear o grupo seleccionado +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Mudar o deseño do grupo seleccionado STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Pincha para protexer a este grupo da autosubstitución global STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Borrar Grupo @@ -3364,14 +3495,17 @@ STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Novos vehículo STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Novos vehículos de levitación magnética (Maglev) STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Novos vehículos de estrada +STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION :Novo material rodante para tranvías ############ range for vehicle availability starts STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Novos vehículos ferroviarios +STR_BUY_VEHICLE_ROAD_VEHICLE_ALL_CAPTION :Novos vehículos de estrada STR_BUY_VEHICLE_SHIP_CAPTION :Novos barcos STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Novas aeronaves ############ range for vehicle availability ends STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} Peso: {GOLD}{WEIGHT_SHORT} +STR_PURCHASE_INFO_COST_REFIT_WEIGHT :BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} (Custo de redeseño: {GOLD}{CURRENCY_LONG}{BLACK}) Masa: {GOLD}{WEIGHT_SHORT} STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Velocidade: {GOLD}{VELOCITY}{BLACK} Potencia: {GOLD}{POWER} STR_PURCHASE_INFO_SPEED :{BLACK}Velocidade: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Velocidade no océano: {GOLD}{VELOCITY} @@ -3382,12 +3516,15 @@ STR_PURCHASE_INFO_REFITTABLE :(reformábel) STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Deseñado: {GOLD}{NUM}{BLACK} Vida útil: {GOLD}{COMMA} ano{P "" s} STR_PURCHASE_INFO_RELIABILITY :{BLACK}Fiabilidade máxima: {GOLD}{COMMA}% STR_PURCHASE_INFO_COST :{BLACK}Custo: {GOLD}{CURRENCY_LONG} +STR_PURCHASE_INFO_COST_REFIT :{BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} (Custo da reforma: {GOLD}{CURRENCY_LONG}{BLACK}) STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}Peso: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT}) STR_PURCHASE_INFO_COST_SPEED :{BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} Velocidade: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_COST_REFIT_SPEED :{BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} (Custo de reparación: {GOLD}{CURRENCY_LONG}{BLACK}) Velocidade: {GOLD}{VELOCITY} STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacidade: {GOLD}{CARGO_LONG}, {CARGO_LONG} STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Vagóns tractores: {GOLD}+{POWER}{BLACK} Peso: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Reformábel a: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Tódolos tipos de carga +STR_PURCHASE_INFO_NONE :Ningún STR_PURCHASE_INFO_ALL_BUT :Todos excepto {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Esforzo máximo de tracción: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Autonomía: {GOLD}{COMMA} cadros @@ -3403,12 +3540,20 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Mercar v STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Mercar barco STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Mercar aeronave +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mercar e modificar vehículo +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mercar e modificar vehículo +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mercar e redeseñar barco +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mercar e redeseñar aeronave -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar o vehículo ferroviario seleccionado. Shift+click mostra o custo estimado sen mercar -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar o vehículo de estrada seleccionado. Shift+click mostra o custo estimado sen mercar +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar o vehículo ferroviario seleccionado. Shift+click mostra o custo estimado sen realizar a compra +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar o vehículo de estrada seleccionado. Shift+click mostra o custo estimado sen realizar a compra STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar o barco seleccionado. Shift+click mostra o custo estimado sen mercar STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Mercar a aeronave seleccionada. Shift+click mostra o custo estimado sen mercar +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mercar e modificar o vehículo ferroviario seleccionado. Shift+click mostra o custo estimado sen realizar a compra +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mercar e modificar o vehículo de estrada seleccionado. Shift+click mostra o custo estimado sen realizar a compra +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Merca e remodela o barco seleccionado. Shift+Click amosa o custo estimado sen mercar +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Merca e remodela a aeronave resaltada. Shift+Click amosa o custo estimado sen mercar STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Renomear STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Renomear @@ -3520,10 +3665,12 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Mensaxe STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Acabamos de deseñar un novo {STRING} - Interésache probar este vehículo en exclusiva durante un ano, para ve-lo seu rendemento antes de facelo universalmente dispoñíbel? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :locomotora de ferrocarril +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :Locomotora eléctrica STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :locomotora de monorraíl STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :locomotora de maglev STR_ENGINE_PREVIEW_ROAD_VEHICLE :vehículo de estrada +STR_ENGINE_PREVIEW_TRAM_VEHICLE :Vehículo de tranvía STR_ENGINE_PREVIEW_AIRCRAFT :avión STR_ENGINE_PREVIEW_SHIP :barco @@ -3565,14 +3712,18 @@ STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Cambia e STR_REPLACE_ENGINES :Locomotoras STR_REPLACE_WAGONS :Vagóns STR_REPLACE_ALL_RAILTYPE :Todos os vehículos sobre raíl +STR_REPLACE_ALL_ROADTYPE :Tódolos vehículos de estrada STR_REPLACE_HELP_RAILTYPE :{BLACK}Selecciona o tipo de carril para o que queres substituír as locomotoras +STR_REPLACE_HELP_ROADTYPE :{BLACK}Escolle o tipo de estrada para o que queres remplazar os motores STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Mostra que máquina seleccionada á esquerda vai ser substituída, se é algunha. STR_REPLACE_RAIL_VEHICLES :Vehículos ferroviarios STR_REPLACE_ELRAIL_VEHICLES :Vehículos de ferrocarril eléctrico STR_REPLACE_MONORAIL_VEHICLES :Vehículos de monorraíl STR_REPLACE_MAGLEV_VEHICLES :Vehículos maglev +STR_REPLACE_ROAD_VEHICLES :Vehículos de estrada +STR_REPLACE_TRAM_VEHICLES :Tranvías STR_REPLACE_REMOVE_WAGON :{BLACK}Eliminar os vagóns: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Facer que a autosubstitución manteña a lonxitude do tren quitando vagóns (empezando pola cabeza), se ao substituír a locomotora o tren se fixera máis longo. @@ -3793,6 +3944,7 @@ STR_ORDER_CONDITIONAL_AGE :Idade (anos) STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Require servizo STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Sempre STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Vida útil restante (anos) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Máxima fiabilidade STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Como comparar os datos do vehículo co valor proporcionado STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :é igual a @@ -4295,6 +4447,7 @@ STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Non hay STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Debes elimina-la vía de ferrocarril primeiro STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}A estrada é de sentido único ou está bloqueada STR_ERROR_CROSSING_DISALLOWED_RAIL :{WHITE}Non se permiten pasos a nivel con este tipo de carril +STR_ERROR_CROSSING_DISALLOWED_ROAD :{WHITE}Pasos a nivel non permitidos para este tipo de estrada STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Non se poden construír sinais aquí... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Non se pode construír vía ferroviaria aquí... STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Non se pode elimina-la vía ferroviaria de aquí... @@ -4314,6 +4467,12 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Non se p STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Non se pode retira-lo tranvía de aquí... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... non hai ningunha estrada STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... non hai ningún tranvía +STR_ERROR_CAN_T_CONVERT_ROAD :{WHITE}Non se pode convertir o tipo de estrada aquí... +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Non se pode converter o tipo de tranvía aquí... +STR_ERROR_NO_SUITABLE_ROAD :{WHITE}Estrada inválida +STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}Vía de tranvía inadecuada +STR_ERROR_INCOMPATIBLE_ROAD :{WHITE}... estrada incompatíbel +STR_ERROR_INCOMPATIBLE_TRAMWAY :{WHITE}... tranvía incompatible # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Non se poden construír canles aquí... @@ -4366,6 +4525,7 @@ STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Non se p STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Non se pode eliminar este grupo... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Non se pode renomear o grupo... STR_ERROR_GROUP_CAN_T_SET_PARENT :{WHITE}Non se pode establecer o grupo superior... +STR_ERROR_GROUP_CAN_T_SET_PARENT_RECURSION :{WHITE}... non se permiten bucles na xerarquía do grupo STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Non se pode borrar tódolos vehículos deste grupo... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Non se pode engadir o vehículo a este grupo... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Non se poden engadir vehículos compartidos ó grupo... @@ -4476,6 +4636,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons da edició STR_BASESOUNDS_WIN_DESCRIPTION :Sons da edición orixinal de Transport Tycoon Deluxe para Windows. STR_BASESOUNDS_NONE_DESCRIPTION :Un conxunto de sons sen ningún son STR_BASEMUSIC_WIN_DESCRIPTION :Música da edición orixinal de Transport Tycoon Deluxe para Windows. +STR_BASEMUSIC_DOS_DESCRIPTION :Música da edición orixinal de Transport Tycoon Deluxe para DOS. +STR_BASEMUSIC_TTO_DESCRIPTION :Temazos orixinais da edición DOS de Transport Tycoon. STR_BASEMUSIC_NONE_DESCRIPTION :Un conxunto de músicas sen ningunha música. ##id 0x2000 diff --git a/src/lang/german.txt b/src/lang/german.txt index f1940b1ec1..e194fc2e59 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -11,8 +11,6 @@ ##gender m w n p -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -867,6 +865,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Neue{G r "" s ""} {STRING} jetzt erhältlich! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} nimmt kein{G "en" "e" "" "e"} {STRING} mehr an STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} nimmt kein{G "en" "e" "" "e"} {STRING} und kein{G "en" "e" "" "e"} {STRING} mehr an STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} nimmt jetzt auch {STRING} an @@ -996,6 +995,7 @@ STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_2X_ZOOM :Doppelt STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_4X_ZOOM :Vierfach +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Doppelt STR_GAME_OPTIONS_BASE_GRF :{BLACK}Basisgrafiken STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Zu benutzendes Set an Basisgrafiken auswählen @@ -1179,6 +1179,7 @@ STR_CONFIG_SETTING_AUTOSLOPE :Landschaftsbau STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Erlaube Erdbauarbeiten unter Gebäuden oder Infrastruktur ohne sie zu entfernen STR_CONFIG_SETTING_CATCHMENT :Verschiedene Stationstypen haben unterschiedlich große Einzugsgebiete: {STRING} STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Wird diese Option eingeschaltet, besitzen unterschiedliche Stationsarten bzw. Flughäfen unterschiedlich große Einzugsgebiete +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :Falls aktiv, können Industrien mit integrierter Haltestelle (wie Ölbohrtürme) auch von nahegelegenen Stationen der Spieler bedient werden. Falls inaktive, können diese Industrien ausschließlich mittels ihrer eigenen Stationen bedient werden. Die integrierten Stationen bedienen dabei keine anderen Industrien in der Nähe STR_CONFIG_SETTING_EXTRADYNAMITE :Entfernung von weiteren Straßen, Brücken usw. erlauben: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Erlaubt einfacheres Entfernen von städtischer Infrastruktur und Gebäuden STR_CONFIG_SETTING_TRAIN_LENGTH :Maximale Zuglänge: {STRING} @@ -1476,6 +1477,8 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :KI im Mehrspiel STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Erlaube die Teilnahme von Computerspielern im Mehrspielermodus STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :Rechenoperationen, bevor das Skript angehalten wird: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Maximale Anzahl Rechenschritte, die ein Skript in einer Runde zur Verfügung hat +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY :Maximaler Arbeitsspeicher pro Script: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Wie viel Arbeitsspeicher ein Script maximal benutzen darf bevor es terminiert wird. Diese Wert muss eventuell vergrößert werden für größere Maps. STR_CONFIG_SETTING_SERVINT_ISPERCENT :Wartungsintervalle in Prozent: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Lege fest, ob Fahrzeuge zur Wartung geschickt werden basierend auf der verstrichenen Zeit seit der letzten Wartung oder dem Absinken der Zuverlässigkeit auf einen gewissen Prozentsatz der maximalen Zuverlässigkeit des Fahrzeugtyps @@ -1578,6 +1581,8 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_HELPTEXT :Erlaube Spieler STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :Verboten STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Erlaubt STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Erlaubt, mit wählbarem Straßenbauplan +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :Quadratisch (orginal) +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :Linear STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :Platzierung von Bäumen während des Spiels: {STRING} STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Lege das Ausmaß des zufälligen Baumwachstums während des Spiels fest. Dies kann Industrien wie die Sägemühle beeinflussen, welche auf nachwachsende Bäume angewiesen sind @@ -2079,6 +2084,7 @@ STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Trennen STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Server ist geschützt. Passwort eingeben: STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Firma ist geschützt. Passwort eingeben: +STR_NETWORK_COMPANY_LIST_CLIENT_LIST_CAPTION :{WHITE}Teilnehmerliste # Network company list added strings STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Teilnehmerliste @@ -2420,6 +2426,8 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Straßen STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Zwischen Bau und Abriss der Straße umschalten STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Zwischen Bau und Abriss von Straßenbahngleisen umschalten +STR_ROAD_NAME_ROAD :Straße +STR_ROAD_NAME_TRAM :Straßenbahngleis # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Ausrichtung Depot @@ -2606,6 +2614,7 @@ STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STR STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Gleistyp: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Höchstgeschwindigkeit Schiene: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Höchstgeschwindigkeit Straße: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Höchstgeschwindigkeit Straßenbahn: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Felsen @@ -2722,6 +2731,7 @@ STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} Bilder/s STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} Bilder/s STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} Bilder/s +STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! @@ -2737,6 +2747,7 @@ STR_FRAMERATE_DRAWING :{BLACK}Grafik-R STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK}Kartenansichten: STR_FRAMERATE_VIDEO :{BLACK}Videoausgabe: STR_FRAMERATE_SOUND :{BLACK}Sound-Abmischung: +STR_FRAMERATE_GAMESCRIPT :{BLACK} Script: ############ End of leave-in-this-order ############ Leave those lines in this order!! STR_FRAMETIME_CAPTION_GAMELOOP :Spielschleife @@ -3081,6 +3092,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Stadt umbenenne # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Stadtverwaltung {TOWN} +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Zone +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Zeige Zone der Stadtverwaltung STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Bewertung der Transportfirma: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Verfügbare Maßnahmen: @@ -3346,9 +3359,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrien STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Keine - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportiert) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportiert) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrienamen - Klick auf den Namen zentriert Hauptansicht auf die Industrie. Strg+Klick öffnet neue Zusatzansicht zentriert auf die Industrie # Industry view @@ -3415,6 +3427,7 @@ STR_GROUP_DEFAULT_ROAD_VEHICLES :Ungruppierte St STR_GROUP_DEFAULT_SHIPS :Ungruppierte Schiffe STR_GROUP_DEFAULT_AIRCRAFTS :Ungruppierte Flugzeuge +STR_GROUP_COUNT_WITH_SUBGROUP :{TINY_FONT}{COMMA} (+{COMMA}) STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Gruppen - Klick auf eine Gruppe zeigt Liste aller Fahrzeuge der Gruppe an STR_GROUP_CREATE_TOOLTIP :{BLACK}Neue Gruppe erstellen @@ -3463,6 +3476,7 @@ STR_PURCHASE_INFO_RELIABILITY :{BLACK}Max. Zuv STR_PURCHASE_INFO_COST :{BLACK}Kosten: {GOLD}{CURRENCY_LONG} STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}Gewicht: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT}) STR_PURCHASE_INFO_COST_SPEED :{BLACK}Kosten: {GOLD}{CURRENCY_LONG}{BLACK} Geschw.: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_COST_REFIT_SPEED :{BLACK}Kosten: {GOLD}{CURRENCY_LONG}{BLACK} (Kosten der Umrüstung: {GOLD}{CURRENCY_LONG}{BLACK}) Geschwindigkeit: {GOLD}{VELOCITY} STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Kapazität: {GOLD}{CARGO_LONG}, {CARGO_LONG} STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Angetriebene Waggons: {GOLD}+{POWER}{BLACK} Gewicht: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Umrüstbar auf: {GOLD}{STRING} @@ -3600,6 +3614,7 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Nachrich STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Wir haben {G "einen" "eine" "ein" ""} neue{G n "" s ""} {0:STRING} entwickelt.{}Besteht Interesse, {G 0 den die das die} {0:STRING} ein Jahr lang exklusiv zu nutzen, so dass wir die Funktionen testen können, bevor {G 0 er sie es sie} allgemein zur Verfügung gestellt {G 0 wird wird wird werden}? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :{G=w}Lokomotive +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :Elektrifizierte Lokomotive STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :{G=w}Einschienenbahn STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :{G=w}Magnetschwebebahn @@ -3653,6 +3668,7 @@ STR_REPLACE_ELRAIL_VEHICLES :elektrische Sch STR_REPLACE_MONORAIL_VEHICLES :Einschienenbahn STR_REPLACE_MAGLEV_VEHICLES :Magnetschwebebahn +STR_REPLACE_TRAM_VEHICLES :Straßenbahnfahrzeuge STR_REPLACE_REMOVE_WAGON :{BLACK}Waggon-Entfernung: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Ursprüngliche Länge des Zugs beibehalten, indem (vorne beginnend) Waggons entfernt werden, falls das Ersetzen der Lokomotive den Zug verlängern würde @@ -4395,6 +4411,7 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Diese St STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Straßenbahngleise können hier nicht entfernt werden... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}...hier ist keine Straße STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}...hier ist kein Straßenbahngleis +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Straßenbahngleistyp kann hier nicht geändert werden... # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Kanal kann hier nicht gebaut werden... diff --git a/src/lang/greek.txt b/src/lang/greek.txt index 2ff31a610d..efcc33e14b 100644 --- a/src/lang/greek.txt +++ b/src/lang/greek.txt @@ -12,8 +12,6 @@ ##case subs date geniki -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -974,6 +972,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ένα νέο {STRING} είναι πλέον διαθέσιμο! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Ο σταθμός {STATION} δεν δέχεται πια {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Ο σταθμός {STATION} δεν δέχεται πια ούτε {STRING} ούτε {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}Ο σταθμός {STATION} τώρα δέχεται {STRING} @@ -3474,8 +3473,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Βιομηχανίες STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Τίποτα - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% μεταφέρθηκαν) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% μεταφέρθηκαν) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Ονόματα βιομηχανιών - πατήστε στο όνομα για κεντράρισμα στη βιομηχανία. Με Ctrl+Κλικ ανοίγει νέο παράθυρο προβολής στην τοποθεσία της βιομηχανίας diff --git a/src/lang/hebrew.txt b/src/lang/hebrew.txt index 3c576bdf4d..00f29a7a19 100644 --- a/src/lang/hebrew.txt +++ b/src/lang/hebrew.txt @@ -12,8 +12,6 @@ ##case singular plural gen -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -876,6 +874,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} חדש זמין כעת - {ENGINE}! + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} אינה מקבלת יותר {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} אינה מקבלת יותר {STRING} או {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} מקבלת כעת {STRING} @@ -3324,8 +3323,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}תעשיות STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- אין - -STR_INDUSTRY_DIRECTORY_ITEM :{YELLOW}(שונעו {NBSP}{3:COMMA}%){BLACK} ({1:CARGO_LONG}{2:STRING}) {ORANGE}{0:INDUSTRY} -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{YELLOW}(שונעו {NBSP} {6:COMMA}%/{5:COMMA}%) {BLACK} ({3:CARGO_LONG}{4:STRING}/{1:CARGO_LONG}{2:STRING}) {ORANGE}{0:INDUSTRY} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}רשימת תעשיות - לחץ על שם כדי להתמקד בתעשייה. Ctrl+לחיצה פותח חלונית תצוגה חדשה על מיקום התעשייה diff --git a/src/lang/hungarian.txt b/src/lang/hungarian.txt index 3b114aa01a..d4e8d0f2ec 100644 --- a/src/lang/hungarian.txt +++ b/src/lang/hungarian.txt @@ -11,8 +11,6 @@ ##case t ba -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -936,6 +934,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Új {STRING} elérhető! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} többé nem fogad el {STRING.t} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} többé nem fogad el {STRING.t} és {STRING.t} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} most már elfogad {STRING.t} @@ -3456,9 +3455,8 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Gazdasági épületek STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nincs - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% elszállítva) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% elszállítva) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Gazdasági épületek neve - a névre kattintva a fő nézetet a választott objektumra irányíthatod. Ctrl+kattintással új látképet nyit a gazdasági épület pozíciójára # Industry view diff --git a/src/lang/icelandic.txt b/src/lang/icelandic.txt index 7ad0c23cfb..48de9cd774 100644 --- a/src/lang/icelandic.txt +++ b/src/lang/icelandic.txt @@ -11,8 +11,6 @@ ##gender karlkyn kvenkyn hvorugkyn -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -829,6 +827,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ný {STRING} er nú fáanleg! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tekur ekki lengur við {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tekur ekki lengur við {STRING} eða {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} tekur nú við {STRING} @@ -3057,8 +3056,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Iðnaðir STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Enginn - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% flutt) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% flutt) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Iðnaðar nöfn - smella á nafn til að færa miðju sjónarhorns á iðnað. Ctrl+smella til að opna nýtt sjónarhorn yfir þessum iðnaði diff --git a/src/lang/indonesian.txt b/src/lang/indonesian.txt index 1f1beaed47..4642ce4feb 100644 --- a/src/lang/indonesian.txt +++ b/src/lang/indonesian.txt @@ -10,8 +10,6 @@ ##grflangid 0x5a -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -865,6 +863,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} jenis baru telah diluncurkan! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tidak lagi menerima {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tidak lagi menerima {STRING} atau {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} Sekarang menerima {STRING} @@ -3315,8 +3314,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industri STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Tidak Ada - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% terkirim) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% terkirim) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nama-nama industri - klik di nama untuk mengarahkan pandangan utama pada industri. Ctrl+Click akan membuka viewport baru pada lokasi industri diff --git a/src/lang/irish.txt b/src/lang/irish.txt index 17a5ad57c4..35830743f1 100644 --- a/src/lang/irish.txt +++ b/src/lang/irish.txt @@ -10,8 +10,6 @@ ##grflangid 0x08 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -858,6 +856,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Tá {STRING} nua ar fáil anois! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Ní ghlacann {STATION} le {STRING} a thuilleadh STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Ní ghlacann {STATION} le {STRING} ná le {STRING} a thuilleadh STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}Glacann {STATION} le {STRING} anois @@ -3266,8 +3265,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Tionscail STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ceann ar bith - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} (iompraíodh {COMMA}%) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} (iompraíodh {COMMA}%/{COMMA}%) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Ainmneacha na dtionscal - cliceáil ar ainm chun an príomh-amharc a lárú ar thionscal. Osclaítear amharc nua ar shuíomh an tionscail le Ctrl+Cliceáil diff --git a/src/lang/italian.txt b/src/lang/italian.txt index d634592b19..47d4414614 100644 --- a/src/lang/italian.txt +++ b/src/lang/italian.txt @@ -12,8 +12,6 @@ ##case ms mp fs fp -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -874,6 +872,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nuov{G o o a} {STRING} disponibile! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} non accetta più {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} non accetta più {STRING} né {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} adesso accetta {STRING} @@ -3422,8 +3421,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrie STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nessuna - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% trasportato) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% trasportato) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomi delle industrie - fare clic su un nome per centrare la visuale sull'industria. CTRL+clic la mostra in una mini visuale. diff --git a/src/lang/japanese.txt b/src/lang/japanese.txt index 60ea503a1b..8c32715c71 100644 --- a/src/lang/japanese.txt +++ b/src/lang/japanese.txt @@ -10,8 +10,6 @@ ##grflangid 0x39 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -858,6 +856,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING}が新登場! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION}は今後{STRING}を受入れません STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION}は今後{STRING}と{STRING}を受入れません STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION}は今後{STRING}を受入れます @@ -3267,8 +3266,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}産業 STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- なし - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK}({CARGO_LONG}{STRING}){YELLOW}({COMMA}%が搬送済) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK}({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW}({COMMA}%/{COMMA}%が搬送済) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}産業の名前です - 名前をクリックするとこの産業拠点の場所にメイン画面を移動します。Ctrl+クリックでこの産業拠点の場所を新たなビューポートに表示します diff --git a/src/lang/korean.txt b/src/lang/korean.txt index 099281c45a..cacac9e7a5 100644 --- a/src/lang/korean.txt +++ b/src/lang/korean.txt @@ -11,8 +11,6 @@ ##gender m f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -158,7 +156,7 @@ STR_ABBREV_SWEETS :{TINY_FONT}사 STR_ABBREV_COLA :{TINY_FONT}콜 STR_ABBREV_CANDYFLOSS :{TINY_FONT}솜 STR_ABBREV_BUBBLES :{TINY_FONT}거 -STR_ABBREV_TOFFEE :{TINY_FONT}태 +STR_ABBREV_TOFFEE :{TINY_FONT}토 STR_ABBREV_BATTERIES :{TINY_FONT}건 STR_ABBREV_PLASTIC :{TINY_FONT}플 STR_ABBREV_FIZZY_DRINKS :{TINY_FONT}탄 @@ -254,10 +252,10 @@ STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}스크 STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}직사각형 모양의 영역에 있는 건물과 땅 등을 부숩니다. CTRL 키를 누른 채로 사용하면 대각선 영역 선택이 가능합니다. SHIFT 키를 누른 채로 사용하면 예상 비용을 볼 수 있습니다 # Show engines button -STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN :{BLACK}숨겨진 차량 보기 -STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE :{BLACK}숨겨진 차량 보기 -STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP :{BLACK}숨겨진 차량 보기 -STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT :{BLACK}숨겨진 차량 보기 +STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN :{BLACK}숨긴 차량 보기 +STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE :{BLACK}숨긴 차량 보기 +STR_SHOW_HIDDEN_ENGINES_VEHICLE_SHIP :{BLACK}숨긴 선박 보기 +STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT :{BLACK}숨긴 항공기 보기 STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP :{BLACK}이 버튼을 누르면 숨겨진 열차 차량도 구매 목록에 모두 표시합니다. STR_SHOW_HIDDEN_ENGINES_VEHICLE_ROAD_VEHICLE_TOOLTIP :{BLACK}이 버튼을 누르면 숨겨진 자동차/전차 차량도 구매 목록에 모두 표시합니다. @@ -605,7 +603,7 @@ STR_GRAPH_KEY_COMPANY_SELECTION_TOOLTIP :{BLACK}특정 STR_COMPANY_LEAGUE_TABLE_CAPTION :{WHITE}회사 성취도 순위 STR_COMPANY_LEAGUE_COMPANY_NAME :{ORANGE}{COMPANY} {BLACK}{COMPANY_NUM} '{STRING}' STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER :{G=f}기사 -STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER :{G=f}교통 매니저 +STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER :{G=f}교통망 관리자 STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR :{G=f}수송 조정자 STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR :{G=f}노선 관리자 STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR :{G=m}임원 @@ -634,7 +632,7 @@ STR_PERFORMANCE_DETAIL_LOAN :{BLACK}대출: STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}종합: ############ End of order list STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}작년에 이익을 낸 차량의 수를 나타냅니다. 자동차/전차, 열차, 선박, 항공기를 포함합니다. -STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}현재 영업 중인 역사의 수를 나타냅니다. 기차역, 버스 정류장, 공항 등은 같은 역으로 묶여있어도 따로 집계됩니다. +STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}현재 영업 중인 역사의 수를 나타냅니다. 기차역, 버스 정류장, 공항 등은 같은 역으로 묶여있어도 별도로 집계됩니다 STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}가장 낮은 수입을 가진 차량의 이익입니다. (2년 이상된 차량만 계산) STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}지난 12분기 동안 최소 이익을 달성한 차량이 벌어들인 돈의 양입니다. STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP :{BLACK}지난 12분기 동안 최대 이익을 달성한 차량이 벌어들인 돈의 양입니다. @@ -873,6 +871,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}신형 {STRING}{G 0 "을" "를"} 사용할 수 있습니다! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION}에서 더 이상 {STRING}{G 1 "을" "를"} 받지 않습니다. STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION}에서 더 이상 {STRING}/{STRING}{G 2 "을" "를"} 받지 않습니다. STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION}에서 이제 {STRING}{G 1 "을" "를"} 받을 수 있습니다. @@ -3395,9 +3394,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}산업시설 STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}(없음) -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% 운반됨) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}%가 각각 운반됨) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% 수송됨){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} 및 {NUM}종의 화물 STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}산업시설 이름 - 산업시설로 이동하려면 이름을 클릭하세요. CTRL+클릭하면 이 산업시설의 위치를 기준으로 새로운 외부 화면을 엽니다 # Industry view @@ -4609,7 +4611,7 @@ STR_ERROR_CAN_T_ADD_ORDER_SHARED :{WHITE}... 경 STR_ERROR_CAN_T_SHARE_ORDER_LIST :{WHITE}경로를 공유할 수 없습니다... STR_ERROR_CAN_T_STOP_SHARING_ORDER_LIST :{WHITE}경로 공유를 중단할 수 없습니다... STR_ERROR_CAN_T_COPY_ORDER_LIST :{WHITE}경로를 복사할 수 없습니다... -STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION :{WHITE}... 이전의 목적지로부터 너무 멉니다 +STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION :{WHITE}... 이전 목적지에서 너무 멀리 떨어져 있습니다 STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE :{WHITE}... 항공기의 항속거리가 충분하지 않습니다. # Timetable related errors diff --git a/src/lang/latin.txt b/src/lang/latin.txt index a9cd508745..23fe40a358 100644 --- a/src/lang/latin.txt +++ b/src/lang/latin.txt @@ -12,8 +12,6 @@ ##case gen acc abl dat -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1054,6 +1052,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G us a um i ae a} {STRING} parabil{G 0 is is e es es ia}! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} non diutius {STRING.acc} accipit STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} non diutius {STRING.acc} {STRING.acc}que accipit STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} nunc {STRING.acc} accipit @@ -3526,8 +3525,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industriae STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nullae - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% translat{G 1 us a um i ae a}) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% translat{G 3 us a um i ae a}) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomina industriarum - preme in nomen ut conspectus moveatur supra industriam. Ctrl+Preme ut nova fenestra conspectus aperiatur supra industriam diff --git a/src/lang/latvian.txt b/src/lang/latvian.txt index 494182806a..1fb3bff1be 100644 --- a/src/lang/latvian.txt +++ b/src/lang/latvian.txt @@ -12,8 +12,6 @@ ##case kas -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -857,6 +855,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Tagad ir pieejams jauns {STRING}! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} vairs nepieņem {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} vairs nepieņem {STRING} vai {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} pieņem {STRING} @@ -3210,8 +3209,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Ražotnes STR_INDUSTRY_DIRECTORY_NONE :{G=m}{ORANGE}- Neviens - STR_INDUSTRY_DIRECTORY_NONE.kas :{ORANGE}- Neviena - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% pārvadāts) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% pārvadāts) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Ražotņu nosaukumi - klikšķināt uz nosaukuma, lai centrētu skatu uz ražotni. Ctrl+klikšķis atvērs jaunu skatvietu pie ražotnes diff --git a/src/lang/lithuanian.txt b/src/lang/lithuanian.txt index 9c8d320060..9deca5c1e0 100644 --- a/src/lang/lithuanian.txt +++ b/src/lang/lithuanian.txt @@ -12,8 +12,6 @@ ##case kas ko kam ka kuo kur kreip -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1063,6 +1061,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Naujas{STRING} - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} nebepriima {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} nebepriima {STRING} arba {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} jau priima {STRING} @@ -3485,8 +3484,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Gamyklos STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nieko - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportuota) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportuota) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Pramonės pavadinimai - spragtelėjus ant pavadinimo, pramonė rodoma ekrano centre. Ctrl+Paspaudimas atidaro nauja langą su pramonės vaizdu diff --git a/src/lang/luxembourgish.txt b/src/lang/luxembourgish.txt index 1b976dd7e8..8f6457be57 100644 --- a/src/lang/luxembourgish.txt +++ b/src/lang/luxembourgish.txt @@ -10,8 +10,6 @@ ##grflangid 0x23 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -867,6 +865,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Neie/Neit {STRING} verfügbar! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} akzeptéiert {STRING} net méi STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} akzeptéiert {STRING} oder {STRING} net méi STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} akzeptéiert elo {STRING} @@ -3346,8 +3345,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrien STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Keng - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportéiert) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportéiert) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrienimm - klick op en Numm fir d'Usiicht do drop ze zentréieren. Ctrl+Klick erstellt eng nei Usiicht op d'Industrie diff --git a/src/lang/malay.txt b/src/lang/malay.txt index 3bdb601406..3a00bac589 100644 --- a/src/lang/malay.txt +++ b/src/lang/malay.txt @@ -10,8 +10,6 @@ ##grflangid 0x3c -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -834,6 +832,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} baru kini boleh boleh dibeli! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tidak lagi menerima {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tidak lagi menerima {STRING} or {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} kini menerima {STRING} @@ -2966,8 +2965,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industri STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Tiada - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% dihantar) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% dihantar) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nama industri - klik pada nama untuk memusatkan pemandangan ke industri. Ctrl+Klik membuka tetingkap pemandangan di lokasi industri diff --git a/src/lang/norwegian_bokmal.txt b/src/lang/norwegian_bokmal.txt index 9d5f363576..cd2b797863 100644 --- a/src/lang/norwegian_bokmal.txt +++ b/src/lang/norwegian_bokmal.txt @@ -12,8 +12,6 @@ ##case small -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -874,6 +872,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny{G "" "" tt} {STRING} er nå tilgjengelig! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} godtar ikke lenger {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} godtar ikke lenger {STRING} eller {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} godtar nå {STRING} @@ -3394,8 +3393,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrier STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ingen - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportert) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportert) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrinavn - klikk på navn for å gå til industri. Ctrl+klikk åpner et nytt tilleggsvindu over industrien diff --git a/src/lang/norwegian_nynorsk.txt b/src/lang/norwegian_nynorsk.txt index 54b8c11054..1ed23d682a 100644 --- a/src/lang/norwegian_nynorsk.txt +++ b/src/lang/norwegian_nynorsk.txt @@ -12,8 +12,6 @@ ##case small -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -860,6 +858,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny {STRING}type er tilgjengeleg! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} godtek ikkje lenger {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} godtek ikkje lenger {STRING} eller {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} godtek no {STRING} @@ -3185,8 +3184,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industriar STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ingen - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}% transportert) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}{NBSP}%/{COMMA}{NBSP}% transportert) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrinamn - Klikk på namnet for å syne industrien i hovedvisninga. CTRL+klikk syner industrien i eit tilleggsvindauge diff --git a/src/lang/polish.txt b/src/lang/polish.txt index 285096874b..e7c1356969 100644 --- a/src/lang/polish.txt +++ b/src/lang/polish.txt @@ -12,8 +12,6 @@ ##case d c b n m w -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -616,6 +614,8 @@ STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Wybierz STR_BUTTON_SORT_BY :{BLACK}Sortuj wg STR_BUTTON_LOCATION :{BLACK}Położenie STR_BUTTON_RENAME :{BLACK}Zmień nazwę +STR_BUTTON_CATCHMENT :{BLACK}Zasięg +STR_TOOLTIP_CATCHMENT :{BLACK}Przełącz wyświetlanie zasięgu STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Zamknij okno STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Tytuł okna - przeciągnij, aby przesunąć okno @@ -644,6 +644,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}Włącze STR_BUTTON_DEFAULT :{BLACK}Domyślna STR_BUTTON_CANCEL :{BLACK}Anuluj STR_BUTTON_OK :{BLACK}OK +STR_WARNING_PASSWORD_SECURITY :{YELLOW}Uwaga: Administratorzy serwera mogą być w stanie przeczytać każdy wpisany tutaj tekst. # On screen keyboard window STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ . @@ -717,6 +718,7 @@ STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Przybli STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Oddalenie STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Budowa kolei STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Budowa dróg +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Budowa tramwajów STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Budowa portów STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Budowa lotnisk STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Zmiana terenu, podwyższanie/obniżanie lądu, sadzenie drzew, itp. @@ -737,6 +739,7 @@ STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Tworzeni STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Tworzenie miast STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Tworzenie przedsiębiorstw STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Konstrukcja dróg +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Konstrukcja torów tramwajowych STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Posadź drzewa. Shift przełącza pomiędzy trybem sadzenia a szacowaniem jego kosztów STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Umieść napis STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Umieść obiekt. Shift przełącza pomiędzy trybem budowania a szacowaniem jego kosztów @@ -845,6 +848,7 @@ STR_TOOLBAR_SOUND_MUSIC :Dźwięk/muzyka ############ range for message menu starts STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Ostatnia wiadomość/ogłoszenie STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Poprzednie wiadomości +STR_NEWS_MENU_DELETE_ALL_MESSAGES :Usuń wszystkie wiadomości ############ range ends here ############ range for about menu starts @@ -1053,6 +1057,7 @@ STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Losowe o STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Pokaż okno wyboru ścieżek # Playlist window +STR_PLAYLIST_MUSIC_SELECTION_SETNAME :{WHITE}Program muzyczny - '{STRING}' STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{STRING}" STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Wykaz ścieżek STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programuj - '{STRING}' @@ -1245,6 +1250,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Dostępn{G y a e} now{G y a e} {STRING} - {ENGINE}! + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} nie akceptuje już {STRING.d} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} nie akceptuje już {STRING.d} ani {STRING.d} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} już akceptuje {STRING.b} @@ -1264,10 +1270,10 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Podgląd {COMMA} -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Kopiuj do podglądu -STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Kopiuj pozycję głównego okna do podglądu -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Wstaw z podglądu -STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Przesuń główne okno na pozycję podglądu +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Zmień podgląd +STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Kopiuj pozycję widoku głównego do podglądu +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Zmień widok główny +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Kopiuj pozycję tego podglądu do widoku głównego # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}Opcje gry @@ -1311,6 +1317,9 @@ STR_GAME_OPTIONS_CURRENCY_GEL :Lari gruziński STR_GAME_OPTIONS_CURRENCY_IRR :Rial irański (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Nowy rubel rosyjski (RUB) STR_GAME_OPTIONS_CURRENCY_MXN :Peso meksykańskie (MXN) +STR_GAME_OPTIONS_CURRENCY_NTD :Nowy dolar tajwański (TWD) +STR_GAME_OPTIONS_CURRENCY_CNY :Juan chiński (CNY) +STR_GAME_OPTIONS_CURRENCY_HKD :Dolar hongkoński (HKD) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Pojazdy drogowe @@ -1373,8 +1382,12 @@ STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_NORMAL :Normalne STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_2X_ZOOM :Podwójny STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_4X_ZOOM :Poczwórny +STR_GAME_OPTIONS_FONT_ZOOM :{BLACK}Wielkość czcionki +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_TOOLTIP :{BLACK}Wybierz wielkość czcionki interfejsu -STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :Poczwórny +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_NORMAL :Normalna +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Podwójna +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :Poczwórna STR_GAME_OPTIONS_BASE_GRF :{BLACK}Podstawowy zestaw grafik STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Wybierz podstawowy zestaw grafik do użycia @@ -1558,6 +1571,8 @@ STR_CONFIG_SETTING_AUTOSLOPE :Pozwól na zmia STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Pozwalaj na modyfikowanie terenu pod budynkami i torami bez usuwania ich STR_CONFIG_SETTING_CATCHMENT :Pozwól na bardziej realistyczny zasięg obejmowania: {STRING} STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Używaj różnych rozmiarów pokrywania obszaru dla różnych typów stacji i lotnisk +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :Stacje firmowe mogą obsługiwać przedsiębiorstwa z dołączonymi stacjami neutralnymi: {STRING} +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :Jeśli włączone, przedsiębiorstwa z dołączonymi stacjami (takie jak platformy wiertnicze) mogą być obsługiwane także przez stacje firmowe znajdujące się w pobliżu. Jeśli wyłączone, przedsiębiorstwa te mogą być obsługiwane wyłącznie przez dołączone do nich stacje. Żadne pobliskie stacje firmowe nie będą mogły ich obsługiwać, a ponadto dołączone stacje nie będą obsługiwały niczego innego poza ich przedsiębiorstwem STR_CONFIG_SETTING_EXTRADYNAMITE :Pozwól usuwać drogi, mosty, tunele, itp. należące do miasta: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Ułatwiaj usuwanie infrastruktury i budynków należących do miast STR_CONFIG_SETTING_TRAIN_LENGTH :Maksymalna długość pociągów: {STRING} @@ -1574,8 +1589,8 @@ STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Pochylenie pola STR_CONFIG_SETTING_PERCENTAGE :{COMMA}% STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Nachylenie stoków dla pojazdów drogowych: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Pochylenie pola stoku dla pojazdów drogowych. Wyższa wartość utrudnia podjazd pod górę -STR_CONFIG_SETTING_FORBID_90_DEG :Zabroń pociągom i statkom skręcać o 90 stopni: {STRING} -STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90-stopniowy zakręt występuje wtedy, gdy bezpośrednio po poziomym odcinku toru występuje odcinek pionowy na sąsiadującym polu zmuszając pociąg do skrętu o 90 stopni pokonując krawędź pola zamiast normalnego, 45-stopniowego skrętu w innych kombinacjach torów. Dotyczy to również kąta skrętu dla statków +STR_CONFIG_SETTING_FORBID_90_DEG :Zabroń pociągom skręcać o 90 stopni: {STRING} +STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90-stopniowy zakręt występuje wtedy, gdy bezpośrednio po poziomym odcinku toru występuje odcinek pionowy na sąsiadującym polu zmuszając pociąg do skrętu o 90 stopni pokonując krawędź pola zamiast normalnego, 45-stopniowego skrętu w innych kombinacjach torów. STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Pozwól na łączenie stacji nie sąsiadujących bezpośrednio: {STRING} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Pozwalaj na dodawanie części stacji nie stykających się ze sobą. Naciśnij Ctrl przed postawieniem nowej części STR_CONFIG_SETTING_INFLATION :Inflacja: {STRING} @@ -1631,8 +1646,8 @@ STR_CONFIG_SETTING_PLANE_SPEED :Prędkość sam STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Ustaw zależną prędkość samolotów w porównaniu do innych typów pojazdów, aby zmniejszyć przychód generowany przez transport samolotami STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA} STR_CONFIG_SETTING_PLANE_CRASHES :Liczba katastrof lotniczych: {STRING} -STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Ustaw szanse na katastrofy lotnicze -STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Brak +STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Ustaw szanse losowych katastrof lotniczych.{}* Duże samoloty zawsze ryzykują katastrofą lądując na małych lotniskach +STR_CONFIG_SETTING_PLANE_CRASHES_NONE :Brak* STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Zredukowana STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normalna STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Pozwól na budowę przystanków przelotowych na drogach miejskich: {STRING} @@ -1691,7 +1706,7 @@ STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :Określa ukszta STR_CONFIG_SETTING_INDUSTRY_DENSITY :Liczba przedsiębiorstw: {STRING} STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Określa liczbę przedsiębiorstw na początku i w trakcie gry STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Maksymalna odległość od krawędzi dla rafinerii: {STRING} -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Rafinerie są budowane tylko w pobliżu krawędzi map, to znaczy na wybrzeżach dla map wyspiarskich +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Rafinerie są budowane tylko w pobliżu krawędzi map, to znaczy na wybrzeżach dla map wyspiarskichOgraniczenie jak daleko od krawędzi mapy mogą być budowane rafinerie i platformy wiertnicze. Na mapach wyspiarskich zapewnia to, że znajdą się blisko wybrzeża. Na mapach większych niż 256 pól, wartość ta jest skalowana w górę. STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Wysokość granicy wiecznych śniegów: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Wysokość linii śniegu w klimacie arktycznym. Poziom pokrywy śnieżnej wpływa na rozmieszczenie przedsiębiorstw i na warunki rozwoju miast STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Gładkość terenu: {STRING} @@ -1729,6 +1744,7 @@ STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Kolor terenu na STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :zielony STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :ciemnozielony STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :fioletowy +STR_CONFIG_SETTING_SCROLLMODE :Zachowanie przeciągania okna podglądu: {STRING} STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT :Zachowanie podczas przeciągania mapy STR_CONFIG_SETTING_SCROLLMODE_DEFAULT :Przeciągnij okno podglądu prawym przyciskiem myszy, pozycja myszy zablokowana STR_CONFIG_SETTING_SCROLLMODE_RMB_LOCKED :Przeciągnij mapę prawym przyciskiem myszy, pozycja myszy zablokowana @@ -1854,6 +1870,9 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Pozwól na SI w STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Pozwól komputerowym graczom SI na udział w grach dla wielu graczy STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :ilość #opcodes przed uśpieniem skryptu: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Maksymalna liczba kroków obliczeniowych, jakie skrypt może zrobić w jednej kolejce +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY :Maksymalne zużycie pamięci na skrypt: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Ilość pamięci jaką może zużywać pojedynczy skrypt zanim zostanie przymusowo zakończony. Może wymagać zwiększenia dla większych map. +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE :{COMMA} MiB STR_CONFIG_SETTING_SERVINT_ISPERCENT :Okres między serwisowaniami w procentach: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Wybierz, czy serwisowanie pojazdów odbywa się na podstawie czasu od ostatniego serwisu, czy sprawności malejącej o pewien procent maksymalnej sprawności @@ -1916,6 +1935,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Pozwól na łag STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Kiedy włączone, produkcja zakładów zmienia się częściej, ale mniejszymi krokami. To ustawienie zazwyczaj nie daje żadnego efektu, jeśli typy zakładów są pobierane z NewGRFów STR_CONFIG_SETTING_ALLOW_SHARES :Pozwól kupować udziały w innych firmach: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Kiedy włączone, pozwala na kupowanie i sprzedawanie udziałów w firmie. Udziały będą dostępne tylko dla firm z odpowiednim stażem +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Minimalny wiek firmy pozwalający na handel udziałami: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Ustaw minimalny wiek firmy pozwalający innym kupować i sprzedawać jej akcje. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Podział przychodów w przypadku przeładunków: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Manipulowanie zrównoważeniem podziałów w łańcuchu dowozowym: przy 0% przychód zostanie zaksięgowany na konto wyłącznie ostatniego pojazdu w łańcuchu, wyższa wartość zwiększa zrównoważenie podziału STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Podczas przeciągania ustaw semafor co: {STRING} @@ -1956,6 +1977,9 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_HELPTEXT :Aktywacja tej o STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :Zabronione STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Dozwolone STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Dozwolone, dowolny układ miasta +STR_CONFIG_SETTING_TOWN_CARGOGENMODE :Generowanie ładunku przez miasta: {STRING} +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT :Ilość ładunku produkowana przez domy w mieście względem ogólnej populacji miasta.{}Wzrost kwadratowy: miasto o podwojonej wielkości generuje czterokrotnie więcej pasażerów.{}Wzrost liniowy: miasto o podwojonej wielkości generuje dwukrotnie więcej pasażerów. +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :Kwadratowy (originalny) STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :Liniowy STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :Rozmieszczenie drzew w grze: {STRING} @@ -2458,6 +2482,7 @@ STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Rozłąc STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Serwer jest chroniony. Wprowadź hasło STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Firma jest chroniona. Wprowadź hasło +STR_NETWORK_COMPANY_LIST_CLIENT_LIST_CAPTION :{WHITE}Lista klientów # Network company list added strings STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Lista klientów @@ -2506,7 +2531,7 @@ STR_NETWORK_CHAT_ALL :[Wszyscy] {STRI STR_NETWORK_CHAT_OSKTITLE :{BLACK}Wpisz tekst do chat'u # Network messages -STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Brak interface'u sieciowego lub skompilowano bez opcji ENABLE_NETWORK +STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Nie znaleziono urządzeń sieciowych STR_NETWORK_ERROR_NOSERVER :{WHITE}Nie można znaleźć żadnej gry w sieci STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Serwer nie odpowiada STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Nie można było połączyć z powodu niezgodności NewGRF @@ -2673,6 +2698,7 @@ STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Legenda STR_LINKGRAPH_LEGEND_ALL :{BLACK}Wszystkie STR_LINKGRAPH_LEGEND_NONE :{BLACK}Żadne STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Wybierz firmy, które mają być wyświetlane +STR_LINKGRAPH_LEGEND_COMPANY_TOOLTIP :{BLACK}{STRING}{}{COMPANY} # Linkgraph legend window and linkgraph legend in smallmap STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}nieużywany @@ -2757,7 +2783,7 @@ STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sygnaliz STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sygnalizator trasy (elektryczny){}Sygnalizator trasy umożliwiający wejście więcej niż jednemu pociagowi do bloku sygnalizatorów, o ile pociąg może zarezerwować trasę do bezpiecznego punktu zatrzymania. Zwykłe sygnalizatory trasy mogą być mijane w przeciwnym kierunku STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Jednokierunkowy sygnalizator trasy (elektryczny){}Sygnalizator trasy umożliwiający wejście więcej niż jednemu pociagowi do bloku sygnalizatorów, o ile pociąg może zarezerwować trasę do bezpiecznego punktu zatrzymania. Sygnalizatory jednokierunkowe nie mogą być mijane w przeciwnym kierunku STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Zamiana sygnałów{}Jeżeli włączone, kliknięcie na istniejący sygnał spowoduje zamianę go na wybrany typ i wariant. CTRL+klik przełącza istniejący wariant. Shift+klik pokazuje szacowany koszt zamiany -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Gęstość sygnałów przy przeciąganiu +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Odległość między sygnałami przy przeciąganiu STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Zmniejsz odległość między sygnałami przy przeciąganiu STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Zwiększ odległość między sygnałami przy przeciąganiu @@ -2797,7 +2823,11 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Zbuduj t STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Zbuduj tunel tramwajowy. Shift przełącza pomiędzy trybem budowania a szacowaniem jego kosztów STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Przełącz buduj/usuń dla konstrukcji dróg STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Przełącz buduj/usuń dla konstrukcji tramwajowej +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Zamiana typu dróg. Shift przełącza pomiędzy trybem budowania a szacowaniem jego kosztów +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Zamiana typu torów tramwajowych. Shift przełącza pomiędzy trybem budowania a szacowaniem jego kosztów +STR_ROAD_NAME_ROAD :Droga +STR_ROAD_NAME_TRAM :Tory tramwajowe # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Ukierunkowanie zajezdni samochodowej @@ -2967,7 +2997,7 @@ STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Zysk gdy STR_LAND_AREA_INFORMATION_OWNER_N_A :Brak STR_LAND_AREA_INFORMATION_OWNER :{BLACK}Właściciel: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_ROAD_OWNER :{BLACK}Wlasciciel drogi: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_TRAM_OWNER :{BLACK}Wlasciciel linii tramwajowej: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_TRAM_OWNER :{BLACK}Właściciel linii tramwajowej: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Wlaściciel linii kolejowej: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Lokalne władze: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Brak @@ -2982,8 +3012,11 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Akceptowany ładunek: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Typ torów: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_ROAD_TYPE :{BLACK}Rodzaj drogi: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}Typ torów tramwajowych: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Limit prędkości linii kolejowej: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Drogowe ograniczenie prędkości: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Limit prędkości tramwajów: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Skały @@ -3023,7 +3056,7 @@ STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Droga z oświet STR_LAI_ROAD_DESCRIPTION_TREE_LINED_ROAD :Droga z drzewami STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT :Zajezdnia samochodowa STR_LAI_ROAD_DESCRIPTION_ROAD_RAIL_LEVEL_CROSSING :Przejazd kolejowy -STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Szyny tramwajowe +STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Tor tramwajowy # Houses come directly from their building names STR_LAI_TOWN_INDUSTRY_DESCRIPTION_UNDER_CONSTRUCTION :{STRING} (w budowie) @@ -3085,11 +3118,15 @@ STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD # Framerate display window STR_FRAMERATE_CAPTION :{WHITE}Ilość klatek na sekundę STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Tempo symulacji: {STRING} STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Liczba ticków gry symulowanych na sekundę. +STR_FRAMERATE_RATE_BLITTER :{BLACK}Klatki na sekundę: {STRING} STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Liczba renderowanych klatek wideo na sekundę. +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Obecny współczynnik szybkości gry: {DECIMAL}x STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Jak szybko gra obecnie działa, w porównaniu do oczekiwanej prędkości przy normalnym tempie symulacji. STR_FRAMERATE_CURRENT :{WHITE}Obecny STR_FRAMERATE_AVERAGE :{WHITE}Średnia +STR_FRAMERATE_MEMORYUSE :{WHITE}Pamięć STR_FRAMERATE_DATA_POINTS :{BLACK}Dane oparte na {COMMA} pomiarach STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms @@ -3097,24 +3134,44 @@ STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} klatek/sek. STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} klatek/sek. STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} klatek/sek. +STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} +STR_FRAMERATE_BYTES_WARN :{YELLOW}{BYTES} +STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} sek. ############ Leave those lines in this order!! +STR_FRAMERATE_GAMELOOP :{BLACK}Pętla gry łącznie: STR_FRAMERATE_GL_ECONOMY :{BLACK} Obsługa ładunku: -STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Opóźnienie wykresu połączeń: +STR_FRAMERATE_GL_TRAINS :{BLACK} Tyknięcia pociągów: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Tyknięcia pojazdów drogowych: +STR_FRAMERATE_GL_SHIPS :{BLACK} Tyknięcia statków: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Tyknięcia samolotów: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Tyknięcia świata: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Opóźnienie wykresu połączeń: STR_FRAMERATE_DRAWING :{BLACK}Renderowanie grafiki: STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Okna podgląu świata: -STR_FRAMERATE_VIDEO :{WHITE}Wyjście video: -STR_FRAMERATE_SOUND :{WHITE}Miksowanie dźwięku: +STR_FRAMERATE_VIDEO :{BLACK}Wyjście video: +STR_FRAMERATE_SOUND :{BLACK}Miksowanie dźwięku: +STR_FRAMERATE_ALLSCRIPTS :{BLACK} GS/SI łącznie: +STR_FRAMERATE_GAMESCRIPT :{BLACK} Game script: +STR_FRAMERATE_AI :{BLACK} SI {NUM} {STRING} ############ End of leave-in-this-order ############ Leave those lines in this order!! STR_FRAMETIME_CAPTION_GAMELOOP :Pętla gry STR_FRAMETIME_CAPTION_GL_ECONOMY :Obsługa ładunku +STR_FRAMETIME_CAPTION_GL_TRAINS :Tyknięcia pociągów +STR_FRAMETIME_CAPTION_GL_ROADVEHS :Tyknięcia pojazdów drogowych +STR_FRAMETIME_CAPTION_GL_SHIPS :Tyknięcia statków +STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Tyknęcia samolotów +STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Tyknięcia świata STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Opóźnienie wykresu połączeń STR_FRAMETIME_CAPTION_DRAWING :Renderowanie grafiki STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Renderowanie okna podgląu świata STR_FRAMETIME_CAPTION_VIDEO :Wyjście wideo STR_FRAMETIME_CAPTION_SOUND :Miksowanie dźwięku +STR_FRAMETIME_CAPTION_ALLSCRIPTS :Wszystkie skrypty GS/SI +STR_FRAMETIME_CAPTION_GAMESCRIPT :Game script +STR_FRAMETIME_CAPTION_AI :SI {NUM} {STRING} ############ End of leave-in-this-order @@ -3261,7 +3318,9 @@ STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Kompatyb STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}Suma MD5: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Paleta: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Domyslny (D) -STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Domyślny (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Domyślna (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Dawna (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Dawna (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parametry: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PARAMETER_NONE :Żadne @@ -3344,6 +3403,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Odczyt poza obs STR_NEWGRF_ERROR_GRM_FAILED :Potrzebne źródło GRF nie jest dostępne (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} został wyłączony przez {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Niepoprawny/nieznany format układu sprite'u (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Zbyt wiele elementów na liście wartości właściwości (sprite {3:NUM}, właściwość {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Niewłaściwy wywołanie produkcji przedsiębiorstwa (sprite {3:NUM}, "{2:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Uwaga! @@ -3375,6 +3436,7 @@ STR_NEWGRF_BUGGY :{WHITE}NewGRF ' STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Informacje o ładunku/naprawie dla '{1:ENGINE}' różnią się od listy zakupu po zbudowaniu. Może to spowodować, że autoodnowienie/-zamiana nie wykona remontu poprawnie STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' spowodował nieskończoną pętlę w wywołaniu produkcji STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Wywołanie {1:HEX} zwróciło nieznany/błędny wynik {2:HEX} +STR_NEWGRF_BUGGY_INVALID_CARGO_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' zwrócił niewłaściwy typ ładunku w wywołaniu produkcji w {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs STR_NEWGRF_INVALID_CARGO : @@ -3441,6 +3503,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Zmień nazwę m # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Lokalne władze m. {TOWN} +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Strefa +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Pokaż strefę granic władz lokalnych STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Ocena transportu firmy: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Możliwe działania: @@ -3698,6 +3762,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Infrastr STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Elementy kolei: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Sygnalizatory STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Elementy dróg: +STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT :{GOLD}Elementy torów tramwajowych: STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Pola wody: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Kanały STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Stacje: @@ -3708,9 +3773,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Przedsiębiorstwa STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Żaden - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} (przetransportowano {COMMA}%) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} (przetransportowano {COMMA}%/{COMMA}%) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% przetransportowano){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} i {NUM} więcej... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nazwy zakładów - kliknij na nazwie zakładu by wyśrodkować na nim widok. Ctrl+klik otwiera nowy podgląd na lokacji zakładu # Industry view @@ -3721,6 +3789,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centruj STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Poziom produkcji: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Przedsiębiorstwo ogłosiło likwidację! +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Potrzebuje: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Wytwarza: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Potrzebuje: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} @@ -3774,6 +3845,7 @@ STR_GROUP_DEFAULT_ROAD_VEHICLES :Pojazdy bez gru STR_GROUP_DEFAULT_SHIPS :Statki bez grupy STR_GROUP_DEFAULT_AIRCRAFTS :Samoloty bez grupy +STR_GROUP_COUNT_WITH_SUBGROUP :{TINY_FONT}{COMMA} (+{COMMA}) STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Grupy - kliknij na grupę, aby wyświetlić wszystkie pojazdy z grupy. Przeciągnij i upuść grupy, aby dostosować hierarchię. STR_GROUP_CREATE_TOOLTIP :{BLACK}Kliknij aby stworzyć grupę @@ -3802,14 +3874,17 @@ STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Nowe pociągi j STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Nowe pociągi Maglev STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Nowy pojazd drogowy +STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION :Nowe pojazdy tramwajowe ############ range for vehicle availability starts STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Nowe Pojazdy Szynowe +STR_BUY_VEHICLE_ROAD_VEHICLE_ALL_CAPTION :Nowe pojazdy drogowe STR_BUY_VEHICLE_SHIP_CAPTION :Nowe statki STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Nowy samolot ############ range for vehicle availability ends STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Koszt: {GOLD}{CURRENCY_LONG}{BLACK} Masa: {GOLD}{WEIGHT_SHORT} +STR_PURCHASE_INFO_COST_REFIT_WEIGHT :{BLACK}Koszt: {GOLD}{CURRENCY_LONG}{BLACK} (Kosz przebudowy: {GOLD}{CURRENCY_LONG}{BLACK}) Masa: {GOLD}{WEIGHT_SHORT} STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Prędkość: {GOLD}{VELOCITY}{BLACK} Moc: {GOLD}{POWER} STR_PURCHASE_INFO_SPEED :{BLACK}Prędkość: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Prędkość na oceanie: {GOLD}{VELOCITY} @@ -3820,8 +3895,10 @@ STR_PURCHASE_INFO_REFITTABLE :(przebudowywaln STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Zaprojektowany: {GOLD}{NUM}{BLACK} Żywotność: {GOLD}{COMMA} lat STR_PURCHASE_INFO_RELIABILITY :{BLACK}Maksymalna niezawodność: {GOLD}{COMMA}% STR_PURCHASE_INFO_COST :{BLACK}Koszt: {GOLD}{CURRENCY_LONG} +STR_PURCHASE_INFO_COST_REFIT :{BLACK}Koszt: {GOLD}{CURRENCY_LONG}{BLACK} (Koszt przebudowy: {GOLD}{CURRENCY_LONG}{BLACK}) STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}Masa: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT}) STR_PURCHASE_INFO_COST_SPEED :{BLACK}Koszt: {GOLD}{CURRENCY_LONG}{BLACK} Prędkość: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_COST_REFIT_SPEED :{BLACK}Koszt: {GOLD}{CURRENCY_LONG}{BLACK} (Koszt przebudowy: {GOLD}{CURRENCY_LONG}{BLACK}) Prędkość: {GOLD}{VELOCITY} STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Ładowność: {GOLD}{CARGO_LONG}, {CARGO_LONG} STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Moc: {GOLD}+{POWER}{BLACK} Masa: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Można przystosować do: {GOLD}{STRING} @@ -3842,12 +3919,20 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Kup poja STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Kup statek STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Kup samolot +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Kup i przebuduj pojazd +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Kup i przebuduj pojazd +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Kup i przebuduj statek +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Kup i przebuduj samolot STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Kup zaznaczony pociąg. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Kup zaznaczony pojazd drogowy. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Kup zaznaczony statek. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Kup zaznaczony samolot. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Kup i przebuduj zaznaczony pociąg. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Kup i przebuduj zaznaczony pojazd drogowy. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Kup i przebuduj zaznaczony statek. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Kup i przebuduj zaznaczony samolot. Shift+klik pokazuje szacunkowy koszt bez dokonania zakupu STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Zmień nazwę STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Zmień nazwę @@ -3960,6 +4045,7 @@ STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Właśnie STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :{G=f}lokomotywa STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE.b :lokomotywę +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :{G=f}lokomotywa elektryczna STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :{G=f}lokomotywa jednoszynowa STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE.b :lokomotywę jednoszynową STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :{G=f}lokomotywa Maglev @@ -3967,6 +4053,7 @@ STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE.b :lokomotywę Mag STR_ENGINE_PREVIEW_ROAD_VEHICLE :{G=m}pojazd STR_ENGINE_PREVIEW_ROAD_VEHICLE.b :pojazd +STR_ENGINE_PREVIEW_TRAM_VEHICLE :pojazd tramwajowy STR_ENGINE_PREVIEW_AIRCRAFT :{G=m}samolot STR_ENGINE_PREVIEW_AIRCRAFT.b :samolot @@ -4010,14 +4097,18 @@ STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Przejdź STR_REPLACE_ENGINES :Lokomotywy STR_REPLACE_WAGONS :Wagony STR_REPLACE_ALL_RAILTYPE :Wszystkie pojazdy szynowe +STR_REPLACE_ALL_ROADTYPE :Wszystkie pojazdy drogowe STR_REPLACE_HELP_RAILTYPE :{BLACK}Wybierz dla jakiego typu torów chcesz zastąpić lokomotywy +STR_REPLACE_HELP_ROADTYPE :{BLACK}Wybierz dla jakiego typu dróg chcesz zastąpić silniki STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Wyświetla typ pojazdu na jaki będzie zastąpiony pojazd zaznaczony po lewej stronie STR_REPLACE_RAIL_VEHICLES :Kolej STR_REPLACE_ELRAIL_VEHICLES :Kolej elektryczna STR_REPLACE_MONORAIL_VEHICLES :Kolej jednoszynowa STR_REPLACE_MAGLEV_VEHICLES :Kolej Maglev +STR_REPLACE_ROAD_VEHICLES :Pojazdy drogowe +STR_REPLACE_TRAM_VEHICLES :Pojazdy tramwajowe STR_REPLACE_REMOVE_WAGON :{BLACK}Usunięcie wagonów: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Autowymiana zachowuje długość pociągu poprzez usuwanie wagonów (począwszy od początku), jeśli wymiana lokomotywy spowoduje wydłużenie pociągu @@ -4741,6 +4832,7 @@ STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Nieodpow STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Należy najpierw usunąć tory STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Droga jest jednokierunkowa lub zablokowana STR_ERROR_CROSSING_DISALLOWED_RAIL :{WHITE}Przejazd kolejowy nie dozwolony dla tego typu torów +STR_ERROR_CROSSING_DISALLOWED_ROAD :{WHITE}Przejazdy kolejowe nie są dozwolone dla tego typu drogi STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Nie można tutaj postawić sygnałów... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Nie można tutaj ułożyć torów... STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Nie można stąd usunąć torów... @@ -4760,6 +4852,12 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Nie moż STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Nie można usunąć torowiska z tego miejsca... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}...brak drogi STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}...brak torowiska tramwajowego +STR_ERROR_CAN_T_CONVERT_ROAD :{WHITE}Nie można zmienić typu drogi w tym miejscu... +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Nie można zmienić typu torów tramwajowych w tym miejscu... +STR_ERROR_NO_SUITABLE_ROAD :{WHITE}Brak właściwej drogi +STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}Brak właściwej linii tramwajowej +STR_ERROR_INCOMPATIBLE_ROAD :{WHITE}... niekompatybilna droga +STR_ERROR_INCOMPATIBLE_TRAMWAY :{WHITE}... niekompatybilne tory tramwajowe # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Nie można tutaj zbudować kanału... @@ -4812,6 +4910,7 @@ STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Nie moż STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Nie można usunąć tej grupy... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Nie można zmienić nazwy grupy... STR_ERROR_GROUP_CAN_T_SET_PARENT :{WHITE}Nie można ustawić grupy nadrzędnej... +STR_ERROR_GROUP_CAN_T_SET_PARENT_RECURSION :{WHITE}... pętle w hierarchii grupy są niedozwolone STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Nie można usunąć wszystkich pojazdów z tej grupy... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Nie można dodać pojazdu do tej grupy... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Nie można dodać pojazdów współdzielących polecenia do grupy... diff --git a/src/lang/portuguese.txt b/src/lang/portuguese.txt index f90aaaefbb..cfb33fc8eb 100644 --- a/src/lang/portuguese.txt +++ b/src/lang/portuguese.txt @@ -11,8 +11,6 @@ ##gender n m f mp fp -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -52,13 +50,13 @@ STR_CARGO_PLURAL_RUBBER :Borracha STR_CARGO_PLURAL_SUGAR :Açúcar STR_CARGO_PLURAL_TOYS :Brinquedos STR_CARGO_PLURAL_CANDY :Doces -STR_CARGO_PLURAL_COLA :Cola +STR_CARGO_PLURAL_COLA :Bebida de cola STR_CARGO_PLURAL_COTTON_CANDY :Algodão Doce STR_CARGO_PLURAL_BUBBLES :Bolhas STR_CARGO_PLURAL_TOFFEE :Caramelo STR_CARGO_PLURAL_BATTERIES :Baterias STR_CARGO_PLURAL_PLASTIC :Plástico -STR_CARGO_PLURAL_FIZZY_DRINKS :Bebidas Gasosas +STR_CARGO_PLURAL_FIZZY_DRINKS :Refrigerantes # Singular cargo name STR_CARGO_SINGULAR_NOTHING : @@ -86,13 +84,13 @@ STR_CARGO_SINGULAR_RUBBER :Borracha STR_CARGO_SINGULAR_SUGAR :Açúcar STR_CARGO_SINGULAR_TOY :Brinquedos STR_CARGO_SINGULAR_CANDY :Doces -STR_CARGO_SINGULAR_COLA :Cola +STR_CARGO_SINGULAR_COLA :Bebida de cola STR_CARGO_SINGULAR_COTTON_CANDY :Algodão Doce STR_CARGO_SINGULAR_BUBBLE :Bolhas STR_CARGO_SINGULAR_TOFFEE :Caramelo STR_CARGO_SINGULAR_BATTERY :Baterias STR_CARGO_SINGULAR_PLASTIC :Plástico -STR_CARGO_SINGULAR_FIZZY_DRINK :Bebidas Gasosas +STR_CARGO_SINGULAR_FIZZY_DRINK :Refrigerantes # Quantity of cargo STR_QUANTITY_NOTHING : @@ -120,13 +118,13 @@ STR_QUANTITY_RUBBER :{VOLUME_LONG} d STR_QUANTITY_SUGAR :{WEIGHT_LONG} de açúcar STR_QUANTITY_TOYS :{COMMA} brinquedo{P "" s} STR_QUANTITY_SWEETS :{COMMA} saco{P "" s} de doces -STR_QUANTITY_COLA :{VOLUME_LONG} de cola +STR_QUANTITY_COLA :{VOLUME_LONG} de bebida de cola STR_QUANTITY_CANDYFLOSS :{WEIGHT_LONG} de algodão doce STR_QUANTITY_BUBBLES :{COMMA} bolha{P "" s} STR_QUANTITY_TOFFEE :{WEIGHT_LONG} de caramelo STR_QUANTITY_BATTERIES :{COMMA} pilha{P "" s} STR_QUANTITY_PLASTIC :{VOLUME_LONG} de plástico -STR_QUANTITY_FIZZY_DRINKS :{COMMA} bebida{P "" s} gasosa{P "" s} +STR_QUANTITY_FIZZY_DRINKS :{COMMA} refrigerante{P "" s} STR_QUANTITY_N_A :N/D # Two letter abbreviation of cargo name @@ -161,7 +159,7 @@ STR_ABBREV_BUBBLES :{TINY_FONT}BO STR_ABBREV_TOFFEE :{TINY_FONT}CM STR_ABBREV_BATTERIES :{TINY_FONT}BA STR_ABBREV_PLASTIC :{TINY_FONT}PL -STR_ABBREV_FIZZY_DRINKS :{TINY_FONT}BG +STR_ABBREV_FIZZY_DRINKS :{TINY_FONT}RF STR_ABBREV_NONE :{TINY_FONT}NÃO STR_ABBREV_ALL :{TINY_FONT}TUDO @@ -174,14 +172,14 @@ STR_ITEMS :{COMMA} item{P STR_CRATES :{COMMA} caixa{P "" s} # Colours, do not shuffle -STR_COLOUR_DARK_BLUE :Azul Escuro -STR_COLOUR_PALE_GREEN :Verde Claro +STR_COLOUR_DARK_BLUE :Azul escuro +STR_COLOUR_PALE_GREEN :Verde claro STR_COLOUR_PINK :Rosa STR_COLOUR_YELLOW :Amarelo STR_COLOUR_RED :Vermelho -STR_COLOUR_LIGHT_BLUE :Azul Claro +STR_COLOUR_LIGHT_BLUE :Azul claro STR_COLOUR_GREEN :Verde -STR_COLOUR_DARK_GREEN :Verde Escuro +STR_COLOUR_DARK_GREEN :Verde escuro STR_COLOUR_BLUE :Azul STR_COLOUR_CREAM :Creme STR_COLOUR_MAUVE :Malva @@ -238,6 +236,7 @@ STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Seleccio STR_BUTTON_SORT_BY :{BLACK}Ordenar por STR_BUTTON_LOCATION :{BLACK}Localização STR_BUTTON_RENAME :{BLACK}Renomear +STR_BUTTON_CATCHMENT :{BLACK}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 @@ -333,13 +332,14 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Mostrar STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Financiar a construção de uma nova indústria STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Mostrar lista de comboios da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Mostrar lista de veículos rodoviários da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos -STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Mostrar lista de barcos da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos +STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Mostrar lista de navios da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Mostrar lista de aeronaves da empresa. Ctrl+Clique alterna entre abrir a lista de grupos/veículos STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Ampliar STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Reduzir STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construir caminhos-de-ferro STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Construir estradas -STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construir docas para barcos +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Construir carris para elétricos +STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Construir docas para navios STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Construir aeroportos STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Abra a barra de modelação ambiental para elevar ou baixar terreno, plantar árvores, etc. STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Mostrar janela som/música @@ -359,6 +359,7 @@ STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Gerar te STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Gerar localidades STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Gerar indústrias STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Construir estradas +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Construção de carris para elétricos STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plantar árvores. Shift alterna contruir/mostrar custo estimado STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Colocar sinais STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Colocar objecto. Shift alterna contruir/mostrar custo estimado @@ -435,8 +436,8 @@ STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Financiar nova ############ range ends here ############ range for railway construction menu starts -STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Construir caminhos-de-ferro -STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Construir caminhos-de-ferro electrificados +STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Construção de caminhos-de-ferro +STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Construção de caminhos-de-ferro eletrificados STR_RAIL_MENU_MONORAIL_CONSTRUCTION :Construir monocarril STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Construir Maglev ############ range ends here @@ -447,11 +448,11 @@ STR_ROAD_MENU_TRAM_CONSTRUCTION :Construção de ############ range ends here ############ range for waterways construction menu starts -STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Construção de canais +STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Construção de hidrovia ############ range ends here ############ range for airport construction menu starts -STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Construir aeroporto +STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Construção de aeroportos ############ range ends here ############ range for landscaping menu starts @@ -473,17 +474,17 @@ STR_NEWS_MENU_DELETE_ALL_MESSAGES :Apagar todas as ############ range for about menu starts STR_ABOUT_MENU_LAND_BLOCK_INFO :Informações do terreno STR_ABOUT_MENU_SEPARATOR : -STR_ABOUT_MENU_TOGGLE_CONSOLE :Mostrar/ocultar consola -STR_ABOUT_MENU_AI_DEBUG :Depuração da IA/Scripts de Jogo +STR_ABOUT_MENU_TOGGLE_CONSOLE :Mostrar/Ocultar consola +STR_ABOUT_MENU_AI_DEBUG :Depuração da IA/Scripts de jogo STR_ABOUT_MENU_SCREENSHOT :Captura de ecrã STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Captura com resolução máxima STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Captura com resolução normal STR_ABOUT_MENU_GIANT_SCREENSHOT :Captura de mapa -STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar taxa de fotograma +STR_ABOUT_MENU_SHOW_FRAMERATE :Mostrar taxa de fotogramas STR_ABOUT_MENU_ABOUT_OPENTTD :Sobre o 'OpenTTD' STR_ABOUT_MENU_SPRITE_ALIGNER :Alinhador de gráficos STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Alternar as caixas envolventes -STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Ligar/Desligar coloração de blocos sujos +STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Ativar coloração de blocos sujos ############ range ends here ############ range for ordinal numbers used for the place in the highscore window @@ -628,7 +629,7 @@ STR_PERFORMANCE_DETAIL_MONEY :{BLACK}Dinheiro STR_PERFORMANCE_DETAIL_LOAN :{BLACK}Empréstimo: STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}Total: ############ End of order list -STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Número de veículos que lucraram no último ano. Isto inclui veículos rodoviários, comboios, barcos e aeronaves. +STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Número de veículos que produziram lucro no último ano. Inclui veículos rodoviários, comboios, navios e aeronaves. STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Número de estações recentemente reparadas. Estações ferroviárias, paragens de autocarro, aeroportos são contabilizadas separadamente, mesmo se estiverem ligadas como uma só. STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}O lucro do veículo com o rendimento menor (só são considerados veículos com mais de 2 anos) STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Dinheiro conseguido no mês com os lucros mais baixos dos últimos 12 trimestres @@ -731,7 +732,7 @@ STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES :{TINY_FONT}{BLA STR_SMALLMAP_LEGENDA_VEHICLES :{TINY_FONT}{BLACK}Veículos STR_SMALLMAP_LEGENDA_TRAINS :{TINY_FONT}{BLACK}Comboios STR_SMALLMAP_LEGENDA_ROAD_VEHICLES :{TINY_FONT}{BLACK}Veículos Rodoviários -STR_SMALLMAP_LEGENDA_SHIPS :{TINY_FONT}{BLACK}Barcos +STR_SMALLMAP_LEGENDA_SHIPS :{TINY_FONT}{BLACK}Navios STR_SMALLMAP_LEGENDA_AIRCRAFT :{TINY_FONT}{BLACK}Aeronaves STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES :{TINY_FONT}{BLACK}Rotas de Transporte STR_SMALLMAP_LEGENDA_FOREST :{TINY_FONT}{BLACK}Floresta @@ -790,7 +791,7 @@ STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLAC STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeiro camião chega a {STATION}! STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeiro eléctrico de passageiros chega a {STATION}! STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeiro eléctrico de mercadorias chega a {STATION}! -STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeiro barco chega a {STATION}! +STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeiro navio chega a {STATION}! STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Cidadãos celebram . . .{}Primeira aeronave chega a {STATION}! STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Acidente de Comboios!{}{COMMA} mortem numa explosão após a colisão! @@ -868,6 +869,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Novo modelo de {STRING} agora disponível! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} não aceita mais {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} não aceita mais {STRING} ou {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} agora aceita {STRING} @@ -934,6 +936,9 @@ STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgiano STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iraniano (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Novo Rublo Russo (RUB) STR_GAME_OPTIONS_CURRENCY_MXN :Peso Mexicano (MXN) +STR_GAME_OPTIONS_CURRENCY_NTD :Novo dólar taiwanês (NTD) +STR_GAME_OPTIONS_CURRENCY_CNY :Renminbi chinês (CNY) +STR_GAME_OPTIONS_CURRENCY_HKD :Dólar de Hong Kong (HKD) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Veículos rodoviários @@ -1121,7 +1126,7 @@ STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Configurações STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Categoria: STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Tipo: STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Restringe a lista abaixo para mostrar apenas opções modificadas -STR_CONFIG_SETTING_RESTRICT_BASIC :Opções Básicas (mostra apenas definições importantes) +STR_CONFIG_SETTING_RESTRICT_BASIC :Opções básicas (mostrar apenas definições importantes) STR_CONFIG_SETTING_RESTRICT_ADVANCED :Avançado (mostra grande parte das definições) STR_CONFIG_SETTING_RESTRICT_ALL :Avançado (mostrar todas as definições, incluindo as estranhas) STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Opções com um valor diferente das de origem @@ -1232,7 +1237,7 @@ STR_CONFIG_SETTING_SIGNALSIDE_RIGHT :Na direita STR_CONFIG_SETTING_SHOWFINANCES :Mostrar janela das finanças no fim do ano: {STRING} STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :Se ativado, os pops up de finanças ao final de cada ano permitem fácil inspeção do estado financeiro da empresa STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :Novas ordens são 'sem parar' por predefinição: {STRING} -STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normalmente, um veículo parará em cada estação por que passe. Ao ligar esta configuração, passará sem parar por todas as estações parando apenas no destino final. Nota que isto só tem efeito para novas rotas. No entanto rotas existentes podem ser alteradas explicitamente para funcionarem assim também. +STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normalmente, um veículo para em cada estação por onde passa. Ao ativar esta configuração, um veículo irá passar por todas as estações no seu percurso, parando apenas no destino final. Esta opção só tem efeito para novas rotas, mas as rotas existentes podem ser alteradas para funcionarem de forma igual. STR_CONFIG_SETTING_STOP_LOCATION :Ordens novas do comboio param {STRING} da plataforma STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Local onde um combóio parará na plataforma por omissão. A opção 'extremo mais próximo' significa perto do ponto de entrada, 'meio' significa no meio da plataforma e 'extremo mais distante' significa o mais distante possível do ponto de entrada. Esta opção apenas afecta o valor por omissão para novas encomendas. Encomendas individuais podem utilizar qualquer uma das opções independentemente desta STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :no extremo perto @@ -1338,8 +1343,8 @@ STR_CONFIG_SETTING_TREE_PLACER_HELPTEXT :Escolhe a distr STR_CONFIG_SETTING_TREE_PLACER_NONE :Nenhum STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Melhorada -STR_CONFIG_SETTING_ROAD_SIDE :Veículo rodoviários: {STRING} -STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Escolhe o lado de condução +STR_CONFIG_SETTING_ROAD_SIDE :Veículos rodoviários: {STRING} +STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Escolher o lado de condução STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Rotação mapa de alt.: {STRING} STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :Sentido anti-horário STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE :Sentido horário @@ -1383,7 +1388,7 @@ STR_CONFIG_SETTING_SCROLLWHEEL_OFF :Desligado STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER :Velocidade da roda do rato no mapa: {STRING} STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Controlo de sensibilidade da roda de rolagem do rato STR_CONFIG_SETTING_OSK_ACTIVATION :Teclado no ecrã: {STRING} -STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Seleccione o método de abertura do teclado no ecran para escrita de texto em caixas usando apenas o rato. Esta opção é pensada para equipamentos pequenos sem teclado físico. +STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Selecione o método de abertura de teclado virtual para escrita de texto em caixas, usando apenas o cursor. Esta opção destina-se principalmente para equipamentos pequenos sem teclado físico. STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Desactivado STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Duplo clique STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Clique simples (quando em foco) @@ -1462,7 +1467,7 @@ STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Máximo de veí STR_CONFIG_SETTING_MAX_ROAD_VEHICLES_HELPTEXT :Número máximo de veículos de estrada que uma companhia pode ter STR_CONFIG_SETTING_MAX_AIRCRAFT :Máximo de aeronaves por empresa: {STRING} STR_CONFIG_SETTING_MAX_AIRCRAFT_HELPTEXT :Número máximo de aeronaves que uma companhia pode ter -STR_CONFIG_SETTING_MAX_SHIPS :Máximo de barcos por empresa: {STRING} +STR_CONFIG_SETTING_MAX_SHIPS :Máximo de navios por empresa: {STRING} STR_CONFIG_SETTING_MAX_SHIPS_HELPTEXT :Número máximo de navios que uma companhia pode ter STR_CONFIG_SETTING_AI_BUILDS_TRAINS :Desactivar comboios para o computador: {STRING} @@ -1471,7 +1476,7 @@ STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES :Desactivar veí STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES_HELPTEXT :Activar esta preferência impossibilita a construção de veículos de estrada por um jogador controlado pelo computador STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT :Desactivar aeronaves para o computador: {STRING} STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT_HELPTEXT :Activar esta preferência impossibilita a construção de aeronaves por um jogador controlado pelo computador -STR_CONFIG_SETTING_AI_BUILDS_SHIPS :Desactivar barcos para o computador: {STRING} +STR_CONFIG_SETTING_AI_BUILDS_SHIPS :Desactivar navios para o computador: {STRING} STR_CONFIG_SETTING_AI_BUILDS_SHIPS_HELPTEXT :Activar esta preferência impossibilita a construção de navios por um jogador controlado pelo computador STR_CONFIG_SETTING_AI_PROFILE :Perfil de preferências por omissão: {STRING} @@ -1484,6 +1489,7 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Permite IAs em STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Permite a jogadores controlados pelo computador a participação em jogos multi-jogador STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes antes de os scripts serem suspensos: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Número máximo de passos computacionais que um script pode executar num turno +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Definir o volume máximo de memória que pode ser utilizada por um script antes de este ser terminado. Para mapas maiores é possível que este parâmetro tenha de ser aumentado. STR_CONFIG_SETTING_SERVINT_ISPERCENT :Os intervalos de serviço são em percentagem: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Escolher se a manutenção de veículos é activada pelo tempo passado deste a última manutenção, ou pela fiabilidade abaixo de uma certa percentagem da fiabilidade máxima @@ -1498,8 +1504,8 @@ STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Definir o inter STR_CONFIG_SETTING_SERVINT_SHIPS :Intervalo de serviço para navios por omissão: {STRING} STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Definir o intervalo de manutenção por omissão para novos navios, se não for configurado um intervalo de manutenção explícito para o veículo STR_CONFIG_SETTING_NOSERVICE :Não fazer manutenção quando não há avarias: {STRING} -STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Quando activo, os veículos não farão manutenção se não puderem avariar -STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Activar limites de velocidade para vagões: {STRING} +STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :Quando ativo, os veículos não farão manutenção se não puderem avariar +STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Ativar limites de velocidade para vagões: {STRING} STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Quando activo, usar também os limites de velocidade das carruagens para decidir a velocidade máxima de um comboio STR_CONFIG_SETTING_DISABLE_ELRAILS :Desactivar carris electrificados: {STRING} STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Activar esta preferência desactiva o requisito de electrificar carris para que composições eléctricas os possam utilizar @@ -1546,6 +1552,7 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Activar economi STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Quando activa, a produção de indústrias muda frequentemente, em pequenos incrementos. Esta preferência não costuma ter efeito, se os tipos de indústria forem provenientes de um NewGRF STR_CONFIG_SETTING_ALLOW_SHARES :Permite comprar acções de outras empresas: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Quando activo, permite a compra e venda de acções de companhias. As acções apenas estarão disponíveis quando a companhia atinge uma determinada idade. +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Definir a idade mínima de uma companhia a partir da qual outros jogadores poderão comprar ou vender ações da mesma. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Percentagem do lucro do serviço a pagar em trajectos de um transporte que alimenta outro transporte: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Percentagem da receita dada a trajectos intermédios em sistemas em que um transporte alimenta outro, dando maior controlo sobre a receita STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Ao arrastar, colocar sinais a cada: {STRING} @@ -1560,12 +1567,12 @@ STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Mostrar uma jan STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Tipo de farol padrão para construir: {STRING} STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Tipo de sinal a usar por omissão STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Sinais de bloqueio -STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Sinais de rota +STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Sinais de trajeto STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :Sinais de sentido único STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Trocar tipos de faróis: {STRING} STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Mostrar uma janela para escolher o tipo de sinais a construir, em vez de escolher a rotação de sinais com +clique em sinais -STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Apenas sinais de bloqueio -STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Apenas sinais de rota +STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Apenas sinais de bloco +STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Apenas sinais de trajeto STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :Todos STR_CONFIG_SETTING_TOWN_LAYOUT :Disposição de estradas para novas localidades: {STRING} @@ -1724,10 +1731,10 @@ STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS :Sistema de enca STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS_HELPTEXT :Sistema de encaminhar comboios STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES :Sistema de encaminhar veículos rodoviários: {STRING} STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES_HELPTEXT :Sistema de encaminhar veículos rodoviários -STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS :Sistema de encaminhar barcos: {STRING} -STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Sistema de encaminhar barcos +STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS :Sistema de encaminhar navios: {STRING} +STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Sistema de encaminhar navios STR_CONFIG_SETTING_REVERSE_AT_SIGNALS :Inversão automática nos sinais: {STRING} -STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Permitir que os comboios invertam o sentido de marcha nos sinais caso estejam à espera muito tempo +STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Permitir que os comboios invertam o sentido de marcha nos sinais, caso estejam à espera muito tempo STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Alterar valor @@ -1754,32 +1761,32 @@ STR_CONFIG_ERROR_SPRITECACHE_TOO_BIG :{WHITE}Falha a # Intro window STR_INTRO_CAPTION :{WHITE}OpenTTD {REV} -STR_INTRO_NEW_GAME :{BLACK}Novo Jogo -STR_INTRO_LOAD_GAME :{BLACK}Abrir Jogo -STR_INTRO_PLAY_SCENARIO :{BLACK}Jogar Cenário +STR_INTRO_NEW_GAME :{BLACK}Novo jogo +STR_INTRO_LOAD_GAME :{BLACK}Carregar jogo +STR_INTRO_PLAY_SCENARIO :{BLACK}Jogar cenário STR_INTRO_PLAY_HEIGHTMAP :{BLACK}Jogar mapa de alturas -STR_INTRO_SCENARIO_EDITOR :{BLACK}Editor de Cenário +STR_INTRO_SCENARIO_EDITOR :{BLACK}Editor de cenário STR_INTRO_MULTIPLAYER :{BLACK}Multi-jogador -STR_INTRO_GAME_OPTIONS :{BLACK}Opções do Jogo -STR_INTRO_HIGHSCORE :{BLACK}Tabela de Classificações +STR_INTRO_GAME_OPTIONS :{BLACK}Opções de jogo +STR_INTRO_HIGHSCORE :{BLACK}Tabela de classificações STR_INTRO_CONFIG_SETTINGS_TREE :{BLACK}Definições STR_INTRO_NEWGRF_SETTINGS :{BLACK}Definições NewGRF -STR_INTRO_ONLINE_CONTENT :{BLACK}Verificar Conteúdo Online -STR_INTRO_SCRIPT_SETTINGS :{BLACK}Definições de IA / Script de Jogo +STR_INTRO_ONLINE_CONTENT :{BLACK}Verificar conteúdo online +STR_INTRO_SCRIPT_SETTINGS :{BLACK}Definições de IA/Script de jogo STR_INTRO_QUIT :{BLACK}Sair STR_INTRO_TOOLTIP_NEW_GAME :{BLACK}Iniciar um novo jogo. Ctrl+Clique salta a configuração do mapa -STR_INTRO_TOOLTIP_LOAD_GAME :{BLACK}Carregar um jogo gravado -STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP :{BLACK}Iniciar novo jogo, usando um mapa de alturas como paisagem +STR_INTRO_TOOLTIP_LOAD_GAME :{BLACK}Carregar um jogo guardado +STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP :{BLACK}Iniciar novo jogo, usando um mapa de alturas como terreno STR_INTRO_TOOLTIP_PLAY_SCENARIO :{BLACK}Iniciar um novo jogo, utilizando um cenário personalizado guardado no disco STR_INTRO_TOOLTIP_SCENARIO_EDITOR :{BLACK}Criar um cenário de jogo personalizado STR_INTRO_TOOLTIP_MULTIPLAYER :{BLACK}Começar um jogo multi-jogador -STR_INTRO_TOOLTIP_TEMPERATE :{BLACK}Seleccionar cenário do estilo 'temperado' -STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Seleccionar cenário do estilo 'subárctico' -STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Seleccionar cenário do estilo 'subtropical' -STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Seleccionar cenário do estilo 'terra dos brinquedos' +STR_INTRO_TOOLTIP_TEMPERATE :{BLACK}Selecionar terreno do estilo "temperado" +STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Selecionar terreno do estilo "subárctico" +STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Selecionar terreno do estilo "subtropical" +STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Selecionar terreno do estilo "terra dos brinquedos" STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Mostrar opções de jogo STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Mostrar tabela de classificações @@ -1819,13 +1826,13 @@ STR_CHEAT_MONEY :{LTBLUE}Aumenta STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Jogando como empresa: {ORANGE}{COMMA} STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Bulldozer mágico (destrói indústrias, objectos amovíveis etc.): {ORANGE}{STRING} STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Os túneis poderão cruzar-se: {ORANGE}{STRING} -STR_CHEAT_NO_JETCRASH :{LTBLUE}Aviões a jacto não irão ter acidentes (frequentes) em aeroportos pequenos: {ORANGE}{STRING} +STR_CHEAT_NO_JETCRASH :{LTBLUE}Aviões a jato não irão ter acidentes (frequentes) em aeroportos pequenos: {ORANGE}{STRING} STR_CHEAT_EDIT_MAX_HL :{LTBLUE}Editar altura máxima do mapa: {ORANGE}{NUM} STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT :{WHITE}Editar altura máxima de montanhas no mapa STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE :Terreno temperado STR_CHEAT_SWITCH_CLIMATE_SUB_ARCTIC_LANDSCAPE :Terreno subárctico STR_CHEAT_SWITCH_CLIMATE_SUB_TROPICAL_LANDSCAPE :Terreno subtropical -STR_CHEAT_SWITCH_CLIMATE_TOYLAND_LANDSCAPE :Terreno 'Terra dos Brinquedos' +STR_CHEAT_SWITCH_CLIMATE_TOYLAND_LANDSCAPE :Terreno terra dos brinquedos STR_CHEAT_CHANGE_DATE :{LTBLUE}Alterar data: {ORANGE}{DATE_SHORT} STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Alterar ano actual STR_CHEAT_SETUP_PROD :{LTBLUE}Activar modificação de valores de produção: {ORANGE}{STRING} @@ -1836,7 +1843,7 @@ STR_LIVERY_CAPTION :{WHITE}{COMPANY STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Exibir esquema de cores geral STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Exibir esquemas de cores dos comboios STR_LIVERY_ROAD_VEHICLE_TOOLTIP :{BLACK}Exibir esquemas de cores dos veículos rodoviários -STR_LIVERY_SHIP_TOOLTIP :{BLACK}Exibir esquemas de cores dos barcos +STR_LIVERY_SHIP_TOOLTIP :{BLACK}Exibir esquemas de cores dos navios STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Exibir esquema de cores da aeronave STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Seleccione a cor primária para o veículo seleccionado. Ctrl+Clique vai usar esta cor para todos os esquemas STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Seleccione a cor secundária para o esquema seleccionado. Ctrl+Click afetará esta escolha para todos os esquemas @@ -1858,12 +1865,12 @@ STR_LIVERY_PASSENGER_WAGON_MAGLEV :Carruagem de Pa STR_LIVERY_FREIGHT_WAGON :Vagão de Carga STR_LIVERY_BUS :Autocarro STR_LIVERY_TRUCK :Veículo de Mercadorias -STR_LIVERY_PASSENGER_SHIP :Barco de Passageiros -STR_LIVERY_FREIGHT_SHIP :Barco Cargueiro +STR_LIVERY_PASSENGER_SHIP :Navio de passageiros +STR_LIVERY_FREIGHT_SHIP :Navio cargueiro STR_LIVERY_HELICOPTER :Helicóptero STR_LIVERY_SMALL_PLANE :Avião de Pequenas Dimensões STR_LIVERY_LARGE_PLANE :Avião de Grandes Dimensões -STR_LIVERY_PASSENGER_TRAM :Eléctrico de Passageiros +STR_LIVERY_PASSENGER_TRAM :Elétrico de passageiros STR_LIVERY_FREIGHT_TRAM :Eléctrico de Mercadorias # Face selection window @@ -2262,7 +2269,7 @@ STR_CONTENT_NO_ZLIB_SUB :{WHITE}... não STR_CONTENT_TYPE_BASE_GRAPHICS :Gráficos base STR_CONTENT_TYPE_NEWGRF :NewGRF STR_CONTENT_TYPE_AI :IA -STR_CONTENT_TYPE_AI_LIBRARY :Livraria IA +STR_CONTENT_TYPE_AI_LIBRARY :Biblioteca IA STR_CONTENT_TYPE_SCENARIO :Cenário STR_CONTENT_TYPE_HEIGHTMAP :Mapa de alturas STR_CONTENT_TYPE_BASE_SOUNDS :Sons base @@ -2290,7 +2297,7 @@ STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}Sim, obt STR_MISSING_GRAPHICS_NO_QUIT :{BLACK}Não, sair do OpenTTD # Transparency settings window -STR_TRANSPARENCY_CAPTION :{WHITE}Opções de Transparência +STR_TRANSPARENCY_CAPTION :{WHITE}Opções de transparência STR_TRANSPARENT_SIGNS_TOOLTIP :{BLACK}Comutar transparência para sinais. Ctrl+Clique para bloquear. STR_TRANSPARENT_TREES_TOOLTIP :{BLACK}Comutar transparência das árvores. Ctrl+Clique para bloquear. STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}Comutar transparência das casas. Ctrl+Clique para bloquear. @@ -2331,34 +2338,34 @@ STR_JOIN_WAYPOINT_CAPTION :{WHITE}Juntar p STR_JOIN_WAYPOINT_CREATE_SPLITTED_WAYPOINT :{YELLOW}Construir um ponto de controlo separado # Rail construction toolbar -STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION :Construir caminhos-de-ferro -STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Construir caminhos-de-ferro electrificados +STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION :Construção de caminhos-de-ferro +STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Construção de caminhos-de-ferro eletrificados STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Construir monocarril STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Construir Maglev STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Construir linha férrea. Ctrl alterna a construção/remoção de linha férrea. Shift alterna contruir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Construir caminhos-de-ferro usando o modo automático. Ctrl alterna a construção/remoção de caminhos-de-ferro. Shift alterna contruir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Construir depósito ferroviário (para compra e manutenção de comboios). Shift alterna contruir/mostrar custo estimado -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Converter linha em ponto de controlo. Ctrl permite juntar pontos de controlo. Shift alterna contruir/mostrar custo estimado +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Converter linha em ponto de controlo. Ctrl permite juntar pontos de controlo. Shift alterna construir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Construir estação ferroviária. Ctrl permite juntar estações. Shift alterna contruir/mostrar custo estimado -STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Construir sinais ferroviários. Ctrl alterna entre sinais clássicos/luminosos{}Arrastar constrói sinais ao longo de uma linha recta de carris. Ctrl constrói sinais até a próxima junção ou sinal{}Ctrl+Clique alterna entre abrir a janela de selecção de sinais. Shift alterna contruir/mostrar custo estimado +STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Construir sinais ferroviários. Ctrl alterna entre semáforos/sinais elétricos{}Arrastar constrói sinais ao longo de uma linha reta de carris. Ctrl constrói sinais até a próxima junção ou sinal{}Ctrl+Clique alterna entre abrir a janela de seleção de sinais. Shift alterna construir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Construir ponte ferroviária. Shift alterna contruir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Construir túnel ferroviário. Shift alterna contruir/mostrar custo estimado STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Alternar entre construir/remover linha férrea, sinais, pontos de passagem e estações. Fixar o Ctrl também remove a linha férrea de pontos de passagem e estações -STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Converter/Atualizar tipo de linha. Shift alterna contruir/mostrar custo estimado +STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Converter/Atualizar tipo de linha. Shift alterna construir/mostrar custo estimado STR_RAIL_NAME_RAILROAD :Caminhos-de-ferro -STR_RAIL_NAME_ELRAIL :Caminhos-de-ferro elétricos +STR_RAIL_NAME_ELRAIL :Caminhos-de-ferro elétrificados STR_RAIL_NAME_MONORAIL :Monocarril STR_RAIL_NAME_MAGLEV :Maglev # Rail depot construction window -STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Orientação do Depósito +STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Orientação do depósito STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Seleccionar a orientação do depósito # Rail waypoint construction window STR_WAYPOINT_CAPTION :{WHITE}Ponto de controlo -STR_WAYPOINT_GRAPHICS_TOOLTIP :{BLACK}Seleccione um tipo de ponto de controlo +STR_WAYPOINT_GRAPHICS_TOOLTIP :{BLACK}Selecione um tipo de ponto de controlo # Rail station construction window STR_STATION_BUILD_RAIL_CAPTION :{WHITE}Selecção de Estação @@ -2379,18 +2386,18 @@ STR_STATION_CLASS_WAYP :Pontos de passa # Signal window STR_BUILD_SIGNAL_CAPTION :{WHITE}Selecção de Sinal -STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Sinal Normal (semáforo){}Este é o tipo mais básico de sinal, que só permite um comboio dentro da mesma linha ferroviária ao mesmo tempo. -STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Sinal de Entrada (semáforo){}Verde enquanto existir um ou mais sinais de saída verdes no seguimento da linha. Caso contrário, ficará vermelho -STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Sinal de Saída (semáforo){}Funciona da mesma forma que o sinal normal mas é necessário para conseguir a cor correcta nos pré-sinais de entrada e combinado. -STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Sinal Combinado (semáforo){}O sinal combinado funciona como um sinal de entrada e de saída. Este permite construir grandes "árvores" de pré-sinais. -STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Sinal (semáforo){}Os sinais permitem que vários comboios utilizem a mesma linha desde que consigam chegar aos seus destinos em segurança. Sinais normais podem ser passados no sentido contrário. -STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Sinal de sentido único (semáforo){}Os sinais permitem que vários comboios utilizem a mesma linha desde que consigam chegar aos seus destinos em segurança. Os comboios não podem passar no sentido oposto dos sinais. -STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Sinal Normal(eléctrico){}Este é o tipo mais básico de sinal, que só permite um comboio dentro da mesma linha ferroviária ao mesmo tempo. -STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Sinal de Entrada (eléctrico){}Verde enquanto existir um ou mais sinais de saída verdes no seguimento da linha. De outro modo ficará vermelho. -STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Sinal de Saída (eléctrico){}Funciona da mesma forma que o sinal normal mas é necessário para conseguir a cor correcta nos pré-sinais de entrada e combinado. -STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sinal Combinado (eléctrico){}O sinal combinado funciona simplesmente como um sinal de entrada e de saída. Este permite construir grandes "árvores" de pré-sinais -STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sinal (eléctrico){}Os sinais permitem que vários comboios entrem na mesma linha ao mesmo tempo, desde que consigam chegar ao seu destino em segurança. Sinais padrão podem ser passados no sentido contrário. -STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Sinal de sentido único (eléctrico){}Um sinal de trajecto permite que mais de um comboio passe ao mesmo tempo um sinal se, o comboio conseguir reservar um caminho para onde posteriormente possa parar sem prejudicar o seguinte. Sinais de um único sentido não podem ser passados no sentido contrário. +STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Sinal de bloco (semáforo){}Este é o tipo mais básico de sinal. Permite apenas a passagem de um comboio dentro de um bloco de linha ao mesmo tempo. +STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Sinal de entrada (semáforo){}Apresenta-se verde enquanto existir um ou mais sinais de saída verdes no seguimento da linha. Caso contrário, ficará vermelho. +STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Sinal de saída (semáforo){}Funciona da mesma forma que o sinal de bloco, mas é necessário para ativar a cor correta nos pré-sinais de entrada e combinado. +STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Sinal combinado (semáforo){}O sinal combinado funciona simultaneamente como um sinal de entrada e de saída. Isto permite a construção de ramificações complexas de pré-sinais. +STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Sinal de trajeto (semáforo){}Permite que vários comboios passem simultaneamente um bloco de linha, desde que consigam reservar um caminho seguro sem prejudicar o veículo seguinte. Os sinais de trajeto padrão podem ser cruzados no sentido contrário. +STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}Sinal de sentido único (semáforo){}Funciona de maneira similar a um sinal de trajeto, mas não pode ser cruzado no sentido contrário. +STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Sinal Normal(eléctrico){}Este é o tipo mais básico de sinal. Permite apenas a passagem de um comboio de cada vez dentro da mesma divisão de linha. +STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Sinal de entrada (eléctrico){}Apresenta-se verde enquanto existir um ou mais sinais de saída verdes no seguimento da linha. De outro modo ficará vermelho. +STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Sinal de saída (eléctrico){}Funciona da mesma forma que o sinal normal, mas é necessário para ativar a cor correta nos pré-sinais de entrada e combinado. +STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Sinal combinado (eléctrico){}O sinal combinado funciona simultaneamente como um sinal de entrada e de saída. Isto permite construir ramificações complexas de pré-sinais. +STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Sinal de trajeto (elétrico){}Permite que vários comboios passem simultaneamente um bloco de linha, desde que consigam reservar um caminho seguro sem prejudicar o veículo seguinte. Os sinais de trajeto padrão podem ser cruzados no sentido contrário. +STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Sinal de sentido único (eléctrico){}Um sinal de trajeto que permite que mais de um comboio passe simultaneamente uma divisão de linha, desde que consiga reservar um caminho para onde possa parar posteriormente sem prejudicar o seguinte. Os sinais de sentido único não podem ser cruzados no sentido contrário. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Conversão de Sinal{}Quando seleccionado, ao fazer clique num sinal existente este será convertido no tipo e variante de sinal seleccionado, Ctrl+clique irá comutar a variante existente. Shift+Clique mostra estimativa do custo de conversão STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Distância de arrasto de sinais STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Reduzir distância de arrasto de sinais @@ -2413,8 +2420,8 @@ STR_BRIDGE_TUBULAR_SILICON :Tubular, Silíc # Road construction toolbar -STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Construir Estradas -STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Construção de Eléctricos +STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Construção de estradas +STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Construção de eléctricos STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Construir estradas. Ctrl alterna a construção/remoção de estradas STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Construir secção de carris para eléctricos. Ctrl alterna a construção/remoção de carris para eléctricos. Shift alterna contruir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Construir estradas usando o modo automático. Ctrl alterna a construção/remoção de estradas. Shift alterna contruir/mostrar custo estimado @@ -2432,10 +2439,14 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Construi STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Construir túnel para eléctricos. Shift alterna contruir/mostrar custo estimado STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Alternar entre construir/remover estradas STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Alternar construir/remover linhas de eléctricos e sinais +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Converter/Atualizar tipo de estrada. Shift alterna construir/mostrar custo estimado +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Converter/Atualizar tipo de carril para eléctricos. Shift alterna construir/mostrar custo estimado +STR_ROAD_NAME_ROAD :Estrada +STR_ROAD_NAME_TRAM :Carris para elétricos # Road depot construction window -STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Orientação do Depósito +STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Orientação do depósito STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Seleccionar a orientação do depósito STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Orientação do depósito para eléctricos STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Escolher a orientação do depósito de eléctricos @@ -2451,14 +2462,14 @@ STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Orienta STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Seleccionar orientação da estação de eléctricos # Waterways toolbar (last two for SE only) -STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Construção de Canais +STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Construção de hidrovia STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Canais STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Construir canais. Shift alterna construção/estimativa de custos STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Construir diques. Shift alterna contruir/mostrar custo estimado -STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Construir depósito naval (para compra e manutenção de barcos). Shift alterna contruir/mostrar custo estimado +STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Construir depósito naval (para compra e manutenção de navio). Shift alterna contruir/mostrar custo estimado STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Construir doca naval. Ctrl permite juntar estações. Shift alterna contruir/mostar custo estimado -STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Bóia de posição, que pode ser usada para marcar pontos de rota adicionais. Shift alterna contrução/mostra de custos estimados -STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Construir aqueduto. Shift alterna contruir/mostar custo estimado +STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Esta bóia de posição pode ser usada para marcar pontos de rota adicionais. Shift alterna construção/mostra de custos estimados +STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Construir aqueduto. Shift alterna contruir/mostrar custo estimado STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Definir área de água.{}Construir um canal, a não ser que a tecla Ctrl esteja pressionada a nível do mar, nesse caso inundará as zonas circundantes STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Colocar rios @@ -2498,10 +2509,10 @@ STR_STATION_BUILD_NOISE :{BLACK}Ruído g # Landscaping toolbar STR_LANDSCAPING_TOOLBAR :{WHITE}Terreno -STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Baixa um canto da terra. Arrastando abaixa o primeiro canto selecionado e os níveis a área selecionada para a altura do canto novo. Ctrl selecciona a área na diagonal. Shift alterna construção/estimativa de custos -STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Elevar um canto da terra. Arrastando eleva o primeiro canto selecionado e os níveis a área selecionada para a altura do canto novo. Ctrl selecciona a área na diagonal. Shift alterna construção/estimativa de custos -STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Nívelar uma área de terra até a altura do primeiro canto selecionado. Ctrl selecciona a área na diagonal. Shift alterna construção/estimativa de custos -STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Comprar terreno para uso futuro. Shift alterna construir/mostrar custo estimado +STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Baixar terreno. Ao pressionar e arrastar o cursor, o primeiro ponto selecionado é rebaixado e o terreno da área selecionada é nivelado com a nova altura do primeiro ponto. Ctrl seleciona a área na diagonal. Shift mostra a estimativa de custos. +STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Elevar terreno. Ao pressionar e arrastar o cursor, o primeiro ponto selecionado é elevado e o terreno da área selecionada é nivelado com a nova altura do primeiro ponto. Ctrl seleciona a área na diagonal. Shift mostra a estimativa de custos. +STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Nívelar uma área de terreno até a altura do primeiro ponto selecionado. Ctrl selecciona a área na diagonal. Shift mostra a estimativa de custos. +STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Comprar terreno para uso futuro. Shift mostra a estimativa de custos. # Object construction window STR_OBJECT_BUILD_CAPTION :{WHITE}Selecção de Objecto @@ -2517,8 +2528,8 @@ STR_OBJECT_CLASS_TRNS :Transmissores STR_PLANT_TREE_CAPTION :{WHITE}Árvores STR_PLANT_TREE_TOOLTIP :{BLACK}Escolha um tipo de árvore para plantar. Se o quadrado já tiver uma árvore, serão adicionadas mais árvores de difrentes tipos independentemente do tipo selecionado STR_TREES_RANDOM_TYPE :{BLACK}Árvores de tipo aleatório -STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Colocar árvores de tipo aleatório. Shift alterna contruir/mostrar custo estimado -STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Plantar Aleatoriamente +STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Colocar árvores de tipo aleatório. Shift alterna construir/mostrar custo estimado +STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Plantar aleatoriamente STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plantar árvores aleatoriamente no terreno # Land generation window (SE) @@ -2608,8 +2619,8 @@ STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Autorida STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Nenhum STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coordenadas: {LTBLUE}{NUM} x {NUM} x {NUM} ({STRING}) STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Construído: {LTBLUE}{DATE_LONG} -STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Tipo de Estação: {LTBLUE}{STRING} -STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Tipo de Estação: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Tipo de estação: {LTBLUE}{STRING} +STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Tipo de estação: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Tipo de aeroporto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Nome do aeroporto: {LTBLUE}{STRING} STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Nome do quadrado do aeroporto: {LTBLUE}{STRING} @@ -2617,14 +2628,17 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Carga aceite: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Tipo de carril: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_ROAD_TYPE :{BLACK}Tipo de estrada: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}Tipo de elétrico: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Limite de velocidade da linha: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Limite de velocidade da estrada: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Limite de velocidade para elétricos: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Rochas -STR_LAI_CLEAR_DESCRIPTION_ROUGH_LAND :Terreno Irregular -STR_LAI_CLEAR_DESCRIPTION_BARE_LAND :Terreno Deserto -STR_LAI_CLEAR_DESCRIPTION_GRASS :Terreno de Prados +STR_LAI_CLEAR_DESCRIPTION_ROUGH_LAND :Terreno irregular +STR_LAI_CLEAR_DESCRIPTION_BARE_LAND :Terreno deserto +STR_LAI_CLEAR_DESCRIPTION_GRASS :Prados STR_LAI_CLEAR_DESCRIPTION_FIELDS :Campos STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Neve STR_LAI_CLEAR_DESCRIPTION_DESERT :Deserto @@ -2664,7 +2678,7 @@ STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Linha de eléct STR_LAI_TOWN_INDUSTRY_DESCRIPTION_UNDER_CONSTRUCTION :{STRING} (em construção) STR_LAI_TREE_NAME_TREES :Árvores -STR_LAI_TREE_NAME_RAINFOREST :Floresta Tropical +STR_LAI_TREE_NAME_RAINFOREST :Floresta tropical STR_LAI_TREE_NAME_CACTUS_PLANTS :Cactos STR_LAI_STATION_DESCRIPTION_RAILROAD_STATION :Estação ferroviária @@ -2728,6 +2742,7 @@ STR_FRAMERATE_SPEED_FACTOR :{BLACK}Factor d STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Quão rápido o jogo está a ser executado, comparado com a velocidade esperada na taxa de simulação normal. STR_FRAMERATE_CURRENT :{WHITE}Actual STR_FRAMERATE_AVERAGE :{WHITE}Média +STR_FRAMERATE_MEMORYUSE :{WHITE}Memória STR_FRAMERATE_DATA_POINTS :{BLACK}Dados baseados em {COMMA} medições STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms @@ -2735,6 +2750,7 @@ STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} fotograma/s STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} fotograma/s STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} fotograma/s +STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! @@ -2759,7 +2775,7 @@ STR_FRAMETIME_CAPTION_GAMELOOP :Loop de jogo STR_FRAMETIME_CAPTION_GL_ECONOMY :Movimentação de carga STR_FRAMETIME_CAPTION_GL_TRAINS :Quantidade de atraso no percurso do Comboio STR_FRAMETIME_CAPTION_GL_ROADVEHS :Quantidade de atraso no percurso do veículo rodoviário -STR_FRAMETIME_CAPTION_GL_SHIPS :Quantidade de atraso no percurso do barco +STR_FRAMETIME_CAPTION_GL_SHIPS :Quantidade de atraso no percurso do navio STR_FRAMETIME_CAPTION_GL_AIRCRAFT :Quantidade de atraso no percurso de Aeronave STR_FRAMETIME_CAPTION_GL_LANDSCAPE :Quantidade de Atraso no Percurso Mundial STR_FRAMETIME_CAPTION_GL_LINKGRAPH :Atraso no gráfico de ligação @@ -3248,7 +3264,7 @@ STR_CARGO_RATING_MEDIOCRE :Medíocre STR_CARGO_RATING_GOOD :Bom STR_CARGO_RATING_VERY_GOOD :Muito Bom STR_CARGO_RATING_EXCELLENT :Excelente -STR_CARGO_RATING_OUTSTANDING :Proeminente +STR_CARGO_RATING_OUTSTANDING :Excecional ############ range for rating ends STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visualização na localização da estação. Ctrl+Clique abre um novo visualizador na localização da estação @@ -3257,7 +3273,7 @@ STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Alterar STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Mostrar todos os comboios que têm esta estação nas ordens de serviço STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Mostrar todos os veículos rodoviários que têm esta estação nas ordens de serviço STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP :{BLACK}Mostrar todas as aeronaves que têm esta estação nas ordens de serviço -STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP :{BLACK}Mostrar todos os barcos que têm esta estação nas ordens de serviço +STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP :{BLACK}Mostrar todos os navios que têm esta estação nas ordens de serviço STR_STATION_VIEW_RENAME_STATION_CAPTION :Alterar nome de estação/local de carga @@ -3282,18 +3298,18 @@ STR_FINANCES_SECTION_NEW_VEHICLES :{GOLD}Novos Ve STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Circulação de Comboios STR_FINANCES_SECTION_ROAD_VEHICLE_RUNNING_COSTS :{GOLD}Circulação de Veículos STR_FINANCES_SECTION_AIRCRAFT_RUNNING_COSTS :{GOLD}Circulação de Aeronaves -STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Circulação de Barcos +STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Circulação de navios STR_FINANCES_SECTION_PROPERTY_MAINTENANCE :{GOLD}Manutenção de Propriedades STR_FINANCES_SECTION_TRAIN_INCOME :{GOLD}Lucros dos Comboios -STR_FINANCES_SECTION_ROAD_VEHICLE_INCOME :{GOLD}Lucros dos V. Rodoviários +STR_FINANCES_SECTION_ROAD_VEHICLE_INCOME :{GOLD}Lucros dos veículos rodoviários STR_FINANCES_SECTION_AIRCRAFT_INCOME :{GOLD}Lucros das Aeronaves -STR_FINANCES_SECTION_SHIP_INCOME :{GOLD}Lucros dos Barcos +STR_FINANCES_SECTION_SHIP_INCOME :{GOLD}Lucros dos navios STR_FINANCES_SECTION_LOAN_INTEREST :{GOLD}Juros do Empréstimo STR_FINANCES_SECTION_OTHER :{GOLD}Outros STR_FINANCES_NEGATIVE_INCOME :{BLACK}-{CURRENCY_LONG} STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURRENCY_LONG} STR_FINANCES_TOTAL_CAPTION :{WHITE}Total: -STR_FINANCES_BANK_BALANCE_TITLE :{WHITE}Balanço Bancário +STR_FINANCES_BANK_BALANCE_TITLE :{WHITE}Balanço bancário STR_FINANCES_LOAN_TITLE :{WHITE}Empréstimo STR_FINANCES_MAX_LOAN :{WHITE}Empréstimo Máximo: {BLACK}{CURRENCY_LONG} STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG} @@ -3313,7 +3329,7 @@ STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Veículos STR_COMPANY_VIEW_TRAINS :{WHITE}{COMMA} comboio{P "" s} STR_COMPANY_VIEW_ROAD_VEHICLES :{WHITE}{COMMA} veículo{P "" s} rodoviário{P "" s} STR_COMPANY_VIEW_AIRCRAFT :{WHITE}{COMMA} aeronave{P "" s} -STR_COMPANY_VIEW_SHIPS :{WHITE}{COMMA} barco{P "" s} +STR_COMPANY_VIEW_SHIPS :{WHITE}{COMMA} navio{P "" s} STR_COMPANY_VIEW_VEHICLES_NONE :{WHITE}Nenhum STR_COMPANY_VIEW_COMPANY_VALUE :{GOLD}Valor da empresa: {WHITE}{CURRENCY_LONG} STR_COMPANY_VIEW_SHARES_OWNED_BY :{WHITE}({COMMA}% propriedade de {COMPANY}) @@ -3334,7 +3350,7 @@ STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Reconstr STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Detalhes STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}Ver contagens de infraestrutura detalhadas -STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Nova Cara +STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}Nova cara STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Seleccione uma nova cara para o presidente STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Cores STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Alterar cores dos veículos @@ -3344,9 +3360,9 @@ STR_COMPANY_VIEW_PRESIDENT_NAME_BUTTON :{BLACK}Nome do STR_COMPANY_VIEW_PRESIDENT_NAME_TOOLTIP :{BLACK}Alterar nome do presidente STR_COMPANY_VIEW_BUY_SHARE_BUTTON :{BLACK}Comprar 25% das acções -STR_COMPANY_VIEW_SELL_SHARE_BUTTON :{BLACK}Vender 25% das acções +STR_COMPANY_VIEW_SELL_SHARE_BUTTON :{BLACK}Vender 25% das ações STR_COMPANY_VIEW_BUY_SHARE_TOOLTIP :{BLACK}Comprar 25% das acções nesta empresa. Shift+Clique mostra valor estimado sem comprar nenhuma acção -STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP :{BLACK}Vender 25% das acções nesta empresa. Shift+Clique mostra valor estimado sem vender nenhuma acção +STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP :{BLACK}Vender 25% das ações nesta empresa. Shift+Clique mostra valor estimado sem vender nenhuma ação STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION :Nome da Empresa STR_COMPANY_VIEW_PRESIDENT_S_NAME_QUERY_CAPTION :Nome do Presidente @@ -3368,8 +3384,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Indústrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nenhuma - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportado) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nomes de indústrias - clique no nome para centrar-se na indústria. Ctrl+Clique abre um novo visualizador na localização da indústria @@ -3395,19 +3409,19 @@ STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Mudar o # Vehicle lists STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING} - {COMMA} Comboio{P "" s} STR_VEHICLE_LIST_ROAD_VEHICLE_CAPTION :{WHITE}{STRING} - {COMMA} Veículo{P "" s} Rodoviário{P "" s} -STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING} - {COMMA} Barco{P "" s} +STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING} - {COMMA} Navio{P "" s} STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING} - {COMMA} Aeronave{P "" s} STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP :{BLACK}Comboios - clique num comboio para informações STR_VEHICLE_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Veículos rodoviários - clique num veículo para informações -STR_VEHICLE_LIST_SHIP_TOOLTIP :{BLACK}Barcos - clique num barco para informações +STR_VEHICLE_LIST_SHIP_TOOLTIP :{BLACK}Navios - clique num navio para informações STR_VEHICLE_LIST_AIRCRAFT_TOOLTIP :{BLACK}Aeronaves - clique numa aeronave para informações STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Lucro deste ano: {CURRENCY_LONG} (último ano: {CURRENCY_LONG}) STR_VEHICLE_LIST_AVAILABLE_TRAINS :Comboios Disponíveis STR_VEHICLE_LIST_AVAILABLE_ROAD_VEHICLES :Veículos Disponíveis -STR_VEHICLE_LIST_AVAILABLE_SHIPS :Barcos Disponíveis +STR_VEHICLE_LIST_AVAILABLE_SHIPS :Navios disponíveis STR_VEHICLE_LIST_AVAILABLE_AIRCRAFT :Aeronaves Disponíveis STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP :{BLACK}Ver lista de modelos disponíveis de locomotivas para este tipo de veículo. @@ -3429,12 +3443,12 @@ STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION :{WHITE}Ordens p # Group window STR_GROUP_ALL_TRAINS :Todos os Comboios STR_GROUP_ALL_ROAD_VEHICLES :Todos os veículos rodoviários -STR_GROUP_ALL_SHIPS :Todos os barcos +STR_GROUP_ALL_SHIPS :Todos os navios STR_GROUP_ALL_AIRCRAFTS :Todas as aeronaves STR_GROUP_DEFAULT_TRAINS :Comboios sem grupo STR_GROUP_DEFAULT_ROAD_VEHICLES :Veículos rodoviários sem grupo -STR_GROUP_DEFAULT_SHIPS :Barcos sem grupo +STR_GROUP_DEFAULT_SHIPS :Navios sem grupo STR_GROUP_DEFAULT_AIRCRAFTS :Aeronaves sem grupo STR_GROUP_COUNT_WITH_SUBGROUP :{TINY_FONT}{COMMA} (+{COMMA}) @@ -3465,12 +3479,14 @@ STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Novos Veículos STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Novos Veículos Monocarril STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Novos Veículos Maglev -STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Novos Veículos Rodoviários +STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Novos veículos rodoviários +STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION :Novos elétricos ############ range for vehicle availability starts STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Novos Veículos Ferroviários -STR_BUY_VEHICLE_SHIP_CAPTION :Novos Barcos -STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Nova Aeronave +STR_BUY_VEHICLE_ROAD_VEHICLE_ALL_CAPTION :Novos veículos rodoviários +STR_BUY_VEHICLE_SHIP_CAPTION :Novos navios +STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Nova aeronave ############ range for vehicle availability ends STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Custo: {GOLD}{CURRENCY_LONG}{BLACK} Peso: {GOLD}{WEIGHT_SHORT} @@ -3504,24 +3520,24 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Lista de STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Lista de selecção de barcos. Clique num navio para informações. Ctrl+Clique para alternar/ocultar o tipo de barco STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Lista de aeronaves - clique na aeronave para informações -STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Comprar Veículo -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Comprar Veículo -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Comprar Barco -STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Comprar Aeronave +STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Comprar veículo +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Comprar veículo +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Comprar navio +STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Comprar aeronave -STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e Reconverter veiculo +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e reconverter veiculo STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e Reconverter Veículo -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e Converter Barco -STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e Adaptar Carga da Aeronave +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e converter navio +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Comprar e adaptar carga da aeronave STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar o veículo ferroviário seleccionado. Shift+Clique mostra estimativa de custo, sem comprar -STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar o veículo rodoviário seleccionado. Shift+Clique mostra estimativa de custo, sem comprar -STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar barco seleccionado. Shift+Clique mostra estimativa de custo, sem comprar +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar o veículo rodoviário selecionado. Shift+Clique mostra estimativa de custo, sem comprar +STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar navio selecionado. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Comprar aeronave seleccionada. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter veículo ferroviário seleccionado. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :Comprar e converter veículo rodoviário seleccionado. Shift+Clique mostra estimativa de custo, sem comprar -STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter barco seleccionado. Shift+Clique mostra estimativa de custo, sem comprar +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter navio seleccionado. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Comprar e converter aeronave seleccionada. Shift+Clique mostra estimativa de custo, sem comprar STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Renomear @@ -3531,7 +3547,7 @@ STR_BUY_VEHICLE_AIRCRAFT_RENAME_BUTTON :{BLACK}Renomear STR_BUY_VEHICLE_TRAIN_RENAME_TOOLTIP :{BLACK}Renomear tipo de veículo ferroviário STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_TOOLTIP :{BLACK}Renomear tipo de veículo rodoviário -STR_BUY_VEHICLE_SHIP_RENAME_TOOLTIP :{BLACK}Renomear tipo de barco +STR_BUY_VEHICLE_SHIP_RENAME_TOOLTIP :{BLACK}Renomear tipo de navio STR_BUY_VEHICLE_AIRCRAFT_RENAME_TOOLTIP :{BLACK}Renomear tipo de aeronave STR_BUY_VEHICLE_TRAIN_HIDE_TOGGLE_BUTTON :{BLACK}Esconder @@ -3546,12 +3562,12 @@ STR_BUY_VEHICLE_AIRCRAFT_SHOW_TOGGLE_BUTTON :{BLACK}Mostrar STR_BUY_VEHICLE_TRAIN_HIDE_SHOW_TOGGLE_TOOLTIP :{BLACK}Alternar mostrar/ocultar o tipo de veículo ferroviário STR_BUY_VEHICLE_ROAD_VEHICLE_HIDE_SHOW_TOGGLE_TOOLTIP :{BLACK}Alternar mostrar/ocultar o tipo de veículo rodoviário -STR_BUY_VEHICLE_SHIP_HIDE_SHOW_TOGGLE_TOOLTIP :{BLACK}Define mostrar/esconder tipo de barco +STR_BUY_VEHICLE_SHIP_HIDE_SHOW_TOGGLE_TOOLTIP :{BLACK}Definir mostrar/esconder tipo de navio STR_BUY_VEHICLE_AIRCRAFT_HIDE_SHOW_TOGGLE_TOOLTIP :{BLACK}Define mostrar/esconder tipo de aeronave STR_QUERY_RENAME_TRAIN_TYPE_CAPTION :{WHITE}Renomear tipo de veículo ferroviário STR_QUERY_RENAME_ROAD_VEHICLE_TYPE_CAPTION :{WHITE}Renomear tipo de veículo rodoviário -STR_QUERY_RENAME_SHIP_TYPE_CAPTION :{WHITE}Renomear tipo de barco +STR_QUERY_RENAME_SHIP_TYPE_CAPTION :{WHITE}Renomear tipo de navio STR_QUERY_RENAME_AIRCRAFT_TYPE_CAPTION :{WHITE}Renomear tipo de aeronave # Depot window @@ -3567,44 +3583,44 @@ STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Comboios - arraste o veículo com o botão esquerdo do rato para adicionar/remover do comboio, clique com o botão direito do rato para informações. Fixe o Ctrl para fazer com que as duas funções se apliquem à seguinte cadeia STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Veículos - faça clique direito num veículo para informações -STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Barcos - faça clique direito num barco para informações +STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Navios - faça clique direito num navio para informações STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aeronave - faça clique direito na aeronave para informações STR_DEPOT_TRAIN_SELL_TOOLTIP :{BLACK}Arraste o veículo ferroviário para aqui para o vender STR_DEPOT_ROAD_VEHICLE_SELL_TOOLTIP :{BLACK}Arraste o veículo rodoviário para aqui para o vender -STR_DEPOT_SHIP_SELL_TOOLTIP :{BLACK}Arraste o barco para aqui para o vender +STR_DEPOT_SHIP_SELL_TOOLTIP :{BLACK}Arraste o navio para aqui para o vender STR_DEPOT_AIRCRAFT_SELL_TOOLTIP :{BLACK}Arraste a aeronave para aqui para a vender STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP :{BLACK}Arrastar locomotiva para aqui para vender todo o comboio STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TOOLTIP :{BLACK}Vender todos os comboios no depósito STR_DEPOT_SELL_ALL_BUTTON_ROAD_VEHICLE_TOOLTIP :{BLACK}Vender todos os veículos no depósito -STR_DEPOT_SELL_ALL_BUTTON_SHIP_TOOLTIP :{BLACK}Vender todos os barcos no depósito +STR_DEPOT_SELL_ALL_BUTTON_SHIP_TOOLTIP :{BLACK}Vender todos os navios no depósito STR_DEPOT_SELL_ALL_BUTTON_AIRCRAFT_TOOLTIP :{BLACK}Vender todas as aeronaves no hangar STR_DEPOT_AUTOREPLACE_TRAIN_TOOLTIP :{BLACK}Autosubstituir todos os comboios no depósito STR_DEPOT_AUTOREPLACE_ROAD_VEHICLE_TOOLTIP :{BLACK}Autosubstituir todos os veículos rodoviários no depósito -STR_DEPOT_AUTOREPLACE_SHIP_TOOLTIP :{BLACK}Autosubstituir todos os barcos no depósito +STR_DEPOT_AUTOREPLACE_SHIP_TOOLTIP :{BLACK}Autosubstituir todos os navios no depósito STR_DEPOT_AUTOREPLACE_AIRCRAFT_TOOLTIP :{BLACK}Autosubstituir todas as aeronaves no hangar STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON :{BLACK}Novos Veículos STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_BUTTON :{BLACK}Novos Veículos -STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}Novos Barcos +STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}Novos navios STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON :{BLACK}Nova Aeronave STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP :{BLACK}Comprar novo veículo ferroviário STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_TOOLTIP :{BLACK}Comprar novo veículo rodoviário -STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP :{BLACK}Comprar novo barco +STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP :{BLACK}Comprar novo navio STR_DEPOT_AIRCRAFT_NEW_VEHICLES_TOOLTIP :{BLACK}Comprar nova aeronave STR_DEPOT_CLONE_TRAIN :{BLACK}Clonar Comboio STR_DEPOT_CLONE_ROAD_VEHICLE :{BLACK}Clonar Veículo -STR_DEPOT_CLONE_SHIP :{BLACK}Clonar Barco +STR_DEPOT_CLONE_SHIP :{BLACK}Clonar navio STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clonar Aeronave STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}Esta acção comprará uma cópia de um comboio, incluindo todas as carruagens. Clique neste botão e, de seguida, num comboio que se encontre dentro ou fora do depósito. Ctrl+Clique irá partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}Esta acção comprará uma cópia de um veículo rodoviário. Clique neste botão e, de seguida, num veículo que se encontre dentro ou fora de um depósito. Ctrl+Clique irá partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar -STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Esta acção comprará uma cópia de um barco. Clique neste botão e, de seguida, num barco que se encontre dentro ou fora do depósito. Ctrl+Clique irá partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}Esta acção comprará uma cópia de um navio. Clique neste botão e, de seguida, num navio que se encontre dentro ou fora do depósito. Ctrl+Clique irá partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}Esta acção comprará uma cópia de uma aeronave. Clique neste botão e, de seguida, numa aeronave que se encontre dentro ou fora do hangar. Ctrl+Clique ira partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização de um depósito ferroviário. Ctrl+Clique abre um novo visualizador na localização do depósito ferroviário @@ -3614,17 +3630,17 @@ STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centrar STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Obter uma lista de todos os comboios em cujas ordens conste este depósito STR_DEPOT_VEHICLE_ORDER_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Obter uma lista de todos os veículos em cujas ordens conste este depósito -STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Obter uma lista de todos os barcos em cujas ordens conste este depósito +STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Obter uma lista de todos os navios em cujas ordens conste este depósito STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TOOLTIP :{BLACK}Obter uma lista de todas as aeronaves em cujas ordens conste um hangar deste aeroporto -STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para imobilizar todos os comboios no depósito -STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para imobilizar todos os veículos no depósito -STR_DEPOT_MASS_STOP_DEPOT_SHIP_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para imobilizar todos os barcos no depósito +STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Pressione o botão esquerdo do rato para imobilizar todos os comboios no depósito +STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Pressione o botão esquerdo do rato para imobilizar todos os veículos no depósito +STR_DEPOT_MASS_STOP_DEPOT_SHIP_TOOLTIP :{BLACK}Pressione o botão esquerdo do rato para imobilizar todos os navios no depósito STR_DEPOT_MASS_STOP_HANGAR_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para imobilizar todas as aeronaves no hangar STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para iniciar todos os comboios no depósito STR_DEPOT_MASS_START_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para iniciar todos os veículos rodoviários no depósito -STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para iniciar todos os barcos no depósito +STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Pressione o botão esquerdo do rato para iniciar todos os navios no depósito STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Pressione botão esquerdo do rato para iniciar todas as aeronaves no hangar STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}Está prestes a vender todos os veículos no depósito. Tem a certeza? @@ -3634,13 +3650,15 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Mensagem STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Projectámos um novo modelo de {STRING} - gostaria de ter um ano de exclusividade de uso deste veículo, de modo a que possamos avaliar o seu desempenho antes de o disponibilizar globalmente? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :locomotiva ferroviária +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :locomotiva de caminhos-de-ferro electrificados STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :locomotiva monocarril STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :locomotiva maglev STR_ENGINE_PREVIEW_ROAD_VEHICLE :veículo rodoviário +STR_ENGINE_PREVIEW_TRAM_VEHICLE :elétrico STR_ENGINE_PREVIEW_AIRCRAFT :aeronave -STR_ENGINE_PREVIEW_SHIP :barco +STR_ENGINE_PREVIEW_SHIP :navio STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Custo: {CURRENCY_LONG} Peso: {WEIGHT_SHORT}{}Velocidade Máx.: {VELOCITY} Potência: {POWER}{}Custo de Circulação: {CURRENCY_LONG}/ano{}Capacidade: {CARGO_LONG} STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Custo: {CURRENCY_LONG} Peso: {WEIGHT_SHORT}{}Velocidade Máx.: {VELOCITY} Potência: {POWER} F.T. Máx.: {6:FORCE}{}Custo de Circulação: {4:CURRENCY_LONG}/ano{}Capacidade: {5:CARGO_LONG} @@ -3654,7 +3672,7 @@ STR_ENGINE_PREVIEW_COST_MAX_SPEED_TYPE_RANGE_CAP_RUNCOST :{BLACK}Custo: { STR_REPLACE_VEHICLES_WHITE :{WHITE}Substituir {STRING} - {STRING} STR_REPLACE_VEHICLE_TRAIN :Comboio STR_REPLACE_VEHICLE_ROAD_VEHICLE :Veículo rodoviário -STR_REPLACE_VEHICLE_SHIP :Barco +STR_REPLACE_VEHICLE_SHIP :Navio STR_REPLACE_VEHICLE_AIRCRAFT :Aeronave STR_REPLACE_VEHICLE_VEHICLES_IN_USE :{YELLOW}Veículos em utilização @@ -3679,14 +3697,18 @@ STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Alternar STR_REPLACE_ENGINES :Locomotivas STR_REPLACE_WAGONS :Vagões STR_REPLACE_ALL_RAILTYPE :Todos os veículos ferroviários +STR_REPLACE_ALL_ROADTYPE :Todos os veículos rodoviários -STR_REPLACE_HELP_RAILTYPE :{BLACK}Seleccione o tipo de carril para o qual deseja efectuar a substituição dos motores +STR_REPLACE_HELP_RAILTYPE :{BLACK}Selecione o tipo de carril para o qual deseja efectuar a substituição dos motores +STR_REPLACE_HELP_ROADTYPE :BLACK}Selecione o tipo de estrada para o qual deseja efectuar a substituição dos motores STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Exibe o tipo de motor que substituirá o que está seleccionado à esquerda, se algum STR_REPLACE_RAIL_VEHICLES :Comboios STR_REPLACE_ELRAIL_VEHICLES :Comboios eléctricos STR_REPLACE_MONORAIL_VEHICLES :Monocarris STR_REPLACE_MAGLEV_VEHICLES :Maglevs +STR_REPLACE_ROAD_VEHICLES :Veículos rodoviários +STR_REPLACE_TRAM_VEHICLES :Elétricos STR_REPLACE_REMOVE_WAGON :{BLACK}Remover vagões: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Forçar a substituição automática a manter o comprimento do comboio, removendo vagões (do início), nas situações em que a substituição da locomotiva pode resultar num comboio mais comprido. @@ -3696,42 +3718,42 @@ STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do comboio. Ctrl+Clique segue o comboio na visualização STR_VEHICLE_VIEW_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do veículo. Ctrl+Clique segue o veículo na visualização -STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do barco. Ctrl+Clique segue o barco na visualização +STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do navio. Ctrl+Clique segue o navio na visualização STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização da aeronave. Ctrl+Clique segue a aeronave na visualização STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar comboio para o depósito STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar veículo para o depósito -STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar barco para o depósito +STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar navio para o depósito STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Mandar aeronave para o hangar -STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Esta acção comprará uma cópia do comboio, incluindo as carruagens. Ctrl+Clique irá partilhar as ordens.Shift+Clique Shift + Clique mostra estimativa de custo, sem comprar -STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Esta acção comprará uma cópia do veículo. Ctrl+Clique para partilhar as ordens.Shift+Clique mostra estimativa de custo, sem comprar -STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Esta acção comprará uma cópia do barco. Ctrl+Clique para partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar -STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Esta acção comprará uma cópia da aeronave. Ctrl+Clique para partilhar as ordens.Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}Esta ação comprará uma cópia do comboio, incluindo as carruagens. Ctrl+Clique irá partilhar as ordens. Shift + Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}Esta ação comprará uma cópia do veículo. Ctrl+Clique para partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}Esta ação comprará uma cópia do navio. Ctrl+Clique para partilhar as ordens. Shift+Clique mostra estimativa de custo, sem comprar +STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}Esta ação comprará uma cópia da aeronave. Ctrl+Clique para partilhar as ordens.Shift+Clique mostra estimativa de custo, sem comprar STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Forçar comboio a prosseguir sem esperar pelo sinal -STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Converter comboio para um tipo de carga diferente -STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Reconverter veículo para transportar outro tipo de carga -STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Adaptar barco para um tipo de carga diferente -STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Adaptar aeronave para um tipo de carga diferente +STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Converter comboio para transportar outro tipo de carga +STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Converter veículo para transportar outro tipo de carga +STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Converter navio para transportar outro tipo de carga +STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Converter aeronave para transportar outro tipo de carga STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Inverter direcção do comboio STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Forçar veículo a dar a volta STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Mostrar ordens do comboio. Ctrl+Clique para mostrar o horário do comboio STR_VEHICLE_VIEW_ROAD_VEHICLE_ORDERS_TOOLTIP :{BLACK}Mostrar ordens do veículo. Ctrl+Clique para mostrar o horário do veículo -STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Mostrar ordens do barco. Ctrl+Clique para mostrar o horário do barco +STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Mostrar ordens do navio. Ctrl+Clique para mostrar o horário do navio STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Mostrar ordens da aeronave. Ctrl+Clique para mostrar o horário da aeronave STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Mostrar detalhes do comboio STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Mostrar detalhes do veículo rodoviário -STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Mostrar detalhes do barco +STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Mostrar detalhes do navio STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Mostrar detalhes da aeronave STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Tarefa actual do comboio - clique aqui para iniciar/parar comboio. Ctrl+Clique para deslocar-se ao destino STR_VEHICLE_VIEW_ROAD_VEHICLE_STATE_START_STOP_TOOLTIP :{BLACK}Tarefa actual do veículo - clique aqui para iniciar/parar veículo. Ctrl+Clique para deslocar-se ao destino -STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Tarefa actual do barco - clique aqui para iniciar/parar barco. Ctrl+Clique para deslocar-se ao destino +STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Tarefa atual do navio - clique aqui para iniciar/parar navio. Ctrl+Clique para deslocar-se ao destino STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Tarefa actual da aeronave - clique aqui para iniciar/parar a aeronave. Ctrl+Clique para deslocar-se ao destino # Messages in the start stop button in the vehicle view @@ -3749,7 +3771,7 @@ STR_VEHICLE_STATUS_HEADING_FOR_STATION_VEL :{LTBLUE}Dirige- STR_VEHICLE_STATUS_NO_ORDERS_VEL :{LTBLUE}Sem ordens, {VELOCITY} STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Dirige-se a {WAYPOINT}, {VELOCITY} STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL :{ORANGE}Dirige-se para {DEPOT}, {VELOCITY} -STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL :{LTBLUE}Efectuar manutenção em {DEPOT}, {VELOCITY} +STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL :{LTBLUE}Efetuar manutenção em {DEPOT}, {VELOCITY} # Vehicle stopped/started animations STR_VEHICLE_COMMAND_STOPPED_SMALL :{TINY_FONT}{RED}Parou @@ -3763,7 +3785,7 @@ STR_VEHICLE_NAME_BUTTON :{BLACK}Nome STR_VEHICLE_DETAILS_TRAIN_RENAME :{BLACK}Renomear comboio STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Renomear veículo rodoviário -STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Renomear barco +STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Renomear navio STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Renomear aeronave STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Idade: {LTBLUE}{STRING}{BLACK} Custo de circulação: {LTBLUE}{CURRENCY_LONG}/ano @@ -3800,7 +3822,7 @@ STR_VEHICLE_DETAILS_PERCENT :Percentagem STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Renomear comboio STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION :{WHITE}Renomear veículo rodoviário -STR_QUERY_RENAME_SHIP_CAPTION :{WHITE}Renomear barco +STR_QUERY_RENAME_SHIP_CAPTION :{WHITE}Renomear navio STR_QUERY_RENAME_AIRCRAFT_CAPTION :{WHITE}Renomear aeronave # Extra buttons for train details windows @@ -3836,18 +3858,18 @@ STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}Nova cap STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Selecionar os veículos a readaptar. Arrastando com o rato permite selecionar vários veículos. Clicando sobre um espaço vazio irá selecionar todo o veículo. Ctrl+Clique irá selecionar um veículo e composição STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Seleccionar tipo de carga do comboio -STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Seleccione o tipo de carga para o veículo -STR_REFIT_SHIP_LIST_TOOLTIP :{BLACK}Seleccionar tipo de carga do barco +STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Selecione o tipo de carga para o veículo +STR_REFIT_SHIP_LIST_TOOLTIP :{BLACK}Selecionar tipo de carga do navio STR_REFIT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Seleccionar tipo de carga da aeronave STR_REFIT_TRAIN_REFIT_BUTTON :{BLACK}Converter comboio STR_REFIT_ROAD_VEHICLE_REFIT_BUTTON :{BLACK}Reconverter veículo -STR_REFIT_SHIP_REFIT_BUTTON :{BLACK}Adaptar barco +STR_REFIT_SHIP_REFIT_BUTTON :{BLACK}Adaptar navio STR_REFIT_AIRCRAFT_REFIT_BUTTON :{BLACK}Adaptar aeronave STR_REFIT_TRAIN_REFIT_TOOLTIP :{BLACK}Converter comboio para transportar a carga seleccionada STR_REFIT_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Reconverter veículo para transportar o tipo de carga seleccionado -STR_REFIT_SHIP_REFIT_TOOLTIP :{BLACK}Adaptar barco para transportar a carga seleccionada +STR_REFIT_SHIP_REFIT_TOOLTIP :{BLACK}Adaptar navio para transportar a carga selecionada STR_REFIT_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Converter aeronave para transportar a carga seleccionada # Order view @@ -4004,7 +4026,7 @@ STR_ORDER_CONDITIONAL_UNCONDITIONAL :Saltar para ord STR_ORDER_CONDITIONAL_NUM :Saltar para ordem {COMMA} quando {STRING} {STRING} {COMMA} STR_ORDER_CONDITIONAL_TRUE_FALSE :Saltar para ordem {COMMA} quando {STRING} {STRING} -STR_INVALID_ORDER :{RED} (Ordem Inválida) +STR_INVALID_ORDER :{RED} (Ordem inválida) # Time table window STR_TIMETABLE_TITLE :{WHITE}{VEHICLE} (Horário) @@ -4046,10 +4068,10 @@ STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Muda o e STR_TIMETABLE_CLEAR_TIME :{BLACK}Apagar Tempo STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Apagar o tempo que dura a ordem seleccionada -STR_TIMETABLE_CHANGE_SPEED :{BLACK}Alterar Limite de Velocidade +STR_TIMETABLE_CHANGE_SPEED :{BLACK}Alterar limite de velocidade STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Mudar a velocidade maxima durante a viagem da ordem selecionada -STR_TIMETABLE_CLEAR_SPEED :{BLACK}Apagar Limite de Velocidade +STR_TIMETABLE_CLEAR_SPEED :{BLACK}Remover limite de velocidade STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Limpar a velocidade maxima durante a viagem da ordem selecionada STR_TIMETABLE_RESET_LATENESS :{BLACK}Apagar Contador Atraso @@ -4076,14 +4098,14 @@ STR_DATE_YEAR_TOOLTIP :{BLACK}Seleccio # AI debug window -STR_AI_DEBUG :{WHITE}Depuração de IA/Script de Jogo +STR_AI_DEBUG :{WHITE}Depuração de IA/Script de jogo STR_AI_DEBUG_NAME_AND_VERSION :{BLACK}{STRING} (v{NUM}) STR_AI_DEBUG_NAME_TOOLTIP :{BLACK}Nome do script STR_AI_DEBUG_SETTINGS :{BLACK}Definições STR_AI_DEBUG_SETTINGS_TOOLTIP :{BLACK}Alterar as definições do script STR_AI_DEBUG_RELOAD :{BLACK}Recarregar IA STR_AI_DEBUG_RELOAD_TOOLTIP :{BLACK}Termina a IA, recarrega o script e reinicia a IA -STR_AI_DEBUG_BREAK_STR_ON_OFF_TOOLTIP :{BLACK}Activar/desactivar paragem quando o registo da IA for igual à string de paragem +STR_AI_DEBUG_BREAK_STR_ON_OFF_TOOLTIP :{BLACK}Ativar/Desativar paragem quando o registo da IA for igual à string de paragem STR_AI_DEBUG_BREAK_ON_LABEL :{BLACK}Parar em: STR_AI_DEBUG_BREAK_STR_OSKTITLE :{BLACK}Parar em STR_AI_DEBUG_BREAK_STR_TOOLTIP :{BLACK}Quando a mensagem do registo da IA for igual a esta string, o jogo é posto em pausa @@ -4092,33 +4114,33 @@ STR_AI_DEBUG_MATCH_CASE_TOOLTIP :{BLACK}Alternar STR_AI_DEBUG_CONTINUE :{BLACK}Continuar STR_AI_DEBUG_CONTINUE_TOOLTIP :{BLACK}Sair da pausa e continuar a IA STR_AI_DEBUG_SELECT_AI_TOOLTIP :{BLACK}Ver saída de depuração desta IA -STR_AI_GAME_SCRIPT :{BLACK}Script de Jogo -STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Verifique o registo do Script de Jogo +STR_AI_GAME_SCRIPT :{BLACK}Script de jogo +STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Verifique o registo do Script de jogo STR_ERROR_AI_NO_AI_FOUND :Não foi encontrada IA adequada para carregar.{}Esta IA é um pacote vazio e não fará nada.{}Pode descarregar várias IA através do sistema 'Conteúdo Online' STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}Houve um erro num script. Por favor reporte isto ao autor do script com uma imagem da janela Depuramento de IA/Scripts de Jogo. -STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}A janela Depuração da IA/Scripts de Jogo está disponível apenas para o servidor +STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}A janela de Depuração de IA/Scripts de jogo está disponível apenas para o servidor # AI configuration window -STR_AI_CONFIG_CAPTION :{WHITE}Configuração IA / Script de Jogo -STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}O Script de Jogo que será carregado no próximo jogo +STR_AI_CONFIG_CAPTION :{WHITE}Configuração IA/Script de jogo +STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}O Script de jogo que será carregado no próximo jogo STR_AI_CONFIG_AILIST_TOOLTIP :{BLACK}As IAs que serão carregadas no próximo jogo STR_AI_CONFIG_HUMAN_PLAYER :Jogador humano -STR_AI_CONFIG_RANDOM_AI :IA Aleatória +STR_AI_CONFIG_RANDOM_AI :IA aleatória STR_AI_CONFIG_NONE :(nenhum) -STR_AI_CONFIG_MOVE_UP :{BLACK}Mover para Cima +STR_AI_CONFIG_MOVE_UP :{BLACK}Mover para cima STR_AI_CONFIG_MOVE_UP_TOOLTIP :{BLACK}Move a IA seleccionada para cima -STR_AI_CONFIG_MOVE_DOWN :{BLACK}Mover para Baixo +STR_AI_CONFIG_MOVE_DOWN :{BLACK}Mover para baixo STR_AI_CONFIG_MOVE_DOWN_TOOLTIP :{BLACK}Move a IA seleccionada para baixo -STR_AI_CONFIG_GAMESCRIPT :{SILVER}Script de Jogo +STR_AI_CONFIG_GAMESCRIPT :{SILVER}Script de jogo STR_AI_CONFIG_AI :{SILVER}IAs STR_AI_CONFIG_CHANGE :{BLACK}Selecionar {STRING} STR_AI_CONFIG_CHANGE_NONE : STR_AI_CONFIG_CHANGE_AI :IA -STR_AI_CONFIG_CHANGE_GAMESCRIPT :Script de Jogo +STR_AI_CONFIG_CHANGE_GAMESCRIPT :Script de jogo STR_AI_CONFIG_CHANGE_TOOLTIP :{BLACK}Carregar outro script STR_AI_CONFIG_CONFIGURE :{BLACK}Configurar STR_AI_CONFIG_CONFIGURE_TOOLTIP :{BLACK}Configurar os parâmetros do script @@ -4126,7 +4148,7 @@ STR_AI_CONFIG_CONFIGURE_TOOLTIP :{BLACK}Configur # Available AIs window STR_AI_LIST_CAPTION :{WHITE}Disponível {STRING} STR_AI_LIST_CAPTION_AI :IAs -STR_AI_LIST_CAPTION_GAMESCRIPT :Scripts de Jogo +STR_AI_LIST_CAPTION_GAMESCRIPT :Scripts de jogo STR_AI_LIST_TOOLTIP :{BLACK}Clique para seleccionar um script STR_AI_LIST_AUTHOR :{LTBLUE}Autor: {ORANGE}{STRING} @@ -4141,7 +4163,7 @@ STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}Não mud # AI Parameters STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Parâmetros STR_AI_SETTINGS_CAPTION_AI :IA -STR_AI_SETTINGS_CAPTION_GAMESCRIPT :Script de Jogo +STR_AI_SETTINGS_CAPTION_GAMESCRIPT :Script de jogo STR_AI_SETTINGS_CLOSE :{BLACK}Fechar STR_AI_SETTINGS_RESET :{BLACK}Repor STR_AI_SETTINGS_SETTING :{STRING}: {ORANGE}{STRING} @@ -4187,9 +4209,9 @@ STR_MESSAGE_ESTIMATED_INCOME :{WHITE}Lucro Es STR_ERROR_SAVE_STILL_IN_PROGRESS :{WHITE}Gravação ainda em curso,{}por favor aguarde! STR_ERROR_AUTOSAVE_FAILED :{WHITE}Falha ao guardar automaticamente STR_ERROR_UNABLE_TO_READ_DRIVE :{BLACK}Não é possível ler unidade -STR_ERROR_GAME_SAVE_FAILED :{WHITE}Falha ao Guardar Jogo{}{STRING} +STR_ERROR_GAME_SAVE_FAILED :{WHITE}Falha ao guardar jogo{}{STRING} STR_ERROR_UNABLE_TO_DELETE_FILE :{WHITE}Não é possível eliminar ficheiro -STR_ERROR_GAME_LOAD_FAILED :{WHITE}Falha ao Abrir Jogo{}{STRING} +STR_ERROR_GAME_LOAD_FAILED :{WHITE}Falha ao abrir jogo{}{STRING} STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR :Erro interno: {STRING} STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME :Ficheiro corrompido - {STRING} STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME :Jogo gravado numa versão mais recente do jogo @@ -4197,7 +4219,7 @@ STR_GAME_SAVELOAD_ERROR_FILE_NOT_READABLE :Impossível ler STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE :Impossível escrever ficheiro STR_GAME_SAVELOAD_ERROR_DATA_INTEGRITY_CHECK_FAILED :Falha ao verificar integridade de dados STR_GAME_SAVELOAD_NOT_AVAILABLE : -STR_WARNING_LOADGAME_REMOVED_TRAMS :{WHITE}O jogo foi salvo numa versão sem suporte a eléctricos. Todos os eléctricos foram removidos. +STR_WARNING_LOADGAME_REMOVED_TRAMS :{WHITE}O jogo foi salvo numa versão sem suporte para eléctricos. Todos os elétricos foram removidos. # Map generation messages STR_ERROR_COULD_NOT_CREATE_TOWN :{WHITE}Geração de mapa abortada...{}... não há locais apropriados para localidades @@ -4410,6 +4432,7 @@ STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Tipo de STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Deverá remover a linha férrea primeiro STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Estrada de sentido único ou bloqueada STR_ERROR_CROSSING_DISALLOWED_RAIL :{WHITE}Passagens de nível não são permitidas para este tipo de linha +STR_ERROR_CROSSING_DISALLOWED_ROAD :{WHITE}Passagens de nível não são permitidas para este tipo de estrada STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Não é possível construir sinais aqui... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Não é possível construir linha férrea aqui... STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Não é possível remover linha férrea daqui... @@ -4429,6 +4452,10 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Não é STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Não é possível remover carris para eléctricos deste local... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... não há estrada STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... não há carris para eléctricos +STR_ERROR_CAN_T_CONVERT_ROAD :{WHITE}Não é possível converter aqui o tipo de estrada... +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Não é possível converter aqui o tipo de carril para eléctricos... +STR_ERROR_INCOMPATIBLE_ROAD :{WHITE}... estrada não-compatível +STR_ERROR_INCOMPATIBLE_TRAMWAY :Cisterna de bebida de cola # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Não é possível construir canais aqui... @@ -4489,47 +4516,47 @@ STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Impossí # Generic vehicle errors STR_ERROR_TRAIN_IN_THE_WAY :{WHITE}Comboio no caminho STR_ERROR_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Veículo rodoviário no caminho -STR_ERROR_SHIP_IN_THE_WAY :{WHITE}Barco no caminho +STR_ERROR_SHIP_IN_THE_WAY :{WHITE}Navio no caminho STR_ERROR_AIRCRAFT_IN_THE_WAY :{WHITE}Aeronave no caminho STR_ERROR_CAN_T_REFIT_TRAIN :{WHITE}Não é possível converter comboio... STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE :{WHITE}Não é possível reconverter veículo -STR_ERROR_CAN_T_REFIT_SHIP :{WHITE}Não é possível adaptar barco... +STR_ERROR_CAN_T_REFIT_SHIP :{WHITE}Não é possível adaptar navio... STR_ERROR_CAN_T_REFIT_AIRCRAFT :{WHITE}Não é possível converter aeronave... STR_ERROR_CAN_T_RENAME_TRAIN :{WHITE}Não é possível renomear comboio... STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE :{WHITE}Não é possível renomear veículo rodoviário... -STR_ERROR_CAN_T_RENAME_SHIP :{WHITE}Não é possível renomear barco... +STR_ERROR_CAN_T_RENAME_SHIP :{WHITE}Não é possível renomear navio... STR_ERROR_CAN_T_RENAME_AIRCRAFT :{WHITE}Não é possível renomear aeronave... STR_ERROR_CAN_T_STOP_START_TRAIN :{WHITE}Não é possível iniciar/parar comboio... STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE :{WHITE}Não é possível iniciar/parar veículo rodoviário... -STR_ERROR_CAN_T_STOP_START_SHIP :{WHITE}Não é possível iniciar/parar barco... +STR_ERROR_CAN_T_STOP_START_SHIP :{WHITE}Não é possível iniciar/parar navio... STR_ERROR_CAN_T_STOP_START_AIRCRAFT :{WHITE}Não é possível iniciar/parar aeronave... STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT :{WHITE}Não é possível mandar o comboio para o depósito... STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT :{WHITE}Não é possível mandar o veículo para o depósito... -STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Não é possível mandar barco para o depósito... +STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Não é possível mandar navio para o depósito... STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}Não é possível mandar aeronave para o hangar... STR_ERROR_CAN_T_BUY_TRAIN :{WHITE}Não é possível comprar veículo ferroviário... STR_ERROR_CAN_T_BUY_ROAD_VEHICLE :{WHITE}Não é possível comprar veículo rodoviário... -STR_ERROR_CAN_T_BUY_SHIP :{WHITE}Não é possível comprar barco... +STR_ERROR_CAN_T_BUY_SHIP :{WHITE}Não é possível comprar navio... STR_ERROR_CAN_T_BUY_AIRCRAFT :{WHITE}Não é possível comprar aeronave... STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Não é possível renomear tipo de veículo ferroviário... STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Não é possível renomear tipo de veículo rodoviário... -STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Não é possível renomear tipo de barco... +STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Não é possível renomear tipo de navio... STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE :{WHITE}Não é possível renomear tipo de aeronave... STR_ERROR_CAN_T_SELL_TRAIN :{WHITE}Não é possível vender veículo ferroviário... STR_ERROR_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Não é possível vender veículo rodoviário... -STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Não é possível vender barco... +STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Não é possível vender navio... STR_ERROR_CAN_T_SELL_AIRCRAFT :{WHITE}Não é possível vender aeronave... STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Veículo não está disponível STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Veículo não está disponível -STR_ERROR_SHIP_NOT_AVAILABLE :{WHITE}Barco não está disponível +STR_ERROR_SHIP_NOT_AVAILABLE :{WHITE}Navio não está disponível STR_ERROR_AIRCRAFT_NOT_AVAILABLE :{WHITE}Aeronave não está disponível STR_ERROR_TOO_MANY_VEHICLES_IN_GAME :{WHITE}Existem demasiados veículos em jogo @@ -4592,8 +4619,8 @@ STR_BASESOUNDS_DOS_DESCRIPTION :Sons originais STR_BASESOUNDS_WIN_DESCRIPTION :Sons originais da edição Windows de Transport Tycoon Deluxe. STR_BASESOUNDS_NONE_DESCRIPTION :Um conjunto de sons vazio. STR_BASEMUSIC_WIN_DESCRIPTION :Música original da edição Windows de Transport Tycoon Deluxe. -STR_BASEMUSIC_DOS_DESCRIPTION :Música original da edição DOS do Transport Tycoon Deluxe. -STR_BASEMUSIC_TTO_DESCRIPTION :Música original da edição DOS do Transport Tycoon (Original/Editor de Mundo) +STR_BASEMUSIC_DOS_DESCRIPTION :Música original da edição DOS de Transport Tycoon Deluxe. +STR_BASEMUSIC_TTO_DESCRIPTION :Música original da edição DOS de Transport Tycoon (Original/Editor de Mundo) STR_BASEMUSIC_NONE_DESCRIPTION :Um conjunto de música vazio. ##id 0x2000 @@ -4663,11 +4690,11 @@ STR_INDUSTRY_NAME_LUMBER_MILL :{G=f}Serração STR_INDUSTRY_NAME_COTTON_CANDY_FOREST :{G=f}Floresta de Algodão Doce STR_INDUSTRY_NAME_CANDY_FACTORY :{G=f}Fábrica de Doces STR_INDUSTRY_NAME_BATTERY_FARM :{G=m}Campo de Baterias -STR_INDUSTRY_NAME_COLA_WELLS :{G=mp}Poços de Cola +STR_INDUSTRY_NAME_COLA_WELLS :{G=mp}Poços de bebida de cola STR_INDUSTRY_NAME_TOY_SHOP :{G=f}Loja de Brinquedos STR_INDUSTRY_NAME_TOY_FACTORY :{G=f}Fábrica de Brinquedos STR_INDUSTRY_NAME_PLASTIC_FOUNTAINS :{G=fp}Fontes de Plástico -STR_INDUSTRY_NAME_FIZZY_DRINK_FACTORY :{G=f}Fábrica de Bebidas Gasosas +STR_INDUSTRY_NAME_FIZZY_DRINK_FACTORY :{G=f}Fábrica de refrigerantes STR_INDUSTRY_NAME_BUBBLE_GENERATOR :{G=m}Produtor de Bolhas STR_INDUSTRY_NAME_TOFFEE_QUARRY :{G=f}Exploração de Caramelo STR_INDUSTRY_NAME_SUGAR_MINE :{G=f}Mina de Açúcar @@ -4679,7 +4706,7 @@ STR_SV_EMPTY : STR_SV_UNNAMED :Sem nome STR_SV_TRAIN_NAME :Comboio {COMMA} STR_SV_ROAD_VEHICLE_NAME :Veículo Rodoviário {COMMA} -STR_SV_SHIP_NAME :Barco {COMMA} +STR_SV_SHIP_NAME :Navio {COMMA} STR_SV_AIRCRAFT_NAME :Aeronave {COMMA} STR_SV_STNAME :{STRING} @@ -4741,33 +4768,33 @@ STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_30_ELECTRIC :SH '30' (Eléct STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_40_ELECTRIC :SH '40' (Eléctrico) STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_T_I_M_ELECTRIC :'T.I.M.' (Eléctrico) STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_ASIASTAR_ELECTRIC :'AsiaStar' (Eléctrico) -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PASSENGER_CAR :Carruagem de Passageiros +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PASSENGER_CAR :Carruagem de passageiros STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_MAIL_VAN :Vagão de Correio STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COAL_CAR :Vagão de Carvão STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_OIL_TANKER :Cisterna de Petróleo STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_LIVESTOCK_VAN :Vagão de Gado STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_GOODS_VAN :Vagão de Bens STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_GRAIN_HOPPER :Vagão de Cereais -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WOOD_TRUCK :Vagão de Madeira +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WOOD_TRUCK :Vagão de madeira STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_IRON_ORE_HOPPER :Vagão de Minério de Ferro -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_STEEL_TRUCK :Vagão de Aço +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_STEEL_TRUCK :Vagão de aço STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_ARMORED_VAN :Vagão Blindado STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FOOD_VAN :Vagão Alimentar STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PAPER_TRUCK :Vagão de Papel STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COPPER_ORE_HOPPER :Vagão de Minério de Cobre -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WATER_TANKER :Cisterna de Água +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WATER_TANKER :Cisterna de água STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FRUIT_TRUCK :Vagão de Fruta -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_RUBBER_TRUCK :Vagão de Borracha -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_SUGAR_TRUCK :Vagão de Açúcar +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_RUBBER_TRUCK :Vagão de borracha +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_SUGAR_TRUCK :Vagão de açúcar STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COTTON_CANDY_HOPPER :Vagão de Algodão Doce -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_TOFFEE_HOPPER :Vagão de Caramelo +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_TOFFEE_HOPPER :Vagão de caramelo STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_BUBBLE_VAN :Vagão de Bolhas -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COLA_TANKER :Cisterna de Cola +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COLA_TANKER :Cisterna de bebida de cola STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_CANDY_VAN :Vagão de Doces STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_TOY_VAN :Vagão de Brinquedos STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_BATTERY_TRUCK :Vagão de Baterias -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FIZZY_DRINK_TRUCK :Vagão de Bebidas Gasosas -STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PLASTIC_TRUCK :Vagão de Plástico +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FIZZY_DRINK_TRUCK :Vagão de refrigerantes +STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PLASTIC_TRUCK :Vagão de plástico STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_X2001_ELECTRIC :'X2001' (Eléctrico) STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_MILLENNIUM_Z1_ELECTRIC :'Millennium Z1' (Eléctrico) STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_WIZZOWOW_Z99 :Wizzowow Z99 @@ -4792,11 +4819,11 @@ STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_SUGAR_TRUCK :Vagão de Açú STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COTTON_CANDY_HOPPER :Vagão de Algodão Doce STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_TOFFEE_HOPPER :Vagão de Caramelo STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_BUBBLE_VAN :Vagão de Bolhas -STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COLA_TANKER :Cisterna de Cola +STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COLA_TANKER :Cisterna de beibda de cola STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_CANDY_VAN :Vagão de Doces STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_TOY_VAN :Vagão de Brinquedos STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_BATTERY_TRUCK :Vagão de Baterias -STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_FIZZY_DRINK_TRUCK :Vagão de Bebidas Gasosas +STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_FIZZY_DRINK_TRUCK :Vagão de refrigerantes STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_PLASTIC_TRUCK :Vagão de Plástico STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV1_LEVIATHAN_ELECTRIC :Lev1 'Leviathan' (Eléctrico) STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV2_CYCLOPS_ELECTRIC :Lev2 'Cyclops' (Eléctrico) @@ -4824,11 +4851,11 @@ STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_SUGAR_TRUCK :Vagão de Açú STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COTTON_CANDY_HOPPER :Vagão de Algodão Doce STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_TOFFEE_HOPPER :Vagão de Caramelo STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_BUBBLE_VAN :Vagão de Bolhas -STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COLA_TANKER :Cisterna de Cola +STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COLA_TANKER :Cisterna de bebida de cola STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_CANDY_VAN :Vagão de Doces STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_TOY_VAN :Vagão de Brinquedos STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_BATTERY_TRUCK :Vagão de Baterias -STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_FIZZY_DRINK_TRUCK :Vagão de Bebidas Gasosas +STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_FIZZY_DRINK_TRUCK :Vagão de refrigerantes STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_PLASTIC_TRUCK :Vagão de Plástico STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_REGAL_BUS :Autocarro MPS Regal STR_VEHICLE_NAME_ROAD_VEHICLE_HEREFORD_LEOPARD_BUS :Autocarro Hereford Leopard @@ -4891,9 +4918,9 @@ STR_VEHICLE_NAME_ROAD_VEHICLE_RMT_RUBBER_TRUCK :Camião de Borr STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_SUGAR_TRUCK :Camião de Açúcar MightyMover STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_SUGAR_TRUCK :Camião de Açúcar Powernaught STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_SUGAR_TRUCK :Camião de Açúcar Wizzowow -STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_COLA_TRUCK :Camião de Cola MightyMover -STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_COLA_TRUCK :Camião de Cola Powernaught -STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_COLA_TRUCK :Camião de Cola Wizzowow +STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_COLA_TRUCK :Camião de bebida de cola MightyMover +STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_COLA_TRUCK :Camião de bebida de cola Powernaught +STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_COLA_TRUCK :Camião de bebida de cola Wizzowow STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_COTTON_CANDY :Camião de Algodão Doce MightyMover STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_COTTON_CANDY :Camião de Algodão Doce Powernaught STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_COTTON_CANDY_TRUCK :Camião de Algodão Doce Wizzowow @@ -4909,9 +4936,9 @@ STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_CANDY_TRUCK :Camião de Doce STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_BATTERY_TRUCK :Camião de Baterias MightyMover STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_BATTERY_TRUCK :Camião de Baterias Powernaught STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_BATTERY_TRUCK :Camião de Baterias Wizzowow -STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_FIZZY_DRINK :Camião de Bebidas Gasosas MightyMover -STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_FIZZY_DRINK :Camião de Bebidas Gasosas Powernaught -STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_FIZZY_DRINK_TRUCK :Camião de Bebidas Gasosas Wizzowow +STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_FIZZY_DRINK :Camião de refrigerantes MightyMover +STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_FIZZY_DRINK :Camião de refrigerantes Powernaught +STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_FIZZY_DRINK_TRUCK :Camião de refrigerantes Wizzowow STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_PLASTIC_TRUCK :Camião de Plástico MightyMover STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_PLASTIC_TRUCK :Camião de Plástico Powernaught STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_PLASTIC_TRUCK :Camião de Plástico Wizzowow @@ -4920,15 +4947,15 @@ STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_BUBBLE_TRUCK :Camião de Bolh STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_BUBBLE_TRUCK :Camião de Bolhas Wizzowow STR_VEHICLE_NAME_SHIP_MPS_OIL_TANKER :Cisterna de Petróleo MPS STR_VEHICLE_NAME_SHIP_CS_INC_OIL_TANKER :Cisterna de Petróleo CS-Inc. -STR_VEHICLE_NAME_SHIP_MPS_PASSENGER_FERRY :Barco de Passageiros MPS -STR_VEHICLE_NAME_SHIP_FFP_PASSENGER_FERRY :Barco de Passageiros FFP +STR_VEHICLE_NAME_SHIP_MPS_PASSENGER_FERRY :Navio de passageiros MPS +STR_VEHICLE_NAME_SHIP_FFP_PASSENGER_FERRY :Navio de passageiros FFP STR_VEHICLE_NAME_SHIP_BAKEWELL_300_HOVERCRAFT :Hovercraft Bakewell 300 -STR_VEHICLE_NAME_SHIP_CHUGGER_CHUG_PASSENGER :Barco de Passageiros Chugger-Chug -STR_VEHICLE_NAME_SHIP_SHIVERSHAKE_PASSENGER_FERRY :Barco de Passageiros Shivershake -STR_VEHICLE_NAME_SHIP_YATE_CARGO_SHIP :Barco de Mercadorias Yate -STR_VEHICLE_NAME_SHIP_BAKEWELL_CARGO_SHIP :Barco de Mercadorias Bakewell -STR_VEHICLE_NAME_SHIP_MIGHTYMOVER_CARGO_SHIP :Barco de Mercadorias MightyMover -STR_VEHICLE_NAME_SHIP_POWERNAUT_CARGO_SHIP :Barco de Mercadorias Powernaut +STR_VEHICLE_NAME_SHIP_CHUGGER_CHUG_PASSENGER :Navio de passageiros Chugger-Chug +STR_VEHICLE_NAME_SHIP_SHIVERSHAKE_PASSENGER_FERRY :Navio de passageiros Shivershake +STR_VEHICLE_NAME_SHIP_YATE_CARGO_SHIP :Navio de mercadorias Yate +STR_VEHICLE_NAME_SHIP_BAKEWELL_CARGO_SHIP :Navio de mercadorias Bakewell +STR_VEHICLE_NAME_SHIP_MIGHTYMOVER_CARGO_SHIP :Navio de carga MightyMover +STR_VEHICLE_NAME_SHIP_POWERNAUT_CARGO_SHIP :Navio de carga Powernaut STR_VEHICLE_NAME_AIRCRAFT_SAMPSON_U52 :Sampson U52 STR_VEHICLE_NAME_AIRCRAFT_COLEMAN_COUNT :Coleman Count STR_VEHICLE_NAME_AIRCRAFT_FFP_DART :FFP Dart diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index f0dee3c675..46e128164c 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -10,8 +10,6 @@ ##grflangid 0x28 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -860,6 +858,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Un nou tip de {STRING} este acum disponibil! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} nu mai acceptă {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} nu mai acceptă {STRING} sau {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} acceptă acum {STRING} @@ -3250,8 +3249,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrii STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nimic- -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportat) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportat) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Numele industriilor - clic pe nume pentru focalizarea pe industrie. Ctrl+Click deschide o fereastră cu locaţia industriei diff --git a/src/lang/russian.txt b/src/lang/russian.txt index bdac57d6e9..8c3776a776 100644 --- a/src/lang/russian.txt +++ b/src/lang/russian.txt @@ -12,8 +12,6 @@ ##case m f n p nom gen dat acc abl pre -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1017,6 +1015,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Начато серийное производство новой модели {STRING.gen}! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} больше не принимает {STRING.acc} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} больше не принимает {STRING.acc} и {STRING.acc} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} теперь принимает {STRING.acc} @@ -3574,9 +3573,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Предприятия STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Нет - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% перевезено) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% перевезено) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% перевезено){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} и ещё {NUM}... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Список предприятий - щелчок по названию показывает предприятие в основном окне. Ctrl+щелчок показывает в дополнительном окне. # Industry view diff --git a/src/lang/serbian.txt b/src/lang/serbian.txt index 4568168083..bd12d84c99 100644 --- a/src/lang/serbian.txt +++ b/src/lang/serbian.txt @@ -12,8 +12,6 @@ ##case nom big gen dat aku vok lok ins -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1057,6 +1055,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G "" a o} {STRING} od sada u prodaji! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} više ne prihvata {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} više ne prihvata ni {STRING} ni {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} od sada prihvata {STRING.aku} @@ -3477,8 +3476,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Fabrike STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nema - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% prevezeno) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% prevezeno) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Imena fabrika - klikom na ime premešta se glavni pogled na fabriku. Ctrl+Klik otvara novi pogled na lokaciju fabrike diff --git a/src/lang/simplified_chinese.txt b/src/lang/simplified_chinese.txt index 79cf456e45..2a2f69738a 100644 --- a/src/lang/simplified_chinese.txt +++ b/src/lang/simplified_chinese.txt @@ -10,8 +10,6 @@ ##grflangid 0x56 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -871,6 +869,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}新 {STRING} 上市了! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} 将不再接受 {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} 将不再接受 {STRING} 和 {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} 开始接受 {STRING} @@ -3358,8 +3357,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}每年{C # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}工业设施 STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- 没有 - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% 已运输) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% 已运输) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}工业设施{}点击可以将屏幕中心移动到其所在位置. 单击的同时按住Ctrl会在新视点中显示工业位置 diff --git a/src/lang/slovak.txt b/src/lang/slovak.txt index 995007c687..66bbf080b6 100644 --- a/src/lang/slovak.txt +++ b/src/lang/slovak.txt @@ -12,8 +12,6 @@ ##case g -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -926,6 +924,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Nov{G "ý" "á" "é"} {STRING} dostupn{G "ý" "á" "é"}! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} už neprijíma {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} už neprijíma {STRING} alebo {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} teraz prijíma {STRING} @@ -3334,8 +3333,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Priemysel STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Nič - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% prepraven{P é é ých}) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% prepraven{P é é ých}) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Názvy priemyslu - klikni na meno pre vycentrovanie priemyslu na stred obrazovky diff --git a/src/lang/slovenian.txt b/src/lang/slovenian.txt index 7ab44e1258..fb6ad03cd8 100644 --- a/src/lang/slovenian.txt +++ b/src/lang/slovenian.txt @@ -11,8 +11,6 @@ ##case r d t -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1012,6 +1010,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Novo! {STRING} sedaj na razpolago! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ne sprejema več {STRING.r} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ne sprejema več {STRING.r} ali {STRING.r} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} sedaj sprejema {STRING.t} @@ -3422,8 +3421,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrije STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Brez - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% prepeljano) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% prepeljano) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Imena industrij - klikni na ime za pogled na industrijo. Ctrl+Klik odpre nov pogled na lokaciji industrije diff --git a/src/lang/spanish.txt b/src/lang/spanish.txt index c439b70acd..b04d8dbf8e 100644 --- a/src/lang/spanish.txt +++ b/src/lang/spanish.txt @@ -11,8 +11,6 @@ ##gender m f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -873,6 +871,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}¡Nuev{G o a} {STRING} ahora disponible! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ya no acepta {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ya no acepta {STRING} ni {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} acepta ahora {STRING} @@ -3392,8 +3391,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ninguna - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportado) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nombre de industrias - Click sobre un nombre para centrar la vista principal en la industria. Ctrl+Click abre un punto de vista en dicha posición diff --git a/src/lang/spanish_MX.txt b/src/lang/spanish_MX.txt index 65d2b1329d..e01f831315 100644 --- a/src/lang/spanish_MX.txt +++ b/src/lang/spanish_MX.txt @@ -11,8 +11,6 @@ ##gender m f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -873,6 +871,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}¡Nuev{G o a} {STRING} ahora disponible! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ya no acepta {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ya no acepta {STRING} ni {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} acepta ahora {STRING} @@ -3395,9 +3394,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrias STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Ninguna - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportado) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}, {CARGO_LONG}{STRING}){YELLOW} ({COMMA}%, {COMMA}% transportado) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA} % transportado){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} y {NUM} más... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Nombre de industria: Clic en un nombre para centrar la vista principal en la industria. Ctrl+Clic abre una ventana de vista en dicha ubicación # Industry view diff --git a/src/lang/swedish.txt b/src/lang/swedish.txt index de316f7963..7881727d71 100644 --- a/src/lang/swedish.txt +++ b/src/lang/swedish.txt @@ -10,8 +10,6 @@ ##grflangid 0x2e -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -872,6 +870,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Ny {STRING} är nu tillgänglig - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} tar inte längre emot {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} tar inte längre emot {STRING} eller {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} tar nu emot {STRING} @@ -3390,8 +3389,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industrier STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Inga - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transporterat) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transporterat) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industrinamn - klicka på namnet för att centrera huvudvyn över industrin. Ctrl+klick öppnar en ny vy över industrins läge diff --git a/src/lang/tamil.txt b/src/lang/tamil.txt index 74b880fa82..3634865098 100644 --- a/src/lang/tamil.txt +++ b/src/lang/tamil.txt @@ -10,8 +10,6 @@ ##grflangid 0x0a -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -189,6 +187,7 @@ STR_COLOUR_ORANGE :ஆரஞ்ச STR_COLOUR_BROWN :பழுப்பு STR_COLOUR_GREY :சாம்பல் STR_COLOUR_WHITE :வெள்ளை +STR_COLOUR_RANDOM :ஏதோவொரு STR_COLOUR_DEFAULT :இயல்பிருப்பு # Units used in OpenTTD @@ -460,6 +459,7 @@ STR_TOOLBAR_SOUND_MUSIC :ஒலி/இ ############ range for message menu starts STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :கடைசி செய்தி/செய்தி அறிவிக்கை STR_NEWS_MENU_MESSAGE_HISTORY_MENU :செய்தி வரலாறு +STR_NEWS_MENU_DELETE_ALL_MESSAGES :எல்லா செய்திகளையும் நீக்கு ############ range ends here ############ range for about menu starts @@ -839,6 +839,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}புதிய {STRING} இப்போது கிடைக்கும்! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} இனிமேல் {STRING} ஏற்றுக்கொள்ளாது STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} இனிமேல் {STRING} அல்லது {STRING} ஏற்றுக்கொள்ளாது STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} இப்போது {STRING} ஏற்றுக்கொள்கிறது @@ -853,6 +854,7 @@ STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLAC # Extra view window STR_EXTRA_VIEW_PORT_TITLE :{WHITE}பார்வைப் படம் {COMMA} STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}பார்படத்திற்கு மாற்றவும் +STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}பிரதான பார்வையை மாற்றவும் # Game options window STR_GAME_OPTIONS_CAPTION :{WHITE}ஆட்டத்தின் அமைப்புகள் @@ -928,6 +930,7 @@ STR_GAME_OPTIONS_TOWN_NAME_CATALAN :கடலன் ############ end of townname region STR_GAME_OPTIONS_AUTOSAVE_FRAME :{BLACK}தானாக சேமி +STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}தானியங்கி விளையாட்டு சேமிப்பு இடைவெளியைத் தேர்ந்தெடுக்கவும் ############ start of autosave dropdown STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF :Off @@ -1277,6 +1280,7 @@ STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_CONSTRUCTION :அனைத் STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :அனைத்து செயல்கள் நிலமாற்றங்கள் தவிர்த்து STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_ACTIONS :அனைத்து செயல்கள் STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :வாகனப் பட்டியலினைப் பயன்படுத்தவும்: {STRING} +STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :வாகனங்களை ஏற்றுவதற்கு அல்லது இறக்குவதற்கு மேலே ஏற்றுதல் குறிகாட்டிகள் காட்டப்படுகிறதா என்பதைத் தேர்ந்தெடுக்கவும் STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :கால அட்டவணைகளில் காலங்களைக் காட்டவும்: {STRING} STR_CONFIG_SETTING_QUICKGOTO :வாகன கட்டளைகளை விரிவாக உருவாக்கவும்: {STRING} STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :முதலில் கிடைக்கும் @@ -1398,6 +1402,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} +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :இருபடி (அசல்) STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :ஆட்டத்தின் போது மரங்களை நடுதல்: {STRING} STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :விளையாட்டின் போது மரங்களின் சீரற்ற தோற்றத்தைக் கட்டுப்படுத்தவும். இது மர வளர்ச்சியை நம்பியுள்ள தொழில்களை பாதிக்கலாம், எடுத்துக்காட்டாக மரம் வெட்டுதல் ஆலைகள் @@ -1533,6 +1538,7 @@ STR_INTRO_QUIT :{BLACK}வெ STR_INTRO_TOOLTIP_NEW_GAME :{BLACK}புதிய ஆட்டத்தினைத் தொடங்கும். Ctrl+Click அழுத்தினால் வரைபட அமைப்புவடிவாக்கம் தவிர்க்கப்படும் STR_INTRO_TOOLTIP_LOAD_GAME :{BLACK}பதிவு செய்யப்பட்ட விளையாட்டை ஏற்று STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP :{BLACK}புதிய ஆட்டத்தினைத் தொடங்கு, உயர்படத்தினை நிலப்பரப்பிற்கு பயன்படுத்தி +STR_INTRO_TOOLTIP_MULTIPLAYER :{BLACK}புதிய பல்வீரர் ஆட்டத்தினைத் தொடங்கவும் STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}'உபதுருவ' நிலப்பரப்புப் பாணியைத் தேர்ந்தெடுக்கவும் STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}'மிதவெப்பமண்டல' நிலப்பரப்புப் பாணியைத் தேர்ந்தெடுக்கவும் @@ -1636,7 +1642,7 @@ STR_FACE_LOAD_TOOLTIP :{BLACK}பி STR_FACE_FACECODE :{BLACK}விளையாடுபவர் முக எண் STR_FACE_FACECODE_CAPTION :{WHITE}நிறுவனரின் முக எண்னை பார் அல்லது அமை STR_FACE_FACECODE_SET :{WHITE}புதிய முக எண் குறி அமைக்கப்பட்டது -STR_FACE_SAVE :{BLACK}சேமி\ +STR_FACE_SAVE :{BLACK}சேமி STR_FACE_SAVE_TOOLTIP :{BLACK}பிடித்த முகத்தினைப் பதிவுசெய் STR_FACE_EUROPEAN :{BLACK}ஐரோப்பிய STR_FACE_SELECT_EUROPEAN :{BLACK}ஐரோப்பிய முகங்களினைத் தேர்ந்தெடுக்கவும் @@ -1670,6 +1676,7 @@ STR_FACE_EARRING :கம்மல STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Tie அல்லது காதணியை மாற்றவும் # Network server list +STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}பல்வீரர் STR_NETWORK_SERVER_LIST_ADVERTISED :{BLACK}விளம்பரப்படுத்தப்பட்ட STR_NETWORK_SERVER_LIST_ADVERTISED_NO :இல்லை STR_NETWORK_SERVER_LIST_ADVERTISED_YES :ஆம் @@ -2179,6 +2186,7 @@ STR_AIRPORT_HELISTATION :வானூர STR_AIRPORT_CLASS_SMALL :சிறிய விமான நிலையங்கள் STR_AIRPORT_CLASS_LARGE :பெரிய விமான நிலையங்கள் +STR_AIRPORT_CLASS_HUB :விமான நடுவங்கள் STR_AIRPORT_CLASS_HELIPORTS :ஹெலிகாப்டர் நிலையங்கள் STR_STATION_BUILD_NOISE :{BLACK}ஒலி இரைச்சல்: {GOLD}{COMMA} @@ -2297,6 +2305,7 @@ STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STR STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}அமிழ் தண்டூர்தி வகை: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}இரயில் வேகத் தடை: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}சாலை வேகத்தடை: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}டிராம் வேக வரம்பு: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :கற்கள் @@ -2396,18 +2405,23 @@ STR_ABOUT_VERSION :{BLACK}OpenTTD STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2019 OpenTTD குழுமம் # Framerate display window +STR_FRAMERATE_CAPTION :{WHITE}பிரேம் வீதம் +STR_FRAMERATE_AVERAGE :{WHITE}சராசரி STR_FRAMERATE_MEMORYUSE :{WHITE}நினைவாற்றல் +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} நுண்ணொடி STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} STR_FRAMERATE_BYTES_WARN :{YELLOW}{BYTES} STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} ############ Leave those lines in this order!! +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} இணைப்பு வரைபட தாமதம்: STR_FRAMERATE_ALLSCRIPTS :{BLACK} GS/AI மொத்தம்: ############ End of leave-in-this-order ############ Leave those lines in this order!! STR_FRAMETIME_CAPTION_GL_ECONOMY :சரக்கு கையாளுதல் STR_FRAMETIME_CAPTION_GL_ROADVEHS :சாலை வாகனத்தின் பயண நேரம் STR_FRAMETIME_CAPTION_GAMESCRIPT :விளையாட்டின் ஸ்கிரிப்ட் +STR_FRAMETIME_CAPTION_AI :AI {NUM} {STRING} ############ End of leave-in-this-order @@ -2555,6 +2569,7 @@ STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}இந் # NewGRF save preset window STR_SAVE_PRESET_CAPTION :{WHITE}Preset-ஐ பதிவுசெய் STR_SAVE_PRESET_TITLE :{BLACK}Preset இற்கு ஒரு பெயரினை இடு +STR_SAVE_PRESET_SAVE :{BLACK}சேமி # NewGRF parameters window STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}NewGRF குணாதிசயங்களை மாற்று @@ -2687,6 +2702,7 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :நகரத் # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} நகராட்சி +STR_LOCAL_AUTHORITY_ZONE :{BLACK}மண்டலம் STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}போக்குவரத்து நிறுவன தரங்கள்: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}செயற்பாடுகள்: @@ -2931,8 +2947,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}தொழிற்சாலைகள் STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- ஒன்றுமில்லை - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% நகர்த்தப்பட்டது) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% நகர்த்தப்பட்டது) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} # Industry view @@ -3004,6 +3018,7 @@ STR_GROUP_REMOVE_ALL_VEHICLES :அனைத் STR_GROUP_RENAME_CAPTION :{BLACK}குழுவின் பெயரினை மாற்றவும் +STR_GROUP_OCCUPANCY :தற்போதைய பயன்பாடு: # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :புது இரயில் வாகனங்கள் @@ -3150,6 +3165,7 @@ STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}நீ STR_ENGINE_PREVIEW_CAPTION :{WHITE}வாகன உற்பத்தியாலரிடமிருந்து ஓர் தகவல் STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :இரயில்வே வாகனம் +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :மின்சார இரயில் STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :மோனோ இரயில் வாகனம் STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :மேக்லெவ் வாகனம் @@ -3386,6 +3402,7 @@ STR_ORDER_DROP_SERVICE_DEPOT :தேவைப STR_ORDER_DROP_HALT_DEPOT :நிறுத்து STR_ORDER_SERVICE_TOOLTIP :{BLACK}பழுது சரிபார்த்தல் இல்லையெனில் இந்தக் கட்டளையினை தவிற்கவும் +STR_ORDER_CONDITIONAL_VARIABLE_TOOLTIP :{BLACK}அடிப்படை ஜம்பிங் செய்ய வாகனத் தரவு # Conditional order variables, must follow order of OrderConditionVariable enum STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE :சுமை அளவு @@ -3951,6 +3968,7 @@ STR_ERROR_YOU_ALREADY_OWN_IT :{WHITE}... இ STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}குழுவை உருவாக்க முடியாது... STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}இந்தக் குழுவினை நீக்க முடியாது... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}குழுவின் பெயரினை மாற்ற இயலாது... +STR_ERROR_GROUP_CAN_T_SET_PARENT :{WHITE}பெற்றோர் குழுவை அமைக்க முடியாது ... STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}இந்தக் குழுவில் உள்ள அனைத்து வாகனங்களையும் நீக்க இயலாது... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}வாகனத்தினை இந்தக் குழுவில் இணைக்க இயலாது... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}பகிரப்பட்ட வாகனத்தினை இந்தக் குழுவில் இணைக்க இயலாது... diff --git a/src/lang/thai.txt b/src/lang/thai.txt index 20ddb974bc..a17f625bb6 100644 --- a/src/lang/thai.txt +++ b/src/lang/thai.txt @@ -10,8 +10,6 @@ ##grflangid 0x42 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -849,6 +847,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}ใหม่ {STRING} มีจำหน่ายแล้ว - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} ไม่ต้องการรับ {STRING} อีกต่อไป STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} ไม่รับ {STRING} หรือ {STRING} แล้ว STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} ขณะนี้ยอมรับ {STRING} @@ -3198,8 +3197,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}อุตสาหกรรม STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- ไม่มี - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% ได้รับการขนส่ง) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% ได้รับการขนส่ง) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}ชื่อของอุตสาหกรรม - คลิ๊กที่ชื่อเพื่อไปยังจุดศูนย์กลาง diff --git a/src/lang/traditional_chinese.txt b/src/lang/traditional_chinese.txt index b2fd4b54bd..a1348c3030 100644 --- a/src/lang/traditional_chinese.txt +++ b/src/lang/traditional_chinese.txt @@ -10,8 +10,6 @@ ##grflangid 0x0c -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -858,6 +856,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} 問世了! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} 不再接受 {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} 不再接受 {STRING} 或 {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} 現在接受 {STRING} @@ -3267,8 +3266,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}每年{C # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}工業 STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- 無 - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} (已運送 {COMMA}%) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} (已運送 {COMMA}%/{COMMA}%) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}工業名稱 - 點選名稱可將工業置於畫面中央。 按住 Ctrl 點選可於工業位置開啟新視窗視野 diff --git a/src/lang/turkish.txt b/src/lang/turkish.txt index 8e6e5196aa..b8e34b3ce7 100644 --- a/src/lang/turkish.txt +++ b/src/lang/turkish.txt @@ -11,8 +11,6 @@ ##case tamlanan -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -868,6 +866,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Yeni {STRING} artık kullanılabilir! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} artık {STRING} kabul etmiyor STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} artık {STRING} veya {STRING} kabul etmiyor STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} artık {STRING} kabul ediyor @@ -3354,8 +3353,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Fabrikalar STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Hiçbiri - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} (%{COMMA} taşındı) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} (%{COMMA}/%{COMMA} taşındı) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Fabrika adları - görüntüyü fabrikada merkezlemek için adına tıklayın. Ctrl ile tıklama fabrikanın konumunu gösteren yeni bir pencere açar diff --git a/src/lang/ukrainian.txt b/src/lang/ukrainian.txt index 3246627685..54cbe37685 100644 --- a/src/lang/ukrainian.txt +++ b/src/lang/ukrainian.txt @@ -12,8 +12,6 @@ ##case r d z -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -362,6 +360,8 @@ STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Обер STR_BUTTON_SORT_BY :{BLACK}Сортувати STR_BUTTON_LOCATION :{BLACK}Показати STR_BUTTON_RENAME :{BLACK}Назва +STR_BUTTON_CATCHMENT :{BLACK}Покриття +STR_TOOLTIP_CATCHMENT :{BLACK}Вкл./викл. відображення області покриття STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Закрити вікно STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Заголовок вікна - потягніть для переміщення вікна @@ -390,6 +390,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}нати STR_BUTTON_DEFAULT :{BLACK}Стандартно STR_BUTTON_CANCEL :{BLACK}Відміна STR_BUTTON_OK :{BLACK}Так +STR_WARNING_PASSWORD_SECURITY :{YELLOW}Попередження: Адміністратори серверів можуть мати можливість читати будь-який текст, введений тут. # On screen keyboard window STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\йцукенгшщзхїфівапролджє ячсмитьбю. . @@ -997,6 +998,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Відтепер в наявності новий {STRING}! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} більше не приймає {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} більше не приймає {STRING} або {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} тепер приймає {STRING} @@ -1063,6 +1065,9 @@ STR_GAME_OPTIONS_CURRENCY_GEL :Грузинс STR_GAME_OPTIONS_CURRENCY_IRR :Іранський ріал (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Російський новий рубель (RUB) STR_GAME_OPTIONS_CURRENCY_MXN :Мексиканське песо (MXN) +STR_GAME_OPTIONS_CURRENCY_NTD :Новий тайваньський долар (NTD) +STR_GAME_OPTIONS_CURRENCY_CNY :Китайські ренміні (CNY) +STR_GAME_OPTIONS_CURRENCY_HKD :Гонконгський долар (HKD) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Сторона руху транспорту @@ -1449,7 +1454,7 @@ STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Тільки T STR_CONFIG_SETTING_INDUSTRY_DENSITY :Густота підприємств: {STRING} STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Встановіть кількість підприємств, що будуть створені і кількість підприємств, що існуватимуть впродовж гри STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Макс. відстань від краю карти до нафтопереробних заводів: {STRING} -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Нафтопереробні заводи завжди будуються не далеко від краю карти або узбережжя. +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Обмеження того, наскільки далеко може бути побудований кордон нафтопереробних заводів та нафтових установок. На островних картах це гарантує, що вони знаходяться біля узбережжя. На картах більше 256 плиток це значення збільшується. STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Рівень снігової шапки: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Контроль висоти, вище якої лежить сніг в субарктичному ландшафті. Сніг впливає на генерування підприємств та на умови росту міст STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Грубість ландшафту: {STRING} @@ -1613,6 +1618,9 @@ 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_OPCODES_HELPTEXT :Максимально допустима кількість розрахунків, що можуть виконати скрипти віртуальних гравців впродовж одного ходу. +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY :Максимальне використаня пам'яті скриптом: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Скільки пам'яті може зайняти один сценарій до примусового припинення. Це може знадобитися збільшити для великих карт. +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE :{COMMA} MiB STR_CONFIG_SETTING_SERVINT_ISPERCENT :Інтервали техогляду вказано у відсотках: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Налаштування способу визначення необхідності проведення техогляду: через вказаний проміжок часу після попереднього техогляду чи коли поточна надійність транспортного засобу стане нижчою від максимальної його надійності на вказаний процент. @@ -1675,6 +1683,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Стабіль STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :При включенні обсяги виробництва підприємств змінюються часто, але не дуже суттєво. Зазвичай ця опція не впливає на підприємства, додані за допомогою NewGRF. STR_CONFIG_SETTING_ALLOW_SHARES :Дозволити придбання акції інших компаній: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :При включенні дозволяє придбання та продаж акцій команій. Акції компанії стають доступними після досягнення деякого віку. +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Мінімальний вік компанії для торгівлі акціями: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Встановіть мінімальний вік компанії, щоб інші могли купувати та продавати акції у них. STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Відсоток прибутку за часткове перевезення: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Налаштування проценту прибутку, що нараховується за часткове перевезення вантажу. За допомогою даної опції можна контролювати розподіл прибутків між учасниками багатоланкових перевезень. STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :При протягуванні встановлювати сигнали через {STRING} @@ -2269,7 +2279,7 @@ STR_NETWORK_CHAT_ALL :[Всім] {STR STR_NETWORK_CHAT_OSKTITLE :{BLACK}Введіть текст для мережевого чату # Network messages -STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Не знайдено мережевого пристрою або скомпільовано без ENABLE_NETWORK +STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Не знайдено мережевого пристрою STR_NETWORK_ERROR_NOSERVER :{WHITE}Не знайдено жодної мережевої гри STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Сервер не відповів на запит STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Не можна з'єднатись внаслідок неспівпадання NewGRF @@ -2565,7 +2575,10 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Побу STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Будувати/зруйнувати дорогу STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Будувати/демонтувати колію STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Модернізувати дорогу. Утримуйте Shift для показу витрат на модернізацію +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Convert/Перетворення / оновлення типу трамваю. Shift перемикає будівництво / показ кошторису витрат +STR_ROAD_NAME_ROAD :Дорога +STR_ROAD_NAME_TRAM :Трамвай # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Орієнтація депо @@ -2751,8 +2764,10 @@ STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Прий STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Тип зал.колії: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_ROAD_TYPE :{BLACK}Тип дороги: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}Тип трамваю: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Ліміт швидкості залізниці: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Ліміт швидкості авто: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Обмеження швидкості руху трамваїв: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Каміння @@ -2862,6 +2877,7 @@ STR_FRAMERATE_SPEED_FACTOR :{BLACK}Наяв STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK} Як швидко гра біжить в даний час, в порівнянні з очікуваною швидкістю при звичайній швидкості моделювання. STR_FRAMERATE_CURRENT :{WHITE}Зараз STR_FRAMERATE_AVERAGE :{WHITE}Середнє +STR_FRAMERATE_MEMORYUSE :{WHITE}Пам'ять STR_FRAMERATE_DATA_POINTS :{BLACK}Дані отримано з {COMMA} вимірюван {P "ня" "нь" "нь" } STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} мс STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms @@ -2869,6 +2885,9 @@ STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} кадрів/сек STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} кадр{P "" "и" "ів"}/сек STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} кадрів/сек +STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} +STR_FRAMERATE_BYTES_WARN :{YELLOW}{BYTES} +STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} мс STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} с ############ Leave those lines in this order!! @@ -3136,6 +3155,7 @@ STR_NEWGRF_ERROR_GRM_FAILED :Недосту STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} був вимкнений {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Некоректний або невідомий формат розміщення спрайтів (спрайт {3:NUM}) STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Дуже багато елементів у списку значень (спрайт {3:NUM}, властивість {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Невірна обробка продукції підприємства (спрайт {3:NUM}, "{2:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Обережно! @@ -3167,6 +3187,7 @@ STR_NEWGRF_BUGGY :{WHITE}NewGRF ' STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Інформація про вантаж/переобладнання для '{1:ENGINE}' відрізняється від списку покупки після побудови. Це може спричинити невідповідності під час автооновлення/заміни STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' спричинив нескінченний цикл у виклику виробництва STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Виклик {1:HEX} повернув невідомий/неправильний результат {2:HEX} +STR_NEWGRF_BUGGY_INVALID_CARGO_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}'повернув недійсний тип вантажу у виробничому зворотному режимі о {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs STR_NEWGRF_INVALID_CARGO :<невідомий вантаж> @@ -3233,6 +3254,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Перейме # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} - місцева влада +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Зона +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Показати зону в межах місцевих повноважень STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Рейтинги компаній: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Доступні дії: @@ -3490,6 +3513,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Інфр STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Залізничні ділянки: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}З сигналами STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Дорожні ділянки: +STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT :{GOLD}Трамвайні вагони: STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Судноплавні ділянки: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Канали STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Станції: @@ -3500,9 +3524,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Підприємства STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- немає - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% перевезено) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% перевезено) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% перевезено){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} і {NUM} ще... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Назви підприємств - клацніть мишою на назву, щоб показати підприємство у центрі екрану. Ctrl+клац мишою відкриває нове вікно з видом на підприємство # Industry view @@ -3598,14 +3625,17 @@ STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Новий мо STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Новий магнітний поїзд STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Нові автомобілі +STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION :Нові трамваї ############ range for vehicle availability starts STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Нові потяги +STR_BUY_VEHICLE_ROAD_VEHICLE_ALL_CAPTION :Нові автомобілі STR_BUY_VEHICLE_SHIP_CAPTION :Нові кораблі STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Нові літаки ############ range for vehicle availability ends STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Ціна: {GOLD}{CURRENCY_LONG}{BLACK} Вага: {GOLD}{WEIGHT_SHORT} +STR_PURCHASE_INFO_COST_REFIT_WEIGHT :{BLACK}Ціна: {GOLD}{CURRENCY_LONG}{BLACK} (Вартість переобладнання: {GOLD}{CURRENCY_LONG}{BLACK}) Вага: {GOLD}{WEIGHT_SHORT} STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Швидкість: {GOLD}{VELOCITY}{BLACK} Потужність: {GOLD}{POWER} STR_PURCHASE_INFO_SPEED :{BLACK}Швидкість: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Швидкість в океані: {GOLD}{VELOCITY} @@ -3616,8 +3646,10 @@ STR_PURCHASE_INFO_REFITTABLE :(змінюєт STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Рік випуску: {GOLD}{NUM}{BLACK} Вік: {GOLD}{COMMA} р{P ік оки оків} STR_PURCHASE_INFO_RELIABILITY :{BLACK}Надійність: {GOLD}{COMMA}% STR_PURCHASE_INFO_COST :{BLACK}Ціна: {GOLD}{CURRENCY_LONG} +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} @@ -3638,12 +3670,20 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Купи STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Купити STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Купити +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купити і переобладнати авто +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купити і переобладнати авто +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купіть і переобладнайте корабель +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Купуйте та переобладнайте літаки STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Купити вибраний поїзд. Утримуйте Shift для показу витрат на придбання STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Купити вибране авто. Утримуйте Shift для показу витрат на придбання STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Купити вибраний корабель. Утримуйте Shift для показу витрат на придбання STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Купити вибраний літак. Утримуйте Shift для показу витрат на придбання +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Придбайте та переобладнайте виділений поїзд. Shift + Click показує орієнтовну вартість без покупки +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Придбайте та переобладнайте авто. Shift + Click показує орієнтовну вартість без покупки +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Придбайте та переобладнайте виділене судно. Shift + Click показує орієнтовну вартість без покупки +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Придбайте та переобладнайте виділені літаки. Shift + Click показує орієнтовну вартість без покупки STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Назва STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Зміна назви @@ -3755,10 +3795,12 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Пові STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Ми розробили новий {STRING} - чи бажаєте ексклюзивно користуватись ним протягом року, так ми побачимо, як він зарекомендує себе, перед тим як буде доступним для всіх? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :локомотив +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :електрифікований залізничний локомотив STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :монорейковий локомотив STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :магнітний локомотив STR_ENGINE_PREVIEW_ROAD_VEHICLE :автомобіль +STR_ENGINE_PREVIEW_TRAM_VEHICLE :трамваї STR_ENGINE_PREVIEW_AIRCRAFT :літак STR_ENGINE_PREVIEW_SHIP :корабель @@ -3800,14 +3842,18 @@ STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Пере STR_REPLACE_ENGINES :Локомотиви STR_REPLACE_WAGONS :Вагони STR_REPLACE_ALL_RAILTYPE :Весь з/д транспорт +STR_REPLACE_ALL_ROADTYPE :Всі автомобілі STR_REPLACE_HELP_RAILTYPE :{BLACK}Виберіть тип колії, для якого ви збираєтесь оновити потяги +STR_REPLACE_HELP_ROADTYPE :{BLACK}Виберіть тип дороги, на який хочете замінити двигуни STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Показує, яким потягом буде замінено потяг, вибраний ліворуч STR_REPLACE_RAIL_VEHICLES :Неелектрифіковані поїзди STR_REPLACE_ELRAIL_VEHICLES :Електрифіковані поїзди STR_REPLACE_MONORAIL_VEHICLES :Монорейкові поїзди STR_REPLACE_MAGLEV_VEHICLES :Магнітні поїзди +STR_REPLACE_ROAD_VEHICLES :Авто +STR_REPLACE_TRAM_VEHICLES :Трамвайні транспортні засоби STR_REPLACE_REMOVE_WAGON :{BLACK}Ліквідація зайвих вагонів: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Дозволити автооновленню видаляти вагони, зберігаючи довжину потягу (починаючи спереду), якщо оновлення робить поїзд довшим @@ -4552,6 +4598,11 @@ STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Не м STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... тут немає дороги STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... тут немає трамвайних шляхів STR_ERROR_CAN_T_CONVERT_ROAD :{WHITE}Тут не можна модернізувати дорогу... +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Тут не можна перетворити тип трамваю ... +STR_ERROR_NO_SUITABLE_ROAD :{WHITE}Немає підходящої дороги +STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}Немає підходящої трамвайної колії +STR_ERROR_INCOMPATIBLE_ROAD :{WHITE}... несумісна дорога +STR_ERROR_INCOMPATIBLE_TRAMWAY :{WHITE}... несумісний трамвай # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Неможливо будувати канал тут... diff --git a/src/lang/unfinished/chuvash.txt b/src/lang/unfinished/chuvash.txt index 6bcbbc7f18..cdca14b152 100644 --- a/src/lang/unfinished/chuvash.txt +++ b/src/lang/unfinished/chuvash.txt @@ -10,8 +10,6 @@ ##grflangid 0x0b -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -468,6 +466,7 @@ STR_NEWS_MESSAGE_CAPTION :{WHITE}Пӗлт + # Extra view window # Game options window diff --git a/src/lang/unfinished/frisian.txt b/src/lang/unfinished/frisian.txt index ec5feb4a85..355da5ceb8 100644 --- a/src/lang/unfinished/frisian.txt +++ b/src/lang/unfinished/frisian.txt @@ -10,8 +10,6 @@ ##grflangid 0x32 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -858,6 +856,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Neie {STRING} is no beskikber! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} akseptearret gjin {STRING} mear STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} akseptearret gjin {STRING} en {STRING} mear STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} akseptearrret no {STRING} @@ -3018,8 +3017,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Yndustryen STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Gjin - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% transportearre) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% transportearre) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} # Industry view diff --git a/src/lang/unfinished/ido.txt b/src/lang/unfinished/ido.txt index a5a4dd82da..90e7cc2af4 100644 --- a/src/lang/unfinished/ido.txt +++ b/src/lang/unfinished/ido.txt @@ -10,8 +10,6 @@ ##grflangid 0x06 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -454,6 +452,7 @@ STR_NEWS_MESSAGE_CAPTION :{WHITE}Sendajo + # Extra view window # Game options window diff --git a/src/lang/unfinished/macedonian.txt b/src/lang/unfinished/macedonian.txt index 0db7b504bd..c77747a4d5 100644 --- a/src/lang/unfinished/macedonian.txt +++ b/src/lang/unfinished/macedonian.txt @@ -10,8 +10,6 @@ ##grflangid 0x26 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -778,6 +776,7 @@ STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE + # Extra view window # Game options window diff --git a/src/lang/unfinished/maltese.txt b/src/lang/unfinished/maltese.txt index 7691a8f9ed..8f9079d282 100644 --- a/src/lang/unfinished/maltese.txt +++ b/src/lang/unfinished/maltese.txt @@ -10,8 +10,6 @@ ##grflangid 0x09 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -388,6 +386,7 @@ STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE + # Extra view window # Game options window diff --git a/src/lang/unfinished/marathi.txt b/src/lang/unfinished/marathi.txt index 9194b6c3ac..f6e6832ff3 100644 --- a/src/lang/unfinished/marathi.txt +++ b/src/lang/unfinished/marathi.txt @@ -10,8 +10,6 @@ ##grflangid 0x11 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -687,6 +685,7 @@ STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLAC + # Extra view window # Game options window diff --git a/src/lang/unfinished/persian.txt b/src/lang/unfinished/persian.txt index de218abc8f..907d4deb35 100644 --- a/src/lang/unfinished/persian.txt +++ b/src/lang/unfinished/persian.txt @@ -10,8 +10,6 @@ ##grflangid 0x62 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -847,6 +845,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK} {STRING} جدید هم اکنون قابل دسترسی است! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} دیگر {STRING} قبول نمی کند STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} دیگر {STRING} و {STRING} قبول نمی کند STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} از این پس {STRING} را هم قبول می کند @@ -2887,7 +2886,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :کارخانه ها STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- هیچ - -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% انتقال داده شده) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} # Industry view diff --git a/src/lang/unfinished/urdu.txt b/src/lang/unfinished/urdu.txt index 8a35943609..60b897192c 100644 --- a/src/lang/unfinished/urdu.txt +++ b/src/lang/unfinished/urdu.txt @@ -11,8 +11,6 @@ ##gender m f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -829,6 +827,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}نئی {STRING} اب دستیاب ہے! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} مزید {STRING} قبول نہیں کرتا STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} مزید {STRING} یا {STRING} قبول نہیں کرتا STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} اب قبول کرتا ہے {STRING} diff --git a/src/lang/vietnamese.txt b/src/lang/vietnamese.txt index 8bd361273d..ec481da973 100644 --- a/src/lang/vietnamese.txt +++ b/src/lang/vietnamese.txt @@ -10,8 +10,6 @@ ##grflangid 0x54 -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -189,6 +187,8 @@ STR_COLOUR_ORANGE :Cam STR_COLOUR_BROWN :Nâu STR_COLOUR_GREY :Xám STR_COLOUR_WHITE :Trắng +STR_COLOUR_RANDOM :Ngẫu nhiên +STR_COLOUR_DEFAULT :Mặc định # Units used in OpenTTD STR_UNITS_VELOCITY_IMPERIAL :{COMMA}{NBSP}mph @@ -235,6 +235,8 @@ STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Chọn t STR_BUTTON_SORT_BY :{BLACK}Sắp xếp bởi STR_BUTTON_LOCATION :{BLACK}Vị trí STR_BUTTON_RENAME :{BLACK}Đổi tên +STR_BUTTON_CATCHMENT :{BLACK}Vùng che phủ +STR_TOOLTIP_CATCHMENT :{BLACK}Đổi ẩn/hiện vùng che phủ STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Đóng cửa sổ STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Tiêu đề cửa sổ - kéo nó để di chuyển cửa số @@ -263,6 +265,7 @@ STR_SHOW_HIDDEN_ENGINES_VEHICLE_AIRCRAFT_TOOLTIP :{BLACK}Khi bậ STR_BUTTON_DEFAULT :{BLACK}Mặc định STR_BUTTON_CANCEL :{BLACK}Thôi STR_BUTTON_OK :{BLACK}Đồng ý +STR_WARNING_PASSWORD_SECURITY :{YELLOW}Chú ý: quản trị máy chủ có thể đọc mọi dòng chữ nhập ở đây. # On screen keyboard window STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ . @@ -336,6 +339,7 @@ STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Thu nh STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Nới rộng tầm nhìn STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Lắp đường ray STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Xây đường +STR_TOOLBAR_TOOLTIP_BUILD_TRAMWAYS :{BLACK}Xây dựng đường xe điện STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Xây bến cảng STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Xây sân bay STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Mở thanh địa hình để nâng cao/hạ thấp ô đất, trồng cây, etc. @@ -356,6 +360,7 @@ STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Tạo đ STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Tạo thị trấn STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Tạo nhà máy STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Xây dựng đường +STR_SCENEDIT_TOOLBAR_TRAM_CONSTRUCTION :{BLACK}Xây dựng đường xe điện STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Trồng cây. Nhấn Shift để xem chi phí dự tính STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Tạo bảng ký hiệu STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Đặt đối tượng. Nhấn Shift để xem chi phí dự tính @@ -464,6 +469,7 @@ STR_TOOLBAR_SOUND_MUSIC :Âm thanh/nhạ ############ range for message menu starts STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Thư/bản tin cuối cùng STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Thông báo cũ +STR_NEWS_MENU_DELETE_ALL_MESSAGES :Xoá tất cả thông điệp ############ range ends here ############ range for about menu starts @@ -864,6 +870,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}{STRING} mới đã ra lò! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Ga, bến, cảng {STATION} không chấp nhận {STRING} nữa. STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Ga, bến, cảng {STATION} không chấp nhận {STRING} hoặc {STRING} nữa STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} đã chấp nhận {STRING} @@ -929,6 +936,10 @@ STR_GAME_OPTIONS_CURRENCY_CUSTOM :Tùy chọn... STR_GAME_OPTIONS_CURRENCY_GEL :Lari Georgia (GEL) STR_GAME_OPTIONS_CURRENCY_IRR :Rial Iran (IRR) STR_GAME_OPTIONS_CURRENCY_RUB :Đồng Rúp Nga mới (RUB) +STR_GAME_OPTIONS_CURRENCY_MXN :Peso México (MXN) +STR_GAME_OPTIONS_CURRENCY_NTD :Tân Đài tệ (NTD) +STR_GAME_OPTIONS_CURRENCY_CNY :Nhân dân tệ TQ (CNY) +STR_GAME_OPTIONS_CURRENCY_HKD :Đô-la Hồng Kông (HKD) ############ end of currency region STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Xe cộ @@ -991,7 +1002,12 @@ STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_NORMAL :Bình thường STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_2X_ZOOM :Gấp 2 lần STR_GAME_OPTIONS_GUI_ZOOM_DROPDOWN_4X_ZOOM :Gấp 4 lần +STR_GAME_OPTIONS_FONT_ZOOM :{BLACK}Cỡ chữ +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_TOOLTIP :{BLACK}Chọn cỡ chữ trong giao diện +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_NORMAL :Bình thường +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_2X_ZOOM :Phóng to gấp đôi +STR_GAME_OPTIONS_FONT_ZOOM_DROPDOWN_4X_ZOOM :Phóng nhân bốn STR_GAME_OPTIONS_BASE_GRF :{BLACK}Gói đồ họa STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Chọn gói đồ họa để sử dụng @@ -1175,6 +1191,8 @@ STR_CONFIG_SETTING_AUTOSLOPE :Cho phép thay STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Cho phép thay đổi nền đất dưới công trình và đường mà không cần phá hủy chúng STR_CONFIG_SETTING_CATCHMENT :Mô phỏng thực tế diện tích khu vực đón hàng: {STRING} STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Diện tích khu vực đón hàng khác nhau cho từng loại trạm và sân bay +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES :Số lượng nhà ga có thể phục vụ các ngành công nghiệp với nhà ga có sẵn {STRING} +STR_CONFIG_SETTING_SERVE_NEUTRAL_INDUSTRIES_HELPTEXT :Nếu bật, các khu công nghiệp gắn kèm với nhà ga, cảng, bến (như là dàn khoan dầu) có thể sẽ được phục vụ bởi các công ty sở hữu nhà ga, cảng, bến xây ở gần. Nếu tắt, thì các khu công nghiệp trên chỉ cung cấp hàng cho nhà ga, cản, bến gắn kèm thôi, bất kể là có xây gần hay gắn nhà ga khác vào. STR_CONFIG_SETTING_EXTRADYNAMITE :Cho phép giải toả nhiều hơn đường, cầu ... của đô thị: {STRING} STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Dễ dàng hơn trong việc loại bỏ các công trình thuộc sở hữu thành phố STR_CONFIG_SETTING_TRAIN_LENGTH :Chiều dài tối đa của đoàn tàu: {STRING} @@ -1191,8 +1209,8 @@ STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Sự giảm t STR_CONFIG_SETTING_PERCENTAGE :{COMMA}% STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Sự giảm tốc tại dốc của ôtô: {STRING} STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Sự giảm tốc cho ôtô tại một ô dốc. Giá trị càng cao thì càng khó leo dốc -STR_CONFIG_SETTING_FORBID_90_DEG :Ngăn tàu hỏa và tàu thủy chuyển hướng 90 độ: {STRING} -STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :quay 90 độ chỉ xảy ra khi một ray ngang nối với một ray dọc ở 2 ô liền kề, khiến cho tàu hỏa cua 90 khi đến ô rẽ thay vì 45 độ như bình thường. Việc này cũng áp dụng với tàu thủy. +STR_CONFIG_SETTING_FORBID_90_DEG :Ngăn tàu hỏa chuyển hướng 90 độ: {STRING} +STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :quay 90 độ chỉ xảy ra khi một ray ngang nối với một ray dọc ở 2 ô liền kề, khiến cho tàu hỏa cua 90 độ khi đến ô rẽ thay vì 45 độ như bình thường. STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Cho phép gộp ga, bến, cảng không sát nhau: {STRING} STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Cho phép thêm đoạn vào ga mà không phải sửa cái hiện có. Phải bấm Ctrl+Click để thêm đoạn vào ga STR_CONFIG_SETTING_INFLATION :Lạm phát: {STRING} @@ -1248,8 +1266,8 @@ STR_CONFIG_SETTING_PLANE_SPEED :Tỉ lệ tốc STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Thiết lập tốc độ tương đối của máy bay với phương tiện khác, nhằm giảm thu nhập của việc vận chuyển đường hàng không STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA} STR_CONFIG_SETTING_PLANE_CRASHES :Số vụ tai nạn máy bay: {STRING} -STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Tỉ lệ / xác suất xảy ra tai nạn máy bay -STR_CONFIG_SETTING_PLANE_CRASHES_NONE :không +STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Đặt tỉ lệ/xác suất ngẫu nhiên xảy ra tai nạn máy bay.{}* Máy bay lớn luôn có xác suất tai nạn cao hơn khi hạ cánh ở các sân bay nhỏ. +STR_CONFIG_SETTING_PLANE_CRASHES_NONE :không* STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :giảm bớt STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :bình thường STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Cho phép xây điểm dừng xe buýt trên đường của thị trấn: {STRING} @@ -1260,6 +1278,8 @@ STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Không t STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Phí bảo trì cơ sở hạ tầng: {STRING} STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :Khi mở, thì hạ tầng công ty sẽ sinh ra chi phí bảo trì. Chi phí sẽ tăng theo mạng lưới giao thông bạn xây dựng, và sẽ tiêu tốn của công ty lớn nhiều hơn công ty nhỏ +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR :Màu bắt đầu của công ty: {STRING} +STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT :Thay đổi màu sắc mặc định khi bắt đầu công ty STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Sân bay không bao giờ thành đồ cổ: {STRING} STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Bật tùy chọn này cho phép tất cả các loại sân bay không bị lỗi thời @@ -1306,7 +1326,7 @@ STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT :(Chỉ cho Terr STR_CONFIG_SETTING_INDUSTRY_DENSITY :Mật độ nhà máy: {STRING} STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :Thiết lập số nhà máy sẽ được tạo ra và mức độ dùy trì trong ván chơi STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Khoảng cách tối đa từ lề bản đồ tới nhà máy lọc dầu: {STRING} -STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Nhà máy hóa dầu chỉ có thể xây gần rìa bản đồ, tương ứng là ven biển với những bản đồ dạng đảo +STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Giới hạn bao xa tính từ rìa bản đò tới nhà máy hóa dầu và dàn khoan dầu có thể xây. Trên các bản đồ đảo thì tương ứng là ven biển. Với bản đồ lớn 256 ô, thì giá trị này được nhân tỉ lệ lên STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Độ cao tuyết phủ: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Điều chỉnh độ cao của tuyết phủ đối với địa hình xứ lanh. Tuyết phủ có thể ảnh hưởng tới việc tạo ra nhà máy và các yêu cầu cho sự tăng trưởng đô thị STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Độ gồ ghề của địa chất: {STRING} @@ -1470,6 +1490,9 @@ STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Cho phép AI STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Cho phép người chơi AI (máy tính) được tham gia trong ván chơi nhiều người STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#mã lệnh trước kịch bản tạm ngưng: {STRING} STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Số lượng tối đa các tính toán mà một kịch bản AI được phép chạy mỗi lần +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY :Bộ nhớ sử dụng tối đa mỗi kích bản: {STRING} +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT :Số lượng bộ nhớ tối đa mà kịch bản có thể tiêu thụ trước khi nó bị từ chối hoạt động. Số lượng này có thể phải tăng lên nếu bản đồ lớn hơn. +STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE :{COMMA} MiB STR_CONFIG_SETTING_SERVINT_ISPERCENT :Tần suất bảo trì theo đơn vị phần trăm: {STRING} STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Lựa chọn liệu rằng việc bảo trì phương tiện sẽ được tiến hành sau một khoảng thời gian nhất định hay là độ tin cậy bị giảm xuống bao nhiều phần trăm so với mức tối đa @@ -1532,6 +1555,8 @@ STR_CONFIG_SETTING_SMOOTH_ECONOMY :Nền kinh tế STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :Nếu bật, sản lượng của nhà máy sẽ thay đổi thường xuyên hơn, và thay đổi với mức độ nhỏ hơn. Thiết lập này sẽ không có tác dụng nếu kiểu nhà máy định nghĩa bởi NewGRF STR_CONFIG_SETTING_ALLOW_SHARES :Cho phép mua cổ phần của các công ty khác: {STRING} STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :Nếu bật, cho phép mua và bán cổ phần công ty. Cổ phần chỉ có thể mua bán nếu công ty đã tồn tại một thời gian nhất định nào đó +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES :Tuổi công ty tối thiểu để bán cổ phần: {STRING} +STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT :Đặt số tuổi tối thiểu của công ty để cho các bên khác có thể mua và bán cổ phần STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Tỉ lệ lợi tức cổ phiếu chi trả cho môi giới: {STRING} STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Tỉ lệ thu nhập cho mỗi trung gian trên hệ thống vận tải, cho phép điều chỉnh thu nhập STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :Khi kéo, đặt đèn tín hiệu mỗi: {STRING} @@ -1572,6 +1597,10 @@ STR_CONFIG_SETTING_TOWN_FOUNDING_HELPTEXT :Bật tùy ch STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :không cho phép STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :cho phép STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :cho phép, tùy chọn bố trí đô thị +STR_CONFIG_SETTING_TOWN_CARGOGENMODE :Nhu cầu vận chuyển hàng đô thị: {STRING} +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT :Lượng hàng hoá cần vận chuyển ở trong đô thị, tỉ lệ với tổng dân số của độ thị.{}Tăng tỉ lệ bình phương: một đô thị to gấp 2 sẽ tăng 4 lần số hành khách.{}Tăng tỉ lệ thuận: một đô thị tăng gấp 2 sẽ tăng gấp 2 lần số hành khách. +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL :Tỉ lệ bình phương (nguyên bản) +STR_CONFIG_SETTING_TOWN_CARGOGENMODE_BITCOUNT :Tuyến tính STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :Trồng cây trong trò chơi: {STRING} STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Điều khiển sự xuất hiện tự dộng của cây cối khi đang chơi. Điều này có thể ảnh hưởng đến những nhà máy dựa vào cây cối, ví dự như nhà máy chế biến gỗgỗ @@ -1813,6 +1842,7 @@ STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Thay đ STR_CHEAT_SETUP_PROD :{LTBLUE}Cho phép khả năng sửa giá trị sản xuất: {ORANGE}{STRING} # Livery window +STR_LIVERY_CAPTION :{WHITE}{COMPANY} - Cách Phối Màu Mới STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Hiển thị phối màu chung STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Hiển thị phối màu tàu hỏa @@ -2072,6 +2102,7 @@ STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Ngắt k STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Server yêu cầu xác thực. Nhập mật khẩu STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Công ty yêu cầu xác thực. Nhập mật khẩu +STR_NETWORK_COMPANY_LIST_CLIENT_LIST_CAPTION :{WHITE}Danh sách máy trạm # Network company list added strings STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Danh sách máy trạm @@ -2120,7 +2151,7 @@ STR_NETWORK_CHAT_ALL :[Chung] {STRING STR_NETWORK_CHAT_OSKTITLE :{BLACK}Nhập thông điệp tán gẫu # Network messages -STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Không có thiết bị mạng hoặc không thiết lập ENABLE_NETWORK +STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}Không có thiết bị kết nối mạng STR_NETWORK_ERROR_NOSERVER :{WHITE}Không tìm thấy ván chơi mạng nào STR_NETWORK_ERROR_NOCONNECTION :{WHITE}Server không trả lời yêu cầu STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Không thể kết nối vì NewGRF không hợp @@ -2373,7 +2404,7 @@ STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Đèn t STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}Đèn tín hiệu giành đường một chiều (điện){}Đèn tín hiệu giành đường cho phép nhiều hơn 1 đoàn tàu có thể đi vào 1 khu vực khoá, nếu như mỗi đoàn tàu có thể giành lấy một con đường tới một điểm đến một cách an toàn. Đèn tín hiệu giành đường tiêu chuẩn cho thể cho phép đi qua từ phía sau của đèn. STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Chuyển đổi đèn tín hiệu{}Khi sử dụng, nháy vào đèn hiệu đang có, sẽ chuyển đổi loại đèn đã chọn, Ctrl+Click sẽ đổi loại đèn. Shift để hiện chi phí dự tính STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Mật độ khi kéo chuỗi đèn hiệu -STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Giảm mật độ kéo chuỗi đèn hiệu +STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Giảm khoảng cách kéo chuỗi đèn hiệu STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Tăng mật độ kéo chuỗi đèn hiệu # Bridge selection window @@ -2412,7 +2443,11 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Xây h STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Xây hầm xe điện. Shift để xem chi phí dự tính STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Bật chế độ xây/phá đường bộ STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Bật chế độ xây/phá đường xe điện +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD :{BLACK}Chuyển đổi/nâng cấp kiểu đường ô-tô. Shift đổi chế độ xây/xem chi phí dự tính +STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM :{BLACK}Chuyển đổi/nâng cấp loại xe điện. Shift để đổi chế độ mua/xem giá dự tính +STR_ROAD_NAME_ROAD :Đường ô-tô +STR_ROAD_NAME_TRAM :Đường xe điện # Road depot construction window STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Hướng Của Xưởng Ôtô @@ -2597,8 +2632,11 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Hàng hoá chấp nhận: {LTBLUE} STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING}) STR_LANG_AREA_INFORMATION_RAIL_TYPE :{BLACK}Kiểu đường ray: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_ROAD_TYPE :{BLACK}Kiểu đường: {LTBLUE}{STRING} +STR_LANG_AREA_INFORMATION_TRAM_TYPE :{BLACK}Kiểu xe điện: {LTBLUE}{STRING} STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Giới hạn tốc độ đường ray: {LTBLUE}{VELOCITY} STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Hạn chế tốc độ đường bộ: {LTBLUE}{VELOCITY} +STR_LANG_AREA_INFORMATION_TRAM_SPEED_LIMIT :{BLACK}Tốc độ xe điện giới hạn: {LTBLUE}{VELOCITY} # Description of land area of different tiles STR_LAI_CLEAR_DESCRIPTION_ROCKS :Đá @@ -2700,36 +2738,43 @@ STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD # Framerate display window STR_FRAMERATE_CAPTION :{WHITE}Tốc độ khung hình STR_FRAMERATE_CAPTION_SMALL :{STRING}{WHITE} ({DECIMAL}x) -STR_FRAMERATE_RATE_GAMELOOP :{WHITE}Tốc độ khung giả lập game: {STRING} +STR_FRAMERATE_RATE_GAMELOOP :{BLACK}Tốc độ khung giả lập game: {STRING} STR_FRAMERATE_RATE_GAMELOOP_TOOLTIP :{BLACK}Số nhịp đếm giả lập trong mỗi giây -STR_FRAMERATE_RATE_BLITTER :{WHITE}Tốc độ khung hình: {STRING} +STR_FRAMERATE_RATE_BLITTER :{BLACK}Tốc độ khung hình: {STRING} STR_FRAMERATE_RATE_BLITTER_TOOLTIP :{BLACK}Số khu hình vẽ lại mỗi giây. -STR_FRAMERATE_SPEED_FACTOR :{WHITE}Chỉ số vận tốc game hiện tại: {DECIMAL}x +STR_FRAMERATE_SPEED_FACTOR :{BLACK}Chỉ số vận tốc game hiện tại: {DECIMAL}x STR_FRAMERATE_SPEED_FACTOR_TOOLTIP :{BLACK}Tốc độ chạy game hiện tại, so với tốc độ bình thường STR_FRAMERATE_CURRENT :{WHITE}Hiện tại STR_FRAMERATE_AVERAGE :{WHITE}Trung bình -STR_FRAMERATE_DATA_POINTS :{WHITE}Dữ liệu được tính theo số đo {COMMA} -STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL}{WHITE} ms -STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL}{WHITE} ms -STR_FRAMERATE_MS_BAD :{RED}{DECIMAL}{WHITE} ms -STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL}{WHITE} khung/s -STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL}{WHITE} khung/s -STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL}{WHITE} khung/s +STR_FRAMERATE_MEMORYUSE :{WHITE}Bộ nhớ +STR_FRAMERATE_DATA_POINTS :{BLACK}Dữ liệu được tính theo số đo {COMMA} +STR_FRAMERATE_MS_GOOD :{LTBLUE}{DECIMAL} ms +STR_FRAMERATE_MS_WARN :{YELLOW}{DECIMAL} ms +STR_FRAMERATE_MS_BAD :{RED}{DECIMAL} ms +STR_FRAMERATE_FPS_GOOD :{LTBLUE}{DECIMAL} khung/s +STR_FRAMERATE_FPS_WARN :{YELLOW}{DECIMAL} khung/s +STR_FRAMERATE_FPS_BAD :{RED}{DECIMAL} khung/s +STR_FRAMERATE_BYTES_GOOD :{LTBLUE}{BYTES} +STR_FRAMERATE_BYTES_WARN :{YELLOW}{BYTES} +STR_FRAMERATE_BYTES_BAD :{RED}{BYTES} STR_FRAMERATE_GRAPH_MILLISECONDS :{TINY_FONT}{COMMA} ms STR_FRAMERATE_GRAPH_SECONDS :{TINY_FONT}{COMMA} s ############ Leave those lines in this order!! -STR_FRAMERATE_GAMELOOP :{WHITE}Tổng vòng lặp khung hình game: -STR_FRAMERATE_GL_ECONOMY :{WHITE} Xử lý bốc dỡ hàng: -STR_FRAMERATE_GL_TRAINS :{WHITE} Nhịp của tàu hoả: -STR_FRAMERATE_GL_ROADVEHS :{WHITE} Nhịp của xe ô-tô -STR_FRAMERATE_GL_SHIPS :{WHITE} Số nhịp của tàu thủy: -STR_FRAMERATE_GL_AIRCRAFT :{WHITE} Số nhịp của máy bay: -STR_FRAMERATE_GL_LANDSCAPE :{WHITE} Nhịp của bản đồ game: -STR_FRAMERATE_GL_LINKGRAPH :{WHITE} Độ trễ tính toán đồ thị: -STR_FRAMERATE_DRAWING :{WHITE}Cách vẽ đồ hoạ game: -STR_FRAMERATE_DRAWING_VIEWPORTS :{WHITE} Khung nhìn toàn bản đồ: -STR_FRAMERATE_VIDEO :Nguồn xuất hình: -STR_FRAMERATE_SOUND :{WHITE}Trộn âm thanh: +STR_FRAMERATE_GAMELOOP :{BLACK}Tổng vòng lặp khung hình game: +STR_FRAMERATE_GL_ECONOMY :{BLACK} Xử lý bốc dỡ hàng: +STR_FRAMERATE_GL_TRAINS :{BLACK} Nhịp của tàu hoả: +STR_FRAMERATE_GL_ROADVEHS :{BLACK} Nhịp của xe ô-tô +STR_FRAMERATE_GL_SHIPS :{BLACK} Số nhịp của tàu thủy: +STR_FRAMERATE_GL_AIRCRAFT :{BLACK} Số nhịp của máy bay: +STR_FRAMERATE_GL_LANDSCAPE :{BLACK} Nhịp của bản đồ game: +STR_FRAMERATE_GL_LINKGRAPH :{BLACK} Độ trễ tính toán đồ thị: +STR_FRAMERATE_DRAWING :{BLACK}Cách vẽ đồ hoạ game: +STR_FRAMERATE_DRAWING_VIEWPORTS :{BLACK} Khung nhìn toàn bản đồ: +STR_FRAMERATE_VIDEO :{BLACK}Nguồn xuất hình: +STR_FRAMERATE_SOUND :{BLACK}Trộn âm thanh: +STR_FRAMERATE_ALLSCRIPTS :{BLACK} Tổng số GS/AI: +STR_FRAMERATE_GAMESCRIPT :{BLACK} Kịch bản ván chơi: +STR_FRAMERATE_AI :{BLACK} AI {NUM} {STRING} ############ End of leave-in-this-order ############ Leave those lines in this order!! STR_FRAMETIME_CAPTION_GAMELOOP :Vòng lặp khung hình game @@ -2744,6 +2789,9 @@ STR_FRAMETIME_CAPTION_DRAWING :Cách vẽ đ STR_FRAMETIME_CAPTION_DRAWING_VIEWPORTS :Khung vẽ cả bản đồ game STR_FRAMETIME_CAPTION_VIDEO :Ngõ xuất hình STR_FRAMETIME_CAPTION_SOUND :Trộn âm thanh +STR_FRAMETIME_CAPTION_ALLSCRIPTS :Tổng số kịch bản GS/AI +STR_FRAMETIME_CAPTION_GAMESCRIPT :Kịch bản ván chơi +STR_FRAMETIME_CAPTION_AI :AI {NUM} {STRING} ############ End of leave-in-this-order @@ -2769,6 +2817,9 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Chi Ti STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Không có thông tin gì cả. STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING} STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING} +STR_SAVELOAD_FILTER_TITLE :{BLACK}Chuỗi lọc: +STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Ghi đè file +STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Bạn có chắc chắn ghi đè lên file đang tồn tại? STR_SAVELOAD_OSKTITLE :{BLACK}Nhập tên của ván chơi để lưu @@ -2886,7 +2937,12 @@ STR_NEWGRF_SETTINGS_VERSION :{BLACK}Phiên b STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Phiên bản phù hợp tối thiểu: {SILVER}{NUM} STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{STRING} STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Bảng màu: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT :Mặc định (D) +STR_NEWGRF_SETTINGS_PALETTE_DEFAULT_32BPP :Mặc định (D) / 32 bpp +STR_NEWGRF_SETTINGS_PALETTE_LEGACY :Kiểu cũ (W) +STR_NEWGRF_SETTINGS_PALETTE_LEGACY_32BPP :Kiểu cũ (W) / 32 bpp STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Tham số: {SILVER}{STRING} +STR_NEWGRF_SETTINGS_PARAMETER_NONE :Không STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}Không có thông tin gì cả STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}File hợp lệ không có @@ -2967,6 +3023,8 @@ STR_NEWGRF_ERROR_READ_BOUNDS :Đọc quá gi STR_NEWGRF_ERROR_GRM_FAILED :Dữ liệu GRF theo yêu cầu không hợp lệ (sprite {3:NUM}) STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:STRING} bị tắt bởi {STRING} STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Định dạng Sprite không hợp lệ hoặc chưa định nghĩa (sprite {3:NUM}) +STR_NEWGRF_ERROR_LIST_PROPERTY_TOO_LONG :Có quá phần trong danh sách tài sản (sprite {3:NUM}, tài sản {4:HEX}) +STR_NEWGRF_ERROR_INDPROD_CALLBACK :Lại nhà máy sản xuất không hợp lệ (sprite {3:NUM}, "{2:STRING}") # NewGRF related 'general' warnings STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Chú Ý! @@ -2998,6 +3056,7 @@ STR_NEWGRF_BUGGY :{WHITE}NewGRF ' STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Danh mục hàng hoá/cải biến được cho '{1:ENGINE}' khác với danh mục mua được sau khi đã có. Việc này khiến cho việc tự thay thế hay là tự cải biến không chính xác. STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' gây ra một vòng lặp vô tận khi gọi hàm callback. STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Hàm callback {1:HEX} gửi trả kết quả sai/không rõ {2:HEX} +STR_NEWGRF_BUGGY_INVALID_CARGO_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' trả về loại hàng hoá sản xuất không hợp lệ khi gọi lại tại {2:HEX} # 'User removed essential NewGRFs'-placeholders for stuff without specs STR_NEWGRF_INVALID_CARGO : @@ -3064,6 +3123,8 @@ STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Đổi tên đ # Town local authority window STR_LOCAL_AUTHORITY_CAPTION :{WHITE}Chính quyền địa phương {TOWN} +STR_LOCAL_AUTHORITY_ZONE :{BLACK}Khu vực +STR_LOCAL_AUTHORITY_ZONE_TOOLTIP :{BLACK}Hiện vùng sáng nằm trong phạm vi của chính quyền địa phương STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Uy tín công ty vận tải: STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING} STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Các thao tác: @@ -3092,6 +3153,7 @@ STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE :{YELLOW}Đút l # Goal window STR_GOALS_CAPTION :{WHITE}Mục Tiêu Của {COMPANY} STR_GOALS_SPECTATOR_CAPTION :{WHITE}Mục Tiêu Chung +STR_GOALS_SPECTATOR :Các mục tiêu chung STR_GOALS_GLOBAL_TITLE :{BLACK}Các mục tiêu chung: STR_GOALS_TEXT :{ORANGE}{STRING} STR_GOALS_NONE :{ORANGE}- Không - @@ -3140,6 +3202,7 @@ STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Nháy v # Story book window STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Tình Tiết STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Bảng Tình Tiết Chung +STR_STORY_BOOK_SPECTATOR :Nhật ký chung STR_STORY_BOOK_TITLE :{YELLOW}{STRING} STR_STORY_BOOK_GENERIC_PAGE_ITEM :Trang {NUM} STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Chuyển tới trang cụ thể bằng cách chọn trong danh sách sổ xuống @@ -3319,6 +3382,7 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Hạ t STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Ô đường ray: STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Tín hiệu STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Ô đường bộ: +STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT :{GOLD}Các đoạn xe điện: STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Ô là nước: STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Kênh đào STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Ga, bến: @@ -3329,9 +3393,12 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Nhà máy STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Không Có - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% đã vận chuyển) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% đã vận chuyển) +STR_INDUSTRY_DIRECTORY_ITEM_INFO :{BLACK}{CARGO_LONG}{STRING}{YELLOW} ({COMMA}% đã vận chuyển){BLACK} STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} +STR_INDUSTRY_DIRECTORY_ITEM_PROD1 :{ORANGE}{INDUSTRY} {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD2 :{ORANGE}{INDUSTRY} {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PROD3 :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} +STR_INDUSTRY_DIRECTORY_ITEM_PRODMORE :{ORANGE}{INDUSTRY} {STRING}, {STRING}, {STRING} và hơn {NUM}... STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Tên các nhà máy - nháy vào tên để xem vị trí nhà máy. Ctrl+Click mở cửa sổ mới để xem # Industry view @@ -3342,6 +3409,9 @@ STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Xem vị STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Mức sản lượng: {YELLOW}{COMMA}% STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Nhà máy này đã thông báo sắp đóng cửa! +STR_INDUSTRY_VIEW_REQUIRES_N_CARGO :{BLACK}Yêu cầu: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_PRODUCES_N_CARGO :{BLACK}Sản lượng: {YELLOW}{STRING}{STRING} +STR_INDUSTRY_VIEW_CARGO_LIST_EXTENSION :, {STRING}{STRING} STR_INDUSTRY_VIEW_REQUIRES :{BLACK}Cần cung cấp: STR_INDUSTRY_VIEW_ACCEPT_CARGO :{YELLOW}{STRING}{BLACK}{3:STRING} @@ -3395,11 +3465,13 @@ STR_GROUP_DEFAULT_ROAD_VEHICLES :Xe ôtô chưa STR_GROUP_DEFAULT_SHIPS :Tày thuỷ chưa lập nhóm STR_GROUP_DEFAULT_AIRCRAFTS :Máy bay chưa lập nhóm +STR_GROUP_COUNT_WITH_SUBGROUP :{TINY_FONT}{COMMA} (+{COMMA}) STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Nhóm - chọn nhóm để hiển thị các phương tiện thuộc nhóm. Kéo thả nhóm để sắp xếp lại danh sách. STR_GROUP_CREATE_TOOLTIP :{BLACK}Ấn vào để tạo nhóm STR_GROUP_DELETE_TOOLTIP :{BLACK}Xoá nhóm đã chọn STR_GROUP_RENAME_TOOLTIP :{BLACK}Đổi tên nhóm +STR_GROUP_LIVERY_TOOLTIP :{BLACK}Thay đổi phục trang cho nhóm được chọn STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Không để nhóm này tự thay thế (thiết lập chung) khi hết hạn STR_QUERY_GROUP_DELETE_CAPTION :{WHITE}Xóa Nhóm @@ -3422,14 +3494,17 @@ STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :Tàu Đơn Ray STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :Tàu Đệm Từ Mới STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :Xe Cộ Mới +STR_BUY_VEHICLE_TRAM_VEHICLE_CAPTION :Kiểu xe điện mới ############ range for vehicle availability starts STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :Tàu Hỏa Mới +STR_BUY_VEHICLE_ROAD_VEHICLE_ALL_CAPTION :Thêm xe ô-tô mới STR_BUY_VEHICLE_SHIP_CAPTION :Tàu Mới STR_BUY_VEHICLE_AIRCRAFT_CAPTION :Máy Bay Mới ############ range for vehicle availability ends STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Chi phí: {GOLD}{CURRENCY_LONG}{BLACK} Tải trọng: {GOLD}{WEIGHT_SHORT} +STR_PURCHASE_INFO_COST_REFIT_WEIGHT :{BLACK}Giá: {GOLD}{CURRENCY_LONG}{BLACK} (Giá cải biến: {GOLD}{CURRENCY_LONG}{BLACK}) Trọng lượng: {GOLD}{WEIGHT_SHORT} STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Tốc độ: {GOLD}{VELOCITY}{BLACK} Công suất: {GOLD}{POWER} STR_PURCHASE_INFO_SPEED :{BLACK}Tốc độ: {GOLD}{VELOCITY} STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Tốc độ trên biển: {GOLD}{VELOCITY} @@ -3440,12 +3515,15 @@ STR_PURCHASE_INFO_REFITTABLE :(cải biến STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Thiết kế: {GOLD}{NUM}{BLACK} Niên hạn: {GOLD}{COMMA} năm STR_PURCHASE_INFO_RELIABILITY :{BLACK}Độ tin cậy tối đa: {GOLD}{COMMA}% STR_PURCHASE_INFO_COST :{BLACK}Giá thành: {GOLD}{CURRENCY_LONG} +STR_PURCHASE_INFO_COST_REFIT :{BLACK}Giá: {GOLD}{CURRENCY_LONG}{BLACK} (Giá cải biến: {GOLD}{CURRENCY_LONG}{BLACK}) STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}Tải trọng: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT}) STR_PURCHASE_INFO_COST_SPEED :{BLACK}Giá thành: {GOLD}{CURRENCY_LONG}{BLACK} Tốc độ: {GOLD}{VELOCITY} +STR_PURCHASE_INFO_COST_REFIT_SPEED :{BLACK}Giá: {GOLD}{CURRENCY_LONG}{BLACK} (Giá cải biến: {GOLD}{CURRENCY_LONG}{BLACK}) Tốc độ: {GOLD}{VELOCITY} STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Sức chứa: {GOLD}{CARGO_LONG}, {CARGO_LONG} STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Công suất toa xe: {GOLD}+{POWER}{BLACK} Tải trọng: {GOLD}+{WEIGHT_SHORT} STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Cải biến thành: {GOLD}{STRING} STR_PURCHASE_INFO_ALL_TYPES :Tất cả kiểu hàng hoá +STR_PURCHASE_INFO_NONE :Không STR_PURCHASE_INFO_ALL_BUT :Tất cả trừ {CARGO_LIST} STR_PURCHASE_INFO_MAX_TE :{BLACK}Lực kéo tối đa: {GOLD}{FORCE} STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Tầm xa: {GOLD}{COMMA} ô @@ -3461,12 +3539,20 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Mua P.Ti STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Mua tàu STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Mua Máy Bay +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mua và cải biến ô-tô +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mua và cải biến ô-tô +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mua và cải biến tàu thuỷ +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_BUTTON :{BLACK}Mua và cải biến máy bay STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Mua tàu hỏa đã ấn định. Shift+Click để xem giá mua dự tính STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Mua xe đã ấn định. Shift+Click để xem giá mua dự tính STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Mua tàu đã ấn định. Shift+Click để xem giá mua dự tính STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Mua máy bay đã ấn định. Shift+Click để xem giá mua dự tính +STR_BUY_VEHICLE_TRAIN_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mua và cải biến toa tầu được chọn. Shift+Click để xem giá mua dự tính +STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mua và cải biến ô-tô đang chọn. Shift+Click để xem giá mua dự tính +STR_BUY_VEHICLE_SHIP_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mua và cải biến tàu thuỷ đã chọn. Shift+Click để dự tính giá mà không mua +STR_BUY_VEHICLE_AIRCRAFT_BUY_REFIT_VEHICLE_TOOLTIP :{BLACK}Mua và cải biến máy bay được chọn. Shift+Click để xem chi phí dự tính STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Thay tên STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Thay tên @@ -3578,10 +3664,12 @@ STR_ENGINE_PREVIEW_CAPTION :{WHITE}Thông c STR_ENGINE_PREVIEW_MESSAGE :{GOLD}Chúng tôi vừa thiết kế một {STRING} mới - bạn có muốn mua nó trước khi chúng tôi hoàn thiện 1 năm, để chúng tôi đánh giá nó trước khi bán rộng rãi? STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :đầu máy tầu hoả +STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE :ngành vận tải đường sắt điện lực STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :đầu máy ray đơn STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :đầu máy đệm từ STR_ENGINE_PREVIEW_ROAD_VEHICLE :ôtô +STR_ENGINE_PREVIEW_TRAM_VEHICLE :toa xe điện STR_ENGINE_PREVIEW_AIRCRAFT :máy bay STR_ENGINE_PREVIEW_SHIP :tàu thuỷ @@ -3623,14 +3711,18 @@ STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Chuyển STR_REPLACE_ENGINES :Đầu máy STR_REPLACE_WAGONS :Toa xe STR_REPLACE_ALL_RAILTYPE :Tất cả toa xe đầu máy +STR_REPLACE_ALL_ROADTYPE :Tất cả các xe ô-tô STR_REPLACE_HELP_RAILTYPE :{BLACK}Chọn kiểu đường ray bạn muốn thay thế +STR_REPLACE_HELP_ROADTYPE :{BLACK}Chọn loại đường bạn muốn thay ô-tô thành vậy STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Hiện thị đầu máy nào đang được thay thế, nếu có STR_REPLACE_RAIL_VEHICLES :Đầu máy/toa tàu hoả STR_REPLACE_ELRAIL_VEHICLES :Đầu máy/toa xe điện STR_REPLACE_MONORAIL_VEHICLES :Đầu máy ray đơn STR_REPLACE_MAGLEV_VEHICLES :Đầu máy đệm từ +STR_REPLACE_ROAD_VEHICLES :Các xe ô-tô +STR_REPLACE_TRAM_VEHICLES :Các xe điện STR_REPLACE_REMOVE_WAGON :{BLACK}Xoá bỏ toa xe: {ORANGE}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Tự động thay thế sẽ giữ nguyên độ dài đoàn tàu bằng cách bỏ bớt toa xe (bỏ từ phía đầu), nếu như việc thay thế đầu máy làm đoàn tàu dài hơn. @@ -3851,6 +3943,7 @@ STR_ORDER_CONDITIONAL_AGE :Tuổi phương STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Yêu cầu bảo trì STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Luôn luôn STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Thời gian sử dụng còn lại (năm) +STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Mức độ tin cậy tối đa STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Cách so sánh dữ kiện của phương tiện với giá trị cho trước STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :bằng với @@ -4353,6 +4446,7 @@ STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}Không c STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Phải phá bỏ đường ray trước STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Đường một chiều hoặc bị chặn STR_ERROR_CROSSING_DISALLOWED_RAIL :{WHITE}Đường giao nhau không cho phép với loại ray này +STR_ERROR_CROSSING_DISALLOWED_ROAD :{WHITE}Tạo đường dốc khác độ cao không được phép với loại đường này STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Không thể xây đèn hiệu ở đây... STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Không thể xây đường ray ở đây... STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Không thể phá bỏ đường ray ở đây... @@ -4372,6 +4466,12 @@ STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Không t STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Không thể phá dỡ đường xe điện ở đây... STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... không có đường bộ STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... không có đường ray xe điện +STR_ERROR_CAN_T_CONVERT_ROAD :{WHITE}Không thể chuyển đổi loại đường ở đây... +STR_ERROR_CAN_T_CONVERT_TRAMWAY :{WHITE}Không thể chuyển đổi kiểu xe điện ở đây... +STR_ERROR_NO_SUITABLE_ROAD :{WHITE}Không có đường ô-tô thích hợp +STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}Không có đường xe điện phù hợp +STR_ERROR_INCOMPATIBLE_ROAD :{WHITE}... đường không tương thích +STR_ERROR_INCOMPATIBLE_TRAMWAY :{WHITE}... xe điện không phù hợp # Waterway construction errors STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Không thể xây kênh đào ở đây... @@ -4424,6 +4524,7 @@ STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Không t STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Không thể xoá bỏ nhóm... STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Không thể đổi tên nhóm... STR_ERROR_GROUP_CAN_T_SET_PARENT :{WHITE}Không thể thiết đặt nhóm cha... +STR_ERROR_GROUP_CAN_T_SET_PARENT_RECURSION :{WHITE}... lặp ở trong nhóm phân cấp là không được STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Không thể bỏ các phương tiện trong nhóm này... STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Không thể thêm phương tiện vào nhóm này... STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Không thể thêm phương tiện được chia sẻ vào nhóm... diff --git a/src/lang/welsh.txt b/src/lang/welsh.txt index 75ede9e957..d107bd82d5 100644 --- a/src/lang/welsh.txt +++ b/src/lang/welsh.txt @@ -10,8 +10,6 @@ ##grflangid 0x0f -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -859,6 +857,7 @@ STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLAC STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE} STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}Mae {STRING} newydd yn awr ar gael! - {ENGINE} + STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}Nid yw {STATION} bellach yn derbyn {STRING} STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}Nid yw {STATION} bellach yn derbyn {STRING} na {STRING} STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}Mae {STATION} nawr yn derbyn {STRING} @@ -3280,8 +3279,6 @@ STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENC # Industry directory STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Diwydiannau STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- Dim - -STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}){YELLOW} ({COMMA}% wedi'i gludo) -STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{STRING}/{CARGO_LONG}{STRING}){YELLOW} ({COMMA}%/{COMMA}% wedi'i gludo) STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY} STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Enwau diwydiannau - cliciwch ar enw i ganoli'r sgrin ar ddiwydiant. Mae Ctrl+Clic yn agor ffenest golwg newydd ar leoliad y diwydiant diff --git a/src/language.h b/src/language.h index be2d37084b..aec5d9c85f 100644 --- a/src/language.h +++ b/src/language.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/flowmapper.cpp b/src/linkgraph/flowmapper.cpp index b78b30335e..2e0257fc1b 100644 --- a/src/linkgraph/flowmapper.cpp +++ b/src/linkgraph/flowmapper.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/flowmapper.h b/src/linkgraph/flowmapper.h index 6f874e5b30..90ccd9fe52 100644 --- a/src/linkgraph/flowmapper.h +++ b/src/linkgraph/flowmapper.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraph.cpp b/src/linkgraph/linkgraph.cpp index 234b0be605..5185d07b7b 100644 --- a/src/linkgraph/linkgraph.cpp +++ b/src/linkgraph/linkgraph.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h index 7f2561e754..997d946230 100644 --- a/src/linkgraph/linkgraph.h +++ b/src/linkgraph/linkgraph.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -536,6 +534,4 @@ protected: EdgeMatrix edges; ///< Edges in the component. }; -#define FOR_ALL_LINK_GRAPHS(var) FOR_ALL_ITEMS_FROM(LinkGraph, link_graph_index, var, 0) - #endif /* LINKGRAPH_H */ diff --git a/src/linkgraph/linkgraph_base.h b/src/linkgraph/linkgraph_base.h index 6e56af9a9c..eb86c0c64e 100644 --- a/src/linkgraph/linkgraph_base.h +++ b/src/linkgraph/linkgraph_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index ebba160bf7..b5fbc50ff7 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -58,8 +56,7 @@ void LinkGraphOverlay::RebuildCache() DrawPixelInfo dpi; this->GetWidgetDpi(&dpi); - const Station *sta; - FOR_ALL_STATIONS(sta) { + for (const Station *sta : Station::Iterate()) { if (sta->rect.IsEmpty()) continue; Point pta = this->GetStationMiddle(sta); diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h index b913bb1f4a..8e85470588 100644 --- a/src/linkgraph/linkgraph_gui.h +++ b/src/linkgraph/linkgraph_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraph_type.h b/src/linkgraph/linkgraph_type.h index 1e3a0ff661..a2618ae84f 100644 --- a/src/linkgraph/linkgraph_type.h +++ b/src/linkgraph/linkgraph_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index cd358f37f0..2d7b407da7 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index fa6ca618a1..9344ea2462 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -336,8 +334,6 @@ public: inline const LinkGraph &Graph() const { return this->link_graph; } }; -#define FOR_ALL_LINK_GRAPH_JOBS(var) FOR_ALL_ITEMS_FROM(LinkGraphJob, link_graph_job_index, var, 0) - /** * A leg of a path in the link graph. Paths can form trees by being "forked". */ diff --git a/src/linkgraph/linkgraphjob_base.h b/src/linkgraph/linkgraphjob_base.h index 0a29166ee9..a05d6ef8d6 100644 --- a/src/linkgraph/linkgraphjob_base.h +++ b/src/linkgraph/linkgraphjob_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp index c5f797f184..964744509e 100644 --- a/src/linkgraph/linkgraphschedule.cpp +++ b/src/linkgraph/linkgraphschedule.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -109,10 +107,8 @@ void LinkGraphSchedule::SpawnAll() */ void LinkGraphSchedule::ShiftDates(int interval) { - LinkGraph *lg; - FOR_ALL_LINK_GRAPHS(lg) lg->ShiftDates(interval); - LinkGraphJob *lgj; - FOR_ALL_LINK_GRAPH_JOBS(lgj) lgj->ShiftJoinDate(interval); + for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(interval); + for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) lgj->ShiftJoinDate(interval); } /** diff --git a/src/linkgraph/linkgraphschedule.h b/src/linkgraph/linkgraphschedule.h index b7dfa9793f..62ca2b0c17 100644 --- a/src/linkgraph/linkgraphschedule.h +++ b/src/linkgraph/linkgraphschedule.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/refresh.cpp b/src/linkgraph/refresh.cpp index ef10de6fe4..430e290727 100644 --- a/src/linkgraph/refresh.cpp +++ b/src/linkgraph/refresh.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index 42067ebcf9..0202fd7239 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/livery.h b/src/livery.h index d6ed5bfdc7..dc01c390a7 100644 --- a/src/livery.h +++ b/src/livery.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/main_gui.cpp b/src/main_gui.cpp index a833714cd9..e7e3ff8e27 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/map.cpp b/src/map.cpp index 53e26ed73e..679c445ee1 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/map_func.h b/src/map_func.h index 21d69b1382..0c8fda7be9 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/map_type.h b/src/map_type.h index 0c57d37700..453186d88e 100644 --- a/src/map_type.h +++ b/src/map_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc.cpp b/src/misc.cpp index ffdadecd3b..c56eb6a38d 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/array.hpp b/src/misc/array.hpp index c49f2afc44..d23fb7a0d9 100644 --- a/src/misc/array.hpp +++ b/src/misc/array.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp index 11e419711a..a967ebdf23 100644 --- a/src/misc/binaryheap.hpp +++ b/src/misc/binaryheap.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp index fafeb80780..7784b6af6b 100644 --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/countedobj.cpp b/src/misc/countedobj.cpp index 837d1c1770..d9b66b83da 100644 --- a/src/misc/countedobj.cpp +++ b/src/misc/countedobj.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/countedptr.hpp b/src/misc/countedptr.hpp index 1364197dc1..8ced8d48e1 100644 --- a/src/misc/countedptr.hpp +++ b/src/misc/countedptr.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index 22ccfa3464..7d38c7e65a 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h index 2e2a1a7e9a..7c9b4c876f 100644 --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp index ec1d58bf3e..db6c7808b3 100644 --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/getoptdata.cpp b/src/misc/getoptdata.cpp index d80898f083..df54391232 100644 --- a/src/misc/getoptdata.cpp +++ b/src/misc/getoptdata.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/getoptdata.h b/src/misc/getoptdata.h index 4777c85b5a..5b1b05d75d 100644 --- a/src/misc/getoptdata.h +++ b/src/misc/getoptdata.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp index 49f321bff3..ee6b88234a 100644 --- a/src/misc/hashtable.hpp +++ b/src/misc/hashtable.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc/str.hpp b/src/misc/str.hpp index 42e4631581..e93ce5efc3 100644 --- a/src/misc/str.hpp +++ b/src/misc/str.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index e00ad9d9c3..63dfb15253 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index dc5ec54fdb..950e402309 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/mixer.cpp b/src/mixer.cpp index 5f3eeb42ad..90e3951cb0 100644 --- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/mixer.h b/src/mixer.h index 9766682d6b..bd7b18a44a 100644 --- a/src/mixer.h +++ b/src/mixer.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music.cpp b/src/music.cpp index 43a9508fad..a95a9d348d 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp index 959f156118..4f90bce061 100644 --- a/src/music/allegro_m.cpp +++ b/src/music/allegro_m.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/allegro_m.h b/src/music/allegro_m.h index 9451162a21..1965626ca2 100644 --- a/src/music/allegro_m.h +++ b/src/music/allegro_m.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/bemidi.cpp b/src/music/bemidi.cpp index 090ac0f907..c3ea152dae 100644 --- a/src/music/bemidi.cpp +++ b/src/music/bemidi.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/bemidi.h b/src/music/bemidi.h index 8591ec0159..a524069db0 100644 --- a/src/music/bemidi.h +++ b/src/music/bemidi.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/cocoa_m.cpp b/src/music/cocoa_m.cpp index fd3ff295e8..f9b8969fdf 100644 --- a/src/music/cocoa_m.cpp +++ b/src/music/cocoa_m.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -161,13 +159,12 @@ void MusicDriver_Cocoa::PlaySong(const MusicSongInfo &song) } const char *os_file = OTTD2FS(filename.c_str()); - CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8*)os_file, strlen(os_file), false); + CFAutoRelease url(CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8*)os_file, strlen(os_file), false)); #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if (MacOSVersionIsAtLeast(10, 5, 0)) { - if (MusicSequenceFileLoad(_sequence, url, kMusicSequenceFile_AnyType, 0) != noErr) { + if (MusicSequenceFileLoad(_sequence, url.get(), kMusicSequenceFile_AnyType, 0) != noErr) { DEBUG(driver, 0, "cocoa_m: Failed to load MIDI file"); - CFRelease(url); return; } } else @@ -175,19 +172,16 @@ void MusicDriver_Cocoa::PlaySong(const MusicSongInfo &song) { #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) FSRef ref_file; - if (!CFURLGetFSRef(url, &ref_file)) { + if (!CFURLGetFSRef(url.get(), &ref_file)) { DEBUG(driver, 0, "cocoa_m: Failed to make FSRef"); - CFRelease(url); return; } if (MusicSequenceLoadSMFWithFlags(_sequence, &ref_file, 0) != noErr) { DEBUG(driver, 0, "cocoa_m: Failed to load MIDI file old style"); - CFRelease(url); return; } #endif } - CFRelease(url); /* Construct audio graph */ AUGraph graph = nullptr; diff --git a/src/music/cocoa_m.h b/src/music/cocoa_m.h index 7694927993..aa477eddaf 100644 --- a/src/music/cocoa_m.h +++ b/src/music/cocoa_m.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index c175b0727d..4a7461ee8f 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/dmusic.h b/src/music/dmusic.h index 5b363b8917..bfbb07f16d 100644 --- a/src/music/dmusic.h +++ b/src/music/dmusic.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index b390c42f55..b7e7e63b90 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/extmidi.h b/src/music/extmidi.h index 55050c0d2b..495e9a72cf 100644 --- a/src/music/extmidi.h +++ b/src/music/extmidi.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp index 4623716a46..aa70767716 100644 --- a/src/music/fluidsynth.cpp +++ b/src/music/fluidsynth.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/fluidsynth.h b/src/music/fluidsynth.h index e8a294b77b..71d43fec4c 100644 --- a/src/music/fluidsynth.h +++ b/src/music/fluidsynth.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/midi.h b/src/music/midi.h index 90f04435e6..6de8b856c9 100644 --- a/src/music/midi.h +++ b/src/music/midi.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/midifile.cpp b/src/music/midifile.cpp index 6ee1f0e60e..197be14a14 100644 --- a/src/music/midifile.cpp +++ b/src/music/midifile.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp index 4d362a1be2..d786bf0078 100644 --- a/src/music/midifile.hpp +++ b/src/music/midifile.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index f4d3d7dd36..601cc6d475 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/null_m.cpp b/src/music/null_m.cpp index 90d08d04a1..c9c8bc84f0 100644 --- a/src/music/null_m.cpp +++ b/src/music/null_m.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/null_m.h b/src/music/null_m.h index 8eb7d67925..09f84e35ce 100644 --- a/src/music/null_m.h +++ b/src/music/null_m.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/os2_m.cpp b/src/music/os2_m.cpp index 92e177f840..f66c2bd9e8 100644 --- a/src/music/os2_m.cpp +++ b/src/music/os2_m.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/os2_m.h b/src/music/os2_m.h index e320946edb..d0a4809b2c 100644 --- a/src/music/os2_m.h +++ b/src/music/os2_m.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/qtmidi.cpp b/src/music/qtmidi.cpp index e612604edd..eea1e30842 100644 --- a/src/music/qtmidi.cpp +++ b/src/music/qtmidi.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/qtmidi.h b/src/music/qtmidi.h index 631f04d2db..d6ed5304a0 100644 --- a/src/music/qtmidi.h +++ b/src/music/qtmidi.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index d1ff5375aa..b4f656b141 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music/win32_m.h b/src/music/win32_m.h index 5366cf5d71..394c3d9909 100644 --- a/src/music/win32_m.h +++ b/src/music/win32_m.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 90fd476690..269bb7f3c3 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 3d5bd5d641..44ba453856 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/address.h b/src/network/core/address.h index 2f27a083ac..980d7227df 100644 --- a/src/network/core/address.h +++ b/src/network/core/address.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/config.h b/src/network/core/config.h index f6823b1a93..3488b1ff28 100644 --- a/src/network/core/config.h +++ b/src/network/core/config.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 1726e4176e..0aeb9c65ce 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/core.h b/src/network/core/core.h index 1536c08a7a..bf83adc72c 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/game.h b/src/network/core/game.h index 57eba5812f..151ebef284 100644 --- a/src/network/core/game.h +++ b/src/network/core/game.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp index 04247d99c9..bcb048e474 100644 --- a/src/network/core/host.cpp +++ b/src/network/core/host.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/host.h b/src/network/core/host.h index 46bfa4e1fa..345b352193 100644 --- a/src/network/core/host.h +++ b/src/network/core/host.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/os_abstraction.h b/src/network/core/os_abstraction.h index df4bed425f..01ab68b278 100644 --- a/src/network/core/os_abstraction.h +++ b/src/network/core/os_abstraction.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index fda8fdfeb7..94ffcc5584 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/packet.h b/src/network/core/packet.h index 7b4bf26f37..c9be4eeb53 100644 --- a/src/network/core/packet.h +++ b/src/network/core/packet.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index 63d004a8fd..a51913d843 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 451b93071c..08a09ca1a2 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index 98ef0f0a07..fdeb3d829b 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 7bcc878403..979e5963f0 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp index 13330108aa..9448acb830 100644 --- a/src/network/core/tcp_connect.cpp +++ b/src/network/core/tcp_connect.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp index ee8baf48e0..989fbefaf4 100644 --- a/src/network/core/tcp_content.cpp +++ b/src/network/core/tcp_content.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h index 689de7a018..be1cc6e77e 100644 --- a/src/network/core/tcp_content.h +++ b/src/network/core/tcp_content.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 6d69d10d25..e0835771ed 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index eb8881adc0..9e3dcf197c 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index 1162324028..b2a6b0c040 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h index 001942ffb7..1a1edaf87a 100644 --- a/src/network/core/tcp_http.h +++ b/src/network/core/tcp_http.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/tcp_listen.h b/src/network/core/tcp_listen.h index 28b6de8ace..d2982363e6 100644 --- a/src/network/core/tcp_listen.h +++ b/src/network/core/tcp_listen.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -104,8 +102,7 @@ public: FD_ZERO(&write_fd); - Tsocket *cs; - FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) { + for (Tsocket *cs : Tsocket::Iterate()) { FD_SET(cs->sock, &read_fd); FD_SET(cs->sock, &write_fd); } @@ -124,7 +121,7 @@ public: } /* read stuff from clients */ - FOR_ALL_ITEMS_FROM(Tsocket, idx, cs, 0) { + for (Tsocket *cs : Tsocket::Iterate()) { cs->writable = !!FD_ISSET(cs->sock, &write_fd); if (FD_ISSET(cs->sock, &read_fd)) { cs->ReceivePackets(); diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 853b19e1ac..1236838732 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/core/udp.h b/src/network/core/udp.h index 9ed2705ef9..ddbbd4515f 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network.cpp b/src/network/network.cpp index 0cc415192e..fe7e6a8552 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -101,10 +99,7 @@ extern void StateGameLoop(); */ bool HasClients() { - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) return true; - - return false; + return !NetworkClientSocket::Iterate().empty(); } /** @@ -123,9 +118,7 @@ NetworkClientInfo::~NetworkClientInfo() */ /* static */ NetworkClientInfo *NetworkClientInfo::GetByClientID(ClientID client_id) { - NetworkClientInfo *ci; - - FOR_ALL_CLIENT_INFOS(ci) { + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_id == client_id) return ci; } @@ -139,9 +132,7 @@ NetworkClientInfo::~NetworkClientInfo() */ /* static */ ServerNetworkGameSocketHandler *ServerNetworkGameSocketHandler::GetByClientID(ClientID client_id) { - NetworkClientSocket *cs; - - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->client_id == client_id) return cs; } @@ -150,10 +141,9 @@ NetworkClientInfo::~NetworkClientInfo() byte NetworkSpectatorCount() { - const NetworkClientInfo *ci; byte count = 0; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas == COMPANY_SPECTATOR) count++; } @@ -410,10 +400,9 @@ static void CheckPauseHelper(bool pause, PauseMode pm) */ static uint NetworkCountActiveClients() { - const NetworkClientSocket *cs; uint count = 0; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (const NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status != NetworkClientSocket::STATUS_ACTIVE) continue; if (!Company::IsValidID(cs->GetInfo()->client_playas)) continue; count++; @@ -441,8 +430,7 @@ static void CheckMinActiveClients() */ static bool NetworkHasJoiningClient() { - const NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (const NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status >= NetworkClientSocket::STATUS_AUTHORIZED && cs->status < NetworkClientSocket::STATUS_ACTIVE) return true; } @@ -529,14 +517,12 @@ void NetworkClose(bool close_admins) { if (_network_server) { if (close_admins) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::Iterate()) { as->CloseConnection(true); } } - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { cs->CloseConnection(NETWORK_RECV_STATUS_CONN_LOST); } ServerNetworkGameSocketHandler::CloseListeners(); @@ -770,14 +756,12 @@ bool NetworkServerStart() void NetworkReboot() { if (_network_server) { - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { cs->SendNewGame(); cs->SendPackets(); } - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { as->SendNewGame(); as->SendPackets(); } @@ -796,15 +780,13 @@ void NetworkReboot() void NetworkDisconnect(bool blocking, bool close_admins) { if (_network_server) { - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { cs->SendShutdown(); cs->SendPackets(); } if (close_admins) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { as->SendShutdown(); as->SendPackets(); } diff --git a/src/network/network.h b/src/network/network.h index 9f8e3b790b..1de0da3a8b 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 9c5c43ab5c..f304740a6a 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -96,8 +94,7 @@ ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler() /** Send the packets for the server sockets. */ /* static */ void ServerNetworkAdminSocketHandler::Send() { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::Iterate()) { if (as->status == ADMIN_STATUS_INACTIVE && as->realtime_connect + ADMIN_AUTHORISATION_TIMEOUT < _realtime_tick) { DEBUG(net, 1, "[admin] Admin did not send its authorisation within %d seconds", ADMIN_AUTHORISATION_TIMEOUT / 1000); as->CloseConnection(true); @@ -401,8 +398,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyRemove(CompanyID c /** Send economic information of all companies. */ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyEconomy() { - const Company *company; - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { /* Get the income. */ Money income = 0; for (uint i = 0; i < lengthof(company->yearly_expenses[0]); i++) { @@ -440,10 +436,8 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCompanyStats() NetworkCompanyStats company_stats[MAX_COMPANIES]; NetworkPopulateCompanyStats(company_stats); - const Company *company; - /* Go through all the companies. */ - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { Packet *p = new Packet(ADMIN_PACKET_SERVER_COMPANY_STATS); /* Send the information. */ @@ -732,17 +726,16 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_POLL(Packet *p) case ADMIN_UPDATE_CLIENT_INFO: /* The admin is requesting client info. */ - const NetworkClientSocket *cs; if (d1 == UINT32_MAX) { this->SendClientInfo(nullptr, NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER)); - FOR_ALL_CLIENT_SOCKETS(cs) { + for (const NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { this->SendClientInfo(cs, cs->GetInfo()); } } else { if (d1 == CLIENT_ID_SERVER) { this->SendClientInfo(nullptr, NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER)); } else { - cs = NetworkClientSocket::GetByClientID((ClientID)d1); + const NetworkClientSocket *cs = NetworkClientSocket::GetByClientID((ClientID)d1); if (cs != nullptr) this->SendClientInfo(cs, cs->GetInfo()); } } @@ -750,13 +743,12 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_POLL(Packet *p) case ADMIN_UPDATE_COMPANY_INFO: /* The admin is asking for company info. */ - const Company *company; if (d1 == UINT32_MAX) { - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { this->SendCompanyInfo(company); } } else { - company = Company::GetIfValid(d1); + const Company *company = Company::GetIfValid(d1); if (company != nullptr) this->SendCompanyInfo(company); } break; @@ -823,8 +815,7 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_CHAT(Packet *p) */ void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendClientInfo(cs, cs->GetInfo()); if (new_client) { @@ -840,8 +831,7 @@ void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client) */ void NetworkAdminClientUpdate(const NetworkClientInfo *ci) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendClientUpdate(ci); } @@ -854,8 +844,7 @@ void NetworkAdminClientUpdate(const NetworkClientInfo *ci) */ void NetworkAdminClientQuit(ClientID client_id) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendClientQuit(client_id); } @@ -869,8 +858,7 @@ void NetworkAdminClientQuit(ClientID client_id) */ void NetworkAdminClientError(ClientID client_id, NetworkErrorCode error_code) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendClientError(client_id, error_code); } @@ -889,8 +877,7 @@ void NetworkAdminCompanyInfo(const Company *company, bool new_company) return; } - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue; as->SendCompanyInfo(company); @@ -908,8 +895,7 @@ void NetworkAdminCompanyUpdate(const Company *company) { if (company == nullptr) return; - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue; as->SendCompanyUpdate(company); @@ -923,8 +909,7 @@ void NetworkAdminCompanyUpdate(const Company *company) */ void NetworkAdminCompanyRemove(CompanyID company_id, AdminCompanyRemoveReason bcrr) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { as->SendCompanyRemove(company_id, bcrr); } } @@ -937,8 +922,7 @@ void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_i { if (from_admin) return; - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CHAT] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendChat(action, desttype, client_id, msg, data); } @@ -963,8 +947,7 @@ void NetworkServerSendAdminRcon(AdminIndex admin_index, TextColour colour_code, */ void NetworkAdminConsole(const char *origin, const char *string) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CONSOLE] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendConsole(origin, string); } @@ -977,8 +960,7 @@ void NetworkAdminConsole(const char *origin, const char *string) */ void NetworkAdminGameScript(const char *json) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_GAMESCRIPT] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendGameScript(json); } @@ -994,8 +976,7 @@ void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacke { ClientID client_id = owner == nullptr ? _network_own_client_id : owner->client_id; - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { if (as->update_frequency[ADMIN_UPDATE_CMD_LOGGING] & ADMIN_FREQUENCY_AUTOMATIC) { as->SendCmdLogging(client_id, cp); } @@ -1007,8 +988,7 @@ void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacke */ void ServerNetworkAdminSocketHandler::WelcomeAll() { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { as->SendWelcome(); } } @@ -1019,8 +999,7 @@ void ServerNetworkAdminSocketHandler::WelcomeAll() */ void NetworkAdminUpdate(AdminUpdateFrequency freq) { - ServerNetworkAdminSocketHandler *as; - FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) { + for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { for (int i = 0; i < ADMIN_UPDATE_END; i++) { if (as->update_frequency[i] & freq) { /* Update the admin for the required details */ diff --git a/src/network/network_admin.h b/src/network/network_admin.h index 6ea373e8eb..98dbab4816 100644 --- a/src/network/network_admin.h +++ b/src/network/network_admin.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -84,29 +82,19 @@ public: { return "admin"; } + + /** + * Returns an iterable ensemble of all active admin sockets + * @param from index of the first socket to consider + * @return an iterable ensemble of all active admin sockets + */ + static Pool::IterateWrapper IterateActive(size_t from = 0) + { + return Pool::IterateWrapper(from, + [](size_t index) { return ServerNetworkAdminSocketHandler::Get(index)->GetAdminStatus() == ADMIN_STATUS_ACTIVE; }); + } }; -/** - * Iterate over all the sockets from a given starting point. - * @param var The variable to iterate with. - * @param start The start of the iteration. - */ -#define FOR_ALL_ADMIN_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(ServerNetworkAdminSocketHandler, adminsocket_index, var, start) - -/** - * Iterate over all the sockets. - * @param var The variable to iterate with. - */ -#define FOR_ALL_ADMIN_SOCKETS(var) FOR_ALL_ADMIN_SOCKETS_FROM(var, 0) - -/** - * Iterate over all the active sockets. - * @param var The variable to iterate with. - */ -#define FOR_ALL_ACTIVE_ADMIN_SOCKETS(var) \ - FOR_ALL_ADMIN_SOCKETS(var) \ - if (var->GetAdminStatus() == ADMIN_STATUS_ACTIVE) - void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client = false); void NetworkAdminClientUpdate(const NetworkClientInfo *ci); void NetworkAdminClientQuit(ClientID client_id); diff --git a/src/network/network_base.h b/src/network/network_base.h index 817d0e4c89..cbb7e88f2c 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -39,17 +37,4 @@ struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_p static NetworkClientInfo *GetByClientID(ClientID client_id); }; -/** - * Iterate over all the clients from a given index. - * @param var The variable to iterate with. - * @param start The location to start the iteration from. - */ -#define FOR_ALL_CLIENT_INFOS_FROM(var, start) FOR_ALL_ITEMS_FROM(NetworkClientInfo, clientinfo_index, var, start) - -/** - * Iterate over all the clients. - * @param var The variable to iterate with. - */ -#define FOR_ALL_CLIENT_INFOS(var) FOR_ALL_CLIENT_INFOS_FROM(var, 0) - #endif /* NETWORK_BASE_H */ diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index e7e22db99b..07348c0484 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -338,8 +336,7 @@ struct NetworkChatWindow : public Window { /* First, try clients */ if (*item < MAX_CLIENT_SLOTS) { /* Skip inactive clients */ - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS_FROM(ci, *item) { + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate(*item)) { *item = ci->index; return ci->client_name; } @@ -350,9 +347,7 @@ struct NetworkChatWindow : public Window { * Not that the following assumes all town indices are adjacent, ie no * towns have been deleted. */ if (*item < (uint)MAX_CLIENT_SLOTS + Town::GetPoolSize()) { - const Town *t; - - FOR_ALL_TOWNS_FROM(t, *item - MAX_CLIENT_SLOTS) { + for (const Town *t : Town::Iterate(*item - MAX_CLIENT_SLOTS)) { /* Get the town-name via the string-system */ SetDParam(0, t->index); GetString(chat_tab_temp_buffer, STR_TOWN_NAME, lastof(chat_tab_temp_buffer)); diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 717e41b836..08ec7823e1 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1236,8 +1234,7 @@ void NetworkClientsToSpectators(CompanyID cid) /* If our company is changing owner, go to spectators */ if (cid == _local_company) SetLocalCompany(COMPANY_SPECTATOR); - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas != cid) continue; NetworkTextMessage(NETWORK_ACTION_COMPANY_SPECTATOR, CC_DEFAULT, false, ci->client_name); ci->client_playas = COMPANY_SPECTATOR; @@ -1301,8 +1298,7 @@ bool NetworkClientPreferTeamChat(const NetworkClientInfo *cio) /* Only companies actually playing can speak to team. Eg spectators cannot */ if (!_settings_client.gui.prefer_teamchat || !Company::IsValidID(cio->client_playas)) return false; - const NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas == cio->client_playas && ci != cio) return true; } diff --git a/src/network/network_client.h b/src/network/network_client.h index d0a9d07b18..d1ffe1c1d1 100644 --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 472215a63e..5d36a39b96 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -240,8 +238,7 @@ static void DistributeCommandPacket(CommandPacket &cp, const NetworkClientSocket CommandCallback *callback = cp.callback; cp.frame = _frame_counter_max + 1; - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status >= NetworkClientSocket::STATUS_MAP) { /* Callbacks are only send back to the client who sent them in the * first place. This filters that out. */ @@ -251,8 +248,8 @@ static void DistributeCommandPacket(CommandPacket &cp, const NetworkClientSocket } } - cp.callback = (cs != owner) ? nullptr : callback; - cp.my_cmd = (cs == owner); + cp.callback = (nullptr != owner) ? nullptr : callback; + cp.my_cmd = (nullptr == owner); _local_execution_queue.Append(&cp); } @@ -285,8 +282,7 @@ void NetworkDistributeCommands() DistributeQueue(&_local_wait_queue, nullptr); /* Then send the queues of the others. */ - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { DistributeQueue(&cs->incoming_queue, cs); } } diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index b6d32620bd..5e401d3e92 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_content.h b/src/network/network_content.h index b65321e0f0..fc33e72a14 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 9c58564e7b..6083396eeb 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_content_gui.h b/src/network/network_content_gui.h index 8afd245d7c..4853101bbf 100644 --- a/src/network/network_content_gui.h +++ b/src/network/network_content_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_func.h b/src/network/network_func.h index 5cf01d32c4..d4a62ddd36 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp index 3b3afcb80e..ff744e8757 100644 --- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h index c77c6719e0..8e61f3a93b 100644 --- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index e14bc36cc0..2faf5a3950 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1885,10 +1883,9 @@ struct NetworkClientListWindow : Window { bool CheckClientListHeight() { int num = 0; - const NetworkClientInfo *ci; /* Should be replaced with a loop through all clients */ - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas != COMPANY_INACTIVE_CLIENT) num++; } @@ -1912,8 +1909,7 @@ struct NetworkClientListWindow : Window { this->line_height = max(this->icon_size.height + 2U, (uint)FONT_HEIGHT_NORMAL); uint width = 100; // Default width - const NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { width = max(width, GetStringBoundingBox(ci->client_name).width); } @@ -1949,8 +1945,7 @@ struct NetworkClientListWindow : Window { uint name_right = rtl ? right - type_icon_width : right; int i = 0; - const NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { TextColour colour; if (this->selected_item == i++) { // Selected item, highlight it GfxFillRect(r.left + 1, y, r.right - 1, y + this->line_height - 1, PC_BLACK); @@ -1978,15 +1973,14 @@ struct NetworkClientListWindow : Window { { /* Show the popup with option */ if (this->selected_item != -1) { - NetworkClientInfo *ci; - int client_no = this->selected_item; - FOR_ALL_CLIENT_INFOS(ci) { - if (client_no == 0) break; + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { + if (client_no == 0) { + PopupClientList(ci->client_id, pt.x + this->left, pt.y + this->top); + break; + } client_no--; } - - if (ci != nullptr) PopupClientList(ci->client_id, pt.x + this->left, pt.y + this->top); } } diff --git a/src/network/network_gui.h b/src/network/network_gui.h index d9dfb57dd6..b9439599b5 100644 --- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_internal.h b/src/network/network_internal.h index 06dca992f7..8cae502e10 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 6d9dcc3d8c..f9c9e91f23 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -260,14 +258,13 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta if (status != NETWORK_RECV_STATUS_CONN_LOST && !this->HasClientQuit() && this->status >= STATUS_AUTHORIZED) { /* We did not receive a leave message from this client... */ char client_name[NETWORK_CLIENT_NAME_LENGTH]; - NetworkClientSocket *new_cs; this->GetClientName(client_name, lastof(client_name)); NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, nullptr, STR_NETWORK_ERROR_CLIENT_CONNECTION_LOST); /* Inform other clients of this... strange leaving ;) */ - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status > STATUS_AUTHORIZED && this != new_cs) { new_cs->SendErrorQuit(this->client_id, NETWORK_ERROR_CONNECTION_LOST); } @@ -312,8 +309,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta /** Send the packets for the server sockets. */ /* static */ void ServerNetworkGameSocketHandler::Send() { - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->writable) { if (cs->SendPackets() != SPS_CLOSED && cs->status == STATUS_MAP) { /* This client is in the middle of a map-send, call the function for that */ @@ -356,7 +352,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() /* Make a list of all clients per company */ char clients[MAX_COMPANIES][NETWORK_CLIENTS_LENGTH]; - NetworkClientSocket *csi; memset(clients, 0, sizeof(clients)); /* Add the local player (if not dedicated) */ @@ -365,7 +360,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() strecpy(clients[ci->client_playas], ci->client_name, lastof(clients[ci->client_playas])); } - FOR_ALL_CLIENT_SOCKETS(csi) { + for (NetworkClientSocket *csi : NetworkClientSocket::Iterate()) { char client_name[NETWORK_CLIENT_NAME_LENGTH]; ((ServerNetworkGameSocketHandler*)csi)->GetClientName(client_name, lastof(client_name)); @@ -382,10 +377,9 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendCompanyInfo() /* Now send the data */ - Company *company; Packet *p; - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { p = new Packet(PACKET_SERVER_COMPANY_INFO); p->Send_uint8 (NETWORK_COMPANY_INFO_VERSION); @@ -427,7 +421,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendError(NetworkErrorCode err /* Only send when the current client was in game */ if (this->status > STATUS_AUTHORIZED) { - NetworkClientSocket *new_cs; char client_name[NETWORK_CLIENT_NAME_LENGTH]; this->GetClientName(client_name, lastof(client_name)); @@ -436,7 +429,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendError(NetworkErrorCode err NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, nullptr, strid); - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status > STATUS_AUTHORIZED && new_cs != this) { /* Some errors we filter to a more general error. Clients don't have to know the real * reason a joining failed. */ @@ -512,7 +505,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendNeedCompanyPassword() NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome() { Packet *p; - NetworkClientSocket *new_cs; /* Invalid packet when status is AUTH or higher */ if (this->status >= STATUS_AUTHORIZED) return this->CloseConnection(NETWORK_RECV_STATUS_MALFORMED_PACKET); @@ -530,7 +522,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome() this->SendPacket(p); /* Transmit info about all the active clients */ - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs != this && new_cs->status > STATUS_AUTHORIZED) { this->SendClientInfo(new_cs->GetInfo()); } @@ -543,11 +535,10 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome() NetworkRecvStatus ServerNetworkGameSocketHandler::SendWait() { int waiting = 0; - NetworkClientSocket *new_cs; Packet *p; /* Count how many clients are waiting in the queue, in front of you! */ - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status != STATUS_MAP_WAIT) continue; if (new_cs->GetInfo()->join_date < this->GetInfo()->join_date || (new_cs->GetInfo()->join_date == this->GetInfo()->join_date && new_cs->client_id < this->client_id)) waiting++; } @@ -614,9 +605,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap() this->status = STATUS_DONE_MAP; /* Find the best candidate for joining, i.e. the first joiner. */ - NetworkClientSocket *new_cs; NetworkClientSocket *best = nullptr; - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status == STATUS_MAP_WAIT) { if (best == nullptr || best->GetInfo()->join_date > new_cs->GetInfo()->join_date || (best->GetInfo()->join_date == new_cs->GetInfo()->join_date && best->client_id > new_cs->client_id)) { best = new_cs; @@ -631,7 +621,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap() best->SendMap(); /* And update the rest. */ - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status == STATUS_MAP_WAIT) new_cs->SendWait(); } } @@ -1003,7 +993,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_COMPANY_PASSWOR NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *p) { - NetworkClientSocket *new_cs; /* The client was never joined.. so this is impossible, right? * Ignore the packet, give the client a warning, and close his connection */ if (this->status < STATUS_AUTHORIZED || this->HasClientQuit()) { @@ -1011,7 +1000,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet * } /* Check if someone else is receiving the map */ - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status == STATUS_MAP) { /* Tell the new client to wait */ this->status = STATUS_MAP_WAIT; @@ -1028,7 +1017,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet * /* Client has the map, now start syncing */ if (this->status == STATUS_DONE_MAP && !this->HasClientQuit()) { char client_name[NETWORK_CLIENT_NAME_LENGTH]; - NetworkClientSocket *new_cs; this->GetClientName(client_name, lastof(client_name)); @@ -1046,7 +1034,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet * this->last_frame = _frame_counter; this->last_frame_server = _frame_counter; - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status > STATUS_AUTHORIZED) { new_cs->SendClientInfo(this->GetInfo()); new_cs->SendJoin(this->client_id); @@ -1138,7 +1126,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ERROR(Packet *p { /* This packets means a client noticed an error and is reporting this * to us. Display the error and report it to the other clients */ - NetworkClientSocket *new_cs; char str[100]; char client_name[NETWORK_CLIENT_NAME_LENGTH]; NetworkErrorCode errorno = (NetworkErrorCode)p->Recv_uint8(); @@ -1157,7 +1144,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ERROR(Packet *p NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, nullptr, strid); - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status > STATUS_AUTHORIZED) { new_cs->SendErrorQuit(this->client_id, errorno); } @@ -1172,7 +1159,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *p) { /* The client wants to leave. Display this and report it to the other * clients. */ - NetworkClientSocket *new_cs; char client_name[NETWORK_CLIENT_NAME_LENGTH]; /* The client was never joined.. thank the client for the packet, but ignore it */ @@ -1184,7 +1170,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_QUIT(Packet *p) NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, nullptr, STR_NETWORK_MESSAGE_CLIENT_LEAVING); - FOR_ALL_CLIENT_SOCKETS(new_cs) { + for (NetworkClientSocket *new_cs : NetworkClientSocket::Iterate()) { if (new_cs->status > STATUS_AUTHORIZED && new_cs != this) { new_cs->SendQuit(this->client_id); } @@ -1253,7 +1239,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ACK(Packet *p) */ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, const char *msg, ClientID from_id, int64 data, bool from_admin) { - NetworkClientSocket *cs; const NetworkClientInfo *ci, *ci_own, *ci_to; switch (desttype) { @@ -1271,7 +1256,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co } } else { /* Else find the client to send the message to */ - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->client_id == (ClientID)dest) { cs->SendChat(action, from_id, false, msg, data); break; @@ -1288,7 +1273,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co NetworkTextMessage(action, GetDrawStringCompanyColour(ci->client_playas), true, ci_to->client_name, msg, data); } } else { - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->client_id == from_id) { cs->SendChat(action, (ClientID)dest, true, msg, data); break; @@ -1302,7 +1287,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co bool show_local = true; /* Find all clients that belong to this company */ ci_to = nullptr; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { ci = cs->GetInfo(); if (ci != nullptr && ci->client_playas == (CompanyID)dest) { cs->SendChat(action, from_id, false, msg, data); @@ -1336,7 +1321,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co GetString(name, str, lastof(name)); NetworkTextMessage(action, GetDrawStringCompanyColour(ci_own->client_playas), true, name, msg, data); } else { - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->client_id == from_id) { cs->SendChat(action, ci_to->client_id, true, msg, data); } @@ -1350,7 +1335,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co FALLTHROUGH; case DESTTYPE_BROADCAST: - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { cs->SendChat(action, from_id, false, msg, data); } @@ -1549,13 +1534,10 @@ void NetworkSocketHandler::SendCompanyInformation(Packet *p, const Company *c, c */ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats) { - const Vehicle *v; - const Station *s; - memset(stats, 0, sizeof(*stats) * MAX_COMPANIES); /* Go through all vehicles and count the type of vehicles */ - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (!Company::IsValidID(v->owner) || !v->IsPrimaryVehicle()) continue; byte type = 0; switch (v->type) { @@ -1569,7 +1551,7 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats) } /* Go through all stations and count the types of stations */ - FOR_ALL_STATIONS(s) { + for (const Station *s : Station::Iterate()) { if (Company::IsValidID(s->owner)) { NetworkCompanyStats *npi = &stats[s->owner]; @@ -1588,14 +1570,13 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats) */ void NetworkUpdateClientInfo(ClientID client_id) { - NetworkClientSocket *cs; NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(client_id); if (ci == nullptr) return; DEBUG(desync, 1, "client: %08x; %02x; %02x; %04x", _date, _date_fract, (int)ci->client_playas, client_id); - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { cs->SendClientInfo(ci); } @@ -1620,8 +1601,6 @@ static void NetworkCheckRestartMap() */ static void NetworkAutoCleanCompanies() { - const NetworkClientInfo *ci; - const Company *c; bool clients_in_company[MAX_COMPANIES]; int vehicles_in_company[MAX_COMPANIES]; @@ -1630,27 +1609,26 @@ static void NetworkAutoCleanCompanies() memset(clients_in_company, 0, sizeof(clients_in_company)); /* Detect the active companies */ - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (Company::IsValidID(ci->client_playas)) clients_in_company[ci->client_playas] = true; } if (!_network_dedicated) { - ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER); + const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER); if (Company::IsValidID(ci->client_playas)) clients_in_company[ci->client_playas] = true; } if (_settings_client.network.autoclean_novehicles != 0) { memset(vehicles_in_company, 0, sizeof(vehicles_in_company)); - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (!Company::IsValidID(v->owner) || !v->IsPrimaryVehicle()) continue; vehicles_in_company[v->owner]++; } } /* Go through all the companies */ - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { /* Skip the non-active once */ if (c->is_ai) continue; @@ -1700,10 +1678,8 @@ bool NetworkFindName(char *new_name, const char *last) strecpy(original_name, new_name, lastof(original_name)); while (!found_name) { - const NetworkClientInfo *ci; - found_name = true; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (strcmp(ci->client_name, new_name) == 0) { /* Name already in use */ found_name = false; @@ -1711,7 +1687,7 @@ bool NetworkFindName(char *new_name, const char *last) } } /* Check if it is the same as the server-name */ - ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER); + const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER); if (ci != nullptr) { if (strcmp(ci->client_name, new_name) == 0) found_name = false; // name already in use } @@ -1736,13 +1712,12 @@ bool NetworkFindName(char *new_name, const char *last) */ bool NetworkServerChangeClientName(ClientID client_id, const char *new_name) { - NetworkClientInfo *ci; /* Check if the name's already in use */ - FOR_ALL_CLIENT_INFOS(ci) { + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (strcmp(ci->client_name, new_name) == 0) return false; } - ci = NetworkClientInfo::GetByClientID(client_id); + NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(client_id); if (ci == nullptr) return false; NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, CC_DEFAULT, true, ci->client_name, new_name); @@ -1790,7 +1765,6 @@ static void NetworkHandleCommandQueue(NetworkClientSocket *cs) */ void NetworkServer_Tick(bool send_frame) { - NetworkClientSocket *cs; #ifndef ENABLE_NETWORK_SYNC_EVERY_FRAME bool send_sync = false; #endif @@ -1804,7 +1778,7 @@ void NetworkServer_Tick(bool send_frame) /* Now we are done with the frame, inform the clients that they can * do their frame! */ - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { /* We allow a number of bytes per frame, but only to the burst amount * to be available for packet receiving at any particular time. */ cs->receive_limit = min(cs->receive_limit + _settings_client.network.bytes_per_frame, @@ -1961,8 +1935,7 @@ void NetworkServerShowStatusToConsole() }; assert_compile(lengthof(stat_str) == NetworkClientSocket::STATUS_END); - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { NetworkClientInfo *ci = cs->GetInfo(); if (ci == nullptr) continue; uint lag = NetworkCalculateLag(cs); @@ -1981,9 +1954,7 @@ void NetworkServerShowStatusToConsole() */ void NetworkServerSendConfigUpdate() { - NetworkClientSocket *cs; - - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status >= NetworkClientSocket::STATUS_PRE_ACTIVE) cs->SendConfigUpdate(); } } @@ -2000,8 +1971,7 @@ void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded) SB(_network_company_passworded, company_id, 1, !!passworded); SetWindowClassesDirty(WC_COMPANY); - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->status >= NetworkClientSocket::STATUS_PRE_ACTIVE) cs->SendCompanyUpdate(); } @@ -2095,8 +2065,7 @@ uint NetworkServerKickOrBanIP(const char *ip, bool ban) uint n = 0; /* There can be multiple clients with the same IP, kick them all */ - NetworkClientSocket *cs; - FOR_ALL_CLIENT_SOCKETS(cs) { + for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { if (cs->client_id == CLIENT_ID_SERVER) continue; if (cs->client_address.IsInNetmask(ip)) { NetworkServerKickClient(cs->client_id); @@ -2114,8 +2083,7 @@ uint NetworkServerKickOrBanIP(const char *ip, bool ban) */ bool NetworkCompanyHasClients(CompanyID company) { - const NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas == company) return true; } return false; @@ -2143,8 +2111,7 @@ void ServerNetworkGameSocketHandler::GetClientName(char *client_name, const char */ void NetworkPrintClients() { - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (_network_server) { IConsolePrintF(CC_INFO, "Client #%1d name: '%s' company: %1d IP: %s", ci->client_id, diff --git a/src/network/network_server.h b/src/network/network_server.h index f13691fcd9..9a1873520c 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -122,17 +120,4 @@ void NetworkServer_Tick(bool send_frame); void NetworkServerSetCompanyPassword(CompanyID company_id, const char *password, bool already_hashed = true); void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded); -/** - * Iterate over all the sockets from a given starting point. - * @param var The variable to iterate with. - * @param start The start of the iteration. - */ -#define FOR_ALL_CLIENT_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(NetworkClientSocket, clientsocket_index, var, start) - -/** - * Iterate over all the sockets. - * @param var The variable to iterate with. - */ -#define FOR_ALL_CLIENT_SOCKETS(var) FOR_ALL_CLIENT_SOCKETS_FROM(var, 0) - #endif /* NETWORK_SERVER_H */ diff --git a/src/network/network_type.h b/src/network/network_type.h index d511f5c0c8..595eaad0f0 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index d9f625719f..90b99ec44b 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -200,8 +198,7 @@ void ServerNetworkUDPSocketHandler::Receive_CLIENT_DETAIL_INFO(Packet *p, Networ for (;;) { int free = SEND_MTU - packet.size; - Company *company; - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { char company_name[NETWORK_COMPANY_NAME_LENGTH]; SetDParam(0, company->index); GetString(company_name, STR_COMPANY_NAME, company_name + max_cname_length - 1); @@ -216,9 +213,8 @@ void ServerNetworkUDPSocketHandler::Receive_CLIENT_DETAIL_INFO(Packet *p, Networ } } - Company *company; /* Go through all the companies */ - FOR_ALL_COMPANIES(company) { + for (const Company *company : Company::Iterate()) { /* Send the information */ this->SendCompanyInformation(&packet, company, &company_stats[company->index], max_cname_length); } diff --git a/src/network/network_udp.h b/src/network/network_udp.h index 12de30bca3..c042bea404 100644 --- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 7a67dea8bc..f4197c9aa9 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -4555,8 +4553,6 @@ static ChangeInfoResult RoadTypeReserveInfo(uint id, int numinfo, int prop, Byte break; case 0x10: // Road Type flags - case 0x12: // Station graphic - case 0x15: // Acceleration model case 0x16: // Map colour case 0x1A: // Sort order buf->ReadByte(); @@ -6626,15 +6622,26 @@ static void SkipIf(ByteReader *buf) break; case 0x0E: result = GetRailTypeByLabel(BSWAP32(cond_val)) != INVALID_RAILTYPE; break; - case 0x0F: result = GetRoadTypeByLabel(BSWAP32(cond_val)) == INVALID_ROADTYPE; + case 0x0F: { + RoadType rt = GetRoadTypeByLabel(BSWAP32(cond_val)); + result = rt == INVALID_ROADTYPE || !RoadTypeIsRoad(rt); break; - case 0x10: result = GetRoadTypeByLabel(BSWAP32(cond_val)) != INVALID_ROADTYPE; + } + case 0x10: { + RoadType rt = GetRoadTypeByLabel(BSWAP32(cond_val)); + result = rt != INVALID_ROADTYPE && RoadTypeIsRoad(rt); break; - case 0x11: result = GetRoadTypeByLabel(BSWAP32(cond_val)) == INVALID_ROADTYPE; + } + case 0x11: { + RoadType rt = GetRoadTypeByLabel(BSWAP32(cond_val)); + result = rt == INVALID_ROADTYPE || !RoadTypeIsTram(rt); break; - case 0x12: result = GetRoadTypeByLabel(BSWAP32(cond_val)) != INVALID_ROADTYPE; + } + case 0x12: { + RoadType rt = GetRoadTypeByLabel(BSWAP32(cond_val)); + result = rt != INVALID_ROADTYPE && RoadTypeIsTram(rt); break; - + } default: grfmsg(1, "SkipIf: Unsupported condition type %02X. Ignoring", condtype); return; } } @@ -7943,8 +7950,14 @@ static bool ChangeGRFParamLimits(size_t len, ByteReader *buf) grfmsg(2, "StaticGRFInfo: expected 8 bytes for 'INFO'->'PARA'->'LIMI' but got " PRINTF_SIZE ", ignoring this field", len); buf->Skip(len); } else { - _cur_parameter->min_value = buf->ReadDWord(); - _cur_parameter->max_value = buf->ReadDWord(); + uint32 min_value = buf->ReadDWord(); + uint32 max_value = buf->ReadDWord(); + if (min_value <= max_value) { + _cur_parameter->min_value = min_value; + _cur_parameter->max_value = max_value; + } else { + grfmsg(2, "StaticGRFInfo: 'INFO'->'PARA'->'LIMI' values are incoherent, ignoring this field"); + } } return true; } @@ -8551,8 +8564,7 @@ void ResetNewGRFData() _gted = CallocT(Engine::GetPoolSize()); /* Fill rail type label temporary data for default trains */ - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { _gted[e->index].railtypelabel = GetRailTypeInfo(e->u.rail.railtype)->label; } @@ -8768,9 +8780,7 @@ static const CargoLabel * const _default_refitmasks[] = { */ static void CalculateRefitMasks() { - Engine *e; - - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { EngineID engine = e->index; EngineInfo *ei = &e->info; bool only_defaultcargo; ///< Set if the vehicle shall carry only the default cargo @@ -8884,9 +8894,7 @@ static void FinaliseCanals() /** Check for invalid engines */ static void FinaliseEngineArray() { - Engine *e; - - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { if (e->GetGRF() == nullptr) { const EngineIDMapping &eid = _engine_mngr[e->index]; if (eid.grfid != INVALID_GRFID || eid.internal_id != eid.substitute_id) { @@ -9680,8 +9688,7 @@ static void AfterLoadGRFs() InitRailTypes(); InitRoadTypes(); - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (Engine *e : Engine::IterateType(VEH_ROAD)) { if (_gted[e->index].rv_max_speed != 0) { /* Set RV maximum speed from the mph/0.8 unit value */ e->u.road.max_speed = _gted[e->index].rv_max_speed * 4; @@ -9713,7 +9720,7 @@ static void AfterLoadGRFs() e->info.climates = 0; } - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (Engine *e : Engine::IterateType(VEH_TRAIN)) { RailType railtype = GetRailTypeByLabel(_gted[e->index].railtypelabel); if (railtype == INVALID_RAILTYPE) { /* Rail type is not available, so disable this engine */ diff --git a/src/newgrf.h b/src/newgrf.h index 4adcae9b8e..00394c681c 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index e654dcc78c..4540698a1a 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_airport.h b/src/newgrf_airport.h index 7b752e741a..264da05ebb 100644 --- a/src/newgrf_airport.h +++ b/src/newgrf_airport.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index 42f4f1d36b..7a420f3e1d 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_airporttiles.h b/src/newgrf_airporttiles.h index 313614eafe..191b79e9ac 100644 --- a/src/newgrf_airporttiles.h +++ b/src/newgrf_airporttiles.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_animation_base.h b/src/newgrf_animation_base.h index 8f1135a6ba..ee8622b56e 100644 --- a/src/newgrf_animation_base.h +++ b/src/newgrf_animation_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_animation_type.h b/src/newgrf_animation_type.h index d014bf3cde..699a633152 100644 --- a/src/newgrf_animation_type.h +++ b/src/newgrf_animation_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_callbacks.h b/src/newgrf_callbacks.h index 2c30241f07..ed32a3abf1 100644 --- a/src/newgrf_callbacks.h +++ b/src/newgrf_callbacks.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 61ba601d56..0209aa9ad8 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_canal.h b/src/newgrf_canal.h index 5ae273bf15..05631216fa 100644 --- a/src/newgrf_canal.h +++ b/src/newgrf_canal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp index 0793d7120f..b0fd632b5b 100644 --- a/src/newgrf_cargo.cpp +++ b/src/newgrf_cargo.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_cargo.h b/src/newgrf_cargo.h index 51add1e7a9..ec0e2f019e 100644 --- a/src/newgrf_cargo.h +++ b/src/newgrf_cargo.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_class.h b/src/newgrf_class.h index 71b5608d84..7610cfb9d9 100644 --- a/src/newgrf_class.h +++ b/src/newgrf_class.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_class_func.h b/src/newgrf_class_func.h index 0a90bf80e5..f97ba58b95 100644 --- a/src/newgrf_class_func.h +++ b/src/newgrf_class_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 49ba60529c..8209d675cd 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h index ec6c454a0c..ed18aaa9e2 100644 --- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 676f677bcf..a0960350da 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_config.h b/src/newgrf_config.h index feee2dbad3..8c3b2ecdf4 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_debug.h b/src/newgrf_debug.h index dac97726da..1679e17eee 100644 --- a/src/newgrf_debug.h +++ b/src/newgrf_debug.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index 4abdb51989..a8ba3d5260 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 184cb19473..dc0e1cfe01 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1238,8 +1236,7 @@ void CommitVehicleListOrderChanges() { /* Pre-sort engines by scope-grfid and local index */ std::vector ordering; - Engine *e; - FOR_ALL_ENGINES(e) { + for (const Engine *e : Engine::Iterate()) { ordering.push_back(e->index); } std::sort(ordering.begin(), ordering.end(), EnginePreSort); diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h index a3ead85ca4..817fefb5d0 100644 --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index bb108f470c..be7caefb83 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_generic.h b/src/newgrf_generic.h index 6251b9ffbd..0d4c8c1411 100644 --- a/src/newgrf_generic.h +++ b/src/newgrf_generic.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index d31d10bc88..3b462f427b 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 7df48304bd..b7d8048c94 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -85,8 +83,7 @@ void InitializeBuildingCounts() { memset(&_building_counts, 0, sizeof(_building_counts)); - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { memset(&t->cache.building_counts, 0, sizeof(t->cache.building_counts)); } } diff --git a/src/newgrf_house.h b/src/newgrf_house.h index 10d61a9e99..b59d28ab51 100644 --- a/src/newgrf_house.h +++ b/src/newgrf_house.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 34fffea9b1..fd32f3e948 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -93,8 +91,7 @@ uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i, uint32 cur_grfid static uint32 GetClosestIndustry(TileIndex tile, IndustryType type, const Industry *current) { uint32 best_dist = UINT32_MAX; - const Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { if (i->type != type || i == current) continue; best_dist = min(best_dist, DistanceManhattan(tile, i->location.tile)); @@ -147,8 +144,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout } else { /* Count only those who match the same industry type and layout filter * Unfortunately, we have to do it manually */ - const Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { if (i->type == ind_index && i != current && (i->selected_layout == layout_filter || layout_filter == 0) && (!town_filter || i->town == current->town)) { closest_dist = min(closest_dist, DistanceManhattan(current->location.tile, i->location.tile)); count++; diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h index d66ab319b8..d791eaf0d8 100644 --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index d5b2ee3258..03d86a7717 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_industrytiles.h b/src/newgrf_industrytiles.h index 9370853052..838dcc5332 100644 --- a/src/newgrf_industrytiles.h +++ b/src/newgrf_industrytiles.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 6038f092f2..34e18c43a2 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -188,8 +186,7 @@ static uint32 GetNearbyObjectTileInformation(byte parameter, TileIndex tile, Obj static uint32 GetClosestObject(TileIndex tile, ObjectType type, const Object *current) { uint32 best_dist = UINT32_MAX; - const Object *o; - FOR_ALL_OBJECTS(o) { + for (const Object *o : Object::Iterate()) { if (o->type != type || o == current) continue; best_dist = min(best_dist, DistanceManhattan(tile, o->location.tile)); diff --git a/src/newgrf_object.h b/src/newgrf_object.h index dcc5caa8b5..90be24042c 100644 --- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_properties.h b/src/newgrf_properties.h index e1240f29ee..835a873847 100644 --- a/src/newgrf_properties.h +++ b/src/newgrf_properties.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_railtype.cpp b/src/newgrf_railtype.cpp index 63121c1e8e..451076ccc2 100644 --- a/src/newgrf_railtype.cpp +++ b/src/newgrf_railtype.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_railtype.h b/src/newgrf_railtype.h index ddcbd71aeb..223cfdd63b 100644 --- a/src/newgrf_railtype.h +++ b/src/newgrf_railtype.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_roadtype.cpp b/src/newgrf_roadtype.cpp index 1fb8e5ec1a..34a8eb11a6 100644 --- a/src/newgrf_roadtype.cpp +++ b/src/newgrf_roadtype.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_roadtype.h b/src/newgrf_roadtype.h index 2da7a82c1f..ee0773d7df 100644 --- a/src/newgrf_roadtype.h +++ b/src/newgrf_roadtype.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index 0756d798f7..aead090016 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_sound.h b/src/newgrf_sound.h index efded063c8..d908173ac8 100644 --- a/src/newgrf_sound.h +++ b/src/newgrf_sound.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 2bff33a036..76f8df20f3 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index 55fb0b58fb..00bfc49d04 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 8b6e87bca6..8e8e52a629 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_station.h b/src/newgrf_station.h index eff76e57df..a79ea3fe29 100644 --- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_storage.cpp b/src/newgrf_storage.cpp index e91e1f90c8..15214d91bb 100644 --- a/src/newgrf_storage.cpp +++ b/src/newgrf_storage.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_storage.h b/src/newgrf_storage.h index e9155dc5cb..61206a587b 100644 --- a/src/newgrf_storage.h +++ b/src/newgrf_storage.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -232,7 +230,4 @@ struct PersistentStorage : PersistentStorageArray, PersistentStorage assert_compile(cpp_lengthof(OldPersistentStorage, storage) <= cpp_lengthof(PersistentStorage, storage)); -#define FOR_ALL_STORAGES_FROM(var, start) FOR_ALL_ITEMS_FROM(PersistentStorage, storage_index, var, start) -#define FOR_ALL_STORAGES(var) FOR_ALL_STORAGES_FROM(var, 0) - #endif /* NEWGRF_STORAGE_H */ diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index 0a6cfd4a83..c08877198d 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_text.h b/src/newgrf_text.h index 69ea6bd402..709f4dd244 100644 --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index d124eaab5d..35581f940e 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_town.h b/src/newgrf_town.h index a55f71f369..c5970d2976 100644 --- a/src/newgrf_town.h +++ b/src/newgrf_town.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp index df99dd7384..207114f61d 100644 --- a/src/newgrf_townname.cpp +++ b/src/newgrf_townname.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h index 0b1b389cbe..6406e74345 100644 --- a/src/newgrf_townname.h +++ b/src/newgrf_townname.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/news_func.h b/src/news_func.h index bfd38a724d..352193f1ed 100644 --- a/src/news_func.h +++ b/src/news_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/news_gui.cpp b/src/news_gui.cpp index 0cf9e9e2a8..f963a876a4 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -18,6 +16,7 @@ #include "vehicle_base.h" #include "vehicle_func.h" #include "vehicle_gui.h" +#include "roadveh.h" #include "station_base.h" #include "industry.h" #include "town.h" @@ -34,6 +33,7 @@ #include "company_base.h" #include "settings_internal.h" #include "guitimer_func.h" +#include "group_gui.h" #include "widgets/news_widget.h" @@ -183,6 +183,8 @@ static const NWidgetPart _nested_small_news_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, WID_N_CLOSEBOX), NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, WID_N_CAPTION), SetFill(1, 0), + NWidget(WWT_TEXTBTN, COLOUR_LIGHT_BLUE, WID_N_SHOW_GROUP), SetMinimalSize(14, 11), SetResize(1, 0), + SetDataTip(STR_NULL /* filled in later */, STR_NEWS_SHOW_VEHICLE_GROUP_TOOLTIP), EndContainer(), /* Main part */ @@ -281,6 +283,27 @@ struct NewsWindow : Window { /* For company news with a face we have a separate headline in param[0] */ if (desc == &_company_news_desc) this->GetWidget(WID_N_TITLE)->widget_data = this->ni->params[0]; + NWidgetCore *nwid = this->GetWidget(WID_N_SHOW_GROUP); + if (ni->reftype1 == NR_VEHICLE && nwid != nullptr) { + const Vehicle *v = Vehicle::Get(ni->ref1); + switch (v->type) { + case VEH_TRAIN: + nwid->widget_data = STR_TRAIN; + break; + case VEH_ROAD: + nwid->widget_data = RoadVehicle::From(v)->IsBus() ? STR_BUS : STR_LORRY; + break; + case VEH_SHIP: + nwid->widget_data = STR_SHIP; + break; + case VEH_AIRCRAFT: + nwid->widget_data = STR_PLANE; + break; + default: + break; // Do nothing + } + } + this->FinishInitNested(0); /* Initialize viewport if it exists. */ @@ -356,6 +379,24 @@ struct NewsWindow : Window { str = GetEngineInfoString(engine); break; } + + case WID_N_SHOW_GROUP: + if (this->ni->reftype1 == NR_VEHICLE) { + Dimension d2 = GetStringBoundingBox(this->GetWidget(WID_N_SHOW_GROUP)->widget_data); + d2.height += WD_CAPTIONTEXT_TOP + WD_CAPTIONTEXT_BOTTOM; + d2.width += WD_CAPTIONTEXT_LEFT + WD_CAPTIONTEXT_RIGHT; + *size = d2; + } else { + /* Hide 'Show group window' button if this news is not about a vehicle. */ + size->width = 0; + size->height = 0; + resize->width = 0; + resize->height = 0; + fill->width = 0; + fill->height = 0; + } + return; + default: return; // Do nothing } @@ -451,6 +492,12 @@ struct NewsWindow : Window { case WID_N_VIEWPORT: break; // Ignore clicks + case WID_N_SHOW_GROUP: + if (this->ni->reftype1 == NR_VEHICLE) { + const Vehicle *v = Vehicle::Get(this->ni->ref1); + ShowCompanyGroupForVehicle(v); + } + break; default: if (this->ni->reftype1 == NR_VEHICLE) { const Vehicle *v = Vehicle::Get(this->ni->ref1); diff --git a/src/news_gui.h b/src/news_gui.h index 569a8b8a74..e6f4bb38bc 100644 --- a/src/news_gui.h +++ b/src/news_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/news_type.h b/src/news_type.h index 0038d0f903..1929804e4b 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/object.h b/src/object.h index 7375aad155..e3f0c84ff5 100644 --- a/src/object.h +++ b/src/object.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/object_base.h b/src/object_base.h index 228eeaa2dc..a468a01ee9 100644 --- a/src/object_base.h +++ b/src/object_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -80,9 +78,6 @@ protected: static uint16 counts[NUM_OBJECTS]; ///< Number of objects per type ingame }; -#define FOR_ALL_OBJECTS_FROM(var, start) FOR_ALL_ITEMS_FROM(Object, object_index, var, start) -#define FOR_ALL_OBJECTS(var) FOR_ALL_OBJECTS_FROM(var, 0) - /** * Keeps track of removed objects during execution/testruns of commands. */ diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 48b6f1f254..3fb61d647e 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -175,8 +173,7 @@ void UpdateCompanyHQ(TileIndex tile, uint score) */ void UpdateObjectColours(const Company *c) { - Object *obj; - FOR_ALL_OBJECTS(obj) { + for (Object *obj : Object::Iterate()) { Owner owner = GetTileOwner(obj->location.tile); /* Not the current owner, so colour doesn't change. */ if (owner != c->index) continue; @@ -559,6 +556,14 @@ static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, Carg SetBit(*always_accepted, CT_MAIL); } +static void AddProducedCargo_Object(TileIndex tile, CargoArray &produced) +{ + if (!IsObjectType(tile, OBJECT_HQ)) return; + + produced[CT_PASSENGERS]++; + produced[CT_MAIL]++; +} + static void GetTileDesc_Object(TileIndex tile, TileDesc *td) { @@ -840,7 +845,7 @@ extern const TileTypeProcs _tile_type_object_procs = { AnimateTile_Object, // animate_tile_proc TileLoop_Object, // tile_loop_proc ChangeTileOwner_Object, // change_tile_owner_proc - nullptr, // add_produced_cargo_proc + AddProducedCargo_Object, // add_produced_cargo_proc nullptr, // vehicle_enter_tile_proc GetFoundation_Object, // get_foundation_proc TerraformTile_Object, // terraform_tile_proc diff --git a/src/object_gui.cpp b/src/object_gui.cpp index a84be26e63..bbd224fead 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/object_map.h b/src/object_map.h index 1aaf984345..d86bf0690e 100644 --- a/src/object_map.h +++ b/src/object_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/object_type.h b/src/object_type.h index 4ead576f38..52aedc6540 100644 --- a/src/object_type.h +++ b/src/object_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/openttd.cpp b/src/openttd.cpp index 8ca080989f..48d889aef4 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1190,8 +1188,7 @@ static void CheckCaches() /* Check the town caches. */ std::vector old_town_caches; - Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { old_town_caches.push_back(t->cache); } @@ -1200,7 +1197,7 @@ static void CheckCaches() RebuildSubsidisedSourceAndDestinationCache(); uint i = 0; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { if (MemCmpT(old_town_caches.data() + i, &t->cache) != 0) { DEBUG(desync, 2, "town cache mismatch: town %i", (int)t->index); } @@ -1209,14 +1206,13 @@ static void CheckCaches() /* Check company infrastructure cache. */ std::vector old_infrastructure; - Company *c; - FOR_ALL_COMPANIES(c) old_infrastructure.push_back(c->infrastructure); + for (const Company *c : Company::Iterate()) old_infrastructure.push_back(c->infrastructure); extern void AfterLoadCompanyStats(); AfterLoadCompanyStats(); i = 0; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (MemCmpT(old_infrastructure.data() + i, &c->infrastructure) != 0) { DEBUG(desync, 2, "infrastructure cache mismatch: company %i", (int)c->index); } @@ -1224,8 +1220,7 @@ static void CheckCaches() } /* Strict checking of the road stop cache entries */ - const RoadStop *rs; - FOR_ALL_ROADSTOPS(rs) { + for (const RoadStop *rs : RoadStop::Iterate()) { if (IsStandardRoadStopTile(rs->xy)) continue; assert(rs->GetEntry(DIAGDIR_NE) != rs->GetEntry(DIAGDIR_NW)); @@ -1233,8 +1228,7 @@ static void CheckCaches() rs->GetEntry(DIAGDIR_NW)->CheckIntegrity(rs); } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { extern void FillNewGRFVehicleCache(const Vehicle *v); if (v != v->First() || v->vehstatus & VS_CRASHED || !v->IsPrimaryVehicle()) continue; @@ -1309,15 +1303,14 @@ static void CheckCaches() } /* Check whether the caches are still valid */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { byte buff[sizeof(VehicleCargoList)]; memcpy(buff, &v->cargo, sizeof(VehicleCargoList)); v->cargo.InvalidateCache(); assert(memcmp(&v->cargo, buff, sizeof(VehicleCargoList)) == 0); } - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID c = 0; c < NUM_CARGO; c++) { byte buff[sizeof(StationCargoList)]; memcpy(buff, &st->goods[c].cargo, sizeof(StationCargoList)); diff --git a/src/openttd.h b/src/openttd.h index 539b7e14f1..6b7401cca1 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/order_backup.cpp b/src/order_backup.cpp index 4f8b13fa00..d537d8ce5c 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -104,8 +102,7 @@ void OrderBackup::DoRestore(Vehicle *v) { /* Don't use reset as that broadcasts over the network to reset the variable, * which is what we are doing at the moment. */ - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { if (ob->user == user) delete ob; } if (OrderBackup::CanAllocateItem()) { @@ -121,8 +118,7 @@ void OrderBackup::DoRestore(Vehicle *v) */ /* static */ void OrderBackup::Restore(Vehicle *v, uint32 user) { - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { if (v->tile != ob->tile || ob->user != user) continue; ob->DoRestore(v); @@ -138,8 +134,7 @@ void OrderBackup::DoRestore(Vehicle *v) */ /* static */ void OrderBackup::ResetOfUser(TileIndex tile, uint32 user) { - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { if (ob->user == user && (ob->tile == tile || tile == INVALID_TILE)) delete ob; } } @@ -171,9 +166,8 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, { assert(_network_server); - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { - /* If it's not an backup of us, so ignore it. */ + for (OrderBackup *ob : OrderBackup::Iterate()) { + /* If it's not a backup of us, ignore it. */ if (ob->user != user) continue; DoCommandP(0, 0, user, CMD_CLEAR_ORDER_BACKUP); @@ -195,9 +189,8 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, * default is just plain and simple: 0. */ uint32 user = _networking && !_network_server ? _network_own_client_id : CLIENT_ID_SERVER; - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { - /* If it's not an backup of us, so ignore it. */ + for (OrderBackup *ob : OrderBackup::Iterate()) { + /* If it's not a backup of us, ignore it. */ if (ob->user != user) continue; /* If it's not for our chosen tile either, ignore it. */ if (t != INVALID_TILE && t != ob->tile) continue; @@ -221,8 +214,7 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, */ /* static */ void OrderBackup::ClearGroup(GroupID group) { - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { if (ob->group == group) ob->group = DEFAULT_GROUP; } } @@ -237,8 +229,7 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, /* static */ void OrderBackup::ClearVehicle(const Vehicle *v) { assert(v != nullptr); - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { if (ob->clone == v) { /* Get another item in the shared list. */ ob->clone = (v->FirstShared() == v) ? v->NextShared() : v->FirstShared(); @@ -258,8 +249,7 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, */ /* static */ void OrderBackup::RemoveOrder(OrderType type, DestinationID destination, bool hangar) { - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { for (Order *order = ob->orders; order != nullptr; order = order->next) { OrderType ot = order->GetType(); if (ot == OT_GOTO_DEPOT && (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) != 0) continue; diff --git a/src/order_backup.h b/src/order_backup.h index c56bc0ecc6..5d1dcef50e 100644 --- a/src/order_backup.h +++ b/src/order_backup.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -66,17 +64,4 @@ public: static void RemoveOrder(OrderType type, DestinationID destination, bool hangar); }; -/** - * Iterator over all order backups from a given ID. - * @param var The variable to iterate with. - * @param start The start of the iteration. - */ -#define FOR_ALL_ORDER_BACKUPS_FROM(var, start) FOR_ALL_ITEMS_FROM(OrderBackup, order_backup_index, var, start) - -/** - * Iterator over all order backups. - * @param var The variable to iterate with. - */ -#define FOR_ALL_ORDER_BACKUPS(var) FOR_ALL_ORDER_BACKUPS_FROM(var, 0) - #endif /* ORDER_BACKUP_H */ diff --git a/src/order_base.h b/src/order_base.h index 5164a4d6ef..347adbcee0 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -392,14 +390,6 @@ public: void DebugCheckSanity() const; }; -#define FOR_ALL_ORDERS_FROM(var, start) FOR_ALL_ITEMS_FROM(Order, order_index, var, start) -#define FOR_ALL_ORDERS(var) FOR_ALL_ORDERS_FROM(var, 0) - - #define FOR_VEHICLE_ORDERS(v, order) for (order = (v->orders.list == nullptr) ? nullptr : v->orders.list->GetFirstOrder(); order != nullptr; order = order->next) - -#define FOR_ALL_ORDER_LISTS_FROM(var, start) FOR_ALL_ITEMS_FROM(OrderList, orderlist_index, var, start) -#define FOR_ALL_ORDER_LISTS(var) FOR_ALL_ORDER_LISTS_FROM(var, 0) - #endif /* ORDER_BASE_H */ diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 2c3e4f9a0a..67092bc775 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1802,14 +1800,12 @@ void CheckOrders(const Vehicle *v) */ void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination, bool hangar) { - Vehicle *v; - /* Aircraft have StationIDs for depot orders and never use DepotIDs * This fact is handled specially below */ /* Go through all vehicles */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { Order *order; order = &v->current_order; diff --git a/src/order_func.h b/src/order_func.h index df99394282..7faeb08429 100644 --- a/src/order_func.h +++ b/src/order_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 7364ccd8a4..4edf994f78 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/order_type.h b/src/order_type.h index c150bc273b..9f4d0ba22b 100644 --- a/src/order_type.h +++ b/src/order_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/G5_detector.cpp b/src/os/macosx/G5_detector.cpp index 53d21c4d4f..cf2aeab0d5 100644 --- a/src/os/macosx/G5_detector.cpp +++ b/src/os/macosx/G5_detector.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp index 25389d1ca7..effbc73541 100644 --- a/src/os/macosx/crashlog_osx.cpp +++ b/src/os/macosx/crashlog_osx.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/macos.h b/src/os/macosx/macos.h index 4204d93bb6..2a7a12a5fb 100644 --- a/src/os/macosx/macos.h +++ b/src/os/macosx/macos.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -40,4 +38,17 @@ bool IsMonospaceFont(CFStringRef name); void MacOSSetThreadName(const char *name); + +/** Deleter that calls CFRelease rather than deleting the pointer. */ +template struct CFDeleter { + void operator()(T *p) + { + if (p) ::CFRelease(p); + } +}; + +/** Specialisation of std::unique_ptr for CoreFoundation objects. */ +template +using CFAutoRelease = std::unique_ptr::type, CFDeleter::type>>; + #endif /* MACOS_H */ diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index ae9d86ee8b..33d2ad2192 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index c3a86092e8..476362cccd 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/splash.cpp b/src/os/macosx/splash.cpp index 1ddb165b32..ac2f86425b 100644 --- a/src/os/macosx/splash.cpp +++ b/src/os/macosx/splash.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/splash.h b/src/os/macosx/splash.h index 90e6638140..8ddb638578 100644 --- a/src/os/macosx/splash.h +++ b/src/os/macosx/splash.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp index 6e5916e7c7..63be4d3ad9 100644 --- a/src/os/macosx/string_osx.cpp +++ b/src/os/macosx/string_osx.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -22,9 +20,9 @@ #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) /** Cached current locale. */ -static CFLocaleRef _osx_locale = nullptr; +static CFAutoRelease _osx_locale; /** CoreText cache for font information, cleared when OTTD changes fonts. */ -static CTFontRef _font_cache[FS_END]; +static CFAutoRelease _font_cache[FS_END]; /** @@ -36,7 +34,7 @@ private: ptrdiff_t length; const FontMap& font_map; - CTTypesetterRef typesetter; + CFAutoRelease typesetter; CFIndex cur_offset = 0; ///< Offset from the start of the current run from where to output. @@ -68,9 +66,9 @@ public: /** A single line worth of VisualRuns. */ class CoreTextLine : public std::vector, public ParagraphLayouter::Line { public: - CoreTextLine(CTLineRef line, const FontMap &fontMapping, const CoreTextParagraphLayoutFactory::CharType *buff) + CoreTextLine(CFAutoRelease line, const FontMap &fontMapping, const CoreTextParagraphLayoutFactory::CharType *buff) { - CFArrayRef runs = CTLineGetGlyphRuns(line); + CFArrayRef runs = CTLineGetGlyphRuns(line.get()); for (CFIndex i = 0; i < CFArrayGetCount(runs); i++) { CTRunRef run = (CTRunRef)CFArrayGetValueAtIndex(runs, i); @@ -81,7 +79,6 @@ public: this->emplace_back(run, map->second, buff); } - CFRelease(line); } int GetLeading() const override; @@ -96,16 +93,11 @@ public: } }; - CoreTextParagraphLayout(CTTypesetterRef typesetter, const CoreTextParagraphLayoutFactory::CharType *buffer, ptrdiff_t len, const FontMap &fontMapping) : text_buffer(buffer), length(len), font_map(fontMapping), typesetter(typesetter) + CoreTextParagraphLayout(CFAutoRelease typesetter, const CoreTextParagraphLayoutFactory::CharType *buffer, ptrdiff_t len, const FontMap &fontMapping) : text_buffer(buffer), length(len), font_map(fontMapping), typesetter(std::move(typesetter)) { this->Reflow(); } - ~CoreTextParagraphLayout() override - { - CFRelease(this->typesetter); - } - void Reflow() override { this->cur_offset = 0; @@ -143,12 +135,11 @@ static CTRunDelegateCallbacks _sprite_font_callback = { } /* Make attributed string with embedded font information. */ - CFMutableAttributedStringRef str = CFAttributedStringCreateMutable(kCFAllocatorDefault, 0); - CFAttributedStringBeginEditing(str); + CFAutoRelease str(CFAttributedStringCreateMutable(kCFAllocatorDefault, 0)); + CFAttributedStringBeginEditing(str.get()); - CFStringRef base = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buff, length, kCFAllocatorNull); - CFAttributedStringReplaceString(str, CFRangeMake(0, 0), base); - CFRelease(base); + CFAutoRelease base(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buff, length, kCFAllocatorNull)); + CFAttributedStringReplaceString(str.get(), CFRangeMake(0, 0), base.get()); /* Apply font and colour ranges to our string. This is important to make sure * that we get proper glyph boundaries on style changes. */ @@ -156,36 +147,33 @@ static CTRunDelegateCallbacks _sprite_font_callback = { for (const auto &i : fontMapping) { if (i.first - last == 0) continue; - if (_font_cache[i.second->fc->GetSize()] == nullptr) { + if (!_font_cache[i.second->fc->GetSize()]) { /* Cache font information. */ - CFStringRef font_name = CFStringCreateWithCString(kCFAllocatorDefault, i.second->fc->GetFontName(), kCFStringEncodingUTF8); - _font_cache[i.second->fc->GetSize()] = CTFontCreateWithName(font_name, i.second->fc->GetFontSize(), nullptr); - CFRelease(font_name); + CFAutoRelease font_name(CFStringCreateWithCString(kCFAllocatorDefault, i.second->fc->GetFontName(), kCFStringEncodingUTF8)); + _font_cache[i.second->fc->GetSize()].reset(CTFontCreateWithName(font_name.get(), i.second->fc->GetFontSize(), nullptr)); } - CFAttributedStringSetAttribute(str, CFRangeMake(last, i.first - last), kCTFontAttributeName, _font_cache[i.second->fc->GetSize()]); + CFAttributedStringSetAttribute(str.get(), CFRangeMake(last, i.first - last), kCTFontAttributeName, _font_cache[i.second->fc->GetSize()].get()); CGColorRef color = CGColorCreateGenericGray((uint8)i.second->colour / 255.0f, 1.0f); // We don't care about the real colours, just that they are different. - CFAttributedStringSetAttribute(str, CFRangeMake(last, i.first - last), kCTForegroundColorAttributeName, color); + CFAttributedStringSetAttribute(str.get(), CFRangeMake(last, i.first - last), kCTForegroundColorAttributeName, color); CGColorRelease(color); /* Install a size callback for our special sprite glyphs. */ for (ssize_t c = last; c < i.first; c++) { if (buff[c] >= SCC_SPRITE_START && buff[c] <= SCC_SPRITE_END) { - CTRunDelegateRef del = CTRunDelegateCreate(&_sprite_font_callback, (void *)(size_t)(buff[c] | (i.second->fc->GetSize() << 24))); - CFAttributedStringSetAttribute(str, CFRangeMake(c, 1), kCTRunDelegateAttributeName, del); - CFRelease(del); + CFAutoRelease del(CTRunDelegateCreate(&_sprite_font_callback, (void *)(size_t)(buff[c] | (i.second->fc->GetSize() << 24)))); + CFAttributedStringSetAttribute(str.get(), CFRangeMake(c, 1), kCTRunDelegateAttributeName, del.get()); } } last = i.first; } - CFAttributedStringEndEditing(str); + CFAttributedStringEndEditing(str.get()); /* Create and return typesetter for the string. */ - CTTypesetterRef typesetter = CTTypesetterCreateWithAttributedString(str); - CFRelease(str); + CFAutoRelease typesetter(CTTypesetterCreateWithAttributedString(str.get())); - return typesetter != nullptr ? new CoreTextParagraphLayout(typesetter, buff, length, fontMapping) : nullptr; + return typesetter ? new CoreTextParagraphLayout(std::move(typesetter), buff, length, fontMapping) : nullptr; } /* virtual */ std::unique_ptr CoreTextParagraphLayout::NextLine(int max_width) @@ -193,14 +181,14 @@ static CTRunDelegateCallbacks _sprite_font_callback = { if (this->cur_offset >= this->length) return nullptr; /* Get line break position, trying word breaking first and breaking somewhere if that doesn't work. */ - CFIndex len = CTTypesetterSuggestLineBreak(this->typesetter, this->cur_offset, max_width); - if (len <= 0) len = CTTypesetterSuggestClusterBreak(this->typesetter, this->cur_offset, max_width); + CFIndex len = CTTypesetterSuggestLineBreak(this->typesetter.get(), this->cur_offset, max_width); + if (len <= 0) len = CTTypesetterSuggestClusterBreak(this->typesetter.get(), this->cur_offset, max_width); /* Create line. */ - CTLineRef line = CTTypesetterCreateLine(this->typesetter, CFRangeMake(this->cur_offset, len)); + CFAutoRelease line(CTTypesetterCreateLine(this->typesetter.get(), CFRangeMake(this->cur_offset, len))); this->cur_offset += len; - return std::unique_ptr(line != nullptr ? new CoreTextLine(line, this->font_map, this->text_buffer) : nullptr); + return std::unique_ptr(line ? new CoreTextLine(std::move(line), this->font_map, this->text_buffer) : nullptr); } CoreTextParagraphLayout::CoreTextVisualRun::CoreTextVisualRun(CTRunRef run, Font *font, const CoreTextParagraphLayoutFactory::CharType *buff) : font(font) @@ -271,10 +259,7 @@ int CoreTextParagraphLayout::CoreTextLine::GetWidth() const /** Delete CoreText font reference for a specific font size. */ void MacOSResetScriptCache(FontSize size) { - if (_font_cache[size] != nullptr) { - CFRelease(_font_cache[size]); - _font_cache[size] = nullptr; - } + _font_cache[size].reset(); } /** Store current language locale as a CoreFounation locale. */ @@ -282,11 +267,8 @@ void MacOSSetCurrentLocaleName(const char *iso_code) { if (!MacOSVersionIsAtLeast(10, 5, 0)) return; - if (_osx_locale != nullptr) CFRelease(_osx_locale); - - CFStringRef iso = CFStringCreateWithCString(kCFAllocatorDefault, iso_code, kCFStringEncodingUTF8); - _osx_locale = CFLocaleCreate(kCFAllocatorDefault, iso); - CFRelease(iso); + CFAutoRelease iso(CFStringCreateWithCString(kCFAllocatorDefault, iso_code, kCFStringEncodingUTF8)); + _osx_locale.reset(CFLocaleCreate(kCFAllocatorDefault, iso.get())); } /** @@ -303,22 +285,13 @@ int MacOSStringCompare(const char *s1, const char *s2) CFStringCompareFlags flags = kCFCompareCaseInsensitive | kCFCompareNumerically | kCFCompareLocalized | kCFCompareWidthInsensitive | kCFCompareForcedOrdering; - CFStringRef cf1 = CFStringCreateWithCString(kCFAllocatorDefault, s1, kCFStringEncodingUTF8); - CFStringRef cf2 = CFStringCreateWithCString(kCFAllocatorDefault, s2, kCFStringEncodingUTF8); + CFAutoRelease cf1(CFStringCreateWithCString(kCFAllocatorDefault, s1, kCFStringEncodingUTF8)); + CFAutoRelease cf2(CFStringCreateWithCString(kCFAllocatorDefault, s2, kCFStringEncodingUTF8)); /* If any CFString could not be created (e.g., due to UTF8 invalid chars), return OS unsupported functionality */ - if (cf1 == nullptr || cf2 == nullptr) { - if (cf1 != nullptr) CFRelease(cf1); - if (cf2 != nullptr) CFRelease(cf2); - return 0; - } + if (cf1 == nullptr || cf2 == nullptr) return 0; - CFComparisonResult res = CFStringCompareWithOptionsAndLocale(cf1, cf2, CFRangeMake(0, CFStringGetLength(cf1)), flags, _osx_locale); - - CFRelease(cf1); - CFRelease(cf2); - - return (int)res + 2; + return (int)CFStringCompareWithOptionsAndLocale(cf1.get(), cf2.get(), CFRangeMake(0, CFStringGetLength(cf1.get())), flags, _osx_locale.get()) + 2; } @@ -353,30 +326,27 @@ int MacOSStringCompare(const char *s1, const char *s2) this->str_info.resize(utf16_to_utf8.size()); if (utf16_str.size() > 0) { - CFStringRef str = CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, &utf16_str[0], utf16_str.size(), kCFAllocatorNull); + CFAutoRelease str(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, &utf16_str[0], utf16_str.size(), kCFAllocatorNull)); /* Get cluster breaks. */ - for (CFIndex i = 0; i < CFStringGetLength(str); ) { - CFRange r = CFStringGetRangeOfComposedCharactersAtIndex(str, i); + for (CFIndex i = 0; i < CFStringGetLength(str.get()); ) { + CFRange r = CFStringGetRangeOfComposedCharactersAtIndex(str.get(), i); this->str_info[r.location].char_stop = true; i += r.length; } /* Get word breaks. */ - CFStringTokenizerRef tokenizer = CFStringTokenizerCreate(kCFAllocatorDefault, str, CFRangeMake(0, CFStringGetLength(str)), kCFStringTokenizerUnitWordBoundary, _osx_locale); + CFAutoRelease tokenizer(CFStringTokenizerCreate(kCFAllocatorDefault, str.get(), CFRangeMake(0, CFStringGetLength(str.get())), kCFStringTokenizerUnitWordBoundary, _osx_locale.get())); CFStringTokenizerTokenType tokenType = kCFStringTokenizerTokenNone; - while ((tokenType = CFStringTokenizerAdvanceToNextToken(tokenizer)) != kCFStringTokenizerTokenNone) { + while ((tokenType = CFStringTokenizerAdvanceToNextToken(tokenizer.get())) != kCFStringTokenizerTokenNone) { /* Skip tokens that are white-space or punctuation tokens. */ if ((tokenType & kCFStringTokenizerTokenHasNonLettersMask) != kCFStringTokenizerTokenHasNonLettersMask) { - CFRange r = CFStringTokenizerGetCurrentTokenRange(tokenizer); + CFRange r = CFStringTokenizerGetCurrentTokenRange(tokenizer.get()); this->str_info[r.location].word_stop = true; } } - - CFRelease(tokenizer); - CFRelease(str); } /* End-of-string is always a valid stopping point. */ diff --git a/src/os/macosx/string_osx.h b/src/os/macosx/string_osx.h index 8c9b7058ab..39f255b162 100644 --- a/src/os/macosx/string_osx.h +++ b/src/os/macosx/string_osx.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp index 9ba6f8ef9e..a44c10a3b7 100644 --- a/src/os/os2/os2.cpp +++ b/src/os/os2/os2.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/unix/crashlog_unix.cpp b/src/os/unix/crashlog_unix.cpp index 005babebd4..ee3f5823fd 100644 --- a/src/os/unix/crashlog_unix.cpp +++ b/src/os/unix/crashlog_unix.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index 430e3770f1..dc54badbd1 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index a64228bfb4..9585bdf20f 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -261,7 +259,7 @@ static char *PrintModuleInfo(char *output, const char *last, HMODULE mod) ep->ContextRecord->Rip, ep->ContextRecord->EFlags ); -#else +#elif defined(_M_IX86) buffer += seprintf(buffer, last, " EAX: %.8X EBX: %.8X ECX: %.8X EDX: %.8X\n" " ESI: %.8X EDI: %.8X EBP: %.8X ESP: %.8X\n" @@ -277,13 +275,57 @@ static char *PrintModuleInfo(char *output, const char *last, HMODULE mod) (int)ep->ContextRecord->Eip, (int)ep->ContextRecord->EFlags ); +#elif defined(_M_ARM64) + buffer += seprintf(buffer, last, + " X0: %.16I64X X1: %.16I64X X2: %.16I64X X3: %.16I64X\n" + " X4: %.16I64X X5: %.16I64X X6: %.16I64X X7: %.16I64X\n" + " X8: %.16I64X X9: %.16I64X X10: %.16I64X X11: %.16I64X\n" + " X12: %.16I64X X13: %.16I64X X14: %.16I64X X15: %.16I64X\n" + " X16: %.16I64X X17: %.16I64X X18: %.16I64X X19: %.16I64X\n" + " X20: %.16I64X X21: %.16I64X X22: %.16I64X X23: %.16I64X\n" + " X24: %.16I64X X25: %.16I64X X26: %.16I64X X27: %.16I64X\n" + " X28: %.16I64X Fp: %.16I64X Lr: %.16I64X\n", + ep->ContextRecord->X0, + ep->ContextRecord->X1, + ep->ContextRecord->X2, + ep->ContextRecord->X3, + ep->ContextRecord->X4, + ep->ContextRecord->X5, + ep->ContextRecord->X6, + ep->ContextRecord->X7, + ep->ContextRecord->X8, + ep->ContextRecord->X9, + ep->ContextRecord->X10, + ep->ContextRecord->X11, + ep->ContextRecord->X12, + ep->ContextRecord->X13, + ep->ContextRecord->X14, + ep->ContextRecord->X15, + ep->ContextRecord->X16, + ep->ContextRecord->X17, + ep->ContextRecord->X18, + ep->ContextRecord->X19, + ep->ContextRecord->X20, + ep->ContextRecord->X21, + ep->ContextRecord->X22, + ep->ContextRecord->X23, + ep->ContextRecord->X24, + ep->ContextRecord->X25, + ep->ContextRecord->X26, + ep->ContextRecord->X27, + ep->ContextRecord->X28, + ep->ContextRecord->Fp, + ep->ContextRecord->Lr + ); #endif buffer += seprintf(buffer, last, "\n Bytes at instruction pointer:\n"); #ifdef _M_AMD64 byte *b = (byte*)ep->ContextRecord->Rip; -#else +#elif defined(_M_IX86) byte *b = (byte*)ep->ContextRecord->Eip; +#elif defined(_M_ARM64) + byte *b = (byte*)ep->ContextRecord->Pc; #endif for (int i = 0; i != 24; i++) { if (IsBadReadPtr(b, 1)) { @@ -301,8 +343,10 @@ static char *PrintModuleInfo(char *output, const char *last, HMODULE mod) buffer += seprintf(buffer, last, "Stack trace:\n"); #ifdef _M_AMD64 uint32 *b = (uint32*)ep->ContextRecord->Rsp; -#else +#elif defined(_M_IX86) uint32 *b = (uint32*)ep->ContextRecord->Esp; +#elif defined(_M_ARM64) + uint32 *b = (uint32*)ep->ContextRecord->Sp; #endif for (int j = 0; j != 24; j++) { for (int i = 0; i != 8; i++) { @@ -373,10 +417,14 @@ char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) c frame.AddrPC.Offset = ep->ContextRecord->Rip; frame.AddrFrame.Offset = ep->ContextRecord->Rbp; frame.AddrStack.Offset = ep->ContextRecord->Rsp; -#else +#elif defined(_M_IX86) frame.AddrPC.Offset = ep->ContextRecord->Eip; frame.AddrFrame.Offset = ep->ContextRecord->Ebp; frame.AddrStack.Offset = ep->ContextRecord->Esp; +#elif defined(_M_ARM64) + frame.AddrPC.Offset = ep->ContextRecord->Pc; + frame.AddrFrame.Offset = ep->ContextRecord->Fp; + frame.AddrStack.Offset = ep->ContextRecord->Sp; #endif frame.AddrPC.Mode = AddrModeFlat; frame.AddrFrame.Mode = AddrModeFlat; @@ -529,9 +577,12 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep) #ifdef _M_AMD64 ep->ContextRecord->Rip = (DWORD64)ShowCrashlogWindow; ep->ContextRecord->Rsp = (DWORD64)_safe_esp; -#else +#elif defined(_M_IX86) ep->ContextRecord->Eip = (DWORD)ShowCrashlogWindow; ep->ContextRecord->Esp = (DWORD)_safe_esp; +#elif defined(_M_ARM64) + ep->ContextRecord->Pc = (DWORD64)ShowCrashlogWindow; + ep->ContextRecord->Sp = (DWORD64)_safe_esp; #endif return EXCEPTION_CONTINUE_EXECUTION; } @@ -547,7 +598,7 @@ static void CDECL CustomAbort(int signal) /* static */ void CrashLog::InitialiseCrashLog() { -#ifdef _M_AMD64 +#if defined(_M_AMD64) || defined(_M_ARM64) CONTEXT ctx; RtlCaptureContext(&ctx); @@ -555,7 +606,11 @@ static void CDECL CustomAbort(int signal) * function. As we are simulating a function call with the safe ESP value, * we need to subtract 8 for the imaginary return address otherwise stack * alignment would be wrong in the called function. */ +#if defined(_M_ARM64) + _safe_esp = (void *)(ctx.Sp - 8); +#else _safe_esp = (void *)(ctx.Rsp - 8); +#endif #else #if defined(_MSC_VER) _asm { diff --git a/src/os/windows/ottdres.rc.in b/src/os/windows/ottdres.rc.in index 88cf64f666..5b375790a3 100644 --- a/src/os/windows/ottdres.rc.in +++ b/src/os/windows/ottdres.rc.in @@ -1,6 +1,4 @@ //Microsoft Developer Studio generated resource script. -// $Id$ -// // This file is part of OpenTTD. // OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. // OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp index c91803089e..ce433364a1 100644 --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/windows/string_uniscribe.h b/src/os/windows/string_uniscribe.h index 49e1123a99..9470b44b0c 100644 --- a/src/os/windows/string_uniscribe.h +++ b/src/os/windows/string_uniscribe.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index b0495d64db..1bdbc3c2a8 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/os/windows/win32.h b/src/os/windows/win32.h index 23e216762c..8ffe8ae7b5 100644 --- a/src/os/windows/win32.h +++ b/src/os/windows/win32.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp index 380b1b0331..2fca3feecc 100644 --- a/src/osk_gui.cpp +++ b/src/osk_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 31a7816509..2cfe4d9e4a 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/aystar.cpp b/src/pathfinder/npf/aystar.cpp index addfc4930e..b14053b7c0 100644 --- a/src/pathfinder/npf/aystar.cpp +++ b/src/pathfinder/npf/aystar.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/aystar.h b/src/pathfinder/npf/aystar.h index 890b023e83..cbbe8a4157 100644 --- a/src/pathfinder/npf/aystar.h +++ b/src/pathfinder/npf/aystar.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 1c39a30a05..34b85791bd 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/npf_func.h b/src/pathfinder/npf/npf_func.h index 2429989ab9..036caf9bb0 100644 --- a/src/pathfinder/npf/npf_func.h +++ b/src/pathfinder/npf/npf_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/queue.cpp b/src/pathfinder/npf/queue.cpp index 02a195c5df..64ea3bfcae 100644 --- a/src/pathfinder/npf/queue.cpp +++ b/src/pathfinder/npf/queue.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/npf/queue.h b/src/pathfinder/npf/queue.h index 3a5bd1ce92..c65131aec9 100644 --- a/src/pathfinder/npf/queue.h +++ b/src/pathfinder/npf/queue.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/pathfinder_func.h b/src/pathfinder/pathfinder_func.h index 4c0671941c..03edf6995b 100644 --- a/src/pathfinder/pathfinder_func.h +++ b/src/pathfinder/pathfinder_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h index 3740d03902..f837f4840b 100644 --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/pf_performance_timer.hpp b/src/pathfinder/pf_performance_timer.hpp index c06ef815ef..66ec9695f8 100644 --- a/src/pathfinder/pf_performance_timer.hpp +++ b/src/pathfinder/pf_performance_timer.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp index 45a72efd5e..e4d91c6ee0 100644 --- a/src/pathfinder/yapf/nodelist.hpp +++ b/src/pathfinder/yapf/nodelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf.h b/src/pathfinder/yapf/yapf.h index 3bea692b79..af5e966e7f 100644 --- a/src/pathfinder/yapf/yapf.h +++ b/src/pathfinder/yapf/yapf.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf.hpp b/src/pathfinder/yapf/yapf.hpp index fda79287d8..867c6188ff 100644 --- a/src/pathfinder/yapf/yapf.hpp +++ b/src/pathfinder/yapf/yapf.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp index 5483b98747..0bdd81dffe 100644 --- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_cache.h b/src/pathfinder/yapf/yapf_cache.h index 1660a21c02..a66cbc9e25 100644 --- a/src/pathfinder/yapf/yapf_cache.h +++ b/src/pathfinder/yapf/yapf_cache.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_common.hpp b/src/pathfinder/yapf/yapf_common.hpp index 95adf37d7b..c6f7e6e5fb 100644 --- a/src/pathfinder/yapf/yapf_common.hpp +++ b/src/pathfinder/yapf/yapf_common.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_costbase.hpp b/src/pathfinder/yapf/yapf_costbase.hpp index 6b55585a83..8da9257d91 100644 --- a/src/pathfinder/yapf/yapf_costbase.hpp +++ b/src/pathfinder/yapf/yapf_costbase.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_costcache.hpp b/src/pathfinder/yapf/yapf_costcache.hpp index 2cdbf06c0b..c56c47b5f2 100644 --- a/src/pathfinder/yapf/yapf_costcache.hpp +++ b/src/pathfinder/yapf/yapf_costcache.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index d7f9a519ec..e6422dc240 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp index 1d1833fbfd..05a1235778 100644 --- a/src/pathfinder/yapf/yapf_destrail.hpp +++ b/src/pathfinder/yapf/yapf_destrail.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_node.hpp b/src/pathfinder/yapf/yapf_node.hpp index 136ce53bde..689a8e9752 100644 --- a/src/pathfinder/yapf/yapf_node.hpp +++ b/src/pathfinder/yapf/yapf_node.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_node_rail.hpp b/src/pathfinder/yapf/yapf_node_rail.hpp index 2dfd6ae7d6..fce909ac9b 100644 --- a/src/pathfinder/yapf/yapf_node_rail.hpp +++ b/src/pathfinder/yapf/yapf_node_rail.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_node_road.hpp b/src/pathfinder/yapf/yapf_node_road.hpp index 9a392f088f..cf5fda95c9 100644 --- a/src/pathfinder/yapf/yapf_node_road.hpp +++ b/src/pathfinder/yapf/yapf_node_road.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_node_ship.hpp b/src/pathfinder/yapf/yapf_node_ship.hpp index a8f8270714..63e21987a3 100644 --- a/src/pathfinder/yapf/yapf_node_ship.hpp +++ b/src/pathfinder/yapf/yapf_node_ship.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp index 8d69b8aade..6922c0b89d 100644 --- a/src/pathfinder/yapf/yapf_rail.cpp +++ b/src/pathfinder/yapf/yapf_rail.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 3935ba18d3..248bf1a40a 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 731ae2f845..2f2ed7e441 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pathfinder/yapf/yapf_type.hpp b/src/pathfinder/yapf/yapf_type.hpp index 8d24eee5e2..ff63c1304a 100644 --- a/src/pathfinder/yapf/yapf_type.hpp +++ b/src/pathfinder/yapf/yapf_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pbs.cpp b/src/pbs.cpp index 90ac3e70e1..c4dfcbce54 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/pbs.h b/src/pbs.h index 96f9184b2b..a7af4e373e 100644 --- a/src/pbs.h +++ b/src/pbs.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/progress.cpp b/src/progress.cpp index 923f1ef83f..e45e5db078 100644 --- a/src/progress.cpp +++ b/src/progress.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/progress.h b/src/progress.h index 2a9d73b038..59a61c678e 100644 --- a/src/progress.h +++ b/src/progress.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/querystring_gui.h b/src/querystring_gui.h index 6764a6c91a..1556334c3d 100644 --- a/src/querystring_gui.h +++ b/src/querystring_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/rail.cpp b/src/rail.cpp index f2870c1eb9..63afa379e0 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -210,21 +208,6 @@ bool ValParamRailtype(const RailType rail) return rail < RAILTYPE_END && HasRailtypeAvail(_current_company, rail); } -/** - * Returns the "best" railtype a company can build. - * As the AI doesn't know what the BEST one is, we have our own priority list - * here. When adding new railtypes, modify this function - * @param company the company "in action" - * @return The "best" railtype a company has available - */ -RailType GetBestRailtype(const CompanyID company) -{ - if (HasRailtypeAvail(company, RAILTYPE_MAGLEV)) return RAILTYPE_MAGLEV; - if (HasRailtypeAvail(company, RAILTYPE_MONO)) return RAILTYPE_MONO; - if (HasRailtypeAvail(company, RAILTYPE_ELECTRIC)) return RAILTYPE_ELECTRIC; - return RAILTYPE_RAIL; -} - /** * Add the rail types that are to be introduced at the given date. * @param current The currently available railtypes. @@ -269,8 +252,7 @@ RailTypes GetCompanyRailtypes(CompanyID company, bool introduces) { RailTypes rts = RAILTYPES_NONE; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { const EngineInfo *ei = &e->info; if (HasBit(ei->climates, _settings_game.game_creation.landscape) && @@ -301,8 +283,7 @@ RailTypes GetRailTypes(bool introduces) { RailTypes rts = RAILTYPES_NONE; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { const EngineInfo *ei = &e->info; if (!HasBit(ei->climates, _settings_game.game_creation.landscape)) continue; diff --git a/src/rail.h b/src/rail.h index 8619bac6d9..d9121d545a 100644 --- a/src/rail.h +++ b/src/rail.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -454,7 +452,6 @@ bool ValParamRailtype(const RailType rail); RailTypes AddDateIntroducedRailTypes(RailTypes current, Date date); -RailType GetBestRailtype(const CompanyID company); RailTypes GetCompanyRailtypes(CompanyID company, bool introduces = true); RailTypes GetRailTypes(bool introduces); diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 64b293dc5b..7de00327eb 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index d39cc8ba0f..c0a3f44574 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1910,38 +1908,41 @@ static void SetDefaultRailGui() if (_local_company == COMPANY_SPECTATOR || !Company::IsValidID(_local_company)) return; extern RailType _last_built_railtype; - RailType rt = (RailType)(_settings_client.gui.default_rail_type + RAILTYPE_END); - if (rt == DEF_RAILTYPE_MOST_USED) { - /* Find the most used rail type */ - uint count[RAILTYPE_END]; - memset(count, 0, sizeof(count)); - for (TileIndex t = 0; t < MapSize(); t++) { - if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) || - (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL)) { - count[GetRailType(t)]++; + RailType rt; + switch (_settings_client.gui.default_rail_type) { + case 2: { + /* Find the most used rail type */ + uint count[RAILTYPE_END]; + memset(count, 0, sizeof(count)); + for (TileIndex t = 0; t < MapSize(); t++) { + if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) || + (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL)) { + count[GetRailType(t)]++; + } } + + rt = static_cast(std::max_element(count + RAILTYPE_BEGIN, count + RAILTYPE_END) - count); + if (count[rt] > 0) break; + + /* No rail, just get the first available one */ + FALLTHROUGH; } - - rt = RAILTYPE_RAIL; - for (RailType r = RAILTYPE_ELECTRIC; r < RAILTYPE_END; r++) { - if (count[r] >= count[rt]) rt = r; + case 0: { + /* Use first available type */ + std::vector::const_iterator it = std::find_if(_sorted_railtypes.begin(), _sorted_railtypes.end(), + [](RailType r){ return HasRailtypeAvail(_local_company, r); }); + rt = it != _sorted_railtypes.end() ? *it : RAILTYPE_BEGIN; + break; } - - /* No rail, just get the first available one */ - if (count[rt] == 0) rt = DEF_RAILTYPE_FIRST; - } - switch (rt) { - case DEF_RAILTYPE_FIRST: - rt = RAILTYPE_RAIL; - while (rt < RAILTYPE_END && !HasRailtypeAvail(_local_company, rt)) rt++; + case 1: { + /* Use last available type */ + std::vector::const_reverse_iterator it = std::find_if(_sorted_railtypes.rbegin(), _sorted_railtypes.rend(), + [](RailType r){ return HasRailtypeAvail(_local_company, r); }); + rt = it != _sorted_railtypes.rend() ? *it : RAILTYPE_BEGIN; break; - - case DEF_RAILTYPE_LAST: - rt = GetBestRailtype(_local_company); - break; - + } default: - break; + NOT_REACHED(); } _last_built_railtype = _cur_railtype = rt; diff --git a/src/rail_gui.h b/src/rail_gui.h index 0a5f240ab3..29a1b9b161 100644 --- a/src/rail_gui.h +++ b/src/rail_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/rail_map.h b/src/rail_map.h index 0142559e78..bd1d3c7492 100644 --- a/src/rail_map.h +++ b/src/rail_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/rail_type.h b/src/rail_type.h index 7e465866cf..874a8ebbb6 100644 --- a/src/rail_type.h +++ b/src/rail_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -34,10 +32,6 @@ enum RailType : byte { RAILTYPE_MAGLEV = 3, ///< Maglev RAILTYPE_END = 64, ///< Used for iterations INVALID_RAILTYPE = 0xFF, ///< Flag for invalid railtype - - DEF_RAILTYPE_FIRST = RAILTYPE_END, ///< Default railtype: first available - DEF_RAILTYPE_LAST, ///< Default railtype: last available - DEF_RAILTYPE_MOST_USED, ///< Default railtype: most used }; /** Allow incrementing of Track variables */ diff --git a/src/rev.cpp b/src/rev.cpp index 16a1e7a018..5692d8d554 100644 --- a/src/rev.cpp +++ b/src/rev.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -37,7 +35,7 @@ bool IsReleasedVersion() * * shows a "M", if the binary is made from modified source code. */ -const char _openttd_revision[] = "1.10.0-beta1"; +const char _openttd_revision[] = "1.10.0-beta2"; /** * The text version of OpenTTD's build date. @@ -50,7 +48,7 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__; /** * The git revision hash of this version. */ -const char _openttd_revision_hash[] = "9f50c754ffee52211e61d88e6d5fc296dfc585e0"; +const char _openttd_revision_hash[] = "18f03a300b12bb022fb3273ff6273c430b28f787"; /** * Let us know if current build was modified. This detection diff --git a/src/rev.cpp.in b/src/rev.cpp.in index d5d19373b3..003fb5556e 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/rev.h b/src/rev.h index 55674cc805..f1e669aa56 100644 --- a/src/rev.h +++ b/src/rev.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road.cpp b/src/road.cpp index d76d6901cb..486dc0044c 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -191,8 +189,7 @@ RoadTypes GetCompanyRoadTypes(CompanyID company, bool introduces) { RoadTypes rts = ROADTYPES_NONE; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { const EngineInfo *ei = &e->info; if (HasBit(ei->climates, _settings_game.game_creation.landscape) && @@ -220,8 +217,7 @@ RoadTypes GetRoadTypes(bool introduces) { RoadTypes rts = ROADTYPES_NONE; - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { const EngineInfo *ei = &e->info; if (!HasBit(ei->climates, _settings_game.game_creation.landscape)) continue; @@ -284,8 +280,7 @@ RoadTypes ExistingRoadTypes(CompanyID c) RoadTypes known_roadtypes = ROADTYPES_NONE; /* Find used roadtypes */ - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (Engine *e : Engine::IterateType(VEH_ROAD)) { /* Check if the roadtype can be used in the current climate */ if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue; @@ -321,8 +316,7 @@ bool CanBuildRoadTypeInfrastructure(RoadType roadtype, CompanyID company) * and if we can build new ones */ if (_settings_game.vehicle.max_roadveh > 0 && HasBit(roadtypes, roadtype)) { /* Can we actually build the vehicle type? */ - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { if (!HasBit(e->company_avail, company)) continue; if (HasPowerOnRoad(e->u.road.roadtype, roadtype) || HasPowerOnRoad(roadtype, e->u.road.roadtype)) return true; } @@ -330,8 +324,7 @@ bool CanBuildRoadTypeInfrastructure(RoadType roadtype, CompanyID company) } /* We should be able to build infrastructure when we have the actual vehicle type */ - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == VEH_ROAD && (company == OWNER_DEITY || v->owner == company) && HasBit(roadtypes, RoadVehicle::From(v)->roadtype) && HasPowerOnRoad(RoadVehicle::From(v)->roadtype, roadtype)) return true; } diff --git a/src/road.h b/src/road.h index c359fc779c..1082ab2729 100644 --- a/src/road.h +++ b/src/road.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 4f5519c31e..ae328a0652 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -184,10 +182,7 @@ RoadType AllocateRoadType(RoadTypeLabel label, RoadTramType rtt) */ bool RoadVehiclesAreBuilt() { - const RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) return true; - - return false; + return !RoadVehicle::Iterate().empty(); } /** @@ -458,8 +453,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec if (HasRoadWorks(tile)) { /* flooding tile with road works, don't forget to remove the effect vehicle too */ assert(_current_company == OWNER_WATER); - EffectVehicle *v; - FOR_ALL_EFFECTVEHICLES(v) { + for (EffectVehicle *v : EffectVehicle::Iterate()) { if (TileVirtXY(v->x_pos, v->y_pos) == tile) { delete v; } diff --git a/src/road_cmd.h b/src/road_cmd.h index 3cf588dcd6..753ebd21d4 100644 --- a/src/road_cmd.h +++ b/src/road_cmd.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_func.h b/src/road_func.h index ebb68de69d..9376460575 100644 --- a/src/road_func.h +++ b/src/road_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 5301b6a2e9..8f5c96f986 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_gui.h b/src/road_gui.h index 3f0b8f9006..580c11e32e 100644 --- a/src/road_gui.h +++ b/src/road_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_internal.h b/src/road_internal.h index 79782e3bba..f0062100a5 100644 --- a/src/road_internal.h +++ b/src/road_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_map.cpp b/src/road_map.cpp index 1ab95043ad..9954e42993 100644 --- a/src/road_map.cpp +++ b/src/road_map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_map.h b/src/road_map.h index f5600d590d..22d0fa54d3 100644 --- a/src/road_map.h +++ b/src/road_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/road_type.h b/src/road_type.h index f01d1d0353..969b141ba2 100644 --- a/src/road_type.h +++ b/src/road_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -16,9 +14,6 @@ typedef uint32 RoadTypeLabel; -static const RoadTypeLabel ROADTYPE_ROAD_LABEL = 'ROAD'; -static const RoadTypeLabel ROADTYPE_TRAM_LABEL = 'TRAM'; - /** * The different roadtypes we support * diff --git a/src/roadstop.cpp b/src/roadstop.cpp index 694e33f0dd..a7f25fe0c3 100644 --- a/src/roadstop.cpp +++ b/src/roadstop.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/roadstop_base.h b/src/roadstop_base.h index ee470db8d1..768b54282d 100644 --- a/src/roadstop_base.h +++ b/src/roadstop_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -190,7 +188,4 @@ private: } }; -#define FOR_ALL_ROADSTOPS_FROM(var, start) FOR_ALL_ITEMS_FROM(RoadStop, roadstop_index, var, start) -#define FOR_ALL_ROADSTOPS(var) FOR_ALL_ROADSTOPS_FROM(var, 0) - #endif /* ROADSTOP_BASE_H */ diff --git a/src/roadveh.h b/src/roadveh.h index 02eb48c8c2..028af9decb 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -321,6 +319,4 @@ protected: // These functions should not be called outside acceleration code. } }; -#define FOR_ALL_ROADVEHICLES(var) FOR_ALL_VEHICLES_OF_TYPE(RoadVehicle, var) - #endif /* ROADVEH_H */ diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index d323bc1ecb..261af7042b 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index 1c96c29e91..f25bd734f9 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/safeguards.h b/src/safeguards.h index 157730fbee..5351116ecb 100644 --- a/src/safeguards.h +++ b/src/safeguards.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 553aab75c6..dd9fcd534f 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -171,9 +169,7 @@ static void ConvertTownOwner() /* since savegame version 4.1, exclusive transport rights are stored at towns */ static void UpdateExclusiveRights() { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { t->exclusivity = INVALID_COMPANY; } @@ -245,8 +241,7 @@ static void InitializeWindowsAndCaches() UpdateAllVirtCoords(); ResetViewportAfterLoadGame(); - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { /* For each company, verify (while loading a scenario) that the inauguration date is the current year and set it * accordingly if it is not the case. No need to set it on companies that are not been used already, * thus the MIN_YEAR (which is really nothing more than Zero, initialized value) test */ @@ -256,35 +251,30 @@ static void InitializeWindowsAndCaches() } /* Count number of objects per type */ - Object *o; - FOR_ALL_OBJECTS(o) { + for (Object *o : Object::Iterate()) { Object::IncTypeCount(o->type); } /* Identify owners of persistent storage arrays */ - Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { if (i->psa != nullptr) { i->psa->feature = GSF_INDUSTRIES; i->psa->tile = i->location.tile; } } - Station *s; - FOR_ALL_STATIONS(s) { + for (Station *s : Station::Iterate()) { if (s->airport.psa != nullptr) { s->airport.psa->feature = GSF_AIRPORTS; s->airport.psa->tile = s->airport.tile; } } - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { for (std::list::iterator it = t->psa_list.begin(); it != t->psa_list.end(); ++it) { (*it)->feature = GSF_FAKE_TOWNS; (*it)->tile = t->xy; } } - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->IsFrontEngine()) { rv->CargoChanged(); } @@ -441,8 +431,8 @@ static void FixOwnerOfRailTrack(TileIndex t) assert(!Company::IsValidID(GetTileOwner(t)) && (IsLevelCrossingTile(t) || IsPlainRailTile(t))); /* remove leftover rail piece from crossing (from very old savegames) */ - Train *v = nullptr, *w; - FOR_ALL_TRAINS(w) { + Train *v = nullptr; + for (Train *w : Train::Iterate()) { if (w->tile == t) { v = w; break; @@ -590,14 +580,13 @@ bool AfterLoadGame() * recompute the width and height. Doing this unconditionally for all old * savegames simplifies the code. */ if (IsSavegameVersionBefore(SLV_2)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { st->train_station.w = st->train_station.h = 0; } for (TileIndex t = 0; t < map_size; t++) { if (!IsTileType(t, MP_STATION)) continue; if (_m[t].m5 > 7) continue; // is it a rail station tile? - st = Station::Get(_m[t].m2); + Station *st = Station::Get(_m[t].m2); assert(st->train_station.tile != 0); int dx = TileX(t) - TileX(st->train_station.tile); int dy = TileY(t) - TileY(st->train_station.tile); @@ -646,23 +635,20 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_84)) { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->name = CopyFromOldName(c->name_1); if (c->name != nullptr) c->name_1 = STR_SV_UNNAMED; c->president_name = CopyFromOldName(c->president_name_1); if (c->president_name != nullptr) c->president_name_1 = SPECSTR_PRESIDENT_NAME; } - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { st->name = CopyFromOldName(st->string_id); /* generating new name would be too much work for little effect, use the station name fallback */ if (st->name != nullptr) st->string_id = STR_SV_STNAME_FALLBACK; } - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { t->name = CopyFromOldName(t->townnametype); if (t->name != nullptr) t->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name; } @@ -673,15 +659,13 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_106)) { /* no station is determined by 'tile == INVALID_TILE' now (instead of '0') */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->airport.tile == 0) st->airport.tile = INVALID_TILE; if (st->train_station.tile == 0) st->train_station.tile = INVALID_TILE; } /* the same applies to Company::location_of_HQ */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { if (c->location_of_HQ == 0 || (IsSavegameVersionBefore(SLV_4) && c->location_of_HQ == 0xFFFF)) { c->location_of_HQ = INVALID_TILE; } @@ -789,8 +773,7 @@ bool AfterLoadGame() * here as AfterLoadVehicles can check it indirectly via the newgrf * code. */ if (IsSavegameVersionBefore(SLV_139)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->airport.tile != INVALID_TILE && st->airport.type == 15) { st->airport.type = AT_OILRIG; } @@ -802,8 +785,7 @@ bool AfterLoadGame() /* Make sure there is an AI attached to an AI company */ { - Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->is_ai && c->ai_instance == nullptr) AI::StartNew(c->index); } } @@ -833,8 +815,7 @@ bool AfterLoadGame() } /* Fix the cache for cargo payments. */ - CargoPayment *cp; - FOR_ALL_CARGO_PAYMENTS(cp) { + for (CargoPayment *cp : CargoPayment::Iterate()) { cp->front->cargo_payment = cp; cp->current_station = cp->front->last_station_visited; } @@ -995,15 +976,13 @@ bool AfterLoadGame() /* From version 9.0, we update the max passengers of a town (was sometimes negative * before that. */ if (IsSavegameVersionBefore(SLV_9)) { - Town *t; - FOR_ALL_TOWNS(t) UpdateTownMaxPass(t); + for (Town *t : Town::Iterate()) UpdateTownMaxPass(t); } /* From version 16.0, we included autorenew on engines, which are now saved, but * of course, we do need to initialize them for older savegames. */ if (IsSavegameVersionBefore(SLV_16)) { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->engine_renew_list = nullptr; c->settings.engine_renew = false; c->settings.engine_renew_months = 6; @@ -1016,7 +995,7 @@ bool AfterLoadGame() * becomes company 0, unless we are in the scenario editor where all the * companies are 'invalid'. */ - c = Company::GetIfValid(COMPANY_FIRST); + Company *c = Company::GetIfValid(COMPANY_FIRST); if (!_network_dedicated && c != nullptr) { c->settings = _settings_client.company; } @@ -1189,8 +1168,6 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_42)) { - Vehicle *v; - for (TileIndex t = 0; t < map_size; t++) { if (MayHaveBridgeAbove(t)) ClearBridgeMiddle(t); if (IsBridgeTile(t)) { @@ -1244,7 +1221,7 @@ bool AfterLoadGame() } } - FOR_ALL_VEHICLES(v) { + for (Vehicle* v : Vehicle::Iterate()) { if (!v->IsGroundVehicle()) continue; if (IsBridgeTile(v->tile)) { DiagDirection dir = GetTunnelBridgeDirection(v->tile); @@ -1303,8 +1280,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_24)) { RailType min_rail = RAILTYPE_ELECTRIC; - Train *v; - FOR_ALL_TRAINS(v) { + for (Train *v : Train::Iterate()) { RailType rt = RailVehInfo(v->engine_type)->railtype; v->railtype = rt; @@ -1341,7 +1317,7 @@ bool AfterLoadGame() } } - FOR_ALL_TRAINS(v) { + for (Train *v : Train::Iterate()) { if (v->IsFrontEngine() || v->IsFreeWagon()) v->ConsistChanged(CCF_TRACK); } @@ -1351,8 +1327,7 @@ bool AfterLoadGame() * replaced, shall keep their old length. In all prior versions, just default * to false */ if (IsSavegameVersionBefore(SLV_16, 1)) { - Company *c; - FOR_ALL_COMPANIES(c) c->settings.renew_keep_length = false; + for (Company *c : Company::Iterate()) c->settings.renew_keep_length = false; } if (IsSavegameVersionBefore(SLV_123)) { @@ -1399,15 +1374,13 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_25)) { - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { rv->vehstatus &= ~0x40; } } if (IsSavegameVersionBefore(SLV_26)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { st->last_vehicle_type = VEH_INVALID; } } @@ -1415,12 +1388,10 @@ bool AfterLoadGame() YapfNotifyTrackLayoutChange(INVALID_TILE, INVALID_TRACK); if (IsSavegameVersionBefore(SLV_34)) { - Company *c; - FOR_ALL_COMPANIES(c) ResetCompanyLivery(c); + for (Company *c : Company::Iterate()) ResetCompanyLivery(c); } - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->avail_railtypes = GetCompanyRailtypes(c->index); c->avail_roadtypes = GetCompanyRoadTypes(c->index); } @@ -1430,22 +1401,16 @@ bool AfterLoadGame() /* Time starts at 0 instead of 1920. * Account for this in older games by adding an offset */ if (IsSavegameVersionBefore(SLV_31)) { - Station *st; - Waypoint *wp; - Engine *e; - Industry *i; - Vehicle *v; - _date += DAYS_TILL_ORIGINAL_BASE_YEAR; _cur_year += ORIGINAL_BASE_YEAR; - FOR_ALL_STATIONS(st) st->build_date += DAYS_TILL_ORIGINAL_BASE_YEAR; - FOR_ALL_WAYPOINTS(wp) wp->build_date += DAYS_TILL_ORIGINAL_BASE_YEAR; - FOR_ALL_ENGINES(e) e->intro_date += DAYS_TILL_ORIGINAL_BASE_YEAR; - FOR_ALL_COMPANIES(c) c->inaugurated_year += ORIGINAL_BASE_YEAR; - FOR_ALL_INDUSTRIES(i) i->last_prod_year += ORIGINAL_BASE_YEAR; + for (Station *st : Station::Iterate()) st->build_date += DAYS_TILL_ORIGINAL_BASE_YEAR; + for (Waypoint *wp : Waypoint::Iterate()) wp->build_date += DAYS_TILL_ORIGINAL_BASE_YEAR; + for (Engine *e : Engine::Iterate()) e->intro_date += DAYS_TILL_ORIGINAL_BASE_YEAR; + for (Company *c : Company::Iterate()) c->inaugurated_year += ORIGINAL_BASE_YEAR; + for (Industry *i : Industry::Iterate()) i->last_prod_year += ORIGINAL_BASE_YEAR; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { v->date_of_last_service += DAYS_TILL_ORIGINAL_BASE_YEAR; v->build_year += ORIGINAL_BASE_YEAR; } @@ -1455,8 +1420,6 @@ bool AfterLoadGame() * To give this prettiness to old savegames, we remove all farmfields and * plant new ones. */ if (IsSavegameVersionBefore(SLV_32)) { - Industry *i; - for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_CLEAR) && IsClearGround(t, CLEAR_FIELDS)) { /* remove fields */ @@ -1464,7 +1427,7 @@ bool AfterLoadGame() } } - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { uint j; if (GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_PLANT_ON_BUILT) { @@ -1475,14 +1438,11 @@ bool AfterLoadGame() /* Setting no refit flags to all orders in savegames from before refit in orders were added */ if (IsSavegameVersionBefore(SLV_36)) { - Order *order; - Vehicle *v; - - FOR_ALL_ORDERS(order) { + for (Order *order : Order::Iterate()) { order->SetRefit(CT_NO_REFIT); } - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { v->current_order.SetRefit(CT_NO_REFIT); } } @@ -1561,13 +1521,12 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_45)) { - Vehicle *v; /* Originally just the fact that some cargo had been paid for was * stored to stop people cheating and cashing in several times. This * wasn't enough though as it was cleared when the vehicle started * loading again, even if it didn't actually load anything, so now the * amount that has been paid is stored. */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { ClrBit(v->vehicle_flags, 2); } } @@ -1575,16 +1534,14 @@ bool AfterLoadGame() /* Buoys do now store the owner of the previous water tile, which can never * be OWNER_NONE. So replace OWNER_NONE with OWNER_WATER. */ if (IsSavegameVersionBefore(SLV_46)) { - Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { if ((wp->facilities & FACIL_DOCK) != 0 && IsTileOwner(wp->xy, OWNER_NONE) && TileHeight(wp->xy) == 0) SetTileOwner(wp->xy, OWNER_WATER); } } if (IsSavegameVersionBefore(SLV_50)) { - Aircraft *v; /* Aircraft units changed from 8 mph to 1 km-ish/h */ - FOR_ALL_AIRCRAFT(v) { + for (Aircraft *v : Aircraft::Iterate()) { if (v->subtype <= AIR_AIRCRAFT) { const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); v->cur_speed *= 128; @@ -1594,7 +1551,7 @@ bool AfterLoadGame() } } - if (IsSavegameVersionBefore(SLV_49)) FOR_ALL_COMPANIES(c) c->face = ConvertFromOldCompanyManagerFace(c->face); + if (IsSavegameVersionBefore(SLV_49)) for (Company *c : Company::Iterate()) c->face = ConvertFromOldCompanyManagerFace(c->face); if (IsSavegameVersionBefore(SLV_52)) { for (TileIndex t = 0; t < map_size; t++) { @@ -1608,9 +1565,7 @@ bool AfterLoadGame() * fast was added in version 54. From version 56 this is now saved in the * town as cities can be built specifically in the scenario editor. */ if (IsSavegameVersionBefore(SLV_56)) { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { if (_settings_game.economy.larger_towns != 0 && (t->index % _settings_game.economy.larger_towns) == 0) { t->larger_town = true; } @@ -1618,9 +1573,8 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_57)) { - Vehicle *v; /* Added a FIFO queue of vehicles loading at stations */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if ((v->type != VEH_TRAIN || Train::From(v)->IsFrontEngine()) && // for all locs !(v->vehstatus & (VS_STOPPED | VS_CRASHED)) && // not stopped or crashed v->current_order.IsType(OT_LOADING)) { // loading @@ -1634,8 +1588,7 @@ bool AfterLoadGame() } else if (IsSavegameVersionBefore(SLV_59)) { /* For some reason non-loading vehicles could be in the station's loading vehicle list */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { std::list::iterator iter; for (iter = st->loading_vehicles.begin(); iter != st->loading_vehicles.end();) { Vehicle *v = *iter; @@ -1672,8 +1625,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_69)) { /* In some old savegames a bit was cleared when it should not be cleared */ - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->state == 250 || rv->state == 251) { SetBit(rv->state, 2); } @@ -1682,8 +1634,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_70)) { /* Added variables to support newindustries */ - Industry *i; - FOR_ALL_INDUSTRIES(i) i->founder = OWNER_NONE; + for (Industry *i : Industry::Iterate()) i->founder = OWNER_NONE; } /* From version 82, old style canals (above sealevel (0), WATER owner) are no longer supported. @@ -1714,8 +1665,7 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_74)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID c = 0; c < NUM_CARGO; c++) { st->goods[c].last_speed = 0; if (st->goods[c].cargo.AvailableCount() != 0) SetBit(st->goods[c].status, GoodsEntry::GES_RATING); @@ -1724,9 +1674,8 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_78)) { - Industry *i; uint j; - FOR_ALL_INDUSTRIES(i) { + for (Industry * i : Industry::Iterate()) { const IndustrySpec *indsp = GetIndustrySpec(i->type); for (j = 0; j < lengthof(i->produced_cargo); j++) { i->produced_cargo[j] = indsp->produced_cargo[j]; @@ -1753,11 +1702,9 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_93)) { /* Rework of orders. */ - Order *order; - FOR_ALL_ORDERS(order) order->ConvertFromOldSavegame(); + for (Order *order : Order::Iterate()) order->ConvertFromOldSavegame(); - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->orders.list != nullptr && v->orders.list->GetFirstOrder() != nullptr && v->orders.list->GetFirstOrder()->IsType(OT_NOTHING)) { v->orders.list->FreeChain(); v->orders.list = nullptr; @@ -1765,21 +1712,20 @@ bool AfterLoadGame() v->current_order.ConvertFromOldSavegame(); if (v->type == VEH_ROAD && v->IsPrimaryVehicle() && v->FirstShared() == v) { + Order* order; FOR_VEHICLE_ORDERS(v, order) order->SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS); } } } else if (IsSavegameVersionBefore(SLV_94)) { /* Unload and transfer are now mutual exclusive. */ - Order *order; - FOR_ALL_ORDERS(order) { + for (Order *order : Order::Iterate()) { if ((order->GetUnloadType() & (OUFB_UNLOAD | OUFB_TRANSFER)) == (OUFB_UNLOAD | OUFB_TRANSFER)) { order->SetUnloadType(OUFB_TRANSFER); order->SetLoadType(OLFB_NO_LOAD); } } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if ((v->current_order.GetUnloadType() & (OUFB_UNLOAD | OUFB_TRANSFER)) == (OUFB_UNLOAD | OUFB_TRANSFER)) { v->current_order.SetUnloadType(OUFB_TRANSFER); v->current_order.SetLoadType(OLFB_NO_LOAD); @@ -1794,7 +1740,7 @@ bool AfterLoadGame() * *really* old revisions of OTTD; else it is already set in InitializeCompanies()) * 2) shares that are owned by inactive companies or self * (caused by cheating clients in earlier revisions) */ - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { for (uint i = 0; i < 4; i++) { CompanyID company = c->share_owners[i]; if (company == INVALID_COMPANY) continue; @@ -1928,8 +1874,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_88)) { /* Profits are now with 8 bit fract */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { v->profit_this_year <<= 8; v->profit_last_year <<= 8; v->running_ticks = 0; @@ -1950,8 +1895,7 @@ bool AfterLoadGame() GroupStatistics::UpdateAfterLoad(); // Ensure statistics pool is initialised before trying to delete vehicles /* Remove all trams from savegames without tram support. * There would be trams without tram track under causing crashes sooner or later. */ - RoadVehicle *v; - FOR_ALL_ROADVEHICLES(v) { + for (RoadVehicle *v : RoadVehicle::Iterate()) { if (v->First() == v && HasBit(EngInfo(v->engine_type)->misc_flags, EF_ROAD_TRAM)) { ShowErrorMessage(STR_WARNING_LOADGAME_REMOVED_TRAMS, INVALID_STRING_ID, WL_CRITICAL); delete v; @@ -2022,8 +1966,7 @@ bool AfterLoadGame() /* Reserve all tracks trains are currently on. */ if (IsSavegameVersionBefore(SLV_101)) { - const Train *t; - FOR_ALL_TRAINS(t) { + for (const Train *t : Train::Iterate()) { if (t->First() == t) t->ReserveTrackUnderConsist(); } } @@ -2040,22 +1983,19 @@ bool AfterLoadGame() UpdateNearestTownForRoadTiles(false); /* signs with invalid owner left from older savegames */ - Sign *si; - FOR_ALL_SIGNS(si) { + for (Sign *si : Sign::Iterate()) { if (si->owner != OWNER_NONE && !Company::IsValidID(si->owner)) si->owner = OWNER_NONE; } /* Station can get named based on an industry type, but the current ones * are not, so mark them as if they are not named by an industry. */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { st->indtype = IT_INVALID; } } if (IsSavegameVersionBefore(SLV_104)) { - Aircraft *a; - FOR_ALL_AIRCRAFT(a) { + for (Aircraft *a : Aircraft::Iterate()) { /* Set engine_type of shadow and rotor */ if (!a->IsNormalAircraft()) { a->engine_type = a->First()->engine_type; @@ -2063,18 +2003,15 @@ bool AfterLoadGame() } /* More companies ... */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { if (c->bankrupt_asked == 0xFF) c->bankrupt_asked = 0xFFFF; } - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { if (e->company_avail == 0xFF) e->company_avail = 0xFFFF; } - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { if (t->have_ratings == 0xFF) t->have_ratings = 0xFFFF; for (uint i = 8; i != MAX_COMPANIES; i++) t->ratings[i] = RATING_INITIAL; } @@ -2163,8 +2100,7 @@ bool AfterLoadGame() /* Initialize layout of all towns. Older versions were using different * generator for random town layout, use it if needed. */ - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { if (_settings_game.economy.town_layout != TL_RANDOM) { t->layout = _settings_game.economy.town_layout; continue; @@ -2185,32 +2121,28 @@ bool AfterLoadGame() /* There could be (deleted) stations with invalid owner, set owner to OWNER NONE. * The conversion affects oil rigs and buoys too, but it doesn't matter as * they have st->owner == OWNER_NONE already. */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (!Company::IsValidID(st->owner)) st->owner = OWNER_NONE; } } /* Trains could now stop in a specific location. */ if (IsSavegameVersionBefore(SLV_117)) { - Order *o; - FOR_ALL_ORDERS(o) { + for (Order *o : Order::Iterate()) { if (o->IsType(OT_GOTO_STATION)) o->SetStopLocation(OSL_PLATFORM_FAR_END); } } if (IsSavegameVersionBefore(SLV_120)) { extern VehicleDefaultSettings _old_vds; - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->settings.vehicle = _old_vds; } } if (IsSavegameVersionBefore(SLV_121)) { /* Delete small ufos heading for non-existing vehicles */ - Vehicle *v; - FOR_ALL_DISASTERVEHICLES(v) { + for (Vehicle *v : DisasterVehicle::Iterate()) { if (v->subtype == 2 /* ST_SMALL_UFO */ && v->current_order.GetDestination() != 0) { const Vehicle *u = Vehicle::GetIfValid(v->dest_tile); if (u == nullptr || u->type != VEH_ROAD || !RoadVehicle::From(u)->IsFrontEngine()) { @@ -2225,8 +2157,7 @@ bool AfterLoadGame() * However, some 0.7 versions might have cargo payment. For those we just * add cargopayment for the vehicles that don't have it. */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { std::list::iterator iter; for (iter = st->loading_vehicles.begin(); iter != st->loading_vehicles.end(); ++iter) { /* There are always as many CargoPayments as Vehicles. We need to make the @@ -2264,8 +2195,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_124) && !IsSavegameVersionBefore(SLV_1)) { /* The train station tile area was added, but for really old (TTDPatch) it's already valid. */ - Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { if (wp->facilities & FACIL_TRAIN) { wp->train_station.tile = wp->xy; wp->train_station.w = 1; @@ -2280,8 +2210,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_125)) { /* Convert old subsidies */ - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { if (s->remaining < 12) { /* Converting nonawarded subsidy */ s->remaining = 12 - s->remaining; // convert "age" to "remaining" @@ -2357,8 +2286,7 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_128)) { - const Depot *d; - FOR_ALL_DEPOTS(d) { + for (const Depot *d : Depot::Iterate()) { /* At some point, invalid depots were saved into the game (possibly those removed in the past?) * Remove them here, so they don't cause issues further down the line */ if (!IsDepotTile(d->xy)) { @@ -2375,8 +2303,7 @@ bool AfterLoadGame() /* The behaviour of force_proceed has been changed. Now * it counts signals instead of some random time out. */ if (IsSavegameVersionBefore(SLV_131)) { - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (t->force_proceed != TFP_NONE) { t->force_proceed = TFP_STUCK; } @@ -2406,13 +2333,11 @@ bool AfterLoadGame() /* Wait counter and load/unload ticks got split. */ if (IsSavegameVersionBefore(SLV_136)) { - Aircraft *a; - FOR_ALL_AIRCRAFT(a) { + for (Aircraft *a : Aircraft::Iterate()) { a->turn_counter = a->current_order.IsType(OT_LOADING) ? 0 : a->load_unload_ticks; } - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { t->wait_counter = t->current_order.IsType(OT_LOADING) ? 0 : t->load_unload_ticks; } } @@ -2455,8 +2380,7 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_140)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->airport.tile != INVALID_TILE) { st->airport.w = st->airport.GetSpec()->size_x; st->airport.h = st->airport.GetSpec()->size_y; @@ -2473,15 +2397,13 @@ bool AfterLoadGame() /* We need to properly number/name the depots. * The first step is making sure none of the depots uses the * 'default' names, after that we can assign the names. */ - Depot *d; - FOR_ALL_DEPOTS(d) d->town_cn = UINT16_MAX; + for (Depot *d : Depot::Iterate()) d->town_cn = UINT16_MAX; - FOR_ALL_DEPOTS(d) MakeDefaultName(d); + for (Depot* d : Depot::Iterate()) MakeDefaultName(d); } if (IsSavegameVersionBefore(SLV_142)) { - Depot *d; - FOR_ALL_DEPOTS(d) d->build_date = _date; + for (Depot *d : Depot::Iterate()) d->build_date = _date; } /* In old versions it was possible to remove an airport while a plane was @@ -2490,8 +2412,7 @@ bool AfterLoadGame() * For old savegames with such aircraft we just throw them in the air and * treat the aircraft like they were flying already. */ if (IsSavegameVersionBefore(SLV_146)) { - Aircraft *v; - FOR_ALL_AIRCRAFT(v) { + for (Aircraft *v : Aircraft::Iterate()) { if (!v->IsNormalAircraft()) continue; Station *st = GetTargetAirportIfValid(v); if (st == nullptr && v->state != FLYING) { @@ -2541,8 +2462,7 @@ bool AfterLoadGame() /* Add (random) colour to all objects. */ if (IsSavegameVersionBefore(SLV_148)) { - Object *o; - FOR_ALL_OBJECTS(o) { + for (Object *o : Object::Iterate()) { Owner owner = GetTileOwner(o->location.tile); o->colour = (owner == OWNER_NONE) ? Random() & 0xF : Company::Get(owner)->livery->colour1; } @@ -2560,12 +2480,11 @@ bool AfterLoadGame() * renumber those. First set all affected waypoints to the * highest possible number to get them numbered in the * order they have in the pool. */ - Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { if (wp->name != nullptr) wp->town_cn = UINT16_MAX; } - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint* wp : Waypoint::Iterate()) { if (wp->name != nullptr) MakeDefaultName(wp); } } @@ -2576,8 +2495,7 @@ bool AfterLoadGame() /* The moment vehicles go from hidden to visible changed. This means * that vehicles don't always get visible anymore causing things to * get messed up just after loading the savegame. This fixes that. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { /* Not all vehicle types can be inside a tunnel. Furthermore, * testing IsTunnelTile() for invalid tiles causes a crash. */ if (!v->IsGroundVehicle()) continue; @@ -2640,8 +2558,7 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_153)) { - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->state == RVSB_IN_DEPOT || rv->state == RVSB_WORMHOLE) continue; bool loading = rv->current_order.IsType(OT_LOADING) || rv->current_order.IsType(OT_LEAVESTATION); @@ -2656,8 +2573,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_156)) { /* The train's pathfinder lost flag got moved. */ - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (!HasBit(t->flags, 5)) continue; ClrBit(t->flags, 5); @@ -2665,16 +2581,14 @@ bool AfterLoadGame() } /* Introduced terraform/clear limits. */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->terraform_limit = _settings_game.construction.terraform_frame_burst << 16; c->clear_limit = _settings_game.construction.clear_frame_burst << 16; } } if (IsSavegameVersionBefore(SLV_158)) { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { switch (v->type) { case VEH_TRAIN: { Train *t = Train::From(v); @@ -2758,7 +2672,7 @@ bool AfterLoadGame() } /* Fill Vehicle::cur_real_order_index */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (!v->IsPrimaryVehicle()) continue; /* Older versions are less strict with indices being in range and fix them on the fly */ @@ -2778,8 +2692,7 @@ bool AfterLoadGame() * will keep reversing disabled, otherwise it'll be turned on. */ _settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(SLV_100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255); - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { _settings_game.vehicle.max_train_length = max(_settings_game.vehicle.max_train_length, CeilDiv(t->gcache.cached_total_length, TILE_SIZE)); } } @@ -2796,8 +2709,7 @@ bool AfterLoadGame() /* Before savegame version 161, persistent storages were not stored in a pool. */ if (!IsSavegameVersionBefore(SLV_76)) { - Industry *ind; - FOR_ALL_INDUSTRIES(ind) { + for (Industry *ind : Industry::Iterate()) { assert(ind->psa != nullptr); /* Check if the old storage was empty. */ @@ -2819,8 +2731,7 @@ bool AfterLoadGame() } if (!IsSavegameVersionBefore(SLV_145)) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (!(st->facilities & FACIL_AIRPORT)) continue; assert(st->airport.psa != nullptr); @@ -2871,9 +2782,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_164)) FixupTrainLengths(); if (IsSavegameVersionBefore(SLV_165)) { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { /* Set the default cargo requirement for town growth */ switch (_settings_game.game_creation.landscape) { case LT_ARCTIC: @@ -2907,8 +2816,7 @@ bool AfterLoadGame() Town::Get(GetTownIndex(t))->cargo_accepted.Add(t); } - Town *town; - FOR_ALL_TOWNS(town) { + for (Town *town : Town::Iterate()) { UpdateTownCargoes(town); } } @@ -2925,8 +2833,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_175)) { /* Introduced tree planting limit. */ - Company *c; - FOR_ALL_COMPANIES(c) c->tree_limit = _settings_game.construction.tree_frame_burst << 16; + for (Company *c : Company::Iterate()) c->tree_limit = _settings_game.construction.tree_frame_burst << 16; } if (IsSavegameVersionBefore(SLV_177)) { @@ -2935,7 +2842,7 @@ bool AfterLoadGame() if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION; /* We have to convert the quarters of bankruptcy into months of bankruptcy */ - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->months_of_bankruptcy = 3 * c->months_of_bankruptcy; } } @@ -2947,9 +2854,8 @@ bool AfterLoadGame() } if (IsSavegameVersionBefore(SLV_182)) { - Aircraft *v; /* Aircraft acceleration variable was bonkers */ - FOR_ALL_AIRCRAFT(v) { + for (Aircraft *v : Aircraft::Iterate()) { if (v->subtype <= AIR_AIRCRAFT) { const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); v->acceleration = avi->acceleration; @@ -2993,10 +2899,9 @@ bool AfterLoadGame() * Now they have the same length, but that means that trailing articulated parts will * take longer to go through the curve than the parts in front which already left the courve. * So, make articulated parts catch up. */ - RoadVehicle *v; bool roadside = _settings_game.vehicle.road_side == 1; std::vector skip_frames; - FOR_ALL_ROADVEHICLES(v) { + for (RoadVehicle *v : RoadVehicle::Iterate()) { if (!v->IsFrontEngine()) continue; skip_frames.clear(); TileIndex prev_tile = v->tile; @@ -3059,8 +2964,7 @@ bool AfterLoadGame() #ifndef DEBUG_DUMP_COMMANDS /* Note: We cannot use CleanPool since that skips part of the destructor * and then leaks un-reachable Orders in the order pool. */ - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { delete ob; } #endif @@ -3068,8 +2972,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_198)) { /* Convert towns growth_rate and grow_counter to ticks */ - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { /* 0x8000 = TOWN_GROWTH_RATE_CUSTOM previously */ if (t->growth_rate & 0x8000) SetBit(t->flags, TOWN_CUSTOM_GROWTH); if (t->growth_rate != TOWN_GROWTH_RATE_NONE) { @@ -3082,8 +2985,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_EXTEND_INDUSTRY_CARGO_SLOTS)) { /* Make sure added industry cargo slots are cleared */ - Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { for (size_t ci = 2; ci < lengthof(i->produced_cargo); ci++) { i->produced_cargo[ci] = CT_INVALID; i->produced_cargo_waiting[ci] = 0; @@ -3112,8 +3014,7 @@ bool AfterLoadGame() if (IsSavegameVersionBefore(SLV_SHIPS_STOP_IN_LOCKS)) { /* Move ships from lock slope to upper or lower position. */ - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { /* Suitable tile? */ if (!IsTileType(s->tile, MP_WATER) || !IsLock(s->tile) || GetLockPart(s->tile) != LOCK_PART_MIDDLE) continue; @@ -3156,8 +3057,7 @@ bool AfterLoadGame() _settings_game.station.serve_neutral_industries = true; /* Link oil rigs to their industry and back. */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (IsTileType(st->xy, MP_STATION) && IsOilRig(st->xy)) { /* Industry tile is always adjacent during construction by TileDiffXY(0, 1) */ st->industry = Industry::GetByTile(st->xy + TileDiffXY(0, 1)); @@ -3166,8 +3066,7 @@ bool AfterLoadGame() } } else { /* Link neutral station back to industry, as this is not saved. */ - Industry *ind; - FOR_ALL_INDUSTRIES(ind) if (ind->neutral_station != nullptr) ind->neutral_station->industry = ind; + for (Industry *ind : Industry::Iterate()) if (ind->neutral_station != nullptr) ind->neutral_station->industry = ind; } if (IsSavegameVersionBefore(SLV_TREES_WATER_CLASS)) { @@ -3192,8 +3091,7 @@ bool AfterLoadGame() } /* Scan for docking tiles */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->ship_station.tile != INVALID_TILE) UpdateStationDockingTiles(st); } } @@ -3203,8 +3101,7 @@ bool AfterLoadGame() /* Station acceptance is some kind of cache */ if (IsSavegameVersionBefore(SLV_127)) { - Station *st; - FOR_ALL_STATIONS(st) UpdateStationAcceptance(st, false); + for (Station *st : Station::Iterate()) UpdateStationAcceptance(st, false); } /* Road stops is 'only' updating some caches */ diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp index 336c773d50..9b58aea11c 100644 --- a/src/saveload/ai_sl.cpp +++ b/src/saveload/ai_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/airport_sl.cpp b/src/saveload/airport_sl.cpp index ef207bacb1..a7470d268f 100644 --- a/src/saveload/airport_sl.cpp +++ b/src/saveload/airport_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/animated_tile_sl.cpp b/src/saveload/animated_tile_sl.cpp index aab06f6670..9f03e598d7 100644 --- a/src/saveload/animated_tile_sl.cpp +++ b/src/saveload/animated_tile_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/autoreplace_sl.cpp b/src/saveload/autoreplace_sl.cpp index 6493b6f452..88f925cc5d 100644 --- a/src/saveload/autoreplace_sl.cpp +++ b/src/saveload/autoreplace_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -28,9 +26,7 @@ static const SaveLoad _engine_renew_desc[] = { static void Save_ERNW() { - EngineRenew *er; - - FOR_ALL_ENGINE_RENEWS(er) { + for (EngineRenew *er : EngineRenew::Iterate()) { SlSetArrayIndex(er->index); SlObject(er, _engine_renew_desc); } @@ -55,9 +51,7 @@ static void Load_ERNW() static void Ptrs_ERNW() { - EngineRenew *er; - - FOR_ALL_ENGINE_RENEWS(er) { + for (EngineRenew *er : EngineRenew::Iterate()) { SlObject(er, _engine_renew_desc); } } diff --git a/src/saveload/cargomonitor_sl.cpp b/src/saveload/cargomonitor_sl.cpp index 97acc435e1..75f081eb25 100644 --- a/src/saveload/cargomonitor_sl.cpp +++ b/src/saveload/cargomonitor_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp index 51cdf1cf16..e9476fd4b1 100644 --- a/src/saveload/cargopacket_sl.cpp +++ b/src/saveload/cargopacket_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -23,14 +21,13 @@ /* static */ void CargoPacket::AfterLoad() { if (IsSavegameVersionBefore(SLV_44)) { - Vehicle *v; /* If we remove a station while cargo from it is still en route, payment calculation will assume * 0, 0 to be the source of the cargo, resulting in very high payments usually. v->source_xy * stores the coordinates, preserving them even if the station is removed. However, if a game is loaded * where this situation exists, the cargo-source information is lost. in this case, we set the source * to the current tile of the vehicle to prevent excessive profits */ - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { const CargoPacketList *packets = v->cargo.Packets(); for (VehicleCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) { CargoPacket *cp = *it; @@ -44,8 +41,7 @@ * station where the goods came from is already removed, the source * information is lost. In that case we set it to the position of this * station */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID c = 0; c < NUM_CARGO; c++) { GoodsEntry *ge = &st->goods[c]; @@ -61,8 +57,7 @@ if (IsSavegameVersionBefore(SLV_120)) { /* CargoPacket's source should be either INVALID_STATION or a valid station */ - CargoPacket *cp; - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { if (!Station::IsValidID(cp->source)) cp->source = INVALID_STATION; } } @@ -71,18 +66,15 @@ /* Only since version 68 we have cargo packets. Savegames from before used * 'new CargoPacket' + cargolist.Append so their caches are already * correct and do not need rebuilding. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) v->cargo.InvalidateCache(); + for (Vehicle *v : Vehicle::Iterate()) v->cargo.InvalidateCache(); - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID c = 0; c < NUM_CARGO; c++) st->goods[c].cargo.InvalidateCache(); } } if (IsSavegameVersionBefore(SLV_181)) { - Vehicle *v; - FOR_ALL_VEHICLES(v) v->cargo.KeepAll(); + for (Vehicle *v : Vehicle::Iterate()) v->cargo.KeepAll(); } } @@ -116,9 +108,7 @@ const SaveLoad *GetCargoPacketDesc() */ static void Save_CAPA() { - CargoPacket *cp; - - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { SlSetArrayIndex(cp->index); SlObject(cp, GetCargoPacketDesc()); } diff --git a/src/saveload/cheat_sl.cpp b/src/saveload/cheat_sl.cpp index e7b4735a9e..9af1759221 100644 --- a/src/saveload/cheat_sl.cpp +++ b/src/saveload/cheat_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp index f934848e9d..5b9266c7b4 100644 --- a/src/saveload/company_sl.cpp +++ b/src/saveload/company_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -96,17 +94,16 @@ CompanyManagerFace ConvertFromOldCompanyManagerFace(uint32 face) void AfterLoadCompanyStats() { /* Reset infrastructure statistics to zero. */ - Company *c; - FOR_ALL_COMPANIES(c) MemSetT(&c->infrastructure, 0); + for (Company *c : Company::Iterate()) MemSetT(&c->infrastructure, 0); /* Collect airport count. */ - Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if ((st->facilities & FACIL_AIRPORT) && Company::IsValidID(st->owner)) { Company::Get(st->owner)->infrastructure.airport++; } } + Company *c; for (TileIndex tile = 0; tile < MapSize(); tile++) { switch (GetTileType(tile)) { case MP_RAILWAY: @@ -488,8 +485,7 @@ static void SaveLoad_PLYR(Company *c) static void Save_PLYR() { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { SlSetArrayIndex(c->index); SlAutolength((AutolengthProc*)SaveLoad_PLYR, c); } @@ -536,8 +532,7 @@ static void Check_PLYR() static void Ptrs_PLYR() { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { SlObject(c, _company_settings_desc); } } diff --git a/src/saveload/depot_sl.cpp b/src/saveload/depot_sl.cpp index 74559f9237..eb4b9384bc 100644 --- a/src/saveload/depot_sl.cpp +++ b/src/saveload/depot_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -32,9 +30,7 @@ static const SaveLoad _depot_desc[] = { static void Save_DEPT() { - Depot *depot; - - FOR_ALL_DEPOTS(depot) { + for (Depot *depot : Depot::Iterate()) { SlSetArrayIndex(depot->index); SlObject(depot, _depot_desc); } @@ -55,9 +51,7 @@ static void Load_DEPT() static void Ptrs_DEPT() { - Depot *depot; - - FOR_ALL_DEPOTS(depot) { + for (Depot *depot : Depot::Iterate()) { SlObject(depot, _depot_desc); if (IsSavegameVersionBefore(SLV_141)) depot->town = Town::Get((size_t)depot->town); } diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp index 754d07ebdc..637d2529c6 100644 --- a/src/saveload/economy_sl.cpp +++ b/src/saveload/economy_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -74,8 +72,7 @@ static const SaveLoad _cargopayment_desc[] = { static void Save_CAPY() { - CargoPayment *cp; - FOR_ALL_CARGO_PAYMENTS(cp) { + for (CargoPayment *cp : CargoPayment::Iterate()) { SlSetArrayIndex(cp->index); SlObject(cp, _cargopayment_desc); } @@ -93,8 +90,7 @@ static void Load_CAPY() static void Ptrs_CAPY() { - CargoPayment *cp; - FOR_ALL_CARGO_PAYMENTS(cp) { + for (CargoPayment *cp : CargoPayment::Iterate()) { SlObject(cp, _cargopayment_desc); } } diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp index f4c017bb16..4ba38d04bb 100644 --- a/src/saveload/engine_sl.cpp +++ b/src/saveload/engine_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -88,8 +86,7 @@ Engine *GetTempDataEngine(EngineID index) static void Save_ENGN() { - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { SlSetArrayIndex(e->index); SlObject(e, _engine_desc); } @@ -120,8 +117,7 @@ static void Load_ENGN() */ void CopyTempEngineData() { - Engine *e; - FOR_ALL_ENGINES(e) { + for (Engine *e : Engine::Iterate()) { if (e->index >= _temp_engine.size()) break; const Engine *se = GetTempDataEngine(e->index); diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp index 3602f0f29b..28a6c6c11a 100644 --- a/src/saveload/game_sl.cpp +++ b/src/saveload/game_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/gamelog_sl.cpp b/src/saveload/gamelog_sl.cpp index 812d716ecf..576bfa5bc7 100644 --- a/src/saveload/gamelog_sl.cpp +++ b/src/saveload/gamelog_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/goal_sl.cpp b/src/saveload/goal_sl.cpp index b636dcf6a2..4ee9f39ebe 100644 --- a/src/saveload/goal_sl.cpp +++ b/src/saveload/goal_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -28,8 +26,7 @@ static const SaveLoad _goals_desc[] = { static void Save_GOAL() { - Goal *s; - FOR_ALL_GOALS(s) { + for (Goal *s : Goal::Iterate()) { SlSetArrayIndex(s->index); SlObject(s, _goals_desc); } diff --git a/src/saveload/group_sl.cpp b/src/saveload/group_sl.cpp index e431401328..33c63ee44f 100644 --- a/src/saveload/group_sl.cpp +++ b/src/saveload/group_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -33,9 +31,7 @@ static const SaveLoad _group_desc[] = { static void Save_GRPS() { - Group *g; - - FOR_ALL_GROUPS(g) { + for (Group *g : Group::Iterate()) { SlSetArrayIndex(g->index); SlObject(g, _group_desc); } diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index 34fa14542f..f5b1464c1e 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -79,10 +77,8 @@ static const SaveLoad _industry_desc[] = { static void Save_INDY() { - Industry *ind; - /* Write the industries */ - FOR_ALL_INDUSTRIES(ind) { + for (Industry *ind : Industry::Iterate()) { SlSetArrayIndex(ind->index); SlObject(ind, _industry_desc); } @@ -131,9 +127,7 @@ static void Load_TIDS() static void Ptrs_INDY() { - Industry *i; - - FOR_ALL_INDUSTRIES(i) { + for (Industry *i : Industry::Iterate()) { SlObject(i, _industry_desc); } } diff --git a/src/saveload/labelmaps_sl.cpp b/src/saveload/labelmaps_sl.cpp index 6236e190e1..472a328810 100644 --- a/src/saveload/labelmaps_sl.cpp +++ b/src/saveload/labelmaps_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp index 0280cb1f69..29b685cf7d 100644 --- a/src/saveload/linkgraph_sl.cpp +++ b/src/saveload/linkgraph_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -230,17 +228,15 @@ static void Load_LGRS() void AfterLoadLinkGraphs() { if (IsSavegameVersionBefore(SLV_191)) { - LinkGraph *lg; - FOR_ALL_LINK_GRAPHS(lg) { + for (LinkGraph *lg : LinkGraph::Iterate()) { for (NodeID node_id = 0; node_id < lg->Size(); ++node_id) { const Station *st = Station::GetIfValid((*lg)[node_id].Station()); if (st != nullptr) (*lg)[node_id].UpdateLocation(st->xy); } } - LinkGraphJob *lgj; - FOR_ALL_LINK_GRAPH_JOBS(lgj) { - lg = &(const_cast(lgj->Graph())); + for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) { + LinkGraph *lg = &(const_cast(lgj->Graph())); for (NodeID node_id = 0; node_id < lg->Size(); ++node_id) { const Station *st = Station::GetIfValid((*lg)[node_id].Station()); if (st != nullptr) (*lg)[node_id].UpdateLocation(st->xy); @@ -256,8 +252,7 @@ void AfterLoadLinkGraphs() */ static void Save_LGRP() { - LinkGraph *lg; - FOR_ALL_LINK_GRAPHS(lg) { + for (LinkGraph *lg : LinkGraph::Iterate()) { SlSetArrayIndex(lg->index); SlAutolength((AutolengthProc*)DoSave_LGRP, lg); } @@ -268,8 +263,7 @@ static void Save_LGRP() */ static void Save_LGRJ() { - LinkGraphJob *lgj; - FOR_ALL_LINK_GRAPH_JOBS(lgj) { + for (LinkGraphJob *lgj : LinkGraphJob::Iterate()) { SlSetArrayIndex(lgj->index); SlAutolength((AutolengthProc*)DoSave_LGRJ, lgj); } diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp index a857d5b15a..51c56684a9 100644 --- a/src/saveload/map_sl.cpp +++ b/src/saveload/map_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index 4a9b05a461..7ef4e3018e 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/newgrf_sl.cpp b/src/saveload/newgrf_sl.cpp index 2f7dfb3568..b2d2b0df99 100644 --- a/src/saveload/newgrf_sl.cpp +++ b/src/saveload/newgrf_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/newgrf_sl.h b/src/saveload/newgrf_sl.h index c0714d65d6..191046de25 100644 --- a/src/saveload/newgrf_sl.h +++ b/src/saveload/newgrf_sl.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/object_sl.cpp b/src/saveload/object_sl.cpp index 7d7f2fde9e..2c385b6552 100644 --- a/src/saveload/object_sl.cpp +++ b/src/saveload/object_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -33,10 +31,8 @@ static const SaveLoad _object_desc[] = { static void Save_OBJS() { - Object *o; - /* Write the objects */ - FOR_ALL_OBJECTS(o) { + for (Object *o : Object::Iterate()) { SlSetArrayIndex(o->index); SlObject(o, _object_desc); } @@ -53,8 +49,7 @@ static void Load_OBJS() static void Ptrs_OBJS() { - Object *o; - FOR_ALL_OBJECTS(o) { + for (Object *o : Object::Iterate()) { SlObject(o, _object_desc); if (IsSavegameVersionBefore(SLV_148) && !IsTileType(o->location.tile, MP_OBJECT)) { /* Due to a small bug stale objects could remain. */ diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index 11eb058fad..5dac33777d 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/oldloader.h b/src/saveload/oldloader.h index 12d8a348e5..fcc7be4be0 100644 --- a/src/saveload/oldloader.h +++ b/src/saveload/oldloader.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 2287d30a19..659216c0c8 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -111,8 +109,7 @@ static void FixTTDMapArray() static void FixTTDDepots() { - const Depot *d; - FOR_ALL_DEPOTS_FROM(d, 252) { + for (const Depot *d : Depot::Iterate(252)) { if (!IsDepotTile(d->xy) || GetDepotIndex(d->xy) != d->index) { /** Workaround for SVXConverter bug, depots 252-255 could be invalid */ delete d; @@ -155,10 +152,8 @@ static uint32 RemapOldTownName(uint32 townnameparts, byte old_town_name_type) static void FixOldTowns() { - Town *town; - /* Convert town-names if needed */ - FOR_ALL_TOWNS(town) { + for (Town *town : Town::Iterate()) { if (IsInsideMM(town->townnametype, 0x20C1, 0x20C3)) { town->townnametype = SPECSTR_TOWNNAME_ENGLISH + _settings_game.game_creation.town_name; town->townnameparts = RemapOldTownName(town->townnameparts, _settings_game.game_creation.town_name); @@ -175,9 +170,7 @@ static StringID *_old_vehicle_names; */ void FixOldVehicles() { - Vehicle *v; - - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if ((size_t)v->next == 0xFFFF) { v->next = nullptr; } else { @@ -387,8 +380,7 @@ static bool FixTTOEngines() 233, 234, 235, 236, 237, 238, 253 }; - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->engine_type >= lengthof(tto_to_ttd)) return false; v->engine_type = tto_to_ttd[v->engine_type]; } @@ -461,8 +453,7 @@ static bool FixTTOEngines() static void FixTTOCompanies() { - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { c->cur_economy.company_value = CalculateCompanyValue(c); // company value history is zeroed } } diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp index c21782de51..0a9fa2a8cc 100644 --- a/src/saveload/order_sl.cpp +++ b/src/saveload/order_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -125,9 +123,7 @@ const SaveLoad *GetOrderDescription() static void Save_ORDR() { - Order *order; - - FOR_ALL_ORDERS(order) { + for (Order *order : Order::Iterate()) { SlSetArrayIndex(order->index); SlObject(order, GetOrderDescription()); } @@ -168,8 +164,8 @@ static void Load_ORDR() } /* Update all the next pointer */ - Order *o; - FOR_ALL_ORDERS(o) { + for (Order *o : Order::Iterate()) { + size_t order_index = o->index; /* Delete invalid orders */ if (o->IsType(OT_NOTHING)) { delete o; @@ -199,9 +195,7 @@ static void Ptrs_ORDR() /* Orders from old savegames have pointers corrected in Load_ORDR */ if (IsSavegameVersionBefore(SLV_5, 2)) return; - Order *o; - - FOR_ALL_ORDERS(o) { + for (Order *o : Order::Iterate()) { SlObject(o, GetOrderDescription()); } } @@ -218,9 +212,7 @@ const SaveLoad *GetOrderListDescription() static void Save_ORDL() { - OrderList *list; - - FOR_ALL_ORDER_LISTS(list) { + for (OrderList *list : OrderList::Iterate()) { SlSetArrayIndex(list->index); SlObject(list, GetOrderListDescription()); } @@ -240,9 +232,7 @@ static void Load_ORDL() static void Ptrs_ORDL() { - OrderList *list; - - FOR_ALL_ORDER_LISTS(list) { + for (OrderList *list : OrderList::Iterate()) { SlObject(list, GetOrderListDescription()); } } @@ -279,8 +269,7 @@ static void Save_BKOR() * normal games this information isn't needed. */ if (!_networking || !_network_server) return; - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { SlSetArrayIndex(ob->index); SlObject(ob, GetOrderBackupDescription()); } @@ -299,8 +288,7 @@ void Load_BKOR() static void Ptrs_BKOR() { - OrderBackup *ob; - FOR_ALL_ORDER_BACKUPS(ob) { + for (OrderBackup *ob : OrderBackup::Iterate()) { SlObject(ob, GetOrderBackupDescription()); } } diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index aa8acddf17..d652f0d253 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -2818,8 +2816,7 @@ void GenerateDefaultSaveName(char *buf, const char *last) * 'Spectator' as "company" name. */ CompanyID cid = _local_company; if (!Company::IsValidID(cid)) { - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { cid = c->index; break; } diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index d80cc3be35..beecdc8c49 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/saveload_filter.h b/src/saveload/saveload_filter.h index ace9182d31..490daec872 100644 --- a/src/saveload/saveload_filter.h +++ b/src/saveload/saveload_filter.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/saveload_internal.h b/src/saveload/saveload_internal.h index e7a9e7bf5e..02cd90f69e 100644 --- a/src/saveload/saveload_internal.h +++ b/src/saveload/saveload_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp index f2ec21d944..0be96e9821 100644 --- a/src/saveload/signs_sl.cpp +++ b/src/saveload/signs_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -34,9 +32,7 @@ static const SaveLoad _sign_desc[] = { /** Save all signs */ static void Save_SIGN() { - Sign *si; - - FOR_ALL_SIGNS(si) { + for (Sign *si : Sign::Iterate()) { SlSetArrayIndex(si->index); SlObject(si, _sign_desc); } diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp index b9dcbd9e8e..1d3612ae31 100644 --- a/src/saveload/station_sl.cpp +++ b/src/saveload/station_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -42,16 +40,14 @@ static void UpdateWaypointOrder(Order *o) void MoveBuoysToWaypoints() { /* Buoy orders become waypoint orders */ - OrderList *ol; - FOR_ALL_ORDER_LISTS(ol) { + for (OrderList *ol : OrderList::Iterate()) { VehicleType vt = ol->GetFirstSharedVehicle()->type; if (vt != VEH_SHIP && vt != VEH_TRAIN) continue; for (Order *o = ol->GetFirstOrder(); o != nullptr; o = o->next) UpdateWaypointOrder(o); } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { VehicleType vt = v->type; if (vt != VEH_SHIP && vt != VEH_TRAIN) continue; @@ -59,8 +55,7 @@ void MoveBuoysToWaypoints() } /* Now make the stations waypoints */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if ((st->had_vehicle_of_type & HVOT_WAYPOINT) == 0) continue; StationID index = st->index; @@ -111,8 +106,7 @@ void MoveBuoysToWaypoints() void AfterLoadStations() { /* Update the speclists of all stations to point to the currently loaded custom stations. */ - BaseStation *st; - FOR_ALL_BASE_STATIONS(st) { + for (BaseStation *st : BaseStation::Iterate()) { for (uint i = 0; i < st->num_specs; i++) { if (st->speclist[i].grfid == 0) continue; @@ -135,12 +129,11 @@ void AfterLoadStations() void AfterLoadRoadStops() { /* First construct the drive through entries */ - RoadStop *rs; - FOR_ALL_ROADSTOPS(rs) { + for (RoadStop *rs : RoadStop::Iterate()) { if (IsDriveThroughStopTile(rs->xy)) rs->MakeDriveThrough(); } /* And then rebuild the data in those entries */ - FOR_ALL_ROADSTOPS(rs) { + for (RoadStop *rs : RoadStop::Iterate()) { if (!HasBit(rs->status, RoadStop::RSSFB_BASE_ENTRY)) continue; rs->GetEntry(DIAGDIR_NE)->Rebuild(rs); @@ -378,8 +371,7 @@ static void Ptrs_STNS() if (!IsSavegameVersionBefore(SLV_123)) return; uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (!IsSavegameVersionBefore(SLV_68)) { for (CargoID i = 0; i < num_cargo; i++) { GoodsEntry *ge = &st->goods[i]; @@ -516,9 +508,8 @@ static void RealSave_STNN(BaseStation *bst) static void Save_STNN() { - BaseStation *st; /* Write the stations */ - FOR_ALL_BASE_STATIONS(st) { + for (BaseStation *st : BaseStation::Iterate()) { SlSetArrayIndex(st->index); SlAutolength((AutolengthProc*)RealSave_STNN, st); } @@ -590,8 +581,7 @@ static void Ptrs_STNN() if (IsSavegameVersionBefore(SLV_123)) return; uint num_cargo = IsSavegameVersionBefore(SLV_EXTEND_CARGOTYPES) ? 32 : NUM_CARGO; - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID i = 0; i < num_cargo; i++) { GoodsEntry *ge = &st->goods[i]; if (IsSavegameVersionBefore(SLV_183)) { @@ -608,17 +598,14 @@ static void Ptrs_STNN() SlObject(st, _station_desc); } - Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { SlObject(wp, _waypoint_desc); } } static void Save_ROADSTOP() { - RoadStop *rs; - - FOR_ALL_ROADSTOPS(rs) { + for (RoadStop *rs : RoadStop::Iterate()) { SlSetArrayIndex(rs->index); SlObject(rs, _roadstop_desc); } @@ -637,8 +624,7 @@ static void Load_ROADSTOP() static void Ptrs_ROADSTOP() { - RoadStop *rs; - FOR_ALL_ROADSTOPS(rs) { + for (RoadStop *rs : RoadStop::Iterate()) { SlObject(rs, _roadstop_desc); } } diff --git a/src/saveload/storage_sl.cpp b/src/saveload/storage_sl.cpp index fafc35cb12..7abe396f38 100644 --- a/src/saveload/storage_sl.cpp +++ b/src/saveload/storage_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -38,10 +36,8 @@ static void Load_PSAC() /** Save persistent storage data. */ static void Save_PSAC() { - PersistentStorage *ps; - /* Write the industries */ - FOR_ALL_STORAGES(ps) { + for (PersistentStorage *ps : PersistentStorage::Iterate()) { ps->ClearChanges(); SlSetArrayIndex(ps->index); SlObject(ps, _storage_desc); diff --git a/src/saveload/story_sl.cpp b/src/saveload/story_sl.cpp index 11aba1347a..dba2a064f5 100644 --- a/src/saveload/story_sl.cpp +++ b/src/saveload/story_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -41,8 +39,7 @@ static const SaveLoad _story_page_elements_desc[] = { static void Save_STORY_PAGE_ELEMENT() { - StoryPageElement *s; - FOR_ALL_STORY_PAGE_ELEMENTS(s) { + for (StoryPageElement *s : StoryPageElement::Iterate()) { SlSetArrayIndex(s->index); SlObject(s, _story_page_elements_desc); } @@ -77,8 +74,7 @@ static const SaveLoad _story_pages_desc[] = { static void Save_STORY_PAGE() { - StoryPage *s; - FOR_ALL_STORY_PAGES(s) { + for (StoryPage *s : StoryPage::Iterate()) { SlSetArrayIndex(s->index); SlObject(s, _story_pages_desc); } diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp index 9c3f838a80..dce8fdedb7 100644 --- a/src/saveload/strings_sl.cpp +++ b/src/saveload/strings_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/saveload/subsidy_sl.cpp b/src/saveload/subsidy_sl.cpp index 536ec2145f..d0db78b61d 100644 --- a/src/saveload/subsidy_sl.cpp +++ b/src/saveload/subsidy_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -31,8 +29,7 @@ static const SaveLoad _subsidies_desc[] = { static void Save_SUBS() { - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { SlSetArrayIndex(s->index); SlObject(s, _subsidies_desc); } diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 771feadd89..6fe1439b4e 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -26,12 +24,11 @@ */ void RebuildTownCaches() { - Town *town; InitializeBuildingCounts(); RebuildTownKdtree(); /* Reset town population and num_houses */ - FOR_ALL_TOWNS(town) { + for (Town *town : Town::Iterate()) { town->cache.population = 0; town->cache.num_houses = 0; } @@ -40,7 +37,7 @@ void RebuildTownCaches() if (!IsTileType(t, MP_HOUSE)) continue; HouseID house_id = GetHouseType(t); - town = Town::GetByTile(t); + Town *town = Town::GetByTile(t); IncreaseBuildingCount(town, house_id); if (IsHouseCompleted(t)) town->cache.population += HouseSpec::Get(house_id)->population; @@ -49,7 +46,7 @@ void RebuildTownCaches() } /* Update the population and num_house dependent values */ - FOR_ALL_TOWNS(town) { + for (Town *town : Town::Iterate()) { UpdateTownRadius(town); UpdateTownCargoes(town); } @@ -265,9 +262,7 @@ static void RealSave_Town(Town *t) static void Save_TOWN() { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { SlSetArrayIndex(t->index); SlAutolength((AutolengthProc*)RealSave_Town, t); } @@ -313,8 +308,7 @@ static void Ptrs_TOWN() /* Don't run when savegame version lower than 161. */ if (IsSavegameVersionBefore(SLV_161)) return; - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { SlObject(t, _town_desc); } } diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index b08c1cb5ef..3569507c79 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -33,13 +31,11 @@ */ void ConnectMultiheadedTrains() { - Train *v; - - FOR_ALL_TRAINS(v) { + for (Train *v : Train::Iterate()) { v->other_multiheaded_part = nullptr; } - FOR_ALL_TRAINS(v) { + for (Train *v : Train::Iterate()) { if (v->IsFrontEngine() || v->IsFreeWagon()) { /* Two ways to associate multiheaded parts to each other: * sequential-matching: Trains shall be arranged to look like <..>..<..>..<..>.. @@ -113,10 +109,9 @@ void ConnectMultiheadedTrains() */ void ConvertOldMultiheadToNew() { - Train *t; - FOR_ALL_TRAINS(t) SetBit(t->subtype, 7); // indicates that it's the old format and needs to be converted in the next loop + for (Train *t : Train::Iterate()) SetBit(t->subtype, 7); // indicates that it's the old format and needs to be converted in the next loop - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (HasBit(t->subtype, 7) && ((t->subtype & ~0x80) == 0 || (t->subtype & ~0x80) == 4)) { for (Train *u = t; u != nullptr; u = u->Next()) { const RailVehicleInfo *rvi = RailVehInfo(u->engine_type); @@ -167,13 +162,11 @@ void ConvertOldMultiheadToNew() void UpdateOldAircraft() { /* set airport_flags to 0 for all airports just to be sure */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { st->airport.flags = 0; // reset airport } - Aircraft *a; - FOR_ALL_AIRCRAFT(a) { + for (Aircraft *a : Aircraft::Iterate()) { /* airplane has another vehicle with subtype 4 (shadow), helicopter also has 3 (rotor) * skip those */ if (a->IsNormalAircraft()) { @@ -218,14 +211,12 @@ static void CheckValidVehicles() size_t total_engines = Engine::GetPoolSize(); EngineID first_engine[4] = { INVALID_ENGINE, INVALID_ENGINE, INVALID_ENGINE, INVALID_ENGINE }; - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { first_engine[VEH_TRAIN] = e->index; break; } - FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) { first_engine[VEH_ROAD] = e->index; break; } - FOR_ALL_ENGINES_OF_TYPE(e, VEH_SHIP) { first_engine[VEH_SHIP] = e->index; break; } - FOR_ALL_ENGINES_OF_TYPE(e, VEH_AIRCRAFT) { first_engine[VEH_AIRCRAFT] = e->index; break; } + for (const Engine *e : Engine::IterateType(VEH_TRAIN)) { first_engine[VEH_TRAIN] = e->index; break; } + for (const Engine *e : Engine::IterateType(VEH_ROAD)) { first_engine[VEH_ROAD] = e->index; break; } + for (const Engine *e : Engine::IterateType(VEH_SHIP)) { first_engine[VEH_SHIP] = e->index; break; } + for (const Engine *e : Engine::IterateType(VEH_AIRCRAFT)) { first_engine[VEH_AIRCRAFT] = e->index; break; } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { /* Test if engine types match */ switch (v->type) { case VEH_TRAIN: @@ -248,9 +239,7 @@ extern byte _age_cargo_skip_counter; // From misc_sl.cpp /** Called after load to update coordinates */ void AfterLoadVehicles(bool part_of_load) { - Vehicle *v; - - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { /* Reinstate the previous pointer */ if (v->Next() != nullptr) v->Next()->previous = v; if (v->NextShared() != nullptr) v->NextShared()->previous_shared = v; @@ -271,7 +260,7 @@ void AfterLoadVehicles(bool part_of_load) */ std::map mapping; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->orders.old != nullptr) { if (IsSavegameVersionBefore(SLV_105)) { // Pre-105 didn't save an OrderList if (mapping[v->orders.old] == nullptr) { @@ -298,7 +287,7 @@ void AfterLoadVehicles(bool part_of_load) } } - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { /* Fill the first pointers */ if (v->Previous() == nullptr) { for (Vehicle *u = v; u != nullptr; u = u->Next()) { @@ -310,7 +299,7 @@ void AfterLoadVehicles(bool part_of_load) if (part_of_load) { if (IsSavegameVersionBefore(SLV_105)) { /* Before 105 there was no order for shared orders, thus it messed up horribly */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->First() != v || v->orders.list != nullptr || v->previous_shared != nullptr || v->next_shared == nullptr) continue; /* As above, allocating OrderList here is safe. */ @@ -324,8 +313,7 @@ void AfterLoadVehicles(bool part_of_load) if (IsSavegameVersionBefore(SLV_157)) { /* The road vehicle subtype was converted to a flag. */ - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->subtype == 0) { /* The road vehicle is at the front. */ rv->SetFrontEngine(); @@ -341,7 +329,7 @@ void AfterLoadVehicles(bool part_of_load) if (IsSavegameVersionBefore(SLV_160)) { /* In some old savegames there might be some "crap" stored. */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (!v->IsPrimaryVehicle() && v->type != VEH_DISASTER) { v->current_order.Free(); v->unitnumber = 0; @@ -351,14 +339,14 @@ void AfterLoadVehicles(bool part_of_load) if (IsSavegameVersionBefore(SLV_162)) { /* Set the vehicle-local cargo age counter from the old global counter. */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { v->cargo_age_counter = _age_cargo_skip_counter; } } if (IsSavegameVersionBefore(SLV_180)) { /* Set service interval flags */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (!v->IsPrimaryVehicle()) continue; const Company *c = Company::Get(v->owner); @@ -371,13 +359,11 @@ void AfterLoadVehicles(bool part_of_load) if (IsSavegameVersionBefore(SLV_SHIP_ROTATION)) { /* Ship rotation added */ - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { s->rotation = s->direction; } } else { - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { if (s->rotation == s->direction) continue; /* In case we are rotating on gameload, set the rotation position to * the current position, otherwise the applied workaround offset would @@ -391,7 +377,7 @@ void AfterLoadVehicles(bool part_of_load) CheckValidVehicles(); - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { assert(v->first != nullptr); v->trip_occupancy = CalcPercentVehicleFilled(v, nullptr); @@ -436,7 +422,7 @@ void AfterLoadVehicles(bool part_of_load) /* Stop non-front engines */ if (part_of_load && IsSavegameVersionBefore(SLV_112)) { - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->type == VEH_TRAIN) { Train *t = Train::From(v); if (!t->IsFrontEngine()) { @@ -454,7 +440,7 @@ void AfterLoadVehicles(bool part_of_load) } } - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { switch (v->type) { case VEH_ROAD: case VEH_TRAIN: @@ -498,8 +484,7 @@ void FixupTrainLengths() { /* Vehicle center was moved from 4 units behind the front to half the length * behind the front. Move vehicles so they end up on the same spot. */ - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->type == VEH_TRAIN && v->IsPrimaryVehicle()) { /* The vehicle center is now more to the front depending on vehicle length, * so we need to move all vehicles forward to cover the difference to the @@ -896,9 +881,8 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) /** Will be called when the vehicles need to be saved. */ static void Save_VEHS() { - Vehicle *v; /* Write the vehicles */ - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { SlSetArrayIndex(v->index); SlObject(v, GetVehicleDescription(v->type)); } @@ -955,8 +939,7 @@ void Load_VEHS() static void Ptrs_VEHS() { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { SlObject(v, GetVehicleDescription(v->type)); } } diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp index 70a1a27394..c0570f81d3 100644 --- a/src/saveload/waypoint_sl.cpp +++ b/src/saveload/waypoint_sl.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -132,15 +130,13 @@ void MoveWaypointsToBaseStations() } /* Update the orders of vehicles */ - OrderList *ol; - FOR_ALL_ORDER_LISTS(ol) { + for (OrderList *ol : OrderList::Iterate()) { if (ol->GetFirstSharedVehicle()->type != VEH_TRAIN) continue; for (Order *o = ol->GetFirstOrder(); o != nullptr; o = o->next) UpdateWaypointOrder(o); } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->type != VEH_TRAIN) continue; UpdateWaypointOrder(&v->current_order); diff --git a/src/screenshot.cpp b/src/screenshot.cpp index b2d7d21bd8..60196cdf07 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -317,8 +315,7 @@ static bool MakePNGImage(const char *name, ScreenshotCallback *callb, void *user p += seprintf(p, lastof(buf), " %s\n", c->filename); } p = strecpy(p, "\nCompanies:\n", lastof(buf)); - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (c->ai_info == nullptr) { p += seprintf(p, lastof(buf), "%2i: Human\n", (int)c->index); } else { diff --git a/src/screenshot.h b/src/screenshot.h index ee03d8aff7..7a08cd4fb6 100644 --- a/src/screenshot.h +++ b/src/screenshot.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/Doxyfile_AI b/src/script/api/Doxyfile_AI index 568859bff8..4e033d21f6 100644 --- a/src/script/api/Doxyfile_AI +++ b/src/script/api/Doxyfile_AI @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/Doxyfile_Game b/src/script/api/Doxyfile_Game index 1edfe42c7b..eb5691d8b5 100644 --- a/src/script/api/Doxyfile_Game +++ b/src/script/api/Doxyfile_Game @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/ai/ai_accounting.hpp.sq b/src/script/api/ai/ai_accounting.hpp.sq index fd68e4e7e7..d2bfbb04f5 100644 --- a/src/script/api/ai/ai_accounting.hpp.sq +++ b/src/script/api/ai/ai_accounting.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_airport.hpp.sq b/src/script/api/ai/ai_airport.hpp.sq index 89e7ba1258..2d7daeef73 100644 --- a/src/script/api/ai/ai_airport.hpp.sq +++ b/src/script/api/ai/ai_airport.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_base.hpp.sq b/src/script/api/ai/ai_base.hpp.sq index 68cc4a58e2..a03566b4e3 100644 --- a/src/script/api/ai/ai_base.hpp.sq +++ b/src/script/api/ai/ai_base.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_basestation.hpp.sq b/src/script/api/ai/ai_basestation.hpp.sq index 42cc184609..13a351b8ea 100644 --- a/src/script/api/ai/ai_basestation.hpp.sq +++ b/src/script/api/ai/ai_basestation.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_bridge.hpp.sq b/src/script/api/ai/ai_bridge.hpp.sq index 9a9b223009..0d026673f9 100644 --- a/src/script/api/ai/ai_bridge.hpp.sq +++ b/src/script/api/ai/ai_bridge.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_bridgelist.hpp.sq b/src/script/api/ai/ai_bridgelist.hpp.sq index b5618e3337..35d33f544a 100644 --- a/src/script/api/ai/ai_bridgelist.hpp.sq +++ b/src/script/api/ai/ai_bridgelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_cargo.hpp.sq b/src/script/api/ai/ai_cargo.hpp.sq index 6478d44b81..119328e411 100644 --- a/src/script/api/ai/ai_cargo.hpp.sq +++ b/src/script/api/ai/ai_cargo.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_cargolist.hpp.sq b/src/script/api/ai/ai_cargolist.hpp.sq index cc1bbc6a28..d1c1b0b981 100644 --- a/src/script/api/ai/ai_cargolist.hpp.sq +++ b/src/script/api/ai/ai_cargolist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_company.hpp.sq b/src/script/api/ai/ai_company.hpp.sq index ecab99c915..156b6fcb70 100644 --- a/src/script/api/ai/ai_company.hpp.sq +++ b/src/script/api/ai/ai_company.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_controller.hpp.sq b/src/script/api/ai/ai_controller.hpp.sq index 2aefdd68ef..ba1cc3fa57 100644 --- a/src/script/api/ai/ai_controller.hpp.sq +++ b/src/script/api/ai/ai_controller.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_date.hpp.sq b/src/script/api/ai/ai_date.hpp.sq index 7bdf9519d6..2f98a29189 100644 --- a/src/script/api/ai/ai_date.hpp.sq +++ b/src/script/api/ai/ai_date.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_depotlist.hpp.sq b/src/script/api/ai/ai_depotlist.hpp.sq index 528683ce37..72668a4d7f 100644 --- a/src/script/api/ai/ai_depotlist.hpp.sq +++ b/src/script/api/ai/ai_depotlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_engine.hpp.sq b/src/script/api/ai/ai_engine.hpp.sq index b10e7e34f7..fa49f919d6 100644 --- a/src/script/api/ai/ai_engine.hpp.sq +++ b/src/script/api/ai/ai_engine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_enginelist.hpp.sq b/src/script/api/ai/ai_enginelist.hpp.sq index 8ddc2e7ad1..1c1c4cfedb 100644 --- a/src/script/api/ai/ai_enginelist.hpp.sq +++ b/src/script/api/ai/ai_enginelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_error.hpp.sq b/src/script/api/ai/ai_error.hpp.sq index 54636d3a1f..792a21f1d8 100644 --- a/src/script/api/ai/ai_error.hpp.sq +++ b/src/script/api/ai/ai_error.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -58,8 +56,10 @@ void SQAIError_Register(Squirrel *engine) ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH); ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); + ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT); ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR); @@ -88,6 +88,7 @@ void SQAIError_Register(Squirrel *engine) ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE); ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT); diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq index 11fd181434..6061eeed52 100644 --- a/src/script/api/ai/ai_event.hpp.sq +++ b/src/script/api/ai/ai_event.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index 69cdba2dc9..21d0b663a1 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_execmode.hpp.sq b/src/script/api/ai/ai_execmode.hpp.sq index 869f3fe932..fa7d8a2c24 100644 --- a/src/script/api/ai/ai_execmode.hpp.sq +++ b/src/script/api/ai/ai_execmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_gamesettings.hpp.sq b/src/script/api/ai/ai_gamesettings.hpp.sq index 1459b031d7..e5ff4ce17f 100644 --- a/src/script/api/ai/ai_gamesettings.hpp.sq +++ b/src/script/api/ai/ai_gamesettings.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_group.hpp.sq b/src/script/api/ai/ai_group.hpp.sq index 29d86754d0..2a221df62a 100644 --- a/src/script/api/ai/ai_group.hpp.sq +++ b/src/script/api/ai/ai_group.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_grouplist.hpp.sq b/src/script/api/ai/ai_grouplist.hpp.sq index 9f9f2dab25..3977a92c81 100644 --- a/src/script/api/ai/ai_grouplist.hpp.sq +++ b/src/script/api/ai/ai_grouplist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_industry.hpp.sq b/src/script/api/ai/ai_industry.hpp.sq index 4de03f1dab..833c6a9e80 100644 --- a/src/script/api/ai/ai_industry.hpp.sq +++ b/src/script/api/ai/ai_industry.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_industrylist.hpp.sq b/src/script/api/ai/ai_industrylist.hpp.sq index 0ae7e97799..11a4696dc8 100644 --- a/src/script/api/ai/ai_industrylist.hpp.sq +++ b/src/script/api/ai/ai_industrylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_industrytype.hpp.sq b/src/script/api/ai/ai_industrytype.hpp.sq index 7c56acee9f..1d6648d993 100644 --- a/src/script/api/ai/ai_industrytype.hpp.sq +++ b/src/script/api/ai/ai_industrytype.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_industrytypelist.hpp.sq b/src/script/api/ai/ai_industrytypelist.hpp.sq index 6ac836b390..104a78ddf0 100644 --- a/src/script/api/ai/ai_industrytypelist.hpp.sq +++ b/src/script/api/ai/ai_industrytypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_infrastructure.hpp.sq b/src/script/api/ai/ai_infrastructure.hpp.sq index 55a1e4743c..f16f4b2810 100644 --- a/src/script/api/ai/ai_infrastructure.hpp.sq +++ b/src/script/api/ai/ai_infrastructure.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_list.hpp.sq b/src/script/api/ai/ai_list.hpp.sq index 201113823d..ec66200b5e 100644 --- a/src/script/api/ai/ai_list.hpp.sq +++ b/src/script/api/ai/ai_list.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_log.hpp.sq b/src/script/api/ai/ai_log.hpp.sq index 174ac2b929..de86769640 100644 --- a/src/script/api/ai/ai_log.hpp.sq +++ b/src/script/api/ai/ai_log.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_map.hpp.sq b/src/script/api/ai/ai_map.hpp.sq index f0f1cbed0c..3280e7f510 100644 --- a/src/script/api/ai/ai_map.hpp.sq +++ b/src/script/api/ai/ai_map.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_marine.hpp.sq b/src/script/api/ai/ai_marine.hpp.sq index 843c3d8746..d23fe09992 100644 --- a/src/script/api/ai/ai_marine.hpp.sq +++ b/src/script/api/ai/ai_marine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_order.hpp.sq b/src/script/api/ai/ai_order.hpp.sq index ab25e4810d..19664ee1eb 100644 --- a/src/script/api/ai/ai_order.hpp.sq +++ b/src/script/api/ai/ai_order.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_rail.hpp.sq b/src/script/api/ai/ai_rail.hpp.sq index d7e421669f..f7de00cffd 100644 --- a/src/script/api/ai/ai_rail.hpp.sq +++ b/src/script/api/ai/ai_rail.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_railtypelist.hpp.sq b/src/script/api/ai/ai_railtypelist.hpp.sq index 0f05df239a..b676f6e8fe 100644 --- a/src/script/api/ai/ai_railtypelist.hpp.sq +++ b/src/script/api/ai/ai_railtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_road.hpp.sq b/src/script/api/ai/ai_road.hpp.sq index 7e91fb2682..99b1d1dd0b 100644 --- a/src/script/api/ai/ai_road.hpp.sq +++ b/src/script/api/ai/ai_road.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_roadtypelist.hpp.sq b/src/script/api/ai/ai_roadtypelist.hpp.sq index cbe316f8d2..43224eea52 100644 --- a/src/script/api/ai/ai_roadtypelist.hpp.sq +++ b/src/script/api/ai/ai_roadtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_sign.hpp.sq b/src/script/api/ai/ai_sign.hpp.sq index e3c9005e76..e6c78c9344 100644 --- a/src/script/api/ai/ai_sign.hpp.sq +++ b/src/script/api/ai/ai_sign.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_signlist.hpp.sq b/src/script/api/ai/ai_signlist.hpp.sq index 8f4f97c0c8..9fbf42ddf4 100644 --- a/src/script/api/ai/ai_signlist.hpp.sq +++ b/src/script/api/ai/ai_signlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_station.hpp.sq b/src/script/api/ai/ai_station.hpp.sq index 1850c1e740..2278faf238 100644 --- a/src/script/api/ai/ai_station.hpp.sq +++ b/src/script/api/ai/ai_station.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_stationlist.hpp.sq b/src/script/api/ai/ai_stationlist.hpp.sq index 93a8c6e767..d7a63212c3 100644 --- a/src/script/api/ai/ai_stationlist.hpp.sq +++ b/src/script/api/ai/ai_stationlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_subsidy.hpp.sq b/src/script/api/ai/ai_subsidy.hpp.sq index ea9743dace..34a8173e51 100644 --- a/src/script/api/ai/ai_subsidy.hpp.sq +++ b/src/script/api/ai/ai_subsidy.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_subsidylist.hpp.sq b/src/script/api/ai/ai_subsidylist.hpp.sq index f58165f556..c1a39238a5 100644 --- a/src/script/api/ai/ai_subsidylist.hpp.sq +++ b/src/script/api/ai/ai_subsidylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_testmode.hpp.sq b/src/script/api/ai/ai_testmode.hpp.sq index 6072706f73..e80952a610 100644 --- a/src/script/api/ai/ai_testmode.hpp.sq +++ b/src/script/api/ai/ai_testmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_tile.hpp.sq b/src/script/api/ai/ai_tile.hpp.sq index 570e88cd28..4d4f0fe37e 100644 --- a/src/script/api/ai/ai_tile.hpp.sq +++ b/src/script/api/ai/ai_tile.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -26,6 +24,7 @@ void SQAITile_Register(Squirrel *engine) SQAITile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); SQAITile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); SQAITile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + SQAITile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S"); SQAITile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E"); @@ -71,15 +70,19 @@ void SQAITile_Register(Squirrel *engine) SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); SQAITile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW"); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); + ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i"); SQAITile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii"); diff --git a/src/script/api/ai/ai_tilelist.hpp.sq b/src/script/api/ai/ai_tilelist.hpp.sq index 4675e98fe9..64f666f6c7 100644 --- a/src/script/api/ai/ai_tilelist.hpp.sq +++ b/src/script/api/ai/ai_tilelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_town.hpp.sq b/src/script/api/ai/ai_town.hpp.sq index 6b09190be8..8cae7f11a2 100644 --- a/src/script/api/ai/ai_town.hpp.sq +++ b/src/script/api/ai/ai_town.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_townlist.hpp.sq b/src/script/api/ai/ai_townlist.hpp.sq index 74af6f45bb..7efaa298da 100644 --- a/src/script/api/ai/ai_townlist.hpp.sq +++ b/src/script/api/ai/ai_townlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_tunnel.hpp.sq b/src/script/api/ai/ai_tunnel.hpp.sq index 91eb432a05..7c72e83862 100644 --- a/src/script/api/ai/ai_tunnel.hpp.sq +++ b/src/script/api/ai/ai_tunnel.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_vehicle.hpp.sq b/src/script/api/ai/ai_vehicle.hpp.sq index dbd0096ada..20c66254ca 100644 --- a/src/script/api/ai/ai_vehicle.hpp.sq +++ b/src/script/api/ai/ai_vehicle.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_vehiclelist.hpp.sq b/src/script/api/ai/ai_vehiclelist.hpp.sq index 39e5cb4598..25a8610c39 100644 --- a/src/script/api/ai/ai_vehiclelist.hpp.sq +++ b/src/script/api/ai/ai_vehiclelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_waypoint.hpp.sq b/src/script/api/ai/ai_waypoint.hpp.sq index b9edc40bf7..3e2b64b465 100644 --- a/src/script/api/ai/ai_waypoint.hpp.sq +++ b/src/script/api/ai/ai_waypoint.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai/ai_waypointlist.hpp.sq b/src/script/api/ai/ai_waypointlist.hpp.sq index 464c07071f..c8359baedf 100644 --- a/src/script/api/ai/ai_waypointlist.hpp.sq +++ b/src/script/api/ai/ai_waypointlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/ai_changelog.hpp b/src/script/api/ai_changelog.hpp index 2a2918fe2b..9eea9ab152 100644 --- a/src/script/api/ai_changelog.hpp +++ b/src/script/api/ai_changelog.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/doxygen_filter.awk b/src/script/api/doxygen_filter.awk index 3a321fb5bf..7e3f387a0d 100644 --- a/src/script/api/doxygen_filter.awk +++ b/src/script/api/doxygen_filter.awk @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/doxygen_filter.sh b/src/script/api/doxygen_filter.sh index 31c34d4abc..e63c7183d8 100755 --- a/src/script/api/doxygen_filter.sh +++ b/src/script/api/doxygen_filter.sh @@ -1,7 +1,5 @@ #!/bin/bash -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/game/game_accounting.hpp.sq b/src/script/api/game/game_accounting.hpp.sq index 0e78172c0a..5b78909bde 100644 --- a/src/script/api/game/game_accounting.hpp.sq +++ b/src/script/api/game/game_accounting.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_admin.hpp.sq b/src/script/api/game/game_admin.hpp.sq index f8b994e809..6616f2706e 100644 --- a/src/script/api/game/game_admin.hpp.sq +++ b/src/script/api/game/game_admin.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_airport.hpp.sq b/src/script/api/game/game_airport.hpp.sq index d8f3a2a64c..32e0c12a1b 100644 --- a/src/script/api/game/game_airport.hpp.sq +++ b/src/script/api/game/game_airport.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_base.hpp.sq b/src/script/api/game/game_base.hpp.sq index 0301b05478..01791e186e 100644 --- a/src/script/api/game/game_base.hpp.sq +++ b/src/script/api/game/game_base.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_basestation.hpp.sq b/src/script/api/game/game_basestation.hpp.sq index f1e1797e90..91f7b575e1 100644 --- a/src/script/api/game/game_basestation.hpp.sq +++ b/src/script/api/game/game_basestation.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_bridge.hpp.sq b/src/script/api/game/game_bridge.hpp.sq index df0a945024..be9ef4bdf1 100644 --- a/src/script/api/game/game_bridge.hpp.sq +++ b/src/script/api/game/game_bridge.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_bridgelist.hpp.sq b/src/script/api/game/game_bridgelist.hpp.sq index d40c2c1e09..36a18bc221 100644 --- a/src/script/api/game/game_bridgelist.hpp.sq +++ b/src/script/api/game/game_bridgelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_cargo.hpp.sq b/src/script/api/game/game_cargo.hpp.sq index 515d5ff28f..0f018bc579 100644 --- a/src/script/api/game/game_cargo.hpp.sq +++ b/src/script/api/game/game_cargo.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_cargolist.hpp.sq b/src/script/api/game/game_cargolist.hpp.sq index 00b22b3d75..f1fd3ef846 100644 --- a/src/script/api/game/game_cargolist.hpp.sq +++ b/src/script/api/game/game_cargolist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_cargomonitor.hpp.sq b/src/script/api/game/game_cargomonitor.hpp.sq index b3638c4def..ccf9f3d164 100644 --- a/src/script/api/game/game_cargomonitor.hpp.sq +++ b/src/script/api/game/game_cargomonitor.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_client.hpp.sq b/src/script/api/game/game_client.hpp.sq index b4230a6d05..3a7f8491f5 100644 --- a/src/script/api/game/game_client.hpp.sq +++ b/src/script/api/game/game_client.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_clientlist.hpp.sq b/src/script/api/game/game_clientlist.hpp.sq index ef02586474..c341786f1d 100644 --- a/src/script/api/game/game_clientlist.hpp.sq +++ b/src/script/api/game/game_clientlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_company.hpp.sq b/src/script/api/game/game_company.hpp.sq index 626664484a..5bce4065cd 100644 --- a/src/script/api/game/game_company.hpp.sq +++ b/src/script/api/game/game_company.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_companymode.hpp.sq b/src/script/api/game/game_companymode.hpp.sq index 038e234fa1..73eb5e26b4 100644 --- a/src/script/api/game/game_companymode.hpp.sq +++ b/src/script/api/game/game_companymode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_controller.hpp.sq b/src/script/api/game/game_controller.hpp.sq index 7cae77de36..e7f7c58306 100644 --- a/src/script/api/game/game_controller.hpp.sq +++ b/src/script/api/game/game_controller.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_date.hpp.sq b/src/script/api/game/game_date.hpp.sq index dc40989da0..10dc2ad24d 100644 --- a/src/script/api/game/game_date.hpp.sq +++ b/src/script/api/game/game_date.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_depotlist.hpp.sq b/src/script/api/game/game_depotlist.hpp.sq index 59257cdad2..e01aa99a0b 100644 --- a/src/script/api/game/game_depotlist.hpp.sq +++ b/src/script/api/game/game_depotlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_engine.hpp.sq b/src/script/api/game/game_engine.hpp.sq index 67153b1d9e..fdef599c39 100644 --- a/src/script/api/game/game_engine.hpp.sq +++ b/src/script/api/game/game_engine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_enginelist.hpp.sq b/src/script/api/game/game_enginelist.hpp.sq index 1f052b8333..9ffbba636e 100644 --- a/src/script/api/game/game_enginelist.hpp.sq +++ b/src/script/api/game/game_enginelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_error.hpp.sq b/src/script/api/game/game_error.hpp.sq index 7718f14348..f1f88b3373 100644 --- a/src/script/api/game/game_error.hpp.sq +++ b/src/script/api/game/game_error.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -58,8 +56,10 @@ void SQGSError_Register(Squirrel *engine) ScriptError::RegisterErrorMap(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY, ScriptError::ERR_NOT_ENOUGH_CASH); ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); + ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE, ScriptError::ERR_LOCAL_AUTHORITY_REFUSES); ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_BUILT, ScriptError::ERR_ALREADY_BUILT); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_ALREADY_BUILT); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_ALREADY_HERE, ScriptError::ERR_ALREADY_BUILT); ScriptError::RegisterErrorMap(STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, ScriptError::ERR_AREA_NOT_CLEAR); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, ScriptError::ERR_AREA_NOT_CLEAR); ScriptError::RegisterErrorMap(STR_ERROR_MUST_DEMOLISH_RAILROAD, ScriptError::ERR_AREA_NOT_CLEAR); @@ -88,6 +88,7 @@ void SQGSError_Register(Squirrel *engine) ScriptError::RegisterErrorMap(STR_ERROR_SHIP_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IN_THE_WAY, ScriptError::ERR_VEHICLE_IN_THE_WAY); ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE, ScriptError::ERR_SITE_UNSUITABLE); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE, ScriptError::ERR_SITE_UNSUITABLE); ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP, ScriptError::ERR_TOO_CLOSE_TO_EDGE); ScriptError::RegisterErrorMap(STR_ERROR_STATION_TOO_SPREAD_OUT, ScriptError::ERR_STATION_TOO_SPREAD_OUT); diff --git a/src/script/api/game/game_event.hpp.sq b/src/script/api/game/game_event.hpp.sq index 1febdb2be9..42ea11b8ba 100644 --- a/src/script/api/game/game_event.hpp.sq +++ b/src/script/api/game/game_event.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq index 56acdd30fd..62e4f6a089 100644 --- a/src/script/api/game/game_event_types.hpp.sq +++ b/src/script/api/game/game_event_types.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_execmode.hpp.sq b/src/script/api/game/game_execmode.hpp.sq index 93d980312a..14946ba127 100644 --- a/src/script/api/game/game_execmode.hpp.sq +++ b/src/script/api/game/game_execmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_game.hpp.sq b/src/script/api/game/game_game.hpp.sq index ca7bb7a1d1..8c889a05b1 100644 --- a/src/script/api/game/game_game.hpp.sq +++ b/src/script/api/game/game_game.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_gamesettings.hpp.sq b/src/script/api/game/game_gamesettings.hpp.sq index 9aeba71994..a1dbcf7914 100644 --- a/src/script/api/game/game_gamesettings.hpp.sq +++ b/src/script/api/game/game_gamesettings.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_goal.hpp.sq b/src/script/api/game/game_goal.hpp.sq index 4cf15b3fc4..9f0384c554 100644 --- a/src/script/api/game/game_goal.hpp.sq +++ b/src/script/api/game/game_goal.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_industry.hpp.sq b/src/script/api/game/game_industry.hpp.sq index 5d50c90fa2..281ee638fa 100644 --- a/src/script/api/game/game_industry.hpp.sq +++ b/src/script/api/game/game_industry.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_industrylist.hpp.sq b/src/script/api/game/game_industrylist.hpp.sq index fbfc5347bf..71ea5633b0 100644 --- a/src/script/api/game/game_industrylist.hpp.sq +++ b/src/script/api/game/game_industrylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_industrytype.hpp.sq b/src/script/api/game/game_industrytype.hpp.sq index 460cc513c7..67b9a2470c 100644 --- a/src/script/api/game/game_industrytype.hpp.sq +++ b/src/script/api/game/game_industrytype.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_industrytypelist.hpp.sq b/src/script/api/game/game_industrytypelist.hpp.sq index d2ee7d28d1..365bba6e89 100644 --- a/src/script/api/game/game_industrytypelist.hpp.sq +++ b/src/script/api/game/game_industrytypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_infrastructure.hpp.sq b/src/script/api/game/game_infrastructure.hpp.sq index 9608013b18..d241a8223e 100644 --- a/src/script/api/game/game_infrastructure.hpp.sq +++ b/src/script/api/game/game_infrastructure.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_list.hpp.sq b/src/script/api/game/game_list.hpp.sq index a46696def5..9b9e614ced 100644 --- a/src/script/api/game/game_list.hpp.sq +++ b/src/script/api/game/game_list.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_log.hpp.sq b/src/script/api/game/game_log.hpp.sq index 1eb44d955d..c2c387489b 100644 --- a/src/script/api/game/game_log.hpp.sq +++ b/src/script/api/game/game_log.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_map.hpp.sq b/src/script/api/game/game_map.hpp.sq index e43edb1467..139b2e4d6e 100644 --- a/src/script/api/game/game_map.hpp.sq +++ b/src/script/api/game/game_map.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_marine.hpp.sq b/src/script/api/game/game_marine.hpp.sq index 0da8513202..4029f78db1 100644 --- a/src/script/api/game/game_marine.hpp.sq +++ b/src/script/api/game/game_marine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_news.hpp.sq b/src/script/api/game/game_news.hpp.sq index 3d7022e10e..5a3c7f9739 100644 --- a/src/script/api/game/game_news.hpp.sq +++ b/src/script/api/game/game_news.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_order.hpp.sq b/src/script/api/game/game_order.hpp.sq index e2126c603d..77a44acde6 100644 --- a/src/script/api/game/game_order.hpp.sq +++ b/src/script/api/game/game_order.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_rail.hpp.sq b/src/script/api/game/game_rail.hpp.sq index f145e84818..cd32d5d254 100644 --- a/src/script/api/game/game_rail.hpp.sq +++ b/src/script/api/game/game_rail.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_railtypelist.hpp.sq b/src/script/api/game/game_railtypelist.hpp.sq index caa036aca6..b829724bb5 100644 --- a/src/script/api/game/game_railtypelist.hpp.sq +++ b/src/script/api/game/game_railtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_road.hpp.sq b/src/script/api/game/game_road.hpp.sq index 725e24bf12..938dd5eabb 100644 --- a/src/script/api/game/game_road.hpp.sq +++ b/src/script/api/game/game_road.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_roadtypelist.hpp.sq b/src/script/api/game/game_roadtypelist.hpp.sq index f61adaa8fa..0c5a74c577 100644 --- a/src/script/api/game/game_roadtypelist.hpp.sq +++ b/src/script/api/game/game_roadtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_sign.hpp.sq b/src/script/api/game/game_sign.hpp.sq index 0fba369cff..0ae48f1c00 100644 --- a/src/script/api/game/game_sign.hpp.sq +++ b/src/script/api/game/game_sign.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_signlist.hpp.sq b/src/script/api/game/game_signlist.hpp.sq index 9fc7ed7f2d..15a9d6903d 100644 --- a/src/script/api/game/game_signlist.hpp.sq +++ b/src/script/api/game/game_signlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_station.hpp.sq b/src/script/api/game/game_station.hpp.sq index 4c2f63b384..5c412850a4 100644 --- a/src/script/api/game/game_station.hpp.sq +++ b/src/script/api/game/game_station.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_stationlist.hpp.sq b/src/script/api/game/game_stationlist.hpp.sq index a3cdfaa967..e783778712 100644 --- a/src/script/api/game/game_stationlist.hpp.sq +++ b/src/script/api/game/game_stationlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_story_page.hpp.sq b/src/script/api/game/game_story_page.hpp.sq index 621399bb03..99bc237bf8 100644 --- a/src/script/api/game/game_story_page.hpp.sq +++ b/src/script/api/game/game_story_page.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_storypageelementlist.hpp.sq b/src/script/api/game/game_storypageelementlist.hpp.sq index 5ef3e6ed38..3c70a196cb 100644 --- a/src/script/api/game/game_storypageelementlist.hpp.sq +++ b/src/script/api/game/game_storypageelementlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_storypagelist.hpp.sq b/src/script/api/game/game_storypagelist.hpp.sq index 99b25a30ac..b6577e3b8a 100644 --- a/src/script/api/game/game_storypagelist.hpp.sq +++ b/src/script/api/game/game_storypagelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_subsidy.hpp.sq b/src/script/api/game/game_subsidy.hpp.sq index 2d636f74dc..8d2c4b200b 100644 --- a/src/script/api/game/game_subsidy.hpp.sq +++ b/src/script/api/game/game_subsidy.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_subsidylist.hpp.sq b/src/script/api/game/game_subsidylist.hpp.sq index 73dcbd4112..ff68ae3221 100644 --- a/src/script/api/game/game_subsidylist.hpp.sq +++ b/src/script/api/game/game_subsidylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_testmode.hpp.sq b/src/script/api/game/game_testmode.hpp.sq index 6e1175f061..8b6ab26fef 100644 --- a/src/script/api/game/game_testmode.hpp.sq +++ b/src/script/api/game/game_testmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_text.hpp.sq b/src/script/api/game/game_text.hpp.sq index 8a35279d0b..b0563eaba7 100644 --- a/src/script/api/game/game_text.hpp.sq +++ b/src/script/api/game/game_text.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq index 6224919ffb..694708c8eb 100644 --- a/src/script/api/game/game_tile.hpp.sq +++ b/src/script/api/game/game_tile.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -26,6 +24,7 @@ void SQGSTile_Register(Squirrel *engine) SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); SQGSTile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); SQGSTile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + SQGSTile.DefSQConst(engine, ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQGSTile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W"); SQGSTile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S"); SQGSTile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E"); @@ -71,15 +70,19 @@ void SQGSTile_Register(Squirrel *engine) SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_RAINFOREST, "TERRAIN_RAINFOREST"); SQGSTile.DefSQConst(engine, ScriptTile::TERRAIN_SNOW, "TERRAIN_SNOW"); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); - ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); - ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW); + ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT); + ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE); + ScriptError::RegisterErrorMap(STR_ERROR_TERRAFORM_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_CLEARING_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); + ScriptError::RegisterErrorMap(STR_ERROR_TREE_PLANT_LIMIT_REACHED, ScriptTile::ERR_LIMIT_REACHED); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT"); ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE"); + ScriptError::RegisterErrorMapString(ScriptTile::ERR_LIMIT_REACHED, "ERR_LIMIT_REACHED"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildable, "IsBuildable", 2, ".i"); SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii"); diff --git a/src/script/api/game/game_tilelist.hpp.sq b/src/script/api/game/game_tilelist.hpp.sq index a4ade9cc50..5cf05e785f 100644 --- a/src/script/api/game/game_tilelist.hpp.sq +++ b/src/script/api/game/game_tilelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_town.hpp.sq b/src/script/api/game/game_town.hpp.sq index 30eec6928a..b97cb59d20 100644 --- a/src/script/api/game/game_town.hpp.sq +++ b/src/script/api/game/game_town.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_townlist.hpp.sq b/src/script/api/game/game_townlist.hpp.sq index a0d8c7f1da..2445305b98 100644 --- a/src/script/api/game/game_townlist.hpp.sq +++ b/src/script/api/game/game_townlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_tunnel.hpp.sq b/src/script/api/game/game_tunnel.hpp.sq index cea1cf11c8..8639036796 100644 --- a/src/script/api/game/game_tunnel.hpp.sq +++ b/src/script/api/game/game_tunnel.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_vehicle.hpp.sq b/src/script/api/game/game_vehicle.hpp.sq index 15a007046e..de58e05e64 100644 --- a/src/script/api/game/game_vehicle.hpp.sq +++ b/src/script/api/game/game_vehicle.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_vehiclelist.hpp.sq b/src/script/api/game/game_vehiclelist.hpp.sq index c5c6a18a72..b4dcf4b82c 100644 --- a/src/script/api/game/game_vehiclelist.hpp.sq +++ b/src/script/api/game/game_vehiclelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_viewport.hpp.sq b/src/script/api/game/game_viewport.hpp.sq index 357357ae39..6d7d2a8a96 100644 --- a/src/script/api/game/game_viewport.hpp.sq +++ b/src/script/api/game/game_viewport.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_waypoint.hpp.sq b/src/script/api/game/game_waypoint.hpp.sq index 984e1fa2f5..f74902c97f 100644 --- a/src/script/api/game/game_waypoint.hpp.sq +++ b/src/script/api/game/game_waypoint.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_waypointlist.hpp.sq b/src/script/api/game/game_waypointlist.hpp.sq index ccb428ce6b..92827c89be 100644 --- a/src/script/api/game/game_waypointlist.hpp.sq +++ b/src/script/api/game/game_waypointlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq index cd95607e02..be89676047 100644 --- a/src/script/api/game/game_window.hpp.sq +++ b/src/script/api/game/game_window.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -872,6 +870,7 @@ void SQGSWindow_Register(Squirrel *engine) SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_NAME, "WID_N_VEH_NAME"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_SPR, "WID_N_VEH_SPR"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_INFO, "WID_N_VEH_INFO"); + SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_SHOW_GROUP, "WID_N_SHOW_GROUP"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_STICKYBOX, "WID_MH_STICKYBOX"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_BACKGROUND, "WID_MH_BACKGROUND"); SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_SCROLLBAR, "WID_MH_SCROLLBAR"); diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp index 3befcaf97a..74fdb6423a 100644 --- a/src/script/api/game_changelog.hpp +++ b/src/script/api/game_changelog.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/generate_widget.awk b/src/script/api/generate_widget.awk index cdbe59d970..fe9fbe8345 100644 --- a/src/script/api/generate_widget.awk +++ b/src/script/api/generate_widget.awk @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/generate_widget.sh b/src/script/api/generate_widget.sh index 96ef5dfb3a..bd5fdab1d4 100755 --- a/src/script/api/generate_widget.sh +++ b/src/script/api/generate_widget.sh @@ -1,7 +1,5 @@ #!/bin/bash -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/generate_widget.vbs b/src/script/api/generate_widget.vbs index 0bd38bb299..c737bcf4de 100644 --- a/src/script/api/generate_widget.vbs +++ b/src/script/api/generate_widget.vbs @@ -1,7 +1,5 @@ Option Explicit -' $Id$ -' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/script_accounting.cpp b/src/script/api/script_accounting.cpp index e6fddf9e8c..1564c2e1ef 100644 --- a/src/script/api/script_accounting.cpp +++ b/src/script/api/script_accounting.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_accounting.hpp b/src/script/api/script_accounting.hpp index aa438ab54f..04c022e735 100644 --- a/src/script/api/script_accounting.hpp +++ b/src/script/api/script_accounting.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_admin.cpp b/src/script/api/script_admin.cpp index 7a0fe627a3..8f7371266d 100644 --- a/src/script/api/script_admin.cpp +++ b/src/script/api/script_admin.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_admin.hpp b/src/script/api/script_admin.hpp index 48126eac0b..95b7218eb0 100644 --- a/src/script/api/script_admin.hpp +++ b/src/script/api/script_admin.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_airport.cpp b/src/script/api/script_airport.cpp index 7d80f97afa..9477191724 100644 --- a/src/script/api/script_airport.cpp +++ b/src/script/api/script_airport.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_airport.hpp b/src/script/api/script_airport.hpp index 6073a2bdd6..0748fa67fc 100644 --- a/src/script/api/script_airport.hpp +++ b/src/script/api/script_airport.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_base.cpp b/src/script/api/script_base.cpp index 5b2d550b8c..996d4d488f 100644 --- a/src/script/api/script_base.cpp +++ b/src/script/api/script_base.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_base.hpp b/src/script/api/script_base.hpp index 936dee77d9..b8eebdf1b0 100644 --- a/src/script/api/script_base.hpp +++ b/src/script/api/script_base.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_basestation.cpp b/src/script/api/script_basestation.cpp index c51fa867a5..860e54c787 100644 --- a/src/script/api/script_basestation.cpp +++ b/src/script/api/script_basestation.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_basestation.hpp b/src/script/api/script_basestation.hpp index 5bfd9ac84b..85a34eac4f 100644 --- a/src/script/api/script_basestation.hpp +++ b/src/script/api/script_basestation.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_bridge.cpp b/src/script/api/script_bridge.cpp index d2d2a9c2df..0a7c185524 100644 --- a/src/script/api/script_bridge.cpp +++ b/src/script/api/script_bridge.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_bridge.hpp b/src/script/api/script_bridge.hpp index 5327d42062..26d7e11619 100644 --- a/src/script/api/script_bridge.hpp +++ b/src/script/api/script_bridge.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_bridgelist.cpp b/src/script/api/script_bridgelist.cpp index 0969342ecb..a81c186edb 100644 --- a/src/script/api/script_bridgelist.cpp +++ b/src/script/api/script_bridgelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_bridgelist.hpp b/src/script/api/script_bridgelist.hpp index ed09af8b16..78088fe695 100644 --- a/src/script/api/script_bridgelist.hpp +++ b/src/script/api/script_bridgelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargo.cpp b/src/script/api/script_cargo.cpp index 9e83daa083..67cbc1930c 100644 --- a/src/script/api/script_cargo.cpp +++ b/src/script/api/script_cargo.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargo.hpp b/src/script/api/script_cargo.hpp index e977031a10..4aab97c70e 100644 --- a/src/script/api/script_cargo.hpp +++ b/src/script/api/script_cargo.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargolist.cpp b/src/script/api/script_cargolist.cpp index b96cd721e9..fbd150c6cf 100644 --- a/src/script/api/script_cargolist.cpp +++ b/src/script/api/script_cargolist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargolist.hpp b/src/script/api/script_cargolist.hpp index a7cd8b69b5..11223debc1 100644 --- a/src/script/api/script_cargolist.hpp +++ b/src/script/api/script_cargolist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargomonitor.cpp b/src/script/api/script_cargomonitor.cpp index e862fed3e6..dcb18b1ddb 100644 --- a/src/script/api/script_cargomonitor.cpp +++ b/src/script/api/script_cargomonitor.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_cargomonitor.hpp b/src/script/api/script_cargomonitor.hpp index 175936db26..58ed427bea 100644 --- a/src/script/api/script_cargomonitor.hpp +++ b/src/script/api/script_cargomonitor.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_client.cpp b/src/script/api/script_client.cpp index 247cac98ca..da646516bc 100644 --- a/src/script/api/script_client.cpp +++ b/src/script/api/script_client.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_client.hpp b/src/script/api/script_client.hpp index 20cbdc7fee..7400e7247c 100644 --- a/src/script/api/script_client.hpp +++ b/src/script/api/script_client.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_clientlist.cpp b/src/script/api/script_clientlist.cpp index dbbbce0ec4..eb57d8e44a 100644 --- a/src/script/api/script_clientlist.cpp +++ b/src/script/api/script_clientlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -20,8 +18,7 @@ ScriptClientList::ScriptClientList() { if (!_networking) return; - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { this->AddItem(ci->client_id); } } @@ -38,8 +35,7 @@ ScriptClientList_Company::ScriptClientList_Company(ScriptCompany::CompanyID comp c = (CompanyID)company; } - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { + for (const NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { if (ci->client_playas == c) this->AddItem(ci->client_id); } } diff --git a/src/script/api/script_clientlist.hpp b/src/script/api/script_clientlist.hpp index 58d0177b21..39a85fd6e0 100644 --- a/src/script/api/script_clientlist.hpp +++ b/src/script/api/script_clientlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 59f4fa43e3..873475f0aa 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_company.hpp b/src/script/api/script_company.hpp index e3be24e557..ed1d78f1e1 100644 --- a/src/script/api/script_company.hpp +++ b/src/script/api/script_company.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_companymode.cpp b/src/script/api/script_companymode.cpp index a5d3963a2d..83beec5ebb 100644 --- a/src/script/api/script_companymode.cpp +++ b/src/script/api/script_companymode.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_companymode.hpp b/src/script/api/script_companymode.hpp index 67787f2584..4eba2dd9f7 100644 --- a/src/script/api/script_companymode.hpp +++ b/src/script/api/script_companymode.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp index beb9b155fb..461a6c61be 100644 --- a/src/script/api/script_controller.cpp +++ b/src/script/api/script_controller.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_controller.hpp b/src/script/api/script_controller.hpp index 9bdbe9ab79..79cb65a74f 100644 --- a/src/script/api/script_controller.hpp +++ b/src/script/api/script_controller.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_date.cpp b/src/script/api/script_date.cpp index 2f5b399633..9946a26ec6 100644 --- a/src/script/api/script_date.cpp +++ b/src/script/api/script_date.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_date.hpp b/src/script/api/script_date.hpp index b402b0a2b2..5daa5fb03f 100644 --- a/src/script/api/script_date.hpp +++ b/src/script/api/script_date.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_depotlist.cpp b/src/script/api/script_depotlist.cpp index 05bb4ccd04..4b07636ce5 100644 --- a/src/script/api/script_depotlist.cpp +++ b/src/script/api/script_depotlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -28,8 +26,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type) case ScriptTile::TRANSPORT_AIR: { /* Hangars are not seen as real depots by the depot code. */ - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) { for (uint i = 0; i < st->airport.GetNumHangars(); i++) { this->AddItem(st->airport.GetHangarTile(i)); @@ -41,8 +38,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type) } /* Handle 'standard' depots. */ - const Depot *depot; - FOR_ALL_DEPOTS(depot) { + for (const Depot *depot : Depot::Iterate()) { if ((::GetTileOwner(depot->xy) == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && ::IsTileType(depot->xy, tile_type)) this->AddItem(depot->xy); } } diff --git a/src/script/api/script_depotlist.hpp b/src/script/api/script_depotlist.hpp index c516ac758e..efbe701bda 100644 --- a/src/script/api/script_depotlist.hpp +++ b/src/script/api/script_depotlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_engine.cpp b/src/script/api/script_engine.cpp index 88f55226ea..6b1e267ff3 100644 --- a/src/script/api/script_engine.cpp +++ b/src/script/api/script_engine.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_engine.hpp b/src/script/api/script_engine.hpp index b08b6f64b4..4a570fb9ca 100644 --- a/src/script/api/script_engine.hpp +++ b/src/script/api/script_engine.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_enginelist.cpp b/src/script/api/script_enginelist.cpp index 99ab9537be..c6f594cc7e 100644 --- a/src/script/api/script_enginelist.cpp +++ b/src/script/api/script_enginelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -17,8 +15,7 @@ ScriptEngineList::ScriptEngineList(ScriptVehicle::VehicleType vehicle_type) { - Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, (::VehicleType)vehicle_type) { + for (const Engine *e : Engine::IterateType((::VehicleType)vehicle_type)) { if (ScriptObject::GetCompany() == OWNER_DEITY || HasBit(e->company_avail, ScriptObject::GetCompany())) this->AddItem(e->index); } } diff --git a/src/script/api/script_enginelist.hpp b/src/script/api/script_enginelist.hpp index 1fe2c4bc18..05cfc03853 100644 --- a/src/script/api/script_enginelist.hpp +++ b/src/script/api/script_enginelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_error.cpp b/src/script/api/script_error.cpp index 87d2906c55..318a6ff494 100644 --- a/src/script/api/script_error.cpp +++ b/src/script/api/script_error.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_error.hpp b/src/script/api/script_error.hpp index 346298d2c4..87d4196fdd 100644 --- a/src/script/api/script_error.hpp +++ b/src/script/api/script_error.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -110,10 +108,10 @@ public: ERR_NOT_ENOUGH_CASH, // [STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY] /** Local authority won't allow the previous action */ - ERR_LOCAL_AUTHORITY_REFUSES, // [STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS] + ERR_LOCAL_AUTHORITY_REFUSES, // [STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS, STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE] /** The piece of infrastructure you tried to build is already in place */ - ERR_ALREADY_BUILT, // [STR_ERROR_ALREADY_BUILT, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST] + ERR_ALREADY_BUILT, // [STR_ERROR_ALREADY_BUILT, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_TREE_ALREADY_HERE] /** Area isn't clear, try to demolish the building on it */ ERR_AREA_NOT_CLEAR, // [STR_ERROR_BUILDING_MUST_BE_DEMOLISHED, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_RAILROAD, STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST, STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST, STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST, STR_ERROR_BUOY_IN_THE_WAY, STR_ERROR_MUST_DEMOLISH_DOCK_FIRST, STR_ERROR_GENERIC_OBJECT_IN_THE_WAY, STR_ERROR_COMPANY_HEADQUARTERS_IN, STR_ERROR_OBJECT_IN_THE_WAY, STR_ERROR_MUST_REMOVE_ROAD_FIRST, STR_ERROR_MUST_REMOVE_RAILROAD_TRACK, STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST, STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST, STR_ERROR_EXCAVATION_WOULD_DAMAGE] @@ -134,7 +132,7 @@ public: ERR_VEHICLE_IN_THE_WAY, // [STR_ERROR_TRAIN_IN_THE_WAY, STR_ERROR_ROAD_VEHICLE_IN_THE_WAY, STR_ERROR_SHIP_IN_THE_WAY, STR_ERROR_AIRCRAFT_IN_THE_WAY] /** Site is unsuitable */ - ERR_SITE_UNSUITABLE, // [STR_ERROR_SITE_UNSUITABLE] + ERR_SITE_UNSUITABLE, // [STR_ERROR_SITE_UNSUITABLE, STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE] /** Too close to the edge of the map */ ERR_TOO_CLOSE_TO_EDGE, // [STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP] diff --git a/src/script/api/script_event.cpp b/src/script/api/script_event.cpp index 2d364e8d2e..efdc720cf3 100644 --- a/src/script/api/script_event.cpp +++ b/src/script/api/script_event.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_event.hpp b/src/script/api/script_event.hpp index a9e17df7e0..886e4f1db8 100644 --- a/src/script/api/script_event.hpp +++ b/src/script/api/script_event.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_event_types.cpp b/src/script/api/script_event_types.cpp index e997f23201..84c001836d 100644 --- a/src/script/api/script_event_types.cpp +++ b/src/script/api/script_event_types.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index aeb5ebe2d2..98cca7f502 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_execmode.cpp b/src/script/api/script_execmode.cpp index 1bbce807a4..6a34288cb2 100644 --- a/src/script/api/script_execmode.cpp +++ b/src/script/api/script_execmode.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_execmode.hpp b/src/script/api/script_execmode.hpp index 96d30d1e4a..8e4fd71578 100644 --- a/src/script/api/script_execmode.hpp +++ b/src/script/api/script_execmode.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_game.cpp b/src/script/api/script_game.cpp index 3e26174885..43674c6f37 100644 --- a/src/script/api/script_game.cpp +++ b/src/script/api/script_game.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_game.hpp b/src/script/api/script_game.hpp index 3531c9de8f..a9e5b7a258 100644 --- a/src/script/api/script_game.hpp +++ b/src/script/api/script_game.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_gamesettings.cpp b/src/script/api/script_gamesettings.cpp index 490e6eee0c..bdaeb6c93e 100644 --- a/src/script/api/script_gamesettings.cpp +++ b/src/script/api/script_gamesettings.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_gamesettings.hpp b/src/script/api/script_gamesettings.hpp index 6f92ca758b..14b30e5c4d 100644 --- a/src/script/api/script_gamesettings.hpp +++ b/src/script/api/script_gamesettings.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_goal.cpp b/src/script/api/script_goal.cpp index 4c0f5eb353..ca2b165740 100644 --- a/src/script/api/script_goal.cpp +++ b/src/script/api/script_goal.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_goal.hpp b/src/script/api/script_goal.hpp index 30f7df1257..372d6e8b49 100644 --- a/src/script/api/script_goal.hpp +++ b/src/script/api/script_goal.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp index 55f5ffdebb..7f80815864 100644 --- a/src/script/api/script_group.cpp +++ b/src/script/api/script_group.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -156,8 +154,7 @@ Money profit = 0; - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->group_id != group_id) continue; if (!v->IsPrimaryVehicle()) continue; @@ -181,8 +178,7 @@ uint32 occupancy = 0; uint32 vehicle_count = 0; - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->group_id != group_id) continue; if (!v->IsPrimaryVehicle()) continue; diff --git a/src/script/api/script_group.hpp b/src/script/api/script_group.hpp index f44163bbac..2c27b81c6e 100644 --- a/src/script/api/script_group.hpp +++ b/src/script/api/script_group.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_grouplist.cpp b/src/script/api/script_grouplist.cpp index d1071c36c6..569b44634c 100644 --- a/src/script/api/script_grouplist.cpp +++ b/src/script/api/script_grouplist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -17,8 +15,7 @@ ScriptGroupList::ScriptGroupList() { - Group *g; - FOR_ALL_GROUPS(g) { + for (const Group *g : Group::Iterate()) { if (g->owner == ScriptObject::GetCompany()) this->AddItem(g->index); } } diff --git a/src/script/api/script_grouplist.hpp b/src/script/api/script_grouplist.hpp index 32e94d6494..d8195ed96a 100644 --- a/src/script/api/script_grouplist.hpp +++ b/src/script/api/script_grouplist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industry.cpp b/src/script/api/script_industry.cpp index e72f9955b5..4d1e91a3ce 100644 --- a/src/script/api/script_industry.cpp +++ b/src/script/api/script_industry.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industry.hpp b/src/script/api/script_industry.hpp index 83c249f9aa..98c7d33ac3 100644 --- a/src/script/api/script_industry.hpp +++ b/src/script/api/script_industry.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industrylist.cpp b/src/script/api/script_industrylist.cpp index d2d298fa3f..de28f418d4 100644 --- a/src/script/api/script_industrylist.cpp +++ b/src/script/api/script_industrylist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -17,17 +15,14 @@ ScriptIndustryList::ScriptIndustryList() { - Industry *i; - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { this->AddItem(i->index); } } ScriptIndustryList_CargoAccepting::ScriptIndustryList_CargoAccepting(CargoID cargo_id) { - const Industry *i; - - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { for (byte j = 0; j < lengthof(i->accepts_cargo); j++) { if (i->accepts_cargo[j] == cargo_id) this->AddItem(i->index); } @@ -36,9 +31,7 @@ ScriptIndustryList_CargoAccepting::ScriptIndustryList_CargoAccepting(CargoID car ScriptIndustryList_CargoProducing::ScriptIndustryList_CargoProducing(CargoID cargo_id) { - const Industry *i; - - FOR_ALL_INDUSTRIES(i) { + for (const Industry *i : Industry::Iterate()) { for (byte j = 0; j < lengthof(i->produced_cargo); j++) { if (i->produced_cargo[j] == cargo_id) this->AddItem(i->index); } diff --git a/src/script/api/script_industrylist.hpp b/src/script/api/script_industrylist.hpp index a9ef85ecea..ff7210d682 100644 --- a/src/script/api/script_industrylist.hpp +++ b/src/script/api/script_industrylist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industrytype.cpp b/src/script/api/script_industrytype.cpp index 76b5cab2aa..ad1ee4feda 100644 --- a/src/script/api/script_industrytype.cpp +++ b/src/script/api/script_industrytype.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industrytype.hpp b/src/script/api/script_industrytype.hpp index 8dccc68c91..3314cb053f 100644 --- a/src/script/api/script_industrytype.hpp +++ b/src/script/api/script_industrytype.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industrytypelist.cpp b/src/script/api/script_industrytypelist.cpp index b60361578b..c8986f675a 100644 --- a/src/script/api/script_industrytypelist.cpp +++ b/src/script/api/script_industrytypelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_industrytypelist.hpp b/src/script/api/script_industrytypelist.hpp index efb2a4a611..2d2f8775be 100644 --- a/src/script/api/script_industrytypelist.hpp +++ b/src/script/api/script_industrytypelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_info_docs.hpp b/src/script/api/script_info_docs.hpp index e12a6a45c5..be5d0cec6f 100644 --- a/src/script/api/script_info_docs.hpp +++ b/src/script/api/script_info_docs.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_infrastructure.cpp b/src/script/api/script_infrastructure.cpp index 35febbd58a..5ef5470c53 100644 --- a/src/script/api/script_infrastructure.cpp +++ b/src/script/api/script_infrastructure.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_infrastructure.hpp b/src/script/api/script_infrastructure.hpp index f2ef641eea..8f2d283137 100644 --- a/src/script/api/script_infrastructure.hpp +++ b/src/script/api/script_infrastructure.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_list.cpp b/src/script/api/script_list.cpp index fe747028f8..2fb2a8d6b9 100644 --- a/src/script/api/script_list.cpp +++ b/src/script/api/script_list.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_list.hpp b/src/script/api/script_list.hpp index b32ebc463e..0dbb2c45d7 100644 --- a/src/script/api/script_list.hpp +++ b/src/script/api/script_list.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_log.cpp b/src/script/api/script_log.cpp index b40ed97aac..38a9a87d94 100644 --- a/src/script/api/script_log.cpp +++ b/src/script/api/script_log.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_log.hpp b/src/script/api/script_log.hpp index def37c938e..a71e09c2ef 100644 --- a/src/script/api/script_log.hpp +++ b/src/script/api/script_log.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_map.cpp b/src/script/api/script_map.cpp index 6334089fdb..da66de10f3 100644 --- a/src/script/api/script_map.cpp +++ b/src/script/api/script_map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_map.hpp b/src/script/api/script_map.hpp index 3648ae7f39..30acdb9176 100644 --- a/src/script/api/script_map.hpp +++ b/src/script/api/script_map.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_marine.cpp b/src/script/api/script_marine.cpp index bba361cec2..c175adf066 100644 --- a/src/script/api/script_marine.cpp +++ b/src/script/api/script_marine.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_marine.hpp b/src/script/api/script_marine.hpp index d70121029f..324ed8f3e9 100644 --- a/src/script/api/script_marine.hpp +++ b/src/script/api/script_marine.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_news.cpp b/src/script/api/script_news.cpp index 0c2ca3792d..678cc69852 100644 --- a/src/script/api/script_news.cpp +++ b/src/script/api/script_news.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_news.hpp b/src/script/api/script_news.hpp index 4414193385..6b7b39af01 100644 --- a/src/script/api/script_news.hpp +++ b/src/script/api/script_news.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index 6714782e1a..6275d1be38 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index fba4b69f22..f953b20e47 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp index 045968874c..3290e51034 100644 --- a/src/script/api/script_order.cpp +++ b/src/script/api/script_order.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_order.hpp b/src/script/api/script_order.hpp index 9161478867..cce74fa5dc 100644 --- a/src/script/api/script_order.hpp +++ b/src/script/api/script_order.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_rail.cpp b/src/script/api/script_rail.cpp index f9495ac2d1..aedb4a364a 100644 --- a/src/script/api/script_rail.cpp +++ b/src/script/api/script_rail.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_rail.hpp b/src/script/api/script_rail.hpp index d52a7bfc46..f82765a706 100644 --- a/src/script/api/script_rail.hpp +++ b/src/script/api/script_rail.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_railtypelist.cpp b/src/script/api/script_railtypelist.cpp index 016145b764..ccbbe97095 100644 --- a/src/script/api/script_railtypelist.cpp +++ b/src/script/api/script_railtypelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_railtypelist.hpp b/src/script/api/script_railtypelist.hpp index 478fd0d5e3..78c7f9ecff 100644 --- a/src/script/api/script_railtypelist.hpp +++ b/src/script/api/script_railtypelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp index afa4b28d37..f842581784 100644 --- a/src/script/api/script_road.cpp +++ b/src/script/api/script_road.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_road.hpp b/src/script/api/script_road.hpp index bc230bda33..5a952d91a2 100644 --- a/src/script/api/script_road.hpp +++ b/src/script/api/script_road.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_roadtypelist.cpp b/src/script/api/script_roadtypelist.cpp index a6d6c4ae60..6ada0cb6b3 100644 --- a/src/script/api/script_roadtypelist.cpp +++ b/src/script/api/script_roadtypelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_roadtypelist.hpp b/src/script/api/script_roadtypelist.hpp index cbcd7fd469..41cf9fe2e8 100644 --- a/src/script/api/script_roadtypelist.hpp +++ b/src/script/api/script_roadtypelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_sign.cpp b/src/script/api/script_sign.cpp index 33c8e9a28a..8908941cf7 100644 --- a/src/script/api/script_sign.cpp +++ b/src/script/api/script_sign.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_sign.hpp b/src/script/api/script_sign.hpp index 4b0483e982..5913e45a4f 100644 --- a/src/script/api/script_sign.hpp +++ b/src/script/api/script_sign.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_signlist.cpp b/src/script/api/script_signlist.cpp index 61ab9665aa..c64891a903 100644 --- a/src/script/api/script_signlist.cpp +++ b/src/script/api/script_signlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -18,8 +16,7 @@ ScriptSignList::ScriptSignList() { - Sign *s; - FOR_ALL_SIGNS(s) { + for (const Sign *s : Sign::Iterate()) { if (ScriptSign::IsValidSign(s->index)) this->AddItem(s->index); } } diff --git a/src/script/api/script_signlist.hpp b/src/script/api/script_signlist.hpp index 3b90a23ad6..125b06cce8 100644 --- a/src/script/api/script_signlist.hpp +++ b/src/script/api/script_signlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp index e5536c6e04..a45c19d0d9 100644 --- a/src/script/api/script_station.cpp +++ b/src/script/api/script_station.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_station.hpp b/src/script/api/script_station.hpp index 42ea412d08..848cc1f27c 100644 --- a/src/script/api/script_station.hpp +++ b/src/script/api/script_station.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_stationlist.cpp b/src/script/api/script_stationlist.cpp index 4bbb5fa677..9b9e67e7a6 100644 --- a/src/script/api/script_stationlist.cpp +++ b/src/script/api/script_stationlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -20,8 +18,7 @@ ScriptStationList::ScriptStationList(ScriptStation::StationType station_type) { - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if ((st->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (st->facilities & station_type) != 0) this->AddItem(st->index); } } diff --git a/src/script/api/script_stationlist.hpp b/src/script/api/script_stationlist.hpp index 720a43639b..ee862cb935 100644 --- a/src/script/api/script_stationlist.hpp +++ b/src/script/api/script_stationlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_story_page.cpp b/src/script/api/script_story_page.cpp index e31ad71c3f..87b81268c1 100644 --- a/src/script/api/script_story_page.cpp +++ b/src/script/api/script_story_page.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_story_page.hpp b/src/script/api/script_story_page.hpp index e806bb7664..d7e44fee49 100644 --- a/src/script/api/script_story_page.hpp +++ b/src/script/api/script_story_page.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_storypageelementlist.cpp b/src/script/api/script_storypageelementlist.cpp index 3f1fa4ebbe..ce60963f24 100644 --- a/src/script/api/script_storypageelementlist.cpp +++ b/src/script/api/script_storypageelementlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -19,8 +17,7 @@ ScriptStoryPageElementList::ScriptStoryPageElementList(ScriptStoryPage::StoryPag { if (!ScriptStoryPage::IsValidStoryPage(story_page_id)) return; - StoryPageElement *pe; - FOR_ALL_STORY_PAGE_ELEMENTS(pe) { + for (StoryPageElement *pe : StoryPageElement::Iterate()) { if (pe->page == story_page_id) { this->AddItem(pe->index); } diff --git a/src/script/api/script_storypageelementlist.hpp b/src/script/api/script_storypageelementlist.hpp index 6aa2faf2d9..5bd1adab5f 100644 --- a/src/script/api/script_storypageelementlist.hpp +++ b/src/script/api/script_storypageelementlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_storypagelist.cpp b/src/script/api/script_storypagelist.cpp index fc32e80a37..63f835ada9 100644 --- a/src/script/api/script_storypagelist.cpp +++ b/src/script/api/script_storypagelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -21,8 +19,7 @@ ScriptStoryPageList::ScriptStoryPageList(ScriptCompany::CompanyID company) uint8 c = company; if (company == ScriptCompany::COMPANY_INVALID) c = INVALID_COMPANY; - StoryPage *p; - FOR_ALL_STORY_PAGES(p) { + for (StoryPage *p : StoryPage::Iterate()) { if (p->company == c || p->company == INVALID_COMPANY) { this->AddItem(p->index); } diff --git a/src/script/api/script_storypagelist.hpp b/src/script/api/script_storypagelist.hpp index 7aa3389f32..b491907c53 100644 --- a/src/script/api/script_storypagelist.hpp +++ b/src/script/api/script_storypagelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_subsidy.cpp b/src/script/api/script_subsidy.cpp index 640f7ab0a0..c8ca6e3e35 100644 --- a/src/script/api/script_subsidy.cpp +++ b/src/script/api/script_subsidy.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_subsidy.hpp b/src/script/api/script_subsidy.hpp index 16a6794409..a4f9fa6867 100644 --- a/src/script/api/script_subsidy.hpp +++ b/src/script/api/script_subsidy.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_subsidylist.cpp b/src/script/api/script_subsidylist.cpp index fd7d947799..b92f1398c3 100644 --- a/src/script/api/script_subsidylist.cpp +++ b/src/script/api/script_subsidylist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -17,8 +15,7 @@ ScriptSubsidyList::ScriptSubsidyList() { - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { this->AddItem(s->index); } } diff --git a/src/script/api/script_subsidylist.hpp b/src/script/api/script_subsidylist.hpp index 7080ac6d88..2d245bec9c 100644 --- a/src/script/api/script_subsidylist.hpp +++ b/src/script/api/script_subsidylist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_testmode.cpp b/src/script/api/script_testmode.cpp index ed643c2d95..70055586fe 100644 --- a/src/script/api/script_testmode.cpp +++ b/src/script/api/script_testmode.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_testmode.hpp b/src/script/api/script_testmode.hpp index 699d4db18b..eddd9340a7 100644 --- a/src/script/api/script_testmode.hpp +++ b/src/script/api/script_testmode.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_text.cpp b/src/script/api/script_text.cpp index bfc866ac42..36f9417930 100644 --- a/src/script/api/script_text.cpp +++ b/src/script/api/script_text.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_text.hpp b/src/script/api/script_text.hpp index 12892a7e79..2553695377 100644 --- a/src/script/api/script_text.hpp +++ b/src/script/api/script_text.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_tile.cpp b/src/script/api/script_tile.cpp index 0f62406668..360b32c025 100644 --- a/src/script/api/script_tile.cpp +++ b/src/script/api/script_tile.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_tile.hpp b/src/script/api/script_tile.hpp index d527e0d7e1..423044b21a 100644 --- a/src/script/api/script_tile.hpp +++ b/src/script/api/script_tile.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -42,6 +40,9 @@ public: /** There is a tunnel underneath */ ERR_EXCAVATION_WOULD_DAMAGE, // [STR_ERROR_EXCAVATION_WOULD_DAMAGE] + + /** Reached the limit for terraforming/clearing/planting */ + ERR_LIMIT_REACHED, // [STR_ERROR_TERRAFORM_LIMIT_REACHED, STR_ERROR_CLEARING_LIMIT_REACHED, STR_ERROR_TREE_PLANT_LIMIT_REACHED] }; /** diff --git a/src/script/api/script_tilelist.cpp b/src/script/api/script_tilelist.cpp index fcee67d965..b9a2ed5298 100644 --- a/src/script/api/script_tilelist.cpp +++ b/src/script/api/script_tilelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_tilelist.hpp b/src/script/api/script_tilelist.hpp index 788432f783..38f08d62a8 100644 --- a/src/script/api/script_tilelist.hpp +++ b/src/script/api/script_tilelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp index 9adfa50753..1cb6e32bb1 100644 --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -60,9 +58,11 @@ { CCountedPtr counter(text); - EnforcePrecondition(false, text != nullptr); - const char *encoded_text = text->GetEncodedText(); - EnforcePreconditionEncodedText(false, encoded_text); + const char *encoded_text = nullptr; + if (text != nullptr) { + encoded_text = text->GetEncodedText(); + EnforcePreconditionEncodedText(false, encoded_text); + } EnforcePrecondition(false, IsValidTown(town_id)); return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, 0, CMD_TOWN_SET_TEXT, encoded_text); @@ -346,8 +346,7 @@ } int num = 0; - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->town == t && (st->facilities & FACIL_AIRPORT) && st->airport.type != AT_OILRIG) num++; } return max(0, 2 - num); diff --git a/src/script/api/script_town.hpp b/src/script/api/script_town.hpp index 302c676ebf..71fb5a712a 100644 --- a/src/script/api/script_town.hpp +++ b/src/script/api/script_town.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -148,7 +146,7 @@ public: /** * Rename a town. * @param town_id The town to rename - * @param name The new name of the town. If nullptr or an empty string is passed, the town name will be reset to the default name. + * @param name The new name of the town. If null is passed, the town name will be reset to the default name. * @pre IsValidTown(town_id). * @return True if the action succeeded. * @api -ai @@ -158,7 +156,7 @@ public: /** * Set the custom text of a town, shown in the GUI. * @param town_id The town to set the custom text of. - * @param text The text to set it to (can be either a raw string, or a ScriptText object). + * @param text The text to set it to (can be either a raw string, or a ScriptText object). If null is passed, the text will be removed. * @pre IsValidTown(town_id). * @return True if the action succeeded. * @api -ai diff --git a/src/script/api/script_townlist.cpp b/src/script/api/script_townlist.cpp index a2e12febe1..b5af62b5f2 100644 --- a/src/script/api/script_townlist.cpp +++ b/src/script/api/script_townlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -17,8 +15,7 @@ ScriptTownList::ScriptTownList() { - Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { this->AddItem(t->index); } } diff --git a/src/script/api/script_townlist.hpp b/src/script/api/script_townlist.hpp index 7baa09da1f..5b20eb2bd1 100644 --- a/src/script/api/script_townlist.hpp +++ b/src/script/api/script_townlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_tunnel.cpp b/src/script/api/script_tunnel.cpp index ce94c17ee8..c47c64e40e 100644 --- a/src/script/api/script_tunnel.cpp +++ b/src/script/api/script_tunnel.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_tunnel.hpp b/src/script/api/script_tunnel.hpp index 74fdaabc55..b096dbcd06 100644 --- a/src/script/api/script_tunnel.hpp +++ b/src/script/api/script_tunnel.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_types.hpp b/src/script/api/script_types.hpp index bd9b7c5607..0d652a2d2d 100644 --- a/src/script/api/script_types.hpp +++ b/src/script/api/script_types.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index e0d129ad87..cd5cc5af72 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index 58a0319d0b..4b8a4687ab 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_vehiclelist.cpp b/src/script/api/script_vehiclelist.cpp index 5534f6f8a5..58c03ff9a9 100644 --- a/src/script/api/script_vehiclelist.cpp +++ b/src/script/api/script_vehiclelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -22,8 +20,7 @@ ScriptVehicleList::ScriptVehicleList() { - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::Train::From(v)->IsFreeWagon()))) this->AddItem(v->index); } } @@ -32,8 +29,7 @@ ScriptVehicleList_Station::ScriptVehicleList_Station(StationID station_id) { if (!ScriptBaseStation::IsValidBaseStation(station_id)) return; - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && v->IsPrimaryVehicle()) { const Order *order; @@ -83,8 +79,7 @@ ScriptVehicleList_Depot::ScriptVehicleList_Depot(TileIndex tile) return; } - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if ((v->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY) && v->IsPrimaryVehicle() && v->type == type) { const Order *order; @@ -111,8 +106,7 @@ ScriptVehicleList_Group::ScriptVehicleList_Group(GroupID group_id) { if (!ScriptGroup::IsValidGroup((ScriptGroup::GroupID)group_id)) return; - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->owner == ScriptObject::GetCompany() && v->IsPrimaryVehicle()) { if (v->group_id == group_id) this->AddItem(v->index); } @@ -123,8 +117,7 @@ ScriptVehicleList_DefaultGroup::ScriptVehicleList_DefaultGroup(ScriptVehicle::Ve { if (vehicle_type < ScriptVehicle::VT_RAIL || vehicle_type > ScriptVehicle::VT_AIR) return; - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->owner == ScriptObject::GetCompany() && v->IsPrimaryVehicle()) { if (v->type == (::VehicleType)vehicle_type && v->group_id == ScriptGroup::GROUP_DEFAULT) this->AddItem(v->index); } diff --git a/src/script/api/script_vehiclelist.hpp b/src/script/api/script_vehiclelist.hpp index 7df3a2bb01..0ce2d86a35 100644 --- a/src/script/api/script_vehiclelist.hpp +++ b/src/script/api/script_vehiclelist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_viewport.cpp b/src/script/api/script_viewport.cpp index bed3ba9923..275ab33465 100644 --- a/src/script/api/script_viewport.cpp +++ b/src/script/api/script_viewport.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_viewport.hpp b/src/script/api/script_viewport.hpp index cae1a59300..81612031dc 100644 --- a/src/script/api/script_viewport.hpp +++ b/src/script/api/script_viewport.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_waypoint.cpp b/src/script/api/script_waypoint.cpp index 3d121a2dcf..8bc3695041 100644 --- a/src/script/api/script_waypoint.cpp +++ b/src/script/api/script_waypoint.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_waypoint.hpp b/src/script/api/script_waypoint.hpp index 7a8b4c97b3..9dada43966 100644 --- a/src/script/api/script_waypoint.hpp +++ b/src/script/api/script_waypoint.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_waypointlist.cpp b/src/script/api/script_waypointlist.cpp index 7e0b45a5bf..1c0a804d1c 100644 --- a/src/script/api/script_waypointlist.cpp +++ b/src/script/api/script_waypointlist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -19,8 +17,7 @@ ScriptWaypointList::ScriptWaypointList(ScriptWaypoint::WaypointType waypoint_type) { - const Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { + for (const Waypoint *wp : Waypoint::Iterate()) { if ((wp->facilities & waypoint_type) && (wp->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY || wp->owner == OWNER_NONE)) this->AddItem(wp->index); } diff --git a/src/script/api/script_waypointlist.hpp b/src/script/api/script_waypointlist.hpp index fde15c9537..0ee33eff68 100644 --- a/src/script/api/script_waypointlist.hpp +++ b/src/script/api/script_waypointlist.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_window.cpp b/src/script/api/script_window.cpp index 2766a0562f..f54b4fd601 100644 --- a/src/script/api/script_window.cpp +++ b/src/script/api/script_window.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp index 252cb3e54f..4efcc5bb6b 100644 --- a/src/script/api/script_window.hpp +++ b/src/script/api/script_window.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1942,6 +1940,7 @@ public: WID_N_VEH_NAME = ::WID_N_VEH_NAME, ///< Name of the new vehicle. WID_N_VEH_SPR = ::WID_N_VEH_SPR, ///< Graphical display of the new vehicle. WID_N_VEH_INFO = ::WID_N_VEH_INFO, ///< Some technical data of the new vehicle. + WID_N_SHOW_GROUP = ::WID_N_SHOW_GROUP, ///< Show vehicle's group }; /** Widgets of the #MessageHistoryWindow class. */ diff --git a/src/script/api/squirrel_export.awk b/src/script/api/squirrel_export.awk index a2782721c7..29305b7896 100644 --- a/src/script/api/squirrel_export.awk +++ b/src/script/api/squirrel_export.awk @@ -1,5 +1,3 @@ -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -53,9 +51,6 @@ function dump_class_templates(name) function dump_fileheader() { - # Break the Id tag, so SVN doesn't replace it - print "/* $I" "d$ */" CR - print "" CR print "/*" CR print " * This file is part of OpenTTD." CR print " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." CR diff --git a/src/script/api/squirrel_export.sh b/src/script/api/squirrel_export.sh index 14ff4e1477..96bd102f9b 100755 --- a/src/script/api/squirrel_export.sh +++ b/src/script/api/squirrel_export.sh @@ -1,7 +1,5 @@ #!/bin/bash -# $Id$ - # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/script/api/squirrel_export.vbs b/src/script/api/squirrel_export.vbs index d9d5d643d0..2ebc77136a 100644 --- a/src/script/api/squirrel_export.vbs +++ b/src/script/api/squirrel_export.vbs @@ -1,7 +1,5 @@ Option Explicit -' $Id$ -' ' This file is part of OpenTTD. ' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ' OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -82,9 +80,6 @@ End Function Function DumpFileheader(api, file) Dim re Set re = New RegExp - ' Break the Id tag, so SVN doesn't replace it - file.WriteLine "/* $I" & "d$ */" - file.WriteLine "" file.WriteLine "/*" file.WriteLine " * This file is part of OpenTTD." file.WriteLine " * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2." diff --git a/src/script/api/template/template_accounting.hpp.sq b/src/script/api/template/template_accounting.hpp.sq index 58f011a4ee..06be408c94 100644 --- a/src/script/api/template/template_accounting.hpp.sq +++ b/src/script/api/template/template_accounting.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_admin.hpp.sq b/src/script/api/template/template_admin.hpp.sq index 394304be09..3fd8a2face 100644 --- a/src/script/api/template/template_admin.hpp.sq +++ b/src/script/api/template/template_admin.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_airport.hpp.sq b/src/script/api/template/template_airport.hpp.sq index d091837ce4..7f82808135 100644 --- a/src/script/api/template/template_airport.hpp.sq +++ b/src/script/api/template/template_airport.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_base.hpp.sq b/src/script/api/template/template_base.hpp.sq index be19e8bad1..b2ce115481 100644 --- a/src/script/api/template/template_base.hpp.sq +++ b/src/script/api/template/template_base.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_basestation.hpp.sq b/src/script/api/template/template_basestation.hpp.sq index 272c58e4a3..297bb0c4a5 100644 --- a/src/script/api/template/template_basestation.hpp.sq +++ b/src/script/api/template/template_basestation.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_bridge.hpp.sq b/src/script/api/template/template_bridge.hpp.sq index 90a1569de3..f3f9371d98 100644 --- a/src/script/api/template/template_bridge.hpp.sq +++ b/src/script/api/template/template_bridge.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_bridgelist.hpp.sq b/src/script/api/template/template_bridgelist.hpp.sq index 61c0ccf403..d007a1aeec 100644 --- a/src/script/api/template/template_bridgelist.hpp.sq +++ b/src/script/api/template/template_bridgelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_cargo.hpp.sq b/src/script/api/template/template_cargo.hpp.sq index 2d85ef8625..5d46fdd373 100644 --- a/src/script/api/template/template_cargo.hpp.sq +++ b/src/script/api/template/template_cargo.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_cargolist.hpp.sq b/src/script/api/template/template_cargolist.hpp.sq index eee5540278..394d20f91d 100644 --- a/src/script/api/template/template_cargolist.hpp.sq +++ b/src/script/api/template/template_cargolist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_cargomonitor.hpp.sq b/src/script/api/template/template_cargomonitor.hpp.sq index 2010bf6eb5..6d6965777f 100644 --- a/src/script/api/template/template_cargomonitor.hpp.sq +++ b/src/script/api/template/template_cargomonitor.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_client.hpp.sq b/src/script/api/template/template_client.hpp.sq index 7e9314197b..c37bd9a6ed 100644 --- a/src/script/api/template/template_client.hpp.sq +++ b/src/script/api/template/template_client.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_clientlist.hpp.sq b/src/script/api/template/template_clientlist.hpp.sq index 6373994a15..7021a59cd6 100644 --- a/src/script/api/template/template_clientlist.hpp.sq +++ b/src/script/api/template/template_clientlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_company.hpp.sq b/src/script/api/template/template_company.hpp.sq index 77ca0c933c..97461448a9 100644 --- a/src/script/api/template/template_company.hpp.sq +++ b/src/script/api/template/template_company.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_companymode.hpp.sq b/src/script/api/template/template_companymode.hpp.sq index c25f047084..aa3edd6b70 100644 --- a/src/script/api/template/template_companymode.hpp.sq +++ b/src/script/api/template/template_companymode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_date.hpp.sq b/src/script/api/template/template_date.hpp.sq index c6d65a8674..747ead207e 100644 --- a/src/script/api/template/template_date.hpp.sq +++ b/src/script/api/template/template_date.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_depotlist.hpp.sq b/src/script/api/template/template_depotlist.hpp.sq index 4305552cfa..9981f80ce7 100644 --- a/src/script/api/template/template_depotlist.hpp.sq +++ b/src/script/api/template/template_depotlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_engine.hpp.sq b/src/script/api/template/template_engine.hpp.sq index 6aa13a94e3..4ae741eac2 100644 --- a/src/script/api/template/template_engine.hpp.sq +++ b/src/script/api/template/template_engine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_enginelist.hpp.sq b/src/script/api/template/template_enginelist.hpp.sq index 3d42f8c53c..3e98f9c8a0 100644 --- a/src/script/api/template/template_enginelist.hpp.sq +++ b/src/script/api/template/template_enginelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_error.hpp.sq b/src/script/api/template/template_error.hpp.sq index 817a2226dc..99b37eafec 100644 --- a/src/script/api/template/template_error.hpp.sq +++ b/src/script/api/template/template_error.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_event.hpp.sq b/src/script/api/template/template_event.hpp.sq index 3847a81ca5..38ba818b40 100644 --- a/src/script/api/template/template_event.hpp.sq +++ b/src/script/api/template/template_event.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_event_types.hpp.sq b/src/script/api/template/template_event_types.hpp.sq index 1351919b11..09cbe43f3f 100644 --- a/src/script/api/template/template_event_types.hpp.sq +++ b/src/script/api/template/template_event_types.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_execmode.hpp.sq b/src/script/api/template/template_execmode.hpp.sq index b7030774e0..7b93b2d1cc 100644 --- a/src/script/api/template/template_execmode.hpp.sq +++ b/src/script/api/template/template_execmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_game.hpp.sq b/src/script/api/template/template_game.hpp.sq index db30d893e6..a7f366f039 100644 --- a/src/script/api/template/template_game.hpp.sq +++ b/src/script/api/template/template_game.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_gamesettings.hpp.sq b/src/script/api/template/template_gamesettings.hpp.sq index 4882951a14..012d9240d0 100644 --- a/src/script/api/template/template_gamesettings.hpp.sq +++ b/src/script/api/template/template_gamesettings.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_goal.hpp.sq b/src/script/api/template/template_goal.hpp.sq index 7b392eca7f..984fe7fb6c 100644 --- a/src/script/api/template/template_goal.hpp.sq +++ b/src/script/api/template/template_goal.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_group.hpp.sq b/src/script/api/template/template_group.hpp.sq index 0bb83765a3..e598d550c0 100644 --- a/src/script/api/template/template_group.hpp.sq +++ b/src/script/api/template/template_group.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_grouplist.hpp.sq b/src/script/api/template/template_grouplist.hpp.sq index 8638ef52f5..5431adb83e 100644 --- a/src/script/api/template/template_grouplist.hpp.sq +++ b/src/script/api/template/template_grouplist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_industry.hpp.sq b/src/script/api/template/template_industry.hpp.sq index 3b60c0fd3f..711c3ab52d 100644 --- a/src/script/api/template/template_industry.hpp.sq +++ b/src/script/api/template/template_industry.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_industrylist.hpp.sq b/src/script/api/template/template_industrylist.hpp.sq index 184b42775e..9c44a3e4cd 100644 --- a/src/script/api/template/template_industrylist.hpp.sq +++ b/src/script/api/template/template_industrylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_industrytype.hpp.sq b/src/script/api/template/template_industrytype.hpp.sq index dfc735d039..06c7c18bbe 100644 --- a/src/script/api/template/template_industrytype.hpp.sq +++ b/src/script/api/template/template_industrytype.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_industrytypelist.hpp.sq b/src/script/api/template/template_industrytypelist.hpp.sq index cac1fc0e34..71272b23ed 100644 --- a/src/script/api/template/template_industrytypelist.hpp.sq +++ b/src/script/api/template/template_industrytypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_infrastructure.hpp.sq b/src/script/api/template/template_infrastructure.hpp.sq index c2a7b71911..11b839ae25 100644 --- a/src/script/api/template/template_infrastructure.hpp.sq +++ b/src/script/api/template/template_infrastructure.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_list.hpp.sq b/src/script/api/template/template_list.hpp.sq index b16117af34..9ca4da9c10 100644 --- a/src/script/api/template/template_list.hpp.sq +++ b/src/script/api/template/template_list.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_log.hpp.sq b/src/script/api/template/template_log.hpp.sq index fd97373884..2ebe7547de 100644 --- a/src/script/api/template/template_log.hpp.sq +++ b/src/script/api/template/template_log.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_map.hpp.sq b/src/script/api/template/template_map.hpp.sq index 980bd7a537..3a15390277 100644 --- a/src/script/api/template/template_map.hpp.sq +++ b/src/script/api/template/template_map.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_marine.hpp.sq b/src/script/api/template/template_marine.hpp.sq index 1dc3eaa33d..115e88c263 100644 --- a/src/script/api/template/template_marine.hpp.sq +++ b/src/script/api/template/template_marine.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_news.hpp.sq b/src/script/api/template/template_news.hpp.sq index db65507cca..443e04c858 100644 --- a/src/script/api/template/template_news.hpp.sq +++ b/src/script/api/template/template_news.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_order.hpp.sq b/src/script/api/template/template_order.hpp.sq index 39a16e00e9..155baa3a75 100644 --- a/src/script/api/template/template_order.hpp.sq +++ b/src/script/api/template/template_order.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_rail.hpp.sq b/src/script/api/template/template_rail.hpp.sq index 3b9c9ce6ae..f451175403 100644 --- a/src/script/api/template/template_rail.hpp.sq +++ b/src/script/api/template/template_rail.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_railtypelist.hpp.sq b/src/script/api/template/template_railtypelist.hpp.sq index 87f9f0e2c9..09f63f8e37 100644 --- a/src/script/api/template/template_railtypelist.hpp.sq +++ b/src/script/api/template/template_railtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_road.hpp.sq b/src/script/api/template/template_road.hpp.sq index 26ef7a142e..f2f8c411df 100644 --- a/src/script/api/template/template_road.hpp.sq +++ b/src/script/api/template/template_road.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_roadtypelist.hpp.sq b/src/script/api/template/template_roadtypelist.hpp.sq index 5573f8614f..bd2c1931e4 100644 --- a/src/script/api/template/template_roadtypelist.hpp.sq +++ b/src/script/api/template/template_roadtypelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_sign.hpp.sq b/src/script/api/template/template_sign.hpp.sq index 2441711892..76e7759ebd 100644 --- a/src/script/api/template/template_sign.hpp.sq +++ b/src/script/api/template/template_sign.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_signlist.hpp.sq b/src/script/api/template/template_signlist.hpp.sq index a7c53a6c8d..e762202508 100644 --- a/src/script/api/template/template_signlist.hpp.sq +++ b/src/script/api/template/template_signlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_station.hpp.sq b/src/script/api/template/template_station.hpp.sq index 3bbd4220e9..ba5af93c14 100644 --- a/src/script/api/template/template_station.hpp.sq +++ b/src/script/api/template/template_station.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_stationlist.hpp.sq b/src/script/api/template/template_stationlist.hpp.sq index e13d26b67f..e6a1f0bbaf 100644 --- a/src/script/api/template/template_stationlist.hpp.sq +++ b/src/script/api/template/template_stationlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_story_page.hpp.sq b/src/script/api/template/template_story_page.hpp.sq index add3a30e74..106f9a6238 100644 --- a/src/script/api/template/template_story_page.hpp.sq +++ b/src/script/api/template/template_story_page.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_storypageelementlist.hpp.sq b/src/script/api/template/template_storypageelementlist.hpp.sq index df7ae6e68e..224f38c506 100644 --- a/src/script/api/template/template_storypageelementlist.hpp.sq +++ b/src/script/api/template/template_storypageelementlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_storypagelist.hpp.sq b/src/script/api/template/template_storypagelist.hpp.sq index bb21f83a90..6b799dd18f 100644 --- a/src/script/api/template/template_storypagelist.hpp.sq +++ b/src/script/api/template/template_storypagelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_subsidy.hpp.sq b/src/script/api/template/template_subsidy.hpp.sq index 501a2f23ff..78a35e8dea 100644 --- a/src/script/api/template/template_subsidy.hpp.sq +++ b/src/script/api/template/template_subsidy.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_subsidylist.hpp.sq b/src/script/api/template/template_subsidylist.hpp.sq index 1f3f7b3a12..98f2e1fd09 100644 --- a/src/script/api/template/template_subsidylist.hpp.sq +++ b/src/script/api/template/template_subsidylist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_testmode.hpp.sq b/src/script/api/template/template_testmode.hpp.sq index 5404e80233..c779df57f5 100644 --- a/src/script/api/template/template_testmode.hpp.sq +++ b/src/script/api/template/template_testmode.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_text.hpp.sq b/src/script/api/template/template_text.hpp.sq index 93654c84a3..b93fad8c5b 100644 --- a/src/script/api/template/template_text.hpp.sq +++ b/src/script/api/template/template_text.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_tile.hpp.sq b/src/script/api/template/template_tile.hpp.sq index 9271b5ba40..ac9365da7a 100644 --- a/src/script/api/template/template_tile.hpp.sq +++ b/src/script/api/template/template_tile.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_tilelist.hpp.sq b/src/script/api/template/template_tilelist.hpp.sq index 989e6749e2..7f1ae696c1 100644 --- a/src/script/api/template/template_tilelist.hpp.sq +++ b/src/script/api/template/template_tilelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_town.hpp.sq b/src/script/api/template/template_town.hpp.sq index 30534fa8a2..6134ecbe93 100644 --- a/src/script/api/template/template_town.hpp.sq +++ b/src/script/api/template/template_town.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_townlist.hpp.sq b/src/script/api/template/template_townlist.hpp.sq index e3709b5b59..ff97ef4471 100644 --- a/src/script/api/template/template_townlist.hpp.sq +++ b/src/script/api/template/template_townlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_tunnel.hpp.sq b/src/script/api/template/template_tunnel.hpp.sq index b003eae13e..49b25b7ef0 100644 --- a/src/script/api/template/template_tunnel.hpp.sq +++ b/src/script/api/template/template_tunnel.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_vehicle.hpp.sq b/src/script/api/template/template_vehicle.hpp.sq index d0e2f52b1b..87713b8b40 100644 --- a/src/script/api/template/template_vehicle.hpp.sq +++ b/src/script/api/template/template_vehicle.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_vehiclelist.hpp.sq b/src/script/api/template/template_vehiclelist.hpp.sq index 11dac4bc3d..701116748d 100644 --- a/src/script/api/template/template_vehiclelist.hpp.sq +++ b/src/script/api/template/template_vehiclelist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_viewport.hpp.sq b/src/script/api/template/template_viewport.hpp.sq index e5b44943bc..845c824485 100644 --- a/src/script/api/template/template_viewport.hpp.sq +++ b/src/script/api/template/template_viewport.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_waypoint.hpp.sq b/src/script/api/template/template_waypoint.hpp.sq index 613c3cbcc2..179e62ae0c 100644 --- a/src/script/api/template/template_waypoint.hpp.sq +++ b/src/script/api/template/template_waypoint.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_waypointlist.hpp.sq b/src/script/api/template/template_waypointlist.hpp.sq index 7c2330964d..1de9eb40e9 100644 --- a/src/script/api/template/template_waypointlist.hpp.sq +++ b/src/script/api/template/template_waypointlist.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/api/template/template_window.hpp.sq b/src/script/api/template/template_window.hpp.sq index c0d3f59deb..016726db2f 100644 --- a/src/script/api/template/template_window.hpp.sq +++ b/src/script/api/template/template_window.hpp.sq @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index e9b0f69bc6..e359afb1e9 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_config.hpp b/src/script/script_config.hpp index db04397a75..31004caba7 100644 --- a/src/script/script_config.hpp +++ b/src/script/script_config.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_fatalerror.hpp b/src/script/script_fatalerror.hpp index fc7e05402d..5d1a2c1250 100644 --- a/src/script/script_fatalerror.hpp +++ b/src/script/script_fatalerror.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp index 5cab36d0ba..53a8fb30ef 100644 --- a/src/script/script_info.cpp +++ b/src/script/script_info.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_info.hpp b/src/script/script_info.hpp index 6bcec878ac..5f90e9b23f 100644 --- a/src/script/script_info.hpp +++ b/src/script/script_info.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_info_dummy.cpp b/src/script/script_info_dummy.cpp index 34e5541e22..063c028cc3 100644 --- a/src/script/script_info_dummy.cpp +++ b/src/script/script_info_dummy.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp index 3468bff446..a38a315ffc 100644 --- a/src/script/script_instance.cpp +++ b/src/script/script_instance.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -89,8 +87,12 @@ void ScriptInstance::Initialize(const char *main_script, const char *instance_na } /* Create the main-class */ - this->instance = MallocT(1); + this->instance = new SQObject(); if (!this->engine->CreateClassInstance(instance_name, this->controller, this->instance)) { + /* If CreateClassInstance has returned false instance has not been + * registered with squirrel, so avoid trying to Release it by clearing it now */ + delete this->instance; + this->instance = nullptr; this->Died(); return; } @@ -139,7 +141,7 @@ ScriptInstance::~ScriptInstance() if (engine != nullptr) delete this->engine; delete this->storage; delete this->controller; - free(this->instance); + delete this->instance; } void ScriptInstance::Continue() @@ -156,6 +158,7 @@ void ScriptInstance::Died() this->last_allocated_memory = this->GetAllocatedMemory(); // Update cache if (this->instance != nullptr) this->engine->ReleaseObject(this->instance); + delete this->instance; delete this->engine; this->instance = nullptr; this->engine = nullptr; diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp index dc5b28dfbb..e5024c80bc 100644 --- a/src/script/script_instance.hpp +++ b/src/script/script_instance.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp index c4205bbc45..e33f233f7b 100644 --- a/src/script/script_scanner.cpp +++ b/src/script/script_scanner.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_scanner.hpp b/src/script/script_scanner.hpp index 3627d251bb..eb65a197e4 100644 --- a/src/script/script_scanner.hpp +++ b/src/script/script_scanner.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_storage.hpp b/src/script/script_storage.hpp index d06cc9efa0..2f5520cffa 100644 --- a/src/script/script_storage.hpp +++ b/src/script/script_storage.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/script_suspend.hpp b/src/script/script_suspend.hpp index 9f8a1513c9..c8a4501f30 100644 --- a/src/script/script_suspend.hpp +++ b/src/script/script_suspend.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp index 275a89c74c..2bd2c9c744 100644 --- a/src/script/squirrel.cpp +++ b/src/script/squirrel.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index d0d02e80f8..cfe54b36ec 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel_class.hpp b/src/script/squirrel_class.hpp index 8ec3f9dc72..b600839d4d 100644 --- a/src/script/squirrel_class.hpp +++ b/src/script/squirrel_class.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index 0f094a80cf..3c6bed6c2c 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel_helper_type.hpp b/src/script/squirrel_helper_type.hpp index a42cd79a93..c20655ca19 100644 --- a/src/script/squirrel_helper_type.hpp +++ b/src/script/squirrel_helper_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel_std.cpp b/src/script/squirrel_std.cpp index 715b989340..9a01dc5d60 100644 --- a/src/script/squirrel_std.cpp +++ b/src/script/squirrel_std.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/script/squirrel_std.hpp b/src/script/squirrel_std.hpp index b1c7b30132..5e977045f8 100644 --- a/src/script/squirrel_std.hpp +++ b/src/script/squirrel_std.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settings.cpp b/src/settings.cpp index 296b3abcfc..0a7ac89ac3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -890,8 +888,7 @@ static bool DeleteSelectStationWindow(int32 p1) static bool UpdateConsists(int32 p1) { - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { /* Update the consist of all trains so the maximum speed is set correctly. */ if (t->IsFrontEngine() || t->IsFreeWagon()) t->ConsistChanged(CCF_TRACK); } @@ -926,8 +923,7 @@ static bool CheckInterval(int32 p1) if (update_vehicles) { const Company *c = Company::Get(_current_company); - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == _current_company && v->IsPrimaryVehicle() && !v->ServiceIntervalIsCustom()) { v->SetServiceInterval(CompanyServiceInterval(c, v->type)); v->SetServiceIntervalIsPercent(p1 != 0); @@ -957,8 +953,7 @@ static bool UpdateInterval(VehicleType type, int32 p1) if (interval != p1) return false; if (update_vehicles) { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == _current_company && v->type == type && v->IsPrimaryVehicle() && !v->ServiceIntervalIsCustom()) { v->SetServiceInterval(p1); } @@ -992,8 +987,7 @@ static bool UpdateIntervalAircraft(int32 p1) static bool TrainAccelerationModelChanged(int32 p1) { - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (t->IsFrontEngine()) { t->tcache.cached_max_curve_speed = t->GetCurveSpeedLimit(); t->UpdateAcceleration(); @@ -1015,8 +1009,7 @@ static bool TrainAccelerationModelChanged(int32 p1) */ static bool TrainSlopeSteepnessChanged(int32 p1) { - Train *t; - FOR_ALL_TRAINS(t) { + for (Train *t : Train::Iterate()) { if (t->IsFrontEngine()) t->CargoChanged(); } @@ -1031,8 +1024,7 @@ static bool TrainSlopeSteepnessChanged(int32 p1) static bool RoadVehAccelerationModelChanged(int32 p1) { if (_settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL) { - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->IsFrontEngine()) { rv->CargoChanged(); } @@ -1054,8 +1046,7 @@ static bool RoadVehAccelerationModelChanged(int32 p1) */ static bool RoadVehSlopeSteepnessChanged(int32 p1) { - RoadVehicle *rv; - FOR_ALL_ROADVEHICLES(rv) { + for (RoadVehicle *rv : RoadVehicle::Iterate()) { if (rv->IsFrontEngine()) rv->CargoChanged(); } @@ -1227,16 +1218,14 @@ static bool CheckFreeformEdges(int32 p1) { if (_game_mode == GM_MENU) return true; if (p1 != 0) { - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { /* Check if there is a ship on the northern border. */ if (TileX(s->tile) == 0 || TileY(s->tile) == 0) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_EMPTY, INVALID_STRING_ID, WL_ERROR); return false; } } - BaseStation *st; - FOR_ALL_BASE_STATIONS(st) { + for (const BaseStation *st : BaseStation::Iterate()) { /* Check if there is a non-deleted buoy on the northern border. */ if (st->IsInUse() && (TileX(st->xy) == 0 || TileY(st->xy) == 0)) { ShowErrorMessage(STR_CONFIG_SETTING_EDGES_NOT_EMPTY, INVALID_STRING_ID, WL_ERROR); @@ -1337,8 +1326,7 @@ static bool MaxVehiclesChanged(int32 p1) static bool InvalidateShipPathCache(int32 p1) { - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { s->path.clear(); } return true; diff --git a/src/settings_func.h b/src/settings_func.h index e75fd2b332..4a55821cf6 100644 --- a/src/settings_func.h +++ b/src/settings_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index e93da22d06..4b7768dfa9 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settings_gui.h b/src/settings_gui.h index a81fc0a2b3..a292347e1f 100644 --- a/src/settings_gui.h +++ b/src/settings_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settings_internal.h b/src/settings_internal.h index 0f1d3c1923..3d9764dc6f 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settings_type.h b/src/settings_type.h index 0033aaf1c1..60db6c9f97 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index 7f024b2dcc..9f272dabbe 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/ship.h b/src/ship.h index ef009046a0..f3e56c39fe 100644 --- a/src/ship.h +++ b/src/ship.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -59,10 +57,4 @@ struct Ship FINAL : public SpecializedVehicle { bool IsShipDestinationTile(TileIndex tile, StationID station); -/** - * Iterate over all ships. - * @param var The variable used for iteration. - */ -#define FOR_ALL_SHIPS(var) FOR_ALL_VEHICLES_OF_TYPE(Ship, var) - #endif /* SHIP_H */ diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 4be95de76a..35edda113e 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -146,7 +144,6 @@ void Ship::GetImage(Direction direction, EngineImageType image_type, VehicleSpri static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance) { /* Find the closest depot */ - const Depot *depot; const Depot *best_depot = nullptr; /* If we don't have a maximum distance, i.e. distance = 0, * we want to find any depot so the best distance of no @@ -155,7 +152,7 @@ static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance) * further away than max_distance can safely be ignored. */ uint best_dist = max_distance == 0 ? UINT_MAX : max_distance + 1; - FOR_ALL_DEPOTS(depot) { + for (const Depot *depot : Depot::Iterate()) { TileIndex tile = depot->xy; if (IsShipDepotTile(tile) && IsTileOwner(tile, v->owner)) { uint dist = DistanceManhattan(tile, v->tile); diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index c6bf342d97..aff7077f07 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/signal.cpp b/src/signal.cpp index 8952000a51..068ca6193b 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/signal_func.h b/src/signal_func.h index 4597a039b0..621eeedc50 100644 --- a/src/signal_func.h +++ b/src/signal_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/signal_type.h b/src/signal_type.h index c7d06072a7..5af2a2c94a 100644 --- a/src/signal_type.h +++ b/src/signal_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/signs.cpp b/src/signs.cpp index 2a23a43c9c..f477ab7641 100644 --- a/src/signs.cpp +++ b/src/signs.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -15,6 +13,7 @@ #include "signs_func.h" #include "strings_func.h" #include "core/pool_func.hpp" +#include "viewport_kdtree.h" #include "table/strings.h" @@ -48,16 +47,19 @@ Sign::~Sign() void Sign::UpdateVirtCoord() { Point pt = RemapCoords(this->x, this->y, this->z); + + if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeSign(this->index)); + SetDParam(0, this->index); this->sign.UpdatePosition(pt.x, pt.y - 6 * ZOOM_LVL_BASE, STR_WHITE_SIGN); + + _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeSign(this->index)); } /** Update the coordinates of all signs */ void UpdateAllSignVirtCoords() { - Sign *si; - - FOR_ALL_SIGNS(si) { + for (Sign *si : Sign::Iterate()) { si->UpdateVirtCoord(); } } diff --git a/src/signs_base.h b/src/signs_base.h index a4ee0718b7..6cc7dc6d80 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -21,12 +19,12 @@ typedef Pool SignPool; extern SignPool _sign_pool; struct Sign : SignPool::PoolItem<&_sign_pool> { - char *name; - ViewportSign sign; - int32 x; - int32 y; - int32 z; - Owner owner; // placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games. + char *name; + TrackedViewportSign sign; + int32 x; + int32 y; + int32 z; + Owner owner; // placed by this company. Anyone can delete them though. OWNER_NONE for gray signs from old games. Sign(Owner owner = INVALID_OWNER); ~Sign(); @@ -34,7 +32,4 @@ struct Sign : SignPool::PoolItem<&_sign_pool> { void UpdateVirtCoord(); }; -#define FOR_ALL_SIGNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Sign, sign_index, var, start) -#define FOR_ALL_SIGNS(var) FOR_ALL_SIGNS_FROM(var, 0) - #endif /* SIGNS_BASE_H */ diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index 6ae2124d8d..d2caa4a235 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -59,7 +57,6 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 si->name = stredup(text); } si->UpdateVirtCoord(); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeSign(si->index)); InvalidateWindowData(WC_SIGN_LIST, 0, 0); _new_sign_id = si->index; } @@ -101,7 +98,7 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } else { // Delete sign if (flags & DC_EXEC) { si->sign.MarkDirty(); - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeSign(si->index)); + if (si->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeSign(si->index)); delete si; InvalidateWindowData(WC_SIGN_LIST, 0, 0); diff --git a/src/signs_func.h b/src/signs_func.h index 4cc89d947c..55e831fdca 100644 --- a/src/signs_func.h +++ b/src/signs_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index d346ec185b..ea3de70085 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -62,8 +60,7 @@ struct SignList { this->signs.clear(); - const Sign *si; - FOR_ALL_SIGNS(si) this->signs.push_back(si); + for (const Sign *si : Sign::Iterate()) this->signs.push_back(si); this->signs.SetFilterState(true); this->FilterSignList(); diff --git a/src/signs_type.h b/src/signs_type.h index a539c66899..fd73af8fad 100644 --- a/src/signs_type.h +++ b/src/signs_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/slope_func.h b/src/slope_func.h index 4aff6b9d31..47a89bfcf9 100644 --- a/src/slope_func.h +++ b/src/slope_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/slope_type.h b/src/slope_type.h index 395b1f0fbc..a2c51bd19e 100644 --- a/src/slope_type.h +++ b/src/slope_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index e9747400d6..00f682f635 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -335,8 +333,7 @@ void BuildOwnerLegend() _legend_land_owners[1].colour = _heightmap_schemes[_settings_client.gui.smallmap_land_colour].default_colour; int i = NUM_NO_COMPANY_ENTRIES; - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { _legend_land_owners[i].colour = _colour_gradient[c->colour][5]; _legend_land_owners[i].company = c->index; _legend_land_owners[i].show_on_map = true; @@ -879,8 +876,7 @@ void SmallMapWindow::DrawSmallMapColumn(void *dst, uint xc, uint yc, int pitch, */ void SmallMapWindow::DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) const { - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == VEH_EFFECT) continue; if (v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) continue; @@ -918,8 +914,7 @@ void SmallMapWindow::DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) co */ void SmallMapWindow::DrawTowns(const DrawPixelInfo *dpi) const { - const Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { /* Remap the town coordinate */ Point pt = this->RemapTile(TileX(t->xy), TileY(t->xy)); int x = pt.x - this->subscroll - (t->cache.sign.width_small >> 1); diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h index a167d81988..558ab0634a 100644 --- a/src/smallmap_gui.h +++ b/src/smallmap_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sortlist_type.h b/src/sortlist_type.h index 47f6638634..a8730d96d9 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound.cpp b/src/sound.cpp index 0b21ef1229..d96adfe29f 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp index f6bb963062..f7fa5df08b 100644 --- a/src/sound/allegro_s.cpp +++ b/src/sound/allegro_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/allegro_s.h b/src/sound/allegro_s.h index 2ad3717401..307d10fca4 100644 --- a/src/sound/allegro_s.h +++ b/src/sound/allegro_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/cocoa_s.cpp b/src/sound/cocoa_s.cpp index 13fe176f55..10fae12a60 100644 --- a/src/sound/cocoa_s.cpp +++ b/src/sound/cocoa_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/cocoa_s.h b/src/sound/cocoa_s.h index dd2d740204..43646504d7 100644 --- a/src/sound/cocoa_s.h +++ b/src/sound/cocoa_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/null_s.cpp b/src/sound/null_s.cpp index 3dc95c46ff..738c213403 100644 --- a/src/sound/null_s.cpp +++ b/src/sound/null_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/null_s.h b/src/sound/null_s.h index e1e2ad4607..5b883dde1e 100644 --- a/src/sound/null_s.h +++ b/src/sound/null_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/sdl2_s.cpp b/src/sound/sdl2_s.cpp index 98839b1c22..0b4e6c086d 100644 --- a/src/sound/sdl2_s.cpp +++ b/src/sound/sdl2_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/sdl_s.cpp b/src/sound/sdl_s.cpp index f8041aa846..aac786dab5 100644 --- a/src/sound/sdl_s.cpp +++ b/src/sound/sdl_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/sdl_s.h b/src/sound/sdl_s.h index 47352b5175..4f746107c7 100644 --- a/src/sound/sdl_s.h +++ b/src/sound/sdl_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp index 0df69b8b45..f1a0519f83 100644 --- a/src/sound/sound_driver.hpp +++ b/src/sound/sound_driver.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp index d16e5be2dc..f45a619b53 100644 --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/win32_s.h b/src/sound/win32_s.h index a0d53a2dae..be48a055c5 100644 --- a/src/sound/win32_s.h +++ b/src/sound/win32_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp index 2acfd20a3f..8b9afbd1b1 100644 --- a/src/sound/xaudio2_s.cpp +++ b/src/sound/xaudio2_s.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound/xaudio2_s.h b/src/sound/xaudio2_s.h index f3525251cf..70b4d80cc9 100644 --- a/src/sound/xaudio2_s.h +++ b/src/sound/xaudio2_s.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound_func.h b/src/sound_func.h index 7117bb6466..b378dbdfe2 100644 --- a/src/sound_func.h +++ b/src/sound_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sound_type.h b/src/sound_type.h index 76fe25139e..0fb0b0a731 100644 --- a/src/sound_type.h +++ b/src/sound_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sprite.cpp b/src/sprite.cpp index 26b4c4869f..a6ff4c9224 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/sprite.h b/src/sprite.h index 16da834c75..44814c09b9 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/spritecache.cpp b/src/spritecache.cpp index bcc0048278..f36354c013 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/spritecache.h b/src/spritecache.h index f718e687bc..3b3e1c9de5 100644 --- a/src/spritecache.h +++ b/src/spritecache.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index 4a4d7daad5..058193c34c 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/spriteloader/grf.hpp b/src/spriteloader/grf.hpp index 4081a9f337..20d60edf51 100644 --- a/src/spriteloader/grf.hpp +++ b/src/spriteloader/grf.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/spriteloader/spriteloader.hpp b/src/spriteloader/spriteloader.hpp index 060e72d16b..0122631716 100644 --- a/src/spriteloader/spriteloader.hpp +++ b/src/spriteloader/spriteloader.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/station.cpp b/src/station.cpp index 1d2eea4ca6..61c53bc562 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -44,8 +42,7 @@ StationKdtree _station_kdtree(Kdtree_StationXYFunc); void RebuildStationKdtree() { std::vector stids; - BaseStation *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { stids.push_back(st->index); } _station_kdtree.Build(stids.begin(), stids.end()); @@ -100,8 +97,7 @@ Station::~Station() this->loading_vehicles.front()->LeaveStation(); } - Aircraft *a; - FOR_ALL_AIRCRAFT(a) { + for (Aircraft *a : Aircraft::Iterate()) { if (!a->IsNormalAircraft()) continue; if (a->targetairport == this->index) a->targetairport = INVALID_STATION; } @@ -125,8 +121,7 @@ Station::~Station() } } - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { /* Forget about this station if this station is removed */ if (v->last_station_visited == this->index) { v->last_station_visited = INVALID_STATION; @@ -164,7 +159,7 @@ Station::~Station() CargoPacket::InvalidateAllFrom(this->index); _station_kdtree.Remove(this->index); - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index)); + if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index)); } @@ -386,10 +381,8 @@ static void AddIndustryToDeliver(Industry *ind, Station *st) */ void Station::RemoveFromAllNearbyLists() { - Town *t; - FOR_ALL_TOWNS(t) { t->stations_near.erase(this); } - Industry *i; - FOR_ALL_INDUSTRIES(i) { i->stations_near.erase(this); } + for (Town *t : Town::Iterate()) { t->stations_near.erase(this); } + for (Industry *i : Industry::Iterate()) { i->stations_near.erase(this); } } /** @@ -482,8 +475,7 @@ void Station::RecomputeCatchment() */ /* static */ void Station::RecomputeCatchmentForAll() { - Station *st; - FOR_ALL_STATIONS(st) { st->RecomputeCatchment(); } + for (Station *st : Station::Iterate()) { st->RecomputeCatchment(); } } /************************************************************************/ @@ -662,8 +654,7 @@ Money AirportMaintenanceCost(Owner owner) { Money total_cost = 0; - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->owner == owner && (st->facilities & FACIL_AIRPORT)) { total_cost += _price[PR_INFRASTRUCTURE_AIRPORT] * st->airport.GetSpec()->maintenance_cost; } diff --git a/src/station_base.h b/src/station_base.h index 1f597a2897..0c33a58edb 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -527,8 +525,6 @@ public: void GetTileArea(TileArea *ta, StationType type) const override; }; -#define FOR_ALL_STATIONS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Station, var) - /** Iterator to iterate over all tiles belonging to an airport. */ class AirportTileIterator : public OrthogonalTileIterator { private: diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 636b1c4766..8f057453f9 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -253,8 +251,7 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n bool indtypes[NUM_INDUSTRYTYPES]; memset(indtypes, 0, sizeof(indtypes)); - const Station *s; - FOR_ALL_STATIONS(s) { + for (const Station *s : Station::Iterate()) { if (s != st && s->town == t) { if (s->indtype != IT_INVALID) { indtypes[s->indtype] = true; @@ -422,10 +419,14 @@ void Station::UpdateVirtCoord() pt.y -= 32 * ZOOM_LVL_BASE; if ((this->facilities & FACIL_AIRPORT) && this->airport.type == AT_OILRIG) pt.y -= 16 * ZOOM_LVL_BASE; + if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index)); + SetDParam(0, this->index); SetDParam(1, this->facilities); this->sign.UpdatePosition(pt.x, pt.y, STR_VIEWPORT_STATION); + _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeStation(this->index)); + SetWindowDirty(WC_STATION_VIEW, this->index); } @@ -437,21 +438,17 @@ void Station::MoveSign(TileIndex new_xy) { if (this->xy == new_xy) return; - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index)); _station_kdtree.Remove(this->index); this->BaseStation::MoveSign(new_xy); _station_kdtree.Insert(this->index); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeStation(this->index)); } /** Update the virtual coords needed to draw the station sign for all stations. */ void UpdateAllStationVirtCoords() { - BaseStation *st; - - FOR_ALL_BASE_STATIONS(st) { + for (BaseStation *st : BaseStation::Iterate()) { st->UpdateVirtCoord(); } } @@ -694,7 +691,6 @@ static CommandCost BuildStationPart(Station **st, DoCommandFlag flags, bool reus if (flags & DC_EXEC) { *st = new Station(area.tile); _station_kdtree.Insert((*st)->index); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeStation((*st)->index)); (*st)->town = ClosestTownFromTile(area.tile, UINT_MAX); (*st)->string_id = GenerateStationName(*st, area.tile, name_class); @@ -2037,8 +2033,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) delete cur_stop; /* Make sure no vehicle is going to the old roadstop */ - RoadVehicle *v; - FOR_ALL_ROADVEHICLES(v) { + for (RoadVehicle *v : RoadVehicle::Iterate()) { if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) && v->dest_tile == tile) { v->SetDestTile(v->GetOrderStationLocation(st->index)); @@ -2127,30 +2122,13 @@ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, ui /* Update company infrastructure counts. */ int count = CountBits(road_bits); UpdateCompanyRoadInfrastructure(road_type[RTT_ROAD], road_owner[RTT_ROAD], count); - UpdateCompanyRoadInfrastructure(road_type[RTT_TRAM], road_owner[RTT_ROAD], count); + UpdateCompanyRoadInfrastructure(road_type[RTT_TRAM], road_owner[RTT_TRAM], count); } } return had_success ? cost : last_error; } -/** - * Computes the minimal distance from town's xy to any airport's tile. - * @param it An iterator over all airport tiles. - * @param town_tile town's tile (t->xy) - * @return minimal manhattan distance from town_tile to any airport's tile - */ -static uint GetMinimalAirportDistanceToTile(TileIterator &it, TileIndex town_tile) -{ - uint mindist = UINT_MAX; - - for (TileIndex cur_tile = it; cur_tile != INVALID_TILE; cur_tile = ++it) { - mindist = min(mindist, DistanceManhattan(town_tile, cur_tile)); - } - - return mindist; -} - /** * Get a possible noise reduction factor based on distance from town center. * The further you get, the less noise you generate. @@ -2190,14 +2168,25 @@ uint8 GetAirportNoiseLevelForDistance(const AirportSpec *as, uint distance) */ Town *AirportGetNearestTown(const AirportSpec *as, const TileIterator &it, uint &mindist) { - Town *t, *nearest = nullptr; - uint add = as->size_x + as->size_y - 2; // GetMinimalAirportDistanceToTile can differ from DistanceManhattan by this much - mindist = UINT_MAX - add; // prevent overflow - FOR_ALL_TOWNS(t) { - if (DistanceManhattan(t->xy, it) < mindist + add) { // avoid calling GetMinimalAirportDistanceToTile too often - TileIterator *copy = it.Clone(); - uint dist = GetMinimalAirportDistanceToTile(*copy, t->xy); - delete copy; + assert(Town::GetNumItems() > 0); + + Town *nearest = nullptr; + + uint perimeter_min_x = TileX(it); + uint perimeter_min_y = TileY(it); + uint perimeter_max_x = perimeter_min_x + as->size_x - 1; + uint perimeter_max_y = perimeter_min_y + as->size_y - 1; + + mindist = UINT_MAX - 1; // prevent overflow + + std::unique_ptr copy(it.Clone()); + for (TileIndex cur_tile = *copy; cur_tile != INVALID_TILE; cur_tile = ++*copy) { + if (TileX(cur_tile) == perimeter_min_x || TileX(cur_tile) == perimeter_max_x || TileY(cur_tile) == perimeter_min_y || TileY(cur_tile) == perimeter_max_y) { + Town *t = CalcClosestTownFromTile(cur_tile, mindist + 1); + if (t == nullptr) continue; + + uint dist = DistanceManhattan(t->xy, cur_tile); + if (dist == mindist && t->index < nearest->index) nearest = t; if (dist < mindist) { nearest = t; mindist = dist; @@ -2212,12 +2201,9 @@ Town *AirportGetNearestTown(const AirportSpec *as, const TileIterator &it, uint /** Recalculate the noise generated by the airports of each town */ void UpdateAirportsNoise() { - Town *t; - const Station *st; + for (Town *t : Town::Iterate()) t->noise_reached = 0; - FOR_ALL_TOWNS(t) t->noise_reached = 0; - - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->airport.tile != INVALID_TILE && st->airport.type != AT_OILRIG) { const AirportSpec *as = st->airport.GetSpec(); AirportTileIterator it(st); @@ -2294,8 +2280,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint } else { Town *t = ClosestTownFromTile(tile, UINT_MAX); uint num = 0; - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->town == t && (st->facilities & FACIL_AIRPORT) && st->airport.type != AT_OILRIG) num++; } if (num >= 2) { @@ -2386,8 +2371,7 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags) CommandCost cost(EXPENSES_CONSTRUCTION); - const Aircraft *a; - FOR_ALL_AIRCRAFT(a) { + for (const Aircraft *a : Aircraft::Iterate()) { if (!a->IsNormalAircraft()) continue; if (a->targetairport == st->index && a->state != FLYING) { return_cmd_error(STR_ERROR_AIRCRAFT_IN_THE_WAY); @@ -2486,8 +2470,7 @@ CommandCost CmdOpenCloseAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, */ bool HasStationInUse(StationID station, bool include_company, CompanyID company) { - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if ((v->owner == company) == include_company) { const Order *order; FOR_VEHICLE_ORDERS(v, order) { @@ -2727,8 +2710,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags) * will be selected and in case of no appropriate order it will just * wander around the world. */ if (!(st->facilities & FACIL_DOCK)) { - Ship *s; - FOR_ALL_SHIPS(s) { + for (Ship *s : Ship::Iterate()) { if (s->current_order.IsType(OT_LOADING) && s->current_order.GetDestination() == st->index) { s->LeaveStation(); } @@ -3670,9 +3652,8 @@ void DeleteStaleLinks(Station *from) if (auto_distributed) { /* Have all vehicles refresh their next hops before deciding to * remove the node. */ - OrderList *l; std::vector vehicles; - FOR_ALL_ORDER_LISTS(l) { + for (OrderList *l : OrderList::Iterate()) { bool found_from = false; bool found_to = false; for (Order *order = l->GetFirstOrder(); order != nullptr; order = order->next) { @@ -3825,8 +3806,7 @@ void OnTick_Station() { if (_game_mode == GM_EDITOR) return; - BaseStation *st; - FOR_ALL_BASE_STATIONS(st) { + for (BaseStation *st : BaseStation::Iterate()) { StationHandleSmallTick(st); /* Clean up the link graph about once a week. */ @@ -3849,9 +3829,7 @@ void OnTick_Station() /** Monthly loop for stations. */ void StationMonthlyLoop() { - Station *st; - - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { for (CargoID i = 0; i < NUM_CARGO; i++) { GoodsEntry *ge = &st->goods[i]; SB(ge->status, GoodsEntry::GES_LAST_MONTH, 1, GB(ge->status, GoodsEntry::GES_CURRENT_MONTH, 1)); @@ -3923,9 +3901,7 @@ static uint UpdateStationWaiting(Station *st, CargoID type, uint amount, SourceT static bool IsUniqueStationName(const char *name) { - const Station *st; - - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->name != nullptr && strcmp(st->name, name) == 0) return false; } @@ -4159,7 +4135,6 @@ void BuildOilRig(TileIndex tile) st->rect.BeforeAddTile(tile, StationRect::ADD_FORCE); st->UpdateVirtCoord(); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeStation(st->index)); st->RecomputeCatchment(); UpdateStationAcceptance(st, false); } @@ -4172,6 +4147,10 @@ void DeleteOilRig(TileIndex tile) /* The oil rig station is not supposed to be shared with anything else */ assert(st->facilities == (FACIL_AIRPORT | FACIL_DOCK) && st->airport.type == AT_OILRIG); + if (st->industry != nullptr && st->industry->neutral_station == st) { + /* Don't leave dangling neutral station pointer */ + st->industry->neutral_station = nullptr; + } delete st; } diff --git a/src/station_func.h b/src/station_func.h index 86aae1e56e..e7a32b8a5b 100644 --- a/src/station_func.h +++ b/src/station_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 2bee2d80fb..a4804528cd 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -231,8 +229,7 @@ protected: this->stations.clear(); - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->owner == owner || (st->owner == OWNER_NONE && HasStationInUse(st->index, true, owner))) { if (this->facilities & st->facilities) { // only stations with selected facilities int num_waiting_cargo = 0; @@ -2244,8 +2241,7 @@ static const T *FindStationsNearby(TileArea ta, bool distant_join) } /* Look for deleted stations */ - const BaseStation *st; - FOR_ALL_BASE_STATIONS(st) { + for (const BaseStation *st : BaseStation::Iterate()) { if (T::IsExpected(st) && !st->IsInUse() && st->owner == _local_company) { /* Include only within station spread (yes, it is strictly less than) */ if (max(DistanceMax(ta.tile, st->xy), DistanceMax(TILE_ADDXY(ta.tile, ta.w - 1, ta.h - 1), st->xy)) < _settings_game.station.station_spread) { diff --git a/src/station_gui.h b/src/station_gui.h index 6640856246..ac2fa2fc32 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/station_map.h b/src/station_map.h index 98f8f288bc..dbb00ef2f5 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/station_type.h b/src/station_type.h index 9afbc22056..36ce7c3ce7 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 82939e8961..322e196dfa 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -122,8 +120,7 @@ struct StatusBarWindow : Window { case WID_S_RIGHT: { int64 max_money = UINT32_MAX; - const Company *c; - FOR_ALL_COMPANIES(c) max_money = max(c->money, max_money); + for (const Company *c : Company::Iterate()) max_money = max(c->money, max_money); SetDParam(0, 100LL * max_money); d = GetStringBoundingBox(STR_COMPANY_MONEY); break; diff --git a/src/statusbar_gui.h b/src/statusbar_gui.h index 574a75c73f..26503dbff1 100644 --- a/src/statusbar_gui.h +++ b/src/statusbar_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/stdafx.h b/src/stdafx.h index 7f7f9cc6e7..4fb84a956e 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/story.cpp b/src/story.cpp index d2a357b5fc..0d465fde85 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -159,8 +157,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3 /* Allow at most 128 elements per page. */ uint16 element_count = 0; - StoryPageElement *iter; - FOR_ALL_STORY_PAGE_ELEMENTS(iter) { + for (StoryPageElement *iter : StoryPageElement::Iterate()) { if (iter->page == page_id) element_count++; } if (element_count >= 128) return CMD_ERROR; @@ -319,8 +316,7 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (flags & DC_EXEC) { StoryPage *p = StoryPage::Get(page_id); - StoryPageElement *pe; - FOR_ALL_STORY_PAGE_ELEMENTS(pe) { + for (StoryPageElement *pe : StoryPageElement::Iterate()) { if (pe->page == p->index) { delete pe; } diff --git a/src/story_base.h b/src/story_base.h index 4cc857b8d3..e82b9d6964 100644 --- a/src/story_base.h +++ b/src/story_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -62,9 +60,6 @@ struct StoryPageElement : StoryPageElementPool::PoolItem<&_story_page_element_po inline ~StoryPageElement() { free(this->text); } }; -#define FOR_ALL_STORY_PAGE_ELEMENTS_FROM(var, start) FOR_ALL_ITEMS_FROM(StoryPageElement, story_page_element_index, var, start) -#define FOR_ALL_STORY_PAGE_ELEMENTS(var) FOR_ALL_STORY_PAGE_ELEMENTS_FROM(var, 0) - /** Struct about stories, current and completed */ struct StoryPage : StoryPagePool::PoolItem<&_story_page_pool> { uint32 sort_value; ///< A number that increases for every created story page. Used for sorting. The id of a story page is the pool index. @@ -84,8 +79,7 @@ struct StoryPage : StoryPagePool::PoolItem<&_story_page_pool> { inline ~StoryPage() { if (!this->CleaningPool()) { - StoryPageElement *spe; - FOR_ALL_STORY_PAGE_ELEMENTS(spe) { + for (StoryPageElement *spe : StoryPageElement::Iterate()) { if (spe->page == this->index) delete spe; } } @@ -93,8 +87,5 @@ struct StoryPage : StoryPagePool::PoolItem<&_story_page_pool> { } }; -#define FOR_ALL_STORY_PAGES_FROM(var, start) FOR_ALL_ITEMS_FROM(StoryPage, story_page_index, var, start) -#define FOR_ALL_STORY_PAGES(var) FOR_ALL_STORY_PAGES_FROM(var, 0) - #endif /* STORY_BASE_H */ diff --git a/src/story_gui.cpp b/src/story_gui.cpp index 316e79ebb9..677d88bba8 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -54,8 +52,7 @@ protected: if (this->story_pages.NeedRebuild()) { this->story_pages.clear(); - const StoryPage *p; - FOR_ALL_STORY_PAGES(p) { + for (const StoryPage *p : StoryPage::Iterate()) { if (this->IsPageAvailable(p)) { this->story_pages.push_back(p); } @@ -82,8 +79,7 @@ protected: const StoryPage *p = GetSelPage(); if (p != nullptr) { - const StoryPageElement *pe; - FOR_ALL_STORY_PAGE_ELEMENTS(pe) { + for (const StoryPageElement *pe : StoryPageElement::Iterate()) { if (pe->page == p->index) { this->story_page_elements.push_back(pe); } diff --git a/src/story_type.h b/src/story_type.h index 392249da23..1dce00008b 100644 --- a/src/story_type.h +++ b/src/story_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index c33e884af0..c59be0021d 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h index 69b8732f17..2110d30876 100644 --- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 84fc3537be..7e43471b26 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/string.cpp b/src/string.cpp index ed3f7cc66b..dea369037b 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/string_base.h b/src/string_base.h index 02856cf1c6..a22be65713 100644 --- a/src/string_base.h +++ b/src/string_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/string_func.h b/src/string_func.h index 1f622870e1..9942e9a6a7 100644 --- a/src/string_func.h +++ b/src/string_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/string_type.h b/src/string_type.h index b4e8237c41..ced1ab1def 100644 --- a/src/string_type.h +++ b/src/string_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/stringfilter.cpp b/src/stringfilter.cpp index d0bffb2706..30876a82d8 100644 --- a/src/stringfilter.cpp +++ b/src/stringfilter.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/stringfilter_type.h b/src/stringfilter_type.h index c2acffc35e..92db480a6f 100644 --- a/src/stringfilter_type.h +++ b/src/stringfilter_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strings.cpp b/src/strings.cpp index 5593f6ba05..c65f866360 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strings_func.h b/src/strings_func.h index 26ca56fbd5..6ef36dafc6 100644 --- a/src/strings_func.h +++ b/src/strings_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/strings_type.h b/src/strings_type.h index 11eeef1532..41ddfa957e 100644 --- a/src/strings_type.h +++ b/src/strings_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/subsidy.cpp b/src/subsidy.cpp index 711b918109..e3913a2891 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -132,14 +130,11 @@ static inline void SetPartOfSubsidyFlag(SourceType type, SourceID index, PartOfS /** Perform a full rebuild of the subsidies cache. */ void RebuildSubsidisedSourceAndDestinationCache() { - Town *t; - FOR_ALL_TOWNS(t) t->cache.part_of_subsidy = POS_NONE; + for (Town *t : Town::Iterate()) t->cache.part_of_subsidy = POS_NONE; - Industry *i; - FOR_ALL_INDUSTRIES(i) i->part_of_subsidy = POS_NONE; + for (Industry *i : Industry::Iterate()) i->part_of_subsidy = POS_NONE; - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { SetPartOfSubsidyFlag(s->src_type, s->src, POS_SRC); SetPartOfSubsidyFlag(s->dst_type, s->dst, POS_DST); } @@ -154,8 +149,7 @@ void DeleteSubsidyWith(SourceType type, SourceID index) { bool dirty = false; - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { if ((s->src_type == type && s->src == index) || (s->dst_type == type && s->dst == index)) { delete s; dirty = true; @@ -179,8 +173,7 @@ void DeleteSubsidyWith(SourceType type, SourceID index) */ static bool CheckSubsidyDuplicate(CargoID cargo, SourceType src_type, SourceID src, SourceType dst_type, SourceID dst) { - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (s->cargo_type == cargo && s->src_type == src_type && s->src == src && s->dst_type == dst_type && s->dst == dst) { @@ -474,8 +467,7 @@ void SubsidyMonthlyLoop() { bool modified = false; - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { if (--s->remaining == 0) { if (!s->IsAwarded()) { Pair reftype = SetupSubsidyDecodeParam(s, true); @@ -567,8 +559,7 @@ bool CheckSubsidised(CargoID cargo_type, CompanyID company, SourceType src_type, * which are destination of subsidised path. Do that only if needed */ std::vector towns_near; if (!st->rect.IsEmpty()) { - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { /* Don't create the cache if there is no applicable subsidy with town as destination */ if (s->dst_type != ST_TOWN) continue; if (s->cargo_type != cargo_type || s->src_type != src_type || s->src != src) continue; @@ -588,8 +579,7 @@ bool CheckSubsidised(CargoID cargo_type, CompanyID company, SourceType src_type, /* Check if there's a (new) subsidy that applies. There can be more subsidies triggered by this delivery! * Think about the case that subsidies are A->B and A->C and station has both B and C in its catchment area */ - Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (Subsidy *s : Subsidy::Iterate()) { if (s->cargo_type == cargo_type && s->src_type == src_type && s->src == src && (!s->IsAwarded() || s->awarded == company)) { switch (s->dst_type) { case ST_INDUSTRY: diff --git a/src/subsidy_base.h b/src/subsidy_base.h index a7f6f4f3ee..ef26f64167 100644 --- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -60,7 +58,4 @@ static const uint SUBSIDY_CARGO_MIN_POPULATION = 900; ///< Min. population of de static const uint SUBSIDY_MAX_PCT_TRANSPORTED = 42; ///< Subsidy will be created only for towns/industries with less % transported static const uint SUBSIDY_MAX_DISTANCE = 70; ///< Max. length of subsidised route (DistanceManhattan) -#define FOR_ALL_SUBSIDIES_FROM(var, start) FOR_ALL_ITEMS_FROM(Subsidy, subsidy_index, var, start) -#define FOR_ALL_SUBSIDIES(var) FOR_ALL_SUBSIDIES_FROM(var, 0) - #endif /* SUBSIDY_BASE_H */ diff --git a/src/subsidy_func.h b/src/subsidy_func.h index 2e53e14d7a..4889ead249 100644 --- a/src/subsidy_func.h +++ b/src/subsidy_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp index e71b62f94f..f9a17f7b72 100644 --- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -44,8 +42,7 @@ struct SubsidyListWindow : Window { int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SUL_PANEL, WD_FRAMERECT_TOP); int num = 0; - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (!s->IsAwarded()) { y--; if (y == 0) { @@ -64,7 +61,7 @@ struct SubsidyListWindow : Window { y -= 2; // "Services already subsidised:" if (y < 0) return; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (s->IsAwarded()) { y--; if (y == 0) { @@ -112,8 +109,7 @@ struct SubsidyListWindow : Window { /* Count number of (non) awarded subsidies */ uint num_awarded = 0; uint num_not_awarded = 0; - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (!s->IsAwarded()) { num_not_awarded++; } else { @@ -161,8 +157,7 @@ struct SubsidyListWindow : Window { pos++; uint num = 0; - const Subsidy *s; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (!s->IsAwarded()) { if (IsInsideMM(pos, 0, cap)) { /* Displays the two offered towns */ @@ -186,7 +181,7 @@ struct SubsidyListWindow : Window { pos++; num = 0; - FOR_ALL_SUBSIDIES(s) { + for (const Subsidy *s : Subsidy::Iterate()) { if (s->IsAwarded()) { if (IsInsideMM(pos, 0, cap)) { SetupSubsidyDecodeParam(s, true); diff --git a/src/subsidy_type.h b/src/subsidy_type.h index 968351ffb3..6ee80ca3c1 100644 --- a/src/subsidy_type.h +++ b/src/subsidy_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index 89989ee988..ec30874f71 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/airport_movement.h b/src/table/airport_movement.h index 010ceef38a..14fe1c9abb 100644 --- a/src/table/airport_movement.h +++ b/src/table/airport_movement.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/airporttile_ids.h b/src/table/airporttile_ids.h index fa97753877..73eafc8595 100644 --- a/src/table/airporttile_ids.h +++ b/src/table/airporttile_ids.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h index 47a9631583..d4fb3d968e 100644 --- a/src/table/airporttiles.h +++ b/src/table/airporttiles.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/animcursors.h b/src/table/animcursors.h index 08a90757a2..ed25691a5e 100644 --- a/src/table/animcursors.h +++ b/src/table/animcursors.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/autorail.h b/src/table/autorail.h index 5b93668edc..8c5a5a492f 100644 --- a/src/table/autorail.h +++ b/src/table/autorail.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/bridge_land.h b/src/table/bridge_land.h index b06a4076be..fab0605901 100644 --- a/src/table/bridge_land.h +++ b/src/table/bridge_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/build_industry.h b/src/table/build_industry.h index 07ac84a3dc..c045992b31 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/cargo_const.h b/src/table/cargo_const.h index bc3f139563..ad1ed8a215 100644 --- a/src/table/cargo_const.h +++ b/src/table/cargo_const.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/clear_land.h b/src/table/clear_land.h index 345f055c6f..bc6718c6b5 100644 --- a/src/table/clear_land.h +++ b/src/table/clear_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/company_settings.ini b/src/table/company_settings.ini index 3ff5d64299..e853810a17 100644 --- a/src/table/company_settings.ini +++ b/src/table/company_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/table/control_codes.h b/src/table/control_codes.h index d8e9673e9f..7f42d2c4f6 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini index d68f4bfc28..34199501f3 100644 --- a/src/table/currency_settings.ini +++ b/src/table/currency_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/table/elrail_data.h b/src/table/elrail_data.h index df5788fa87..12132848b8 100644 --- a/src/table/elrail_data.h +++ b/src/table/elrail_data.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/engines.h b/src/table/engines.h index 7a40e4f7ed..85e0ad2b6f 100644 --- a/src/table/engines.h +++ b/src/table/engines.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini index b18ed9d75f..d1634e349d 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/gameopt_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/table/genland.h b/src/table/genland.h index fd2a07e7ab..53801e2f68 100644 --- a/src/table/genland.h +++ b/src/table/genland.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/heightmap_colours.h b/src/table/heightmap_colours.h index 42b99eeca1..9f4b7d4129 100644 --- a/src/table/heightmap_colours.h +++ b/src/table/heightmap_colours.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/industry_land.h b/src/table/industry_land.h index fe5dd5b6e5..c0c50fa7d5 100644 --- a/src/table/industry_land.h +++ b/src/table/industry_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/landscape_sprite.h b/src/table/landscape_sprite.h index ceadd3e584..57855a9607 100644 --- a/src/table/landscape_sprite.h +++ b/src/table/landscape_sprite.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini index f920f515d2..c9441459ff 100644 --- a/src/table/misc_settings.ini +++ b/src/table/misc_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h index 89c289355a..c5ed48df47 100644 --- a/src/table/newgrf_debug_data.h +++ b/src/table/newgrf_debug_data.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/object_land.h b/src/table/object_land.h index a19b2cb089..ed26a0f500 100644 --- a/src/table/object_land.h +++ b/src/table/object_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/palette_convert.h b/src/table/palette_convert.h index 58c190424f..0a3e3d4a4e 100644 --- a/src/table/palette_convert.h +++ b/src/table/palette_convert.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/palettes.h b/src/table/palettes.h index 93cb7385e1..e5d1684b3f 100644 --- a/src/table/palettes.h +++ b/src/table/palettes.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/pricebase.h b/src/table/pricebase.h index 9dc2ee2ba7..5051254a38 100644 --- a/src/table/pricebase.h +++ b/src/table/pricebase.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/railtypes.h b/src/table/railtypes.h index 829b223b5e..95285de5f0 100644 --- a/src/table/railtypes.h +++ b/src/table/railtypes.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/road_land.h b/src/table/road_land.h index 2b3a4177f8..67423784a2 100644 --- a/src/table/road_land.h +++ b/src/table/road_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/roadtypes.h b/src/table/roadtypes.h index 4fcd3d6e76..d11573d632 100644 --- a/src/table/roadtypes.h +++ b/src/table/roadtypes.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/roadveh_movement.h b/src/table/roadveh_movement.h index f6f75c834b..bb4c5df3b2 100644 --- a/src/table/roadveh_movement.h +++ b/src/table/roadveh_movement.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble index 65fc489fac..2be8239a6c 100644 --- a/src/table/settings.h.preamble +++ b/src/table/settings.h.preamble @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/settings.ini b/src/table/settings.ini index e67bfc8ccf..4c3d6ce0d4 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -1382,6 +1380,7 @@ guiflags = SGF_NO_NETWORK def = DEF_SNOWLINE_HEIGHT min = MIN_SNOWLINE_HEIGHT max = MAX_SNOWLINE_HEIGHT +interval = 1 str = STR_CONFIG_SETTING_SNOWLINE_HEIGHT strhelp = STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT strval = STR_JUST_COMMA @@ -2375,9 +2374,9 @@ base = GameSettings var = game_creation.custom_sea_level type = SLE_UINT8 from = SLV_149 -def = 1 -min = 2 -max = 90 +def = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE +min = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE +max = CUSTOM_SEA_LEVEL_MAX_PERCENTAGE cat = SC_BASIC [SDT_VAR] diff --git a/src/table/sprites.h b/src/table/sprites.h index a0e068f8fd..5df55b8ae4 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/station_land.h b/src/table/station_land.h index b678297d90..6b4b2267ac 100644 --- a/src/table/station_land.h +++ b/src/table/station_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index 6297eea3bc..1c565089ad 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/string_colours.h b/src/table/string_colours.h index ae64705a57..3af980bae4 100644 --- a/src/table/string_colours.h +++ b/src/table/string_colours.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/town_land.h b/src/table/town_land.h index 6476015119..80a181baa3 100644 --- a/src/table/town_land.h +++ b/src/table/town_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/townname.h b/src/table/townname.h index b870aa04b7..4a7da93e9a 100644 --- a/src/table/townname.h +++ b/src/table/townname.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/track_land.h b/src/table/track_land.h index 1916a54f6b..33950a4389 100644 --- a/src/table/track_land.h +++ b/src/table/track_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/train_cmd.h b/src/table/train_cmd.h index 15ac6f2aab..cc53582f8d 100644 --- a/src/table/train_cmd.h +++ b/src/table/train_cmd.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/tree_land.h b/src/table/tree_land.h index 64757267ec..6c35cc3f07 100644 --- a/src/table/tree_land.h +++ b/src/table/tree_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/unicode.h b/src/table/unicode.h index a83a65861c..882fcb5696 100644 --- a/src/table/unicode.h +++ b/src/table/unicode.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/water_land.h b/src/table/water_land.h index d3cb0a3f98..c1d55de956 100644 --- a/src/table/water_land.h +++ b/src/table/water_land.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/table/win32_settings.ini b/src/table/win32_settings.ini index 4b3d6f5598..c7915e32bd 100644 --- a/src/table/win32_settings.ini +++ b/src/table/win32_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/table/window_settings.ini b/src/table/window_settings.ini index 998afc8dbb..fc0c57b39e 100644 --- a/src/table/window_settings.ini +++ b/src/table/window_settings.ini @@ -1,5 +1,3 @@ -; $Id$ -; ; This file is part of OpenTTD. ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/tar_type.h b/src/tar_type.h index 14b23aea64..e428bc2496 100644 --- a/src/tar_type.h +++ b/src/tar_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index eb6ec2b530..85edb73128 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index f582ab2687..9f727ce729 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -502,8 +500,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed) _generating_world = true; /* Delete all companies */ - Company *c; - FOR_ALL_COMPANIES(c) { + for (Company *c : Company::Iterate()) { ChangeOwnershipOfCompanyItems(c->index, INVALID_OWNER); delete c; } @@ -511,8 +508,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed) _generating_world = false; /* Delete all station signs */ - BaseStation *st; - FOR_ALL_BASE_STATIONS(st) { + for (BaseStation *st : BaseStation::Iterate()) { /* There can be buoys, remove them */ if (IsBuoyTile(st->xy)) DoCommand(st->xy, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR); if (!st->IsInUse()) delete st; diff --git a/src/terraform_gui.h b/src/terraform_gui.h index 22cfe79c50..79ffd86764 100644 --- a/src/terraform_gui.h +++ b/src/terraform_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textbuf.cpp b/src/textbuf.cpp index 3847575661..53d90e6c24 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textbuf_gui.h b/src/textbuf_gui.h index e8f5159f94..c96f4e2e06 100644 --- a/src/textbuf_gui.h +++ b/src/textbuf_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textbuf_type.h b/src/textbuf_type.h index 22dfd3ffdc..a238aa74b5 100644 --- a/src/textbuf_type.h +++ b/src/textbuf_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/texteff.cpp b/src/texteff.cpp index 5e8c749858..f08701939f 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/texteff.hpp b/src/texteff.hpp index 114cebed02..789b12d540 100644 --- a/src/texteff.hpp +++ b/src/texteff.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index 5676a7d101..e44d9178d9 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textfile_gui.h b/src/textfile_gui.h index 237b360539..d67435c015 100644 --- a/src/textfile_gui.h +++ b/src/textfile_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/textfile_type.h b/src/textfile_type.h index 374b4641a3..ddb26f6a65 100644 --- a/src/textfile_type.h +++ b/src/textfile_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tgp.cpp b/src/tgp.cpp index 3fd42e0fdb..fb5c69cf75 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tgp.h b/src/tgp.h index 42f991e91d..8d8d974892 100644 --- a/src/tgp.h +++ b/src/tgp.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/thread.h b/src/thread.h index be1d7d4636..f4a16d4e0d 100644 --- a/src/thread.h +++ b/src/thread.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tile_cmd.h b/src/tile_cmd.h index 80f8074ac2..75964abad5 100644 --- a/src/tile_cmd.h +++ b/src/tile_cmd.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tile_map.cpp b/src/tile_map.cpp index a30d1e4426..0b5c8e070b 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tile_map.h b/src/tile_map.h index 89467c4d0a..b6c715e8a8 100644 --- a/src/tile_map.h +++ b/src/tile_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tile_type.h b/src/tile_type.h index c02ba4fc45..132b566f0f 100644 --- a/src/tile_type.h +++ b/src/tile_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tilearea.cpp b/src/tilearea.cpp index 33850c7203..3f240feb40 100644 --- a/src/tilearea.cpp +++ b/src/tilearea.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tilearea_type.h b/src/tilearea_type.h index c599753498..2648219853 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h index 3edef509a2..a6e8a38155 100644 --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h index f1109bf2e5..929d49c4e4 100644 --- a/src/tilehighlight_type.h +++ b/src/tilehighlight_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tilematrix_type.hpp b/src/tilematrix_type.hpp index 78cde1643c..118c994cd5 100644 --- a/src/tilematrix_type.hpp +++ b/src/tilematrix_type.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/timetable.h b/src/timetable.h index fe0848b564..0eba8a7b62 100644 --- a/src/timetable.h +++ b/src/timetable.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 979534bb37..58cf8d46b7 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 087f3f66f0..9e23ebabc9 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 23c10fb727..9a58ff4374 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -759,10 +757,9 @@ static CallBackFunction MenuClickIndustry(int index) static void ToolbarVehicleClick(Window *w, VehicleType veh) { - const Vehicle *v; int dis = ~0; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == veh && v->IsPrimaryVehicle()) ClrBit(dis, v->owner); } PopupMainCompanyToolbMenu(w, WID_TN_VEHICLE_START + veh, dis); diff --git a/src/toolbar_gui.h b/src/toolbar_gui.h index 37fc8f0e9f..6199e0eb73 100644 --- a/src/toolbar_gui.h +++ b/src/toolbar_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/town.h b/src/town.h index ecf8a4f768..c8903d4ff3 100644 --- a/src/town.h +++ b/src/town.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -45,7 +43,7 @@ extern TownPool _town_pool; struct TownCache { uint32 num_houses; ///< Amount of houses uint32 population; ///< Current population of people - ViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this + TrackedViewportSign sign; ///< Location of name sign, UpdateVirtCoord updates this PartOfSubsidy part_of_subsidy; ///< Is this town a source/destination of a subsidy? uint32 squared_town_zone_radius[HZB_END]; ///< UpdateTownRadius updates this given the house count BuildingCounts building_counts; ///< The number of each type of building in the town @@ -187,9 +185,6 @@ TileIndexDiff GetHouseNorthPart(HouseID &house); Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX); -#define FOR_ALL_TOWNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Town, town_index, var, start) -#define FOR_ALL_TOWNS(var) FOR_ALL_TOWNS_FROM(var, 0) - void ResetHouses(); void ClearTownHouse(Town *t, TileIndex tile); diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 2049cbddcc..7b1d5c90ff 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -69,8 +67,7 @@ TownKdtree _town_kdtree(&Kdtree_TownXYFunc); void RebuildTownKdtree() { std::vector townids; - Town *town; - FOR_ALL_TOWNS(town) { + for (const Town *town : Town::Iterate()) { townids.push_back(town->index); } _town_kdtree.Build(townids.begin(), townids.end()); @@ -114,12 +111,10 @@ Town::~Town() DeleteWindowById(WC_TOWN_VIEW, this->index); /* Check no industry is related to us. */ - const Industry *i; - FOR_ALL_INDUSTRIES(i) assert(i->town != this); + for (const Industry *i : Industry::Iterate()) assert(i->town != this); /* ... and no object is related to us. */ - const Object *o; - FOR_ALL_OBJECTS(o) assert(o->town != this); + for (const Object *o : Object::Iterate()) assert(o->town != this); /* Check no tile is related to us. */ for (TileIndex tile = 0; tile < MapSize(); ++tile) { @@ -162,8 +157,7 @@ void Town::PostDestructor(size_t index) UpdateNearestTownForRoadTiles(false); /* Give objects a new home! */ - Object *o; - FOR_ALL_OBJECTS(o) { + for (Object *o : Object::Iterate()) { if (o->town == nullptr) o->town = CalcClosestTownFromTile(o->location.tile, UINT_MAX); } } @@ -396,21 +390,24 @@ static bool IsCloseToTown(TileIndex tile, uint dist) void Town::UpdateVirtCoord() { Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE); + + if (this->cache.sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeTown(this->index)); + SetDParam(0, this->index); SetDParam(1, this->cache.population); this->cache.sign.UpdatePosition(pt.x, pt.y - 24 * ZOOM_LVL_BASE, _settings_client.gui.population_in_label ? STR_VIEWPORT_TOWN_POP : STR_VIEWPORT_TOWN, STR_VIEWPORT_TOWN); + _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeTown(this->index)); + SetWindowDirty(WC_TOWN_VIEW, this->index); } /** Update the virtual coords needed to draw the town sign for all towns. */ void UpdateAllTownVirtCoords() { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { t->UpdateVirtCoord(); } } @@ -437,9 +434,7 @@ static void ChangePopulation(Town *t, int mod) uint32 GetWorldPopulation() { uint32 pop = 0; - const Town *t; - - FOR_ALL_TOWNS(t) pop += t->cache.population; + for (const Town *t : Town::Iterate()) pop += t->cache.population; return pop; } @@ -844,10 +839,9 @@ void UpdateTownCargoes(Town *t) /** Updates the bitmap of all cargoes accepted by houses. */ void UpdateTownCargoBitmap() { - Town *town; _town_cargoes_accepted = 0; - FOR_ALL_TOWNS(town) { + for (const Town *town : Town::Iterate()) { _town_cargoes_accepted |= town->cargo_accepted_total; } } @@ -874,8 +868,7 @@ void OnTick_Town() { if (_game_mode == GM_EDITOR) return; - Town *t; - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { TownTickHandler(t); } } @@ -1784,7 +1777,6 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize t->townnameparts = townnameparts; t->UpdateVirtCoord(); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeTown(t->index)); InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 0); t->InitializeLayout(layout); @@ -1843,9 +1835,7 @@ static CommandCost TownCanBePlacedHere(TileIndex tile) */ static bool IsUniqueTownName(const char *name) { - const Town *t; - - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { if (t->name != nullptr && strcmp(t->name, name) == 0) return false; } @@ -2870,8 +2860,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 if (t == nullptr) return CMD_ERROR; /* Stations refer to towns. */ - const Station *st; - FOR_ALL_STATIONS(st) { + for (const Station *st : Station::Iterate()) { if (st->town == t) { /* Non-oil rig stations are always a problem. */ if (!(st->facilities & FACIL_AIRPORT) || st->airport.type != AT_OILRIG) return CMD_ERROR; @@ -2882,8 +2871,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 } /* Depots refer to towns. */ - const Depot *d; - FOR_ALL_DEPOTS(d) { + for (const Depot *d : Depot::Iterate()) { if (d->town == t) return CMD_ERROR; } @@ -2944,7 +2932,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 /* The town destructor will delete the other things related to the town. */ if (flags & DC_EXEC) { _town_kdtree.Remove(t->index); - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeTown(t->index)); + if (t->cache.sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeTown(t->index)); delete t; } @@ -3157,8 +3145,7 @@ static CommandCost TownActionBribe(Town *t, DoCommandFlag flags) t->unwanted[_current_company] = 6; /* set all close by station ratings to 0 */ - Station *st; - FOR_ALL_STATIONS(st) { + for (Station *st : Station::Iterate()) { if (st->town == t && st->owner == _current_company) { for (CargoID i = 0; i < NUM_CARGO; i++) st->goods[i].rating = 0; } @@ -3292,8 +3279,7 @@ static void ForAllStationsNearTown(Town *t, Func func) static void UpdateTownRating(Town *t) { /* Increase company ratings if they're low */ - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (t->ratings[c->index] < RATING_GROWTH_MAXIMUM) { t->ratings[c->index] = min((int)RATING_GROWTH_MAXIMUM, t->ratings[c->index] + RATING_GROWTH_UP_STEP); } @@ -3362,6 +3348,11 @@ static int CountActiveStations(Town *t) */ static uint GetNormalGrowthRate(Town *t) { + /** + * Note: + * Unserviced+unfunded towns get an additional malus in UpdateTownGrowth(), + * so the "320" is actually not better than the "420". + */ static const uint16 _grow_count_values[2][6] = { { 120, 120, 120, 100, 80, 60 }, // Fund new buildings has been activated { 320, 420, 300, 220, 160, 100 } // Normal values @@ -3444,9 +3435,7 @@ static void UpdateTownAmounts(Town *t) static void UpdateTownUnwanted(Town *t) { - const Company *c; - - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if (t->unwanted[c->index] > 0) t->unwanted[c->index]--; } } @@ -3644,9 +3633,7 @@ CommandCost CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType void TownsMonthlyLoop() { - Town *t; - - FOR_ALL_TOWNS(t) { + for (Town *t : Town::Iterate()) { if (t->road_build_months != 0) t->road_build_months--; if (t->exclusive_counter != 0) { diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 6cb449ab5a..6320803794 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -151,8 +149,7 @@ public: uint exclusive_left = rtl ? right - icon_width - exclusive_width - 2 : left + icon_width + 2; /* Draw list of companies */ - const Company *c; - FOR_ALL_COMPANIES(c) { + for (const Company *c : Company::Iterate()) { if ((HasBit(this->town->have_ratings, c->index) || this->town->exclusivity == c->index)) { DrawCompanyIcon(c->index, icon_left, y + icon_y_offset); @@ -692,8 +689,7 @@ private: if (this->towns.NeedRebuild()) { this->towns.clear(); - const Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { this->towns.push_back(t); } @@ -994,8 +990,7 @@ public: } else { this->towns.clear(); - const Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { this->string_filter.ResetState(); SetDParam(0, t->index); diff --git a/src/town_map.h b/src/town_map.h index 016ff9a6d2..248b1bd323 100644 --- a/src/town_map.h +++ b/src/town_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/town_type.h b/src/town_type.h index 8204083608..f373a3c043 100644 --- a/src/town_type.h +++ b/src/town_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/townname.cpp b/src/townname.cpp index 6d30358868..5cc414794a 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -96,8 +94,7 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names) if (town_names->find(buf1) != town_names->end()) return false; town_names->insert(buf1); } else { - const Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { /* We can't just compare the numbers since * several numbers may map to a single name. */ const char *buf = t->name; diff --git a/src/townname_func.h b/src/townname_func.h index b175f3daf2..6438d2b283 100644 --- a/src/townname_func.h +++ b/src/townname_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/townname_type.h b/src/townname_type.h index ba8f926861..dd95f8f70a 100644 --- a/src/townname_type.h +++ b/src/townname_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/track_func.h b/src/track_func.h index 4171a808b3..1b56668780 100644 --- a/src/track_func.h +++ b/src/track_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/track_type.h b/src/track_type.h index 233376b006..70278c58d9 100644 --- a/src/track_type.h +++ b/src/track_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/train.h b/src/train.h index e122fcf2f9..af638c283d 100644 --- a/src/train.h +++ b/src/train.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -335,6 +333,4 @@ protected: // These functions should not be called outside acceleration code. } }; -#define FOR_ALL_TRAINS(var) FOR_ALL_VEHICLES_OF_TYPE(Train, var) - #endif /* TRAIN_H */ diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 4a4334418b..5d02764b55 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -73,10 +71,9 @@ byte FreightWagonMult(CargoID cargo) /** Checks if lengths of all rail vehicles are valid. If not, shows an error message. */ void CheckTrainsLengths() { - const Train *v; bool first = true; - FOR_ALL_TRAINS(v) { + for (const Train *v : Train::Iterate()) { if (v->First() == v && !(v->vehstatus & VS_CRASHED)) { for (const Train *u = v, *w = v->Next(); w != nullptr; u = w, w = w->Next()) { if (u->track != TRACK_BIT_DEPOT) { @@ -643,8 +640,7 @@ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const CheckConsistencyOfArticulatedVehicle(v); /* Try to connect the vehicle to one of free chains of wagons. */ - Train *w; - FOR_ALL_TRAINS(w) { + for (Train *w : Train::Iterate()) { if (w->tile == tile && ///< Same depot w->IsFreeWagon() && ///< A free wagon chain w->engine_type == e->index && ///< Same type @@ -662,8 +658,7 @@ static CommandCost CmdBuildRailWagon(TileIndex tile, DoCommandFlag flags, const /** Move all free vehicles in the depot to the train */ static void NormalizeTrainVehInDepot(const Train *u) { - const Train *v; - FOR_ALL_TRAINS(v) { + for (const Train *v : Train::Iterate()) { if (v->IsFreeWagon() && v->tile == u->tile && v->track == TRACK_BIT_DEPOT) { if (DoCommand(0, v->index | 1 << 20, u->index, DC_EXEC, @@ -798,8 +793,7 @@ static Train *FindGoodVehiclePos(const Train *src) EngineID eng = src->engine_type; TileIndex tile = src->tile; - Train *dst; - FOR_ALL_TRAINS(dst) { + for (Train *dst : Train::Iterate()) { if (dst->IsFreeWagon() && dst->tile == tile && !(dst->vehstatus & VS_CRASHED)) { /* check so all vehicles in the line have the same engine. */ Train *t = dst; diff --git a/src/train_gui.cpp b/src/train_gui.cpp index c0f976d6e1..476c8f9cdf 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -35,8 +33,7 @@ void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p /* find a locomotive in the depot. */ const Vehicle *found = nullptr; - const Train *t; - FOR_ALL_TRAINS(t) { + for (const Train *t : Train::Iterate()) { if (t->IsFrontEngine() && t->tile == tile && t->IsStoppedInDepot()) { if (found != nullptr) return; // must be exactly one. found = t; diff --git a/src/transparency.h b/src/transparency.h index ab6f9a6f33..54ba24e933 100644 --- a/src/transparency.h +++ b/src/transparency.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index c396b52f5e..153dcb5d03 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/transparency_gui.h b/src/transparency_gui.h index bf9003b497..85dfd453d8 100644 --- a/src/transparency_gui.h +++ b/src/transparency_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/transport_type.h b/src/transport_type.h index 28a1c5cf8f..b244e48b31 100644 --- a/src/transport_type.h +++ b/src/transport_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index e982abfb28..012904fdce 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp index 1b1dce95ac..5a1da825b1 100644 --- a/src/tree_gui.cpp +++ b/src/tree_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tree_map.h b/src/tree_map.h index f6315e9710..e8f68d825d 100644 --- a/src/tree_map.h +++ b/src/tree_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 4e6d5a7e13..9de5235801 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tunnel_map.h b/src/tunnel_map.h index a1df77f3ce..0fdfcecae2 100644 --- a/src/tunnel_map.h +++ b/src/tunnel_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h index 93603acb59..1e35f891cf 100644 --- a/src/tunnelbridge.h +++ b/src/tunnelbridge.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index db33680501..00c362e776 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/tunnelbridge_map.h b/src/tunnelbridge_map.h index 0f7f17b3ac..62d3c14b2d 100644 --- a/src/tunnelbridge_map.h +++ b/src/tunnelbridge_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 0bb4ed178d..806bf47959 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -672,16 +670,14 @@ static void UpdateVehicleViewportHash(Vehicle *v, int x, int y) void ResetVehicleHash() { - Vehicle *v; - FOR_ALL_VEHICLES(v) { v->hash_tile_current = nullptr; } + for (Vehicle *v : Vehicle::Iterate()) { v->hash_tile_current = nullptr; } memset(_vehicle_viewport_hash, 0, sizeof(_vehicle_viewport_hash)); memset(_vehicle_tile_hash, 0, sizeof(_vehicle_tile_hash)); } void ResetVehicleColourMap() { - Vehicle *v; - FOR_ALL_VEHICLES(v) { v->colourmap = PAL_NONE; } + for (Vehicle *v : Vehicle::Iterate()) { v->colourmap = PAL_NONE; } } /** @@ -949,16 +945,15 @@ void CallVehicleTicks() { PerformanceMeasurer framerate(PFE_GL_ECONOMY); - Station *st; - FOR_ALL_STATIONS(st) LoadUnloadStation(st); + for (Station *st : Station::Iterate()) LoadUnloadStation(st); } PerformanceAccumulator::Reset(PFE_GL_TRAINS); PerformanceAccumulator::Reset(PFE_GL_ROADVEHS); PerformanceAccumulator::Reset(PFE_GL_SHIPS); PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT); - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { + size_t vehicle_index = v->index; /* Vehicle could be deleted in this tick */ if (!v->Tick()) { assert(Vehicle::Get(vehicle_index) == nullptr); @@ -1029,7 +1024,7 @@ void CallVehicleTicks() Backup cur_company(_current_company, FILE_LINE); for (auto &it : _vehicles_to_autoreplace) { - v = it.first; + Vehicle *v = it.first; /* Autoreplace needs the current company set as the vehicle owner */ cur_company.Change(v->owner); @@ -1169,7 +1164,7 @@ void ViewportAddVehicles(DrawPixelInfo *dpi) */ Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y) { - Vehicle *found = nullptr, *v; + Vehicle *found = nullptr; uint dist, best_dist = UINT_MAX; if ((uint)(x -= vp->left) >= (uint)vp->width || (uint)(y -= vp->top) >= (uint)vp->height) return nullptr; @@ -1177,7 +1172,7 @@ Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y) x = ScaleByZoom(x, vp->zoom) + vp->virtual_left; y = ScaleByZoom(y, vp->zoom) + vp->virtual_top; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if ((v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) == 0 && x >= v->coord.left && x <= v->coord.right && y >= v->coord.top && y <= v->coord.bottom) { @@ -1691,8 +1686,7 @@ VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y FreeUnitIDGenerator::FreeUnitIDGenerator(VehicleType type, CompanyID owner) : cache(nullptr), maxid(0), curid(0) { /* Find maximum */ - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == type && v->owner == owner) { this->maxid = max(this->maxid, v->unitnumber); } @@ -1706,7 +1700,7 @@ FreeUnitIDGenerator::FreeUnitIDGenerator(VehicleType type, CompanyID owner) : ca this->cache = CallocT(this->maxid + 2); /* Fill the cache */ - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == type && v->owner == owner) { this->cache[v->unitnumber] = true; } @@ -1782,8 +1776,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type, byte subtype) /* We can build vehicle infrastructure when we may build the vehicle type */ if (max > 0) { /* Can we actually build the vehicle type? */ - const Engine *e; - FOR_ALL_ENGINES_OF_TYPE(e, type) { + for (const Engine *e : Engine::IterateType(type)) { if (type == VEH_ROAD && GetRoadTramType(e->u.road.roadtype) != (RoadTramType)subtype) continue; if (HasBit(e->company_avail, _local_company)) return true; } @@ -1791,8 +1784,7 @@ bool CanBuildVehicleInfrastructure(VehicleType type, byte subtype) } /* We should be able to build infrastructure when we have the actual vehicle type */ - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (type == VEH_ROAD && GetRoadTramType(RoadVehicle::From(v)->roadtype) != (RoadTramType)subtype) continue; if (v->owner == _local_company && v->type == type) return true; } @@ -2749,8 +2741,7 @@ void Vehicle::RemoveFromShared() void VehiclesYearlyLoop() { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (Vehicle *v : Vehicle::Iterate()) { if (v->IsPrimaryVehicle()) { /* show warning if vehicle is not generating enough income last 2 years (corresponds to a red icon in the vehicle list) */ Money profit = v->GetDisplayProfitThisYear(); diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 2b091c340f..bc72c6bbfd 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -973,19 +971,6 @@ public: } }; -/** - * Iterate over all vehicles from a given point. - * @param var The variable used to iterate over. - * @param start The vehicle to start the iteration at. - */ -#define FOR_ALL_VEHICLES_FROM(var, start) FOR_ALL_ITEMS_FROM(Vehicle, vehicle_index, var, start) - -/** - * Iterate over all vehicles. - * @param var The variable used to iterate over. - */ -#define FOR_ALL_VEHICLES(var) FOR_ALL_VEHICLES_FROM(var, 0) - /** * Class defining several overloaded accessors so we don't * have to cast vehicle types that often @@ -1148,14 +1133,14 @@ struct SpecializedVehicle : public Vehicle { this->Vehicle::UpdateViewport(true); } } -}; -/** - * Iterate over all vehicles of a particular type. - * @param name The type of vehicle to iterate over. - * @param var The variable used to iterate over. - */ -#define FOR_ALL_VEHICLES_OF_TYPE(name, var) FOR_ALL_ITEMS_FROM(name, vehicle_index, var, 0) if (var->type == name::EXPECTED_TYPE) + /** + * Returns an iterable ensemble of all valid vehicles of type T + * @param from index of the first vehicle to consider + * @return an iterable ensemble of all valid vehicles of type T + */ + static Pool::IterateWrapper Iterate(size_t from = 0) { return Pool::IterateWrapper(from); } +}; /** Generates sequence of free UnitID numbers */ struct FreeUnitIDGenerator { diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 9a6e236d5a..5ba31945fc 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -749,9 +747,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 */ static bool IsUniqueVehicleName(const char *name) { - const Vehicle *v; - - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->name != nullptr && strcmp(v->name, name) == 0) return false; } diff --git a/src/vehicle_func.h b/src/vehicle_func.h index bdd961bef3..aa8334ebb0 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 32eb2cc05d..bd38ea26ad 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -1627,7 +1625,13 @@ public: if (id_v >= this->vehicles.size()) return; // click out of list bound const Vehicle *v = this->vehicles[id_v]; - if (!VehicleClicked(v)) ShowVehicleViewWindow(v); + if (!VehicleClicked(v)) { + if (_ctrl_pressed) { + ShowCompanyGroupForVehicle(v); + } else { + ShowVehicleViewWindow(v); + } + } break; } @@ -2700,7 +2704,11 @@ public: } break; case WID_VV_SHOW_DETAILS: // show details - ShowVehicleDetailsWindow(v); + if (_ctrl_pressed) { + ShowCompanyGroupForVehicle(v); + } else { + ShowVehicleDetailsWindow(v); + } break; case WID_VV_CLONE: // clone vehicle /* Suppress the vehicle GUI when share-cloning. diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h index 9eb688eee9..fe21325168 100644 --- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index 8e75278412..89410b17ef 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/vehicle_type.h b/src/vehicle_type.h index 29929fd8b0..ae4de36665 100644 --- a/src/vehicle_type.h +++ b/src/vehicle_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp index acb848982d..de37e3abae 100644 --- a/src/vehiclelist.cpp +++ b/src/vehiclelist.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -73,8 +71,7 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine engines->clear(); if (wagons != nullptr && wagons != engines) wagons->clear(); - const Vehicle *v; - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { /* General tests for all vehicle types */ if (v->type != type) continue; if (v->tile != tile) continue; @@ -117,11 +114,9 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli { list->clear(); - const Vehicle *v; - switch (vli.type) { case VL_STATION_LIST: - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == vli.vtype && v->IsPrimaryVehicle()) { const Order *order; @@ -136,19 +131,20 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli } break; - case VL_SHARED_ORDERS: + case VL_SHARED_ORDERS: { /* Add all vehicles from this vehicle's shared order list */ - v = Vehicle::GetIfValid(vli.index); + const Vehicle *v = Vehicle::GetIfValid(vli.index); if (v == nullptr || v->type != vli.vtype || !v->IsPrimaryVehicle()) return false; for (; v != nullptr; v = v->NextShared()) { list->push_back(v); } break; + } case VL_GROUP_LIST: if (vli.index != ALL_GROUP) { - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == vli.vtype && v->IsPrimaryVehicle() && v->owner == vli.company && GroupIsInGroup(v->group_id, vli.index)) { list->push_back(v); @@ -159,7 +155,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli FALLTHROUGH; case VL_STANDARD: - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == vli.vtype && v->owner == vli.company && v->IsPrimaryVehicle()) { list->push_back(v); } @@ -167,7 +163,7 @@ bool GenerateVehicleSortList(VehicleList *list, const VehicleListIdentifier &vli break; case VL_DEPOT_LIST: - FOR_ALL_VEHICLES(v) { + for (const Vehicle *v : Vehicle::Iterate()) { if (v->type == vli.vtype && v->IsPrimaryVehicle()) { const Order *order; diff --git a/src/vehiclelist.h b/src/vehiclelist.h index ed817b71c7..6cb2588ea6 100644 --- a/src/vehiclelist.h +++ b/src/vehiclelist.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index 3d4aea8f11..88e5c528ff 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/allegro_v.h b/src/video/allegro_v.h index f68ce5781d..fb7b84ee2c 100644 --- a/src/video/allegro_v.h +++ b/src/video/allegro_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/cocoa_keys.h b/src/video/cocoa/cocoa_keys.h index e2d5ee9fc0..def145d242 100644 --- a/src/video/cocoa/cocoa_keys.h +++ b/src/video/cocoa/cocoa_keys.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index dc0bbeecc4..7535eaada0 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index afbca6501a..f801d7c041 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -258,11 +256,10 @@ static void QZ_GetDisplayModeInfo(CFArrayRef modes, CFIndex i, int &bpp, uint16 #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11) /* Extract bit depth from mode string. */ - CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode); - if (CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 32; - if (CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 16; - if (CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 8; - CFRelease(pixEnc); + CFAutoRelease pixEnc(CGDisplayModeCopyPixelEncoding(mode)); + if (CFStringCompare(pixEnc.get(), CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 32; + if (CFStringCompare(pixEnc.get(), CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 16; + if (CFStringCompare(pixEnc.get(), CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 8; #else /* CGDisplayModeCopyPixelEncoding is deprecated on OSX 10.11+, but there are no 8 bpp modes anyway... */ bpp = 32; @@ -687,15 +684,13 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel void cocoaSetApplicationBundleDir() { char tmp[MAXPATHLEN]; - CFURLRef url = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle()); - if (CFURLGetFileSystemRepresentation(url, true, (unsigned char*)tmp, MAXPATHLEN)) { + CFAutoRelease url(CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle())); + if (CFURLGetFileSystemRepresentation(url.get(), true, (unsigned char*)tmp, MAXPATHLEN)) { AppendPathSeparator(tmp, lastof(tmp)); _searchpaths[SP_APPLICATION_BUNDLE_DIR] = stredup(tmp); } else { _searchpaths[SP_APPLICATION_BUNDLE_DIR] = NULL; } - - CFRelease(url); } /** diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index a8108b561a..f45c3e971f 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index 3ce22133d2..ae4353868d 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index 4115113cdc..d4c5369414 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm index 8475efb0fd..75d1d416b0 100644 --- a/src/video/cocoa/wnd_quickdraw.mm +++ b/src/video/cocoa/wnd_quickdraw.mm @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index c29fd5fd1b..ac7d38bb7f 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/dedicated_v.h b/src/video/dedicated_v.h index bdf873c3d7..27401aae91 100644 --- a/src/video/dedicated_v.h +++ b/src/video/dedicated_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 4ee2d05ceb..3e98ea9258 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/null_v.h b/src/video/null_v.h index a3b2cb5a81..ed563bffb7 100644 --- a/src/video/null_v.h +++ b/src/video/null_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp index 03d05e2102..9ae8c3ca2a 100644 --- a/src/video/sdl2_v.cpp +++ b/src/video/sdl2_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -23,6 +21,7 @@ #include "../core/math_func.hpp" #include "../fileio_func.h" #include "../framerate_type.h" +#include "../window_func.h" #include "sdl2_v.h" #include #include @@ -354,43 +353,70 @@ bool VideoDriver_SDL::ClaimMousePointer() return true; } +/** + * This is called to indicate that an edit box has gained focus, text input mode should be enabled. + */ +void VideoDriver_SDL::EditBoxGainedFocus() +{ + if (!this->edit_box_focused) { + SDL_StartTextInput(); + this->edit_box_focused = true; + } +} + +/** + * This is called to indicate that an edit box has lost focus, text input mode should be disabled. + */ +void VideoDriver_SDL::EditBoxLostFocus() +{ + if (this->edit_box_focused) { + SDL_StopTextInput(); + this->edit_box_focused = false; + } +} + + struct VkMapping { SDL_Keycode vk_from; byte vk_count; byte map_to; + bool unprintable; }; -#define AS(x, z) {x, 0, z} -#define AM(x, y, z, w) {x, (byte)(y - x), z} +#define AS(x, z) {x, 0, z, false} +#define AM(x, y, z, w) {x, (byte)(y - x), z, false} +#define AS_UP(x, z) {x, 0, z, true} +#define AM_UP(x, y, z, w) {x, (byte)(y - x), z, true} static const VkMapping _vk_mapping[] = { /* Pageup stuff + up/down */ - AM(SDLK_PAGEUP, SDLK_PAGEDOWN, WKC_PAGEUP, WKC_PAGEDOWN), - AS(SDLK_UP, WKC_UP), - AS(SDLK_DOWN, WKC_DOWN), - AS(SDLK_LEFT, WKC_LEFT), - AS(SDLK_RIGHT, WKC_RIGHT), + AS_UP(SDLK_PAGEUP, WKC_PAGEUP), + AS_UP(SDLK_PAGEDOWN, WKC_PAGEDOWN), + AS_UP(SDLK_UP, WKC_UP), + AS_UP(SDLK_DOWN, WKC_DOWN), + AS_UP(SDLK_LEFT, WKC_LEFT), + AS_UP(SDLK_RIGHT, WKC_RIGHT), - AS(SDLK_HOME, WKC_HOME), - AS(SDLK_END, WKC_END), + AS_UP(SDLK_HOME, WKC_HOME), + AS_UP(SDLK_END, WKC_END), - AS(SDLK_INSERT, WKC_INSERT), - AS(SDLK_DELETE, WKC_DELETE), + AS_UP(SDLK_INSERT, WKC_INSERT), + AS_UP(SDLK_DELETE, WKC_DELETE), /* Map letters & digits */ AM(SDLK_a, SDLK_z, 'A', 'Z'), AM(SDLK_0, SDLK_9, '0', '9'), - AS(SDLK_ESCAPE, WKC_ESC), - AS(SDLK_PAUSE, WKC_PAUSE), - AS(SDLK_BACKSPACE, WKC_BACKSPACE), + AS_UP(SDLK_ESCAPE, WKC_ESC), + AS_UP(SDLK_PAUSE, WKC_PAUSE), + AS_UP(SDLK_BACKSPACE, WKC_BACKSPACE), AS(SDLK_SPACE, WKC_SPACE), AS(SDLK_RETURN, WKC_RETURN), AS(SDLK_TAB, WKC_TAB), /* Function keys */ - AM(SDLK_F1, SDLK_F12, WKC_F1, WKC_F12), + AM_UP(SDLK_F1, SDLK_F12, WKC_F1, WKC_F12), /* Numeric part. */ AM(SDLK_KP_0, SDLK_KP_9, '0', '9'), @@ -419,27 +445,18 @@ static uint ConvertSdlKeyIntoMy(SDL_Keysym *sym, WChar *character) { const VkMapping *map; uint key = 0; + bool unprintable = false; for (map = _vk_mapping; map != endof(_vk_mapping); ++map) { if ((uint)(sym->sym - map->vk_from) <= map->vk_count) { key = sym->sym - map->vk_from + map->map_to; + unprintable = map->unprintable; break; } } /* check scancode for BACKQUOTE key, because we want the key left of "1", not anything else (on non-US keyboards) */ -#if defined(_WIN32) || defined(__OS2__) - if (sym->scancode == 41) key = WKC_BACKQUOTE; -#elif defined(__APPLE__) - if (sym->scancode == 10) key = WKC_BACKQUOTE; -#elif defined(__SVR4) && defined(__sun) - if (sym->scancode == 60) key = WKC_BACKQUOTE; - if (sym->scancode == 49) key = WKC_BACKSPACE; -#elif defined(__sgi__) - if (sym->scancode == 22) key = WKC_BACKQUOTE; -#else - if (sym->scancode == 49) key = WKC_BACKQUOTE; -#endif + if (sym->scancode == SDL_SCANCODE_GRAVE) key = WKC_BACKQUOTE; /* META are the command keys on mac */ if (sym->mod & KMOD_GUI) key |= WKC_META; @@ -449,9 +466,9 @@ static uint ConvertSdlKeyIntoMy(SDL_Keysym *sym, WChar *character) /* The mod keys have no character. Prevent '?' */ if (sym->mod & KMOD_GUI || - sym->mod & KMOD_SHIFT || sym->mod & KMOD_CTRL || - sym->mod & KMOD_ALT) { + sym->mod & KMOD_ALT || + unprintable) { *character = WKC_NONE; } else { *character = sym->sym; @@ -554,12 +571,16 @@ int VideoDriver_SDL::PollEvent() uint keycode = ConvertSdlKeyIntoMy(&ev.key.keysym, &character); // Only handle non-text keys here. Text is handled in // SDL_TEXTINPUT below. - if (keycode == WKC_DELETE || + if (!this->edit_box_focused || + keycode == WKC_DELETE || keycode == WKC_NUM_ENTER || keycode == WKC_LEFT || keycode == WKC_RIGHT || + keycode == WKC_UP || + keycode == WKC_DOWN || + keycode == WKC_HOME || + keycode == WKC_END || keycode & WKC_META || - keycode & WKC_SHIFT || keycode & WKC_CTRL || keycode & WKC_ALT || (keycode >= WKC_F1 && keycode <= WKC_F12) || @@ -570,12 +591,17 @@ int VideoDriver_SDL::PollEvent() break; case SDL_TEXTINPUT: { - WChar character; + if (!this->edit_box_focused) break; SDL_Keycode kc = SDL_GetKeyFromName(ev.text.text); uint keycode = ConvertSdlKeycodeIntoMy(kc); - Utf8Decode(&character, ev.text.text); - HandleKeypress(keycode, character); + if (keycode == WKC_BACKQUOTE && FocusedWindowIsConsole()) { + WChar character; + Utf8Decode(&character, ev.text.text); + HandleKeypress(keycode, character); + } else { + HandleTextInput(ev.text.text); + } break; } case SDL_WINDOWEVENT: { @@ -628,6 +654,9 @@ const char *VideoDriver_SDL::Start(const char * const *parm) _draw_threaded = GetDriverParam(parm, "no_threads") == nullptr && GetDriverParam(parm, "no_thread") == nullptr; + SDL_StopTextInput(); + this->edit_box_focused = false; + return nullptr; } diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h index ba7e322ed3..ae456a39d1 100644 --- a/src/video/sdl2_v.h +++ b/src/video/sdl2_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -37,10 +35,19 @@ public: bool ClaimMousePointer() override; + void EditBoxGainedFocus() override; + + void EditBoxLostFocus() override; + const char *GetName() const override { return "sdl"; } private: int PollEvent(); bool CreateMainSurface(uint w, uint h, bool resize); + + /** + * This is true to indicate that keyboard input is in text input mode, and SDL_TEXTINPUT events are enabled. + */ + bool edit_box_focused; }; /** Factory for the SDL video driver. */ diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 87880dea7c..aacd3f2cba 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/sdl_v.h b/src/video/sdl_v.h index cafdbbc614..39c77e5d33 100644 --- a/src/video/sdl_v.h +++ b/src/video/sdl_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index b774c7ba6e..2cca66d3b2 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -93,6 +91,11 @@ public: */ virtual void EditBoxLostFocus() {} + /** + * An edit box gained the input focus + */ + virtual void EditBoxGainedFocus() {} + /** * Get the currently active instance of the video driver. */ diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index cd2b298aea..3deb0beb06 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/video/win32_v.h b/src/video/win32_v.h index aa6bb7c0d5..a0b5c7e161 100644 --- a/src/video/win32_v.h +++ b/src/video/win32_v.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/viewport.cpp b/src/viewport.cpp index 5a5756dfea..06f5023795 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -2180,13 +2178,9 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeStation(StationID id) item.id.station = id; const Station *st = Station::Get(id); - Point pt = RemapCoords(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE, GetTileMaxZ(st->xy) * TILE_HEIGHT); - - pt.y -= 32 * ZOOM_LVL_BASE; - if ((st->facilities & FACIL_AIRPORT) && st->airport.type == AT_OILRIG) pt.y -= 16 * ZOOM_LVL_BASE; - - item.center = pt.x; - item.top = pt.y; + assert(st->sign.kdtree_valid); + item.center = st->sign.center; + item.top = st->sign.top; /* Assume the sign can be a candidate for drawing, so measure its width */ _viewport_sign_maxwidth = max(_viewport_sign_maxwidth, st->sign.width_normal); @@ -2201,12 +2195,9 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeWaypoint(StationID id) item.id.station = id; const Waypoint *st = Waypoint::Get(id); - Point pt = RemapCoords(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE, GetTileMaxZ(st->xy) * TILE_HEIGHT); - - pt.y -= 32 * ZOOM_LVL_BASE; - - item.center = pt.x; - item.top = pt.y; + assert(st->sign.kdtree_valid); + item.center = st->sign.center; + item.top = st->sign.top; /* Assume the sign can be a candidate for drawing, so measure its width */ _viewport_sign_maxwidth = max(_viewport_sign_maxwidth, st->sign.width_normal); @@ -2221,14 +2212,9 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeTown(TownID id) item.id.town = id; const Town *town = Town::Get(id); - /* Avoid using RemapCoords2, it has dependency on the foundations status of the tile, and that can be unavailable during saveload, leading to crashes. - * Instead "fake" foundations by taking the highest Z coordinate of any corner of the tile. */ - Point pt = RemapCoords(TileX(town->xy) * TILE_SIZE, TileY(town->xy) * TILE_SIZE, GetTileMaxZ(town->xy) * TILE_HEIGHT); - - pt.y -= 24 * ZOOM_LVL_BASE; - - item.center = pt.x; - item.top = pt.y; + assert(town->cache.sign.kdtree_valid); + item.center = town->cache.sign.center; + item.top = town->cache.sign.top; /* Assume the sign can be a candidate for drawing, so measure its width */ _viewport_sign_maxwidth = max(_viewport_sign_maxwidth, town->cache.sign.width_normal); @@ -2243,12 +2229,9 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeSign(SignID id) item.id.sign = id; const Sign *sign = Sign::Get(id); - Point pt = RemapCoords(sign->x, sign->y, sign->z); - - pt.y -= 6 * ZOOM_LVL_BASE; - - item.center = pt.x; - item.top = pt.y; + assert(sign->sign.kdtree_valid); + item.center = sign->sign.center; + item.top = sign->sign.top; /* Assume the sign can be a candidate for drawing, so measure its width */ _viewport_sign_maxwidth = max(_viewport_sign_maxwidth, sign->sign.width_normal); @@ -2264,24 +2247,20 @@ void RebuildViewportKdtree() std::vector items; items.reserve(BaseStation::GetNumItems() + Town::GetNumItems() + Sign::GetNumItems()); - const Station *st; - FOR_ALL_STATIONS(st) { - items.push_back(ViewportSignKdtreeItem::MakeStation(st->index)); + for (const Station *st : Station::Iterate()) { + if (st->sign.kdtree_valid) items.push_back(ViewportSignKdtreeItem::MakeStation(st->index)); } - const Waypoint *wp; - FOR_ALL_WAYPOINTS(wp) { - items.push_back(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); + for (const Waypoint *wp : Waypoint::Iterate()) { + if (wp->sign.kdtree_valid) items.push_back(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); } - const Town *town; - FOR_ALL_TOWNS(town) { - items.push_back(ViewportSignKdtreeItem::MakeTown(town->index)); + for (const Town *town : Town::Iterate()) { + if (town->cache.sign.kdtree_valid) items.push_back(ViewportSignKdtreeItem::MakeTown(town->index)); } - const Sign *sign; - FOR_ALL_SIGNS(sign) { - items.push_back(ViewportSignKdtreeItem::MakeSign(sign->index)); + for (const Sign *sign : Sign::Iterate()) { + if (sign->sign.kdtree_valid) items.push_back(ViewportSignKdtreeItem::MakeSign(sign->index)); } _viewport_sign_kdtree.Build(items.begin(), items.end()); diff --git a/src/viewport_func.h b/src/viewport_func.h index 8b23cc02a9..0ac70b270b 100644 --- a/src/viewport_func.h +++ b/src/viewport_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp index 85b278b2a7..bce6e68c12 100644 --- a/src/viewport_gui.cpp +++ b/src/viewport_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/viewport_sprite_sorter.h b/src/viewport_sprite_sorter.h index 24241565e7..d9948b7c22 100644 --- a/src/viewport_sprite_sorter.h +++ b/src/viewport_sprite_sorter.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/viewport_sprite_sorter_sse4.cpp b/src/viewport_sprite_sorter_sse4.cpp index 212ff12e68..46068c41d2 100644 --- a/src/viewport_sprite_sorter_sse4.cpp +++ b/src/viewport_sprite_sorter_sse4.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/viewport_type.h b/src/viewport_type.h index 1f61b2d70b..f6a9ce4ae4 100644 --- a/src/viewport_type.h +++ b/src/viewport_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -55,6 +53,26 @@ struct ViewportSign { void MarkDirty(ZoomLevel maxzoom = ZOOM_LVL_MAX) const; }; +/** Specialised ViewportSign that tracks whether it is valid for entering into a Kdtree */ +struct TrackedViewportSign : ViewportSign { + bool kdtree_valid; ///< Are the sign data valid for use with the _viewport_sign_kdtree? + + /** + * Update the position of the viewport sign. + * Note that this function hides the base class function. + */ + void UpdatePosition(int center, int top, StringID str, StringID str_small = STR_NULL) + { + this->kdtree_valid = true; + this->ViewportSign::UpdatePosition(center, top, str, str_small); + } + + + TrackedViewportSign() : kdtree_valid{ false } + { + } +}; + /** * Directions of zooming. * @see DoZoomInOutWindow diff --git a/src/void_cmd.cpp b/src/void_cmd.cpp index 56e7cc5261..cf159d69cc 100644 --- a/src/void_cmd.cpp +++ b/src/void_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/void_map.h b/src/void_map.h index 5ccc4e9d7d..415e0a5803 100644 --- a/src/void_map.h +++ b/src/void_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/water.h b/src/water.h index 9e2c23418a..27c3339c18 100644 --- a/src/water.h +++ b/src/water.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 7091f9f2d4..d1ab57f347 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/water_map.h b/src/water_map.h index 05f49afb13..22e54e967f 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/waypoint.cpp b/src/waypoint.cpp index 8452ff6186..f602eee6d0 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -55,5 +53,5 @@ Waypoint::~Waypoint() if (CleaningPool()) return; DeleteWindowById(WC_WAYPOINT_VIEW, this->index); RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index); - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index)); + if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index)); } diff --git a/src/waypoint_base.h b/src/waypoint_base.h index be1d0bd0df..2c7cc530f6 100644 --- a/src/waypoint_base.h +++ b/src/waypoint_base.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -69,10 +67,4 @@ struct Waypoint FINAL : SpecializedStation { } }; -/** - * Iterate over all waypoints. - * @param var The variable used for iteration. - */ -#define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var) - #endif /* WAYPOINT_BASE_H */ diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 652173a947..51d791fc28 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -41,8 +39,13 @@ void Waypoint::UpdateVirtCoord() { Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE); + if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index)); + SetDParam(0, this->index); this->sign.UpdatePosition(pt.x, pt.y - 32 * ZOOM_LVL_BASE, STR_VIEWPORT_WAYPOINT); + + _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(this->index)); + /* Recenter viewport */ InvalidateWindowData(WC_WAYPOINT_VIEW, this->index); } @@ -55,11 +58,7 @@ void Waypoint::MoveSign(TileIndex new_xy) { if (this->xy == new_xy) return; - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index)); - this->BaseStation::MoveSign(new_xy); - - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(this->index)); } /** @@ -71,10 +70,10 @@ void Waypoint::MoveSign(TileIndex new_xy) */ static Waypoint *FindDeletedWaypointCloseTo(TileIndex tile, StringID str, CompanyID cid) { - Waypoint *wp, *best = nullptr; + Waypoint *best = nullptr; uint thres = 8; - FOR_ALL_WAYPOINTS(wp) { + for (Waypoint *wp : Waypoint::Iterate()) { if (!wp->IsInUse() && wp->string_id == str && wp->owner == cid) { uint cur_dist = DistanceManhattan(tile, wp->xy); @@ -241,15 +240,11 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint } if (flags & DC_EXEC) { - bool need_sign_update = false; if (wp == nullptr) { wp = new Waypoint(start_tile); - need_sign_update = true; } else if (!wp->IsInUse()) { /* Move existing (recently deleted) waypoint to the new location */ - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); wp->xy = start_tile; - need_sign_update = true; } wp->owner = GetTileOwner(start_tile); @@ -264,7 +259,6 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint if (wp->town == nullptr) MakeDefaultName(wp); wp->UpdateVirtCoord(); - if (need_sign_update) _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); const StationSpec *spec = StationClass::Get(spec_class)->GetSpec(spec_index); byte *layout_ptr = AllocaM(byte, count); @@ -331,7 +325,6 @@ CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 wp = new Waypoint(tile); } else { /* Move existing (recently deleted) buoy to the new location */ - _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); wp->xy = tile; InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index); } @@ -351,7 +344,6 @@ CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 MarkTileDirtyByTile(tile); wp->UpdateVirtCoord(); - _viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(wp->index)); InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index); } @@ -405,9 +397,7 @@ CommandCost RemoveBuoy(TileIndex tile, DoCommandFlag flags) */ static bool IsUniqueWaypointName(const char *name) { - const Waypoint *wp; - - FOR_ALL_WAYPOINTS(wp) { + for (const Waypoint *wp : Waypoint::Iterate()) { if (wp->name != nullptr && strcmp(wp->name, name) == 0) return false; } diff --git a/src/waypoint_func.h b/src/waypoint_func.h index b44264dc13..2906fa6369 100644 --- a/src/waypoint_func.h +++ b/src/waypoint_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index 54578a4bb5..64ef0eb251 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widget.cpp b/src/widget.cpp index f0d53fe6b6..eb683c4128 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widget_type.h b/src/widget_type.h index 261e3cdf34..3a36d9aad9 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/ai_widget.h b/src/widgets/ai_widget.h index b6ef02fa55..163894df4c 100644 --- a/src/widgets/ai_widget.h +++ b/src/widgets/ai_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/airport_widget.h b/src/widgets/airport_widget.h index f0d2113328..da0770bcb9 100644 --- a/src/widgets/airport_widget.h +++ b/src/widgets/airport_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/autoreplace_widget.h b/src/widgets/autoreplace_widget.h index 8432b1a7f2..3522dbc8d6 100644 --- a/src/widgets/autoreplace_widget.h +++ b/src/widgets/autoreplace_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/bootstrap_widget.h b/src/widgets/bootstrap_widget.h index a371a3bdb0..4870f62d5a 100644 --- a/src/widgets/bootstrap_widget.h +++ b/src/widgets/bootstrap_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/bridge_widget.h b/src/widgets/bridge_widget.h index 942b230758..d9b6adedda 100644 --- a/src/widgets/bridge_widget.h +++ b/src/widgets/bridge_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/build_vehicle_widget.h b/src/widgets/build_vehicle_widget.h index ae548587e2..861c01f680 100644 --- a/src/widgets/build_vehicle_widget.h +++ b/src/widgets/build_vehicle_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/cheat_widget.h b/src/widgets/cheat_widget.h index 3209cae239..c43799d5d3 100644 --- a/src/widgets/cheat_widget.h +++ b/src/widgets/cheat_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/company_widget.h b/src/widgets/company_widget.h index 8b0d8ee0b6..2fb2234d41 100644 --- a/src/widgets/company_widget.h +++ b/src/widgets/company_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/console_widget.h b/src/widgets/console_widget.h index 13fa2395cf..1bc1be1f67 100644 --- a/src/widgets/console_widget.h +++ b/src/widgets/console_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/date_widget.h b/src/widgets/date_widget.h index 79476606df..3b397dae47 100644 --- a/src/widgets/date_widget.h +++ b/src/widgets/date_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/depot_widget.h b/src/widgets/depot_widget.h index 5864564ceb..c162cb8b7d 100644 --- a/src/widgets/depot_widget.h +++ b/src/widgets/depot_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/dock_widget.h b/src/widgets/dock_widget.h index 080282bd30..139fcd55bc 100644 --- a/src/widgets/dock_widget.h +++ b/src/widgets/dock_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 844c6470ee..3412a98bdd 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/dropdown_func.h b/src/widgets/dropdown_func.h index 4c7e134562..f047fb43df 100644 --- a/src/widgets/dropdown_func.h +++ b/src/widgets/dropdown_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index 27c85cbe2a..c7d3251d68 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/dropdown_widget.h b/src/widgets/dropdown_widget.h index 0390a950ac..21223179e9 100644 --- a/src/widgets/dropdown_widget.h +++ b/src/widgets/dropdown_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/engine_widget.h b/src/widgets/engine_widget.h index b131a1dd4b..5d3468efc6 100644 --- a/src/widgets/engine_widget.h +++ b/src/widgets/engine_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/error_widget.h b/src/widgets/error_widget.h index 8693575a75..7a7fa4af38 100644 --- a/src/widgets/error_widget.h +++ b/src/widgets/error_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/fios_widget.h b/src/widgets/fios_widget.h index 2351f8035e..86995588ed 100644 --- a/src/widgets/fios_widget.h +++ b/src/widgets/fios_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/framerate_widget.h b/src/widgets/framerate_widget.h index b03d3aef73..49ee2f9528 100644 --- a/src/widgets/framerate_widget.h +++ b/src/widgets/framerate_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/genworld_widget.h b/src/widgets/genworld_widget.h index 877efbb921..f7bf20e950 100644 --- a/src/widgets/genworld_widget.h +++ b/src/widgets/genworld_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/goal_widget.h b/src/widgets/goal_widget.h index 388930a102..e5da620510 100644 --- a/src/widgets/goal_widget.h +++ b/src/widgets/goal_widget.h @@ -1,6 +1,4 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h index 7af5297abf..7c6478f640 100644 --- a/src/widgets/graph_widget.h +++ b/src/widgets/graph_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/group_widget.h b/src/widgets/group_widget.h index fe5ae81174..beca5a3a65 100644 --- a/src/widgets/group_widget.h +++ b/src/widgets/group_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/highscore_widget.h b/src/widgets/highscore_widget.h index 3a2a1bfbb7..394b8c9bf7 100644 --- a/src/widgets/highscore_widget.h +++ b/src/widgets/highscore_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/industry_widget.h b/src/widgets/industry_widget.h index 711694db72..d31de978ef 100644 --- a/src/widgets/industry_widget.h +++ b/src/widgets/industry_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/intro_widget.h b/src/widgets/intro_widget.h index ae48827ed1..d2eeacf64a 100644 --- a/src/widgets/intro_widget.h +++ b/src/widgets/intro_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/link_graph_legend_widget.h b/src/widgets/link_graph_legend_widget.h index 9537b896df..a0ff68ab07 100644 --- a/src/widgets/link_graph_legend_widget.h +++ b/src/widgets/link_graph_legend_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/main_widget.h b/src/widgets/main_widget.h index 3ffc1214b8..51627da5c0 100644 --- a/src/widgets/main_widget.h +++ b/src/widgets/main_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/misc_widget.h b/src/widgets/misc_widget.h index 806f889bbf..bc0c07030b 100644 --- a/src/widgets/misc_widget.h +++ b/src/widgets/misc_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/music_widget.h b/src/widgets/music_widget.h index c8e6a98186..dc2e685325 100644 --- a/src/widgets/music_widget.h +++ b/src/widgets/music_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/network_chat_widget.h b/src/widgets/network_chat_widget.h index cd13cf6a96..ccfb467f71 100644 --- a/src/widgets/network_chat_widget.h +++ b/src/widgets/network_chat_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/network_content_widget.h b/src/widgets/network_content_widget.h index e659743d4f..fd77f90aaf 100644 --- a/src/widgets/network_content_widget.h +++ b/src/widgets/network_content_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/network_widget.h b/src/widgets/network_widget.h index 4cb5cc92c2..23ea95a61a 100644 --- a/src/widgets/network_widget.h +++ b/src/widgets/network_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/newgrf_debug_widget.h b/src/widgets/newgrf_debug_widget.h index 22a5cda40e..6ae41de348 100644 --- a/src/widgets/newgrf_debug_widget.h +++ b/src/widgets/newgrf_debug_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/newgrf_widget.h b/src/widgets/newgrf_widget.h index 271b6669ad..7f5fefde06 100644 --- a/src/widgets/newgrf_widget.h +++ b/src/widgets/newgrf_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/news_widget.h b/src/widgets/news_widget.h index f12786640f..e5b8934439 100644 --- a/src/widgets/news_widget.h +++ b/src/widgets/news_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -33,6 +31,7 @@ enum NewsWidgets { WID_N_VEH_NAME, ///< Name of the new vehicle. WID_N_VEH_SPR, ///< Graphical display of the new vehicle. WID_N_VEH_INFO, ///< Some technical data of the new vehicle. + WID_N_SHOW_GROUP, ///< Show vehicle's group }; /** Widgets of the #MessageHistoryWindow class. */ diff --git a/src/widgets/object_widget.h b/src/widgets/object_widget.h index 45533ae98e..9ca06e2fea 100644 --- a/src/widgets/object_widget.h +++ b/src/widgets/object_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/order_widget.h b/src/widgets/order_widget.h index 825f791ea8..82ca472e20 100644 --- a/src/widgets/order_widget.h +++ b/src/widgets/order_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/osk_widget.h b/src/widgets/osk_widget.h index 25cd928a86..ccda502fff 100644 --- a/src/widgets/osk_widget.h +++ b/src/widgets/osk_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/rail_widget.h b/src/widgets/rail_widget.h index f977f44803..65af03d4a4 100644 --- a/src/widgets/rail_widget.h +++ b/src/widgets/rail_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/road_widget.h b/src/widgets/road_widget.h index 60068317ab..3d49e9ae9d 100644 --- a/src/widgets/road_widget.h +++ b/src/widgets/road_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/settings_widget.h b/src/widgets/settings_widget.h index ac64ac80ae..5ad981f4dc 100644 --- a/src/widgets/settings_widget.h +++ b/src/widgets/settings_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/sign_widget.h b/src/widgets/sign_widget.h index f390793ceb..2225eb8b1c 100644 --- a/src/widgets/sign_widget.h +++ b/src/widgets/sign_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/smallmap_widget.h b/src/widgets/smallmap_widget.h index 0b1daea03f..79769a21cc 100644 --- a/src/widgets/smallmap_widget.h +++ b/src/widgets/smallmap_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/station_widget.h b/src/widgets/station_widget.h index f9b5b266ab..8ab89bbf31 100644 --- a/src/widgets/station_widget.h +++ b/src/widgets/station_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/statusbar_widget.h b/src/widgets/statusbar_widget.h index 1cfbe7ff29..bb8149e461 100644 --- a/src/widgets/statusbar_widget.h +++ b/src/widgets/statusbar_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/story_widget.h b/src/widgets/story_widget.h index 139b6d2d6b..3492aed419 100644 --- a/src/widgets/story_widget.h +++ b/src/widgets/story_widget.h @@ -1,6 +1,4 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/subsidy_widget.h b/src/widgets/subsidy_widget.h index 07d0f6cfbb..b3edd897c5 100644 --- a/src/widgets/subsidy_widget.h +++ b/src/widgets/subsidy_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/terraform_widget.h b/src/widgets/terraform_widget.h index 7f8a4c4d1b..0fd216d721 100644 --- a/src/widgets/terraform_widget.h +++ b/src/widgets/terraform_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/timetable_widget.h b/src/widgets/timetable_widget.h index 09beb61672..15c44f33c5 100644 --- a/src/widgets/timetable_widget.h +++ b/src/widgets/timetable_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/toolbar_widget.h b/src/widgets/toolbar_widget.h index 5b9d1e1568..d68de49700 100644 --- a/src/widgets/toolbar_widget.h +++ b/src/widgets/toolbar_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/town_widget.h b/src/widgets/town_widget.h index bd6e0b954f..1a3291a3db 100644 --- a/src/widgets/town_widget.h +++ b/src/widgets/town_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/transparency_widget.h b/src/widgets/transparency_widget.h index 87618fcb6e..2b096e733b 100644 --- a/src/widgets/transparency_widget.h +++ b/src/widgets/transparency_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/tree_widget.h b/src/widgets/tree_widget.h index cd0b85c9d1..7da9fa4a84 100644 --- a/src/widgets/tree_widget.h +++ b/src/widgets/tree_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/vehicle_widget.h b/src/widgets/vehicle_widget.h index a0902dab44..5ecb8dffea 100644 --- a/src/widgets/vehicle_widget.h +++ b/src/widgets/vehicle_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/viewport_widget.h b/src/widgets/viewport_widget.h index 187659f362..81a6983e89 100644 --- a/src/widgets/viewport_widget.h +++ b/src/widgets/viewport_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/widgets/waypoint_widget.h b/src/widgets/waypoint_widget.h index 8fceddaa70..a5b316034f 100644 --- a/src/widgets/waypoint_widget.h +++ b/src/widgets/waypoint_widget.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/window.cpp b/src/window.cpp index 25e4eb95a8..93777d28f6 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -466,6 +464,15 @@ bool EditBoxInGlobalFocus() return _focused_window->nested_focus != nullptr && _focused_window->nested_focus->type == WWT_EDITBOX; } +/** + * Check if a console is focused. + * @return returns true if the focused window is a console, else false + */ +bool FocusedWindowIsConsole() +{ + return _focused_window && _focused_window->window_class == WC_CONSOLE; +} + /** * Makes no widget on this window have focus. The function however doesn't change which window has focus. */ @@ -499,11 +506,20 @@ bool Window::SetFocusedWidget(int widget_index) if (this->nested_focus->type == WWT_EDITBOX) VideoDriver::GetInstance()->EditBoxLostFocus(); } this->nested_focus = this->GetWidget(widget_index); + if (this->nested_focus->type == WWT_EDITBOX) VideoDriver::GetInstance()->EditBoxGainedFocus(); return true; } /** - * Called when window looses focus + * Called when window gains focus + */ +void Window::OnFocus() +{ + if (this->nested_focus != nullptr && this->nested_focus->type == WWT_EDITBOX) VideoDriver::GetInstance()->EditBoxGainedFocus(); +} + +/** + * Called when window loses focus */ void Window::OnFocusLost() { diff --git a/src/window_func.h b/src/window_func.h index 45e2d71eca..20866b34d9 100644 --- a/src/window_func.h +++ b/src/window_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -55,6 +53,7 @@ void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true); void DeleteWindowByClass(WindowClass cls); bool EditBoxInGlobalFocus(); +bool FocusedWindowIsConsole(); Point GetCaretPosition(); #endif /* WINDOW_FUNC_H */ diff --git a/src/window_gui.h b/src/window_gui.h index db42cafcd4..228a150d2c 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. @@ -592,10 +590,7 @@ public: */ virtual void SetStringParameters(int widget) const {} - /** - * Called when window gains focus - */ - virtual void OnFocus() {} + virtual void OnFocus(); virtual void OnFocusLost(); diff --git a/src/window_type.h b/src/window_type.h index 7185bfcb4f..15b022b562 100644 --- a/src/window_type.h +++ b/src/window_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/zoom_func.h b/src/zoom_func.h index dff7322a03..485284a06c 100644 --- a/src/zoom_func.h +++ b/src/zoom_func.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/src/zoom_type.h b/src/zoom_type.h index 47a725df2b..2606e07677 100644 --- a/src/zoom_type.h +++ b/src/zoom_type.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. diff --git a/update.sh b/update.sh new file mode 100755 index 0000000000..98ba93a38d --- /dev/null +++ b/update.sh @@ -0,0 +1,18 @@ +version=$1 +dir=`mktemp -d` +curdir=`pwd` +echo $dir +cd $dir +wget https://proxy.binaries.openttd.org/openttd-releases/$version/openttd-$version-source.tar.xz +tar xf openttd-$version-source.tar.xz +ttdir=$dir/openttd-$version +cp -r $ttdir/* $curdir +cd $ttdir +find . -type f > $dir/ttd_files +./configure +cd objs/release +make $ttdir/src/rev.cpp +cd $curdir +cp $ttdir/src/rev.cpp src/ +cat $dir/ttd_files | xargs git add +rm -rf $dir