From 301de29d29a85af72150b1edd1da08e9357d6dd7 Mon Sep 17 00:00:00 2001 From: Pavel Stupnikov Date: Wed, 13 Mar 2019 00:25:42 +0300 Subject: [PATCH] Update to 1.9.0-RC1 --HG-- branch : openttd --- Makefile.src.in | 5 +- README.md | 32 +- azure-pipelines-ci.yml | 2 + .../templates/osx-dependencies.yml | 3 +- bin/ai/compat_0.7.nut | 7 + bin/ai/compat_1.0.nut | 7 + bin/ai/compat_1.1.nut | 7 + bin/ai/compat_1.2.nut | 7 + bin/ai/compat_1.3.nut | 7 + bin/ai/compat_1.4.nut | 7 + bin/ai/compat_1.5.nut | 7 + bin/ai/compat_1.6.nut | 7 + bin/ai/compat_1.7.nut | 7 + bin/ai/compat_1.8.nut | 7 + bin/ai/regression/tst_regression/main.nut | 2 +- changelog.txt | 14 + config.lib | 12 +- docs/landscape.html | 1 + docs/landscape_grid.html | 2 +- findversion.sh | 9 +- known-bugs.txt | 4 +- os/debian/changelog | 6 + os/rpm/openttd.spec | 4 +- os/windows/installer/install.nsi | 5 +- projects/determineversion.vbs | 25 +- projects/openttd_vs140.vcxproj | 2 - projects/openttd_vs140.vcxproj.filters | 6 - projects/openttd_vs141.vcxproj | 2 - projects/openttd_vs141.vcxproj.filters | 6 - projects/openttd_vs142.vcxproj | 2 - projects/openttd_vs142.vcxproj.filters | 6 - source.list | 4 - src/aircraft_cmd.cpp | 12 + src/cargomonitor.cpp | 4 +- src/cargomonitor.h | 2 +- src/company_gui.cpp | 16 +- src/crashlog.cpp | 11 +- src/economy.cpp | 20 +- src/engine.cpp | 8 + src/gfx_layout.h | 3 +- src/group_cmd.cpp | 12 - src/lang/catalan.txt | 85 +++-- src/lang/croatian.txt | 6 + src/lang/danish.txt | 54 ++-- src/lang/dutch.txt | 296 +++++++++--------- src/lang/french.txt | 11 + src/lang/hungarian.txt | 6 +- src/lang/norwegian_bokmal.txt | 11 + src/lang/portuguese.txt | 11 + src/lang/romanian.txt | 7 + src/lang/turkish.txt | 4 + src/network/network_client.cpp | 4 +- src/newgrf.cpp | 17 +- src/order_backup.cpp | 7 +- src/order_backup.h | 2 +- src/order_cmd.cpp | 11 +- src/order_func.h | 2 +- src/rev.cpp | 6 +- src/rev.cpp.in | 2 +- src/script/api/ai/ai_company.hpp.sq | 65 +++- src/script/api/ai/ai_group.hpp.sq | 7 +- src/script/api/ai_changelog.hpp | 7 + src/script/api/game/game_company.hpp.sq | 93 ++++-- src/script/api/script_company.cpp | 30 ++ src/script/api/script_company.hpp | 81 +++++ src/script/api/script_group.cpp | 66 +++- src/script/api/script_group.hpp | 45 ++- .../api/template/template_company.hpp.sq | 4 + src/sdl.cpp | 119 ------- src/sdl.h | 71 ----- src/settings_gui.cpp | 1 + src/signs_gui.cpp | 48 +-- src/sound/sdl_s.cpp | 22 +- src/strings.cpp | 2 +- src/table/settings.ini | 2 +- src/town_cmd.cpp | 8 +- src/tree_map.h | 2 + src/video/sdl_v.cpp | 95 +++--- src/water_map.h | 4 +- 79 files changed, 982 insertions(+), 644 deletions(-) delete mode 100644 src/sdl.cpp delete mode 100644 src/sdl.h diff --git a/Makefile.src.in b/Makefile.src.in index 19231d45ce..6b235be9d3 100644 --- a/Makefile.src.in +++ b/Makefile.src.in @@ -92,6 +92,7 @@ VERSION := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') ISODATE := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ') GITHASH := $(shell echo "$(VERSIONS)" | cut -f 4 -d' ') ISTAG := $(shell echo "$(VERSIONS)" | cut -f 5 -d' ') +ISSTABLETAG := $(shell echo "$(VERSIONS)" | cut -f 6 -d' ') # Make sure we have something in VERSION and ISODATE ifeq ($(VERSION),) @@ -277,10 +278,10 @@ endif # Revision files $(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in - $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g" > $(SRC_DIR)/rev.cpp + $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g" > $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in - $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g" > $(SRC_DIR)/os/windows/ottdres.rc + $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!ISODATE\!\!@$(ISODATE)@g;s@!!VERSION!!@$(VERSION)@g;s@!!DATE!!@`date +%d.%m.%y`@g;s@!!GITHASH!!@$(GITHASH)@g;s@!!ISTAG!!@$(ISTAG)@g;s@!!ISSTABLETAG!!@$(ISSTABLETAG)@g" > $(SRC_DIR)/os/windows/ottdres.rc FORCE: diff --git a/README.md b/README.md index 038c177a74..e621dc0215 100644 --- a/README.md +++ b/README.md @@ -310,22 +310,22 @@ your operating system: 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 | | +| 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. diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 7bab1a9369..789f8f6a32 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -1,7 +1,9 @@ trigger: - master +- release/* pr: - master +- release/* jobs: - job: windows diff --git a/azure-pipelines/templates/osx-dependencies.yml b/azure-pipelines/templates/osx-dependencies.yml index c4b723c58b..0393a56621 100644 --- a/azure-pipelines/templates/osx-dependencies.yml +++ b/azure-pipelines/templates/osx-dependencies.yml @@ -1,11 +1,12 @@ steps: - script: | set -ex - HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng + HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config lzo xz libpng freetype # Remove the dynamic libraries of these libraries, to ensure we use # the static versions. That is important, as it is unlikely any # end-user has these brew libraries installed. rm /usr/local/Cellar/lzo/*/lib/*.dylib rm /usr/local/Cellar/xz/*/lib/*.dylib rm /usr/local/Cellar/libpng/*/lib/*.dylib + rm /usr/local/Cellar/freetype/*/lib/*.dylib displayName: 'Install dependencies' diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 98c03c6731..86ab06bba5 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -374,3 +374,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut index 627c949cc3..6aa0e1a973 100644 --- a/bin/ai/compat_1.0.nut +++ b/bin/ai/compat_1.0.nut @@ -126,3 +126,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.1.nut b/bin/ai/compat_1.1.nut index a47f3d5b16..3d7b7553ee 100644 --- a/bin/ai/compat_1.1.nut +++ b/bin/ai/compat_1.1.nut @@ -63,3 +63,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.2.nut b/bin/ai/compat_1.2.nut index 95ccabda24..594ba98352 100644 --- a/bin/ai/compat_1.2.nut +++ b/bin/ai/compat_1.2.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.3.nut b/bin/ai/compat_1.3.nut index fc8e06bf5e..fb0f41d308 100644 --- a/bin/ai/compat_1.3.nut +++ b/bin/ai/compat_1.3.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.4.nut b/bin/ai/compat_1.4.nut index 169ead959d..4bbb971604 100644 --- a/bin/ai/compat_1.4.nut +++ b/bin/ai/compat_1.4.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.5.nut b/bin/ai/compat_1.5.nut index 681a708bee..b006f1733e 100644 --- a/bin/ai/compat_1.5.nut +++ b/bin/ai/compat_1.5.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.6.nut b/bin/ai/compat_1.6.nut index 5242821d1d..e57a3cb980 100644 --- a/bin/ai/compat_1.6.nut +++ b/bin/ai/compat_1.6.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.7.nut b/bin/ai/compat_1.7.nut index 93884e6637..ae403d104b 100644 --- a/bin/ai/compat_1.7.nut +++ b/bin/ai/compat_1.7.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/compat_1.8.nut b/bin/ai/compat_1.8.nut index f3fa1bc0a6..ecf4accdde 100644 --- a/bin/ai/compat_1.8.nut +++ b/bin/ai/compat_1.8.nut @@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id) { return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); } + +/* 1.9 adds parent_group_id to CreateGroup function */ +AIGroup._CreateGroup <- AIGroup.CreateGroup; +AIGroup.CreateGroup <- function(vehicle_type) +{ + return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID); +} diff --git a/bin/ai/regression/tst_regression/main.nut b/bin/ai/regression/tst_regression/main.nut index 8b92b6f881..7315f33f82 100644 --- a/bin/ai/regression/tst_regression/main.nut +++ b/bin/ai/regression/tst_regression/main.nut @@ -574,7 +574,7 @@ function Regression::Group() local vehicle = AIVehicle.BuildVehicle(10000, 116); print(" AIVehicle.BuildVehicle(): " + vehicle); print(" GetNumEngines(): " + AIGroup.GetNumEngines(AIGroup.GROUP_ALL, 116)); - local group = AIGroup.CreateGroup(AIVehicle.VT_ROAD); + local group = AIGroup.CreateGroup(AIVehicle.VT_ROAD, AIGroup.GROUP_INVALID); print(" CreateGroup(): " + group); print(" MoveVehicle(): " + AIGroup.MoveVehicle(group, vehicle)); print(" GetNumEngines(): " + AIGroup.GetNumEngines(group, 116)); diff --git a/changelog.txt b/changelog.txt index 1d9f8947ea..6777ca9ce8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,15 @@ +1.9.0-RC1 (2019-03-03) +------------------------------------------------------------------------ +- Add: Various AI/GS functions for vehicle groups (#7225) +- Change: Synchronise introduction date and reliability randomness across vehicles with the same base introduction date (#7147) +- Change: Allow towns to build bridges over rails and one-way roads (#7291) +- Fix: Detection of coast tiles with trees on them (#7309) +- Fix: Emergency netsave saved the title game instead of the broken game in question (#7298) +- Fix: Company livery window showed incorrect groups when opened in multiplayer (#7288) +- Fix: Unable to select last group in open livery window (#7283) +- Fix: Goto hangar orders were not invalidated when rebuilding airports (#7100) + + 1.9.0-beta3 (2019-02-24) ------------------------------------------------------------------------ - Feature: Option to adjust font size separately from GUI size (#7003) @@ -24,10 +36,12 @@ - Fix #7197: Invalidate depot buttons when necessary (#7212) - Doc: [AI] UnshareOrders empties the orders list of the vehicle + 1.9.0-beta2 (2019-02-09) ------------------------------------------------------------------------ - Fix: Non-Windows builds did not get correct git hash + 1.9.0-beta1 (2019-02-09) ------------------------------------------------------------------------ Note: OpenTTD was migrated to GitHub for 1.9, so SVN revision and FlySpray numbers have been replaced with Pull Requests and Issue numbers diff --git a/config.lib b/config.lib index 1c3fc2c94e..8d651c502b 100644 --- a/config.lib +++ b/config.lib @@ -820,7 +820,7 @@ check_params() { pre_detect_with_zlib=$with_zlib detect_zlib - if [ "$with_zlib" = "0" ] || [ -z "$zlib-config" ]; then + if [ "$with_zlib" = "0" ] || [ -z "$zlib_config" ]; then log 1 "WARNING: zlib was not detected or disabled" log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features" log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps," @@ -1681,12 +1681,10 @@ make_cflags_and_ldflags() { CFLAGS="$CFLAGS -DWITH_SDL" # SDL must not add _GNU_SOURCE as it breaks many platforms CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`" - if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then - if [ "$enable_static" != "0" ]; then - LIBS="$LIBS `$sdl_config --static-libs`" - else - LIBS="$LIBS `$sdl_config --libs`" - fi + if [ "$enable_static" != "0" ]; then + LIBS="$LIBS `$sdl_config --static --libs`" + else + LIBS="$LIBS `$sdl_config --libs`" fi fi diff --git a/docs/landscape.html b/docs/landscape.html index a345128ea4..d4d8f7efeb 100644 --- a/docs/landscape.html +++ b/docs/landscape.html @@ -759,6 +759,7 @@