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 @@
|
+ - m1 bits 6..5: water class (sea or land)
- m1 bits 4..0: owner (normally 10)
- m2 bits 8..6: ground
diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html
index 8519fa990a..4948366e65 100644
--- a/docs/landscape_grid.html
+++ b/docs/landscape_grid.html
@@ -194,7 +194,7 @@ the array so you can quickly see what is used and what is not.
| trees |
XXXX XXXX |
XXXX XXXX |
- OOO~ ~~~~ |
+ OXX~ ~~~~ |
OOOO OOOX XXXX XXXX |
~~XX XXXX |
OOOO OOOO |
diff --git a/findversion.sh b/findversion.sh
index 37e483cae3..95a041bac0 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -83,9 +83,15 @@ if [ -d "$ROOT_DIR/.git" ]; then
if [ -n "$TAG" ]; then
VERSION="${TAG}"
ISTAG="1"
+ if [ -n "`echo \"${TAG}\" | grep \"^[0-9.]*$\"`" ]; then
+ ISSTABLETAG="1"
+ else
+ ISSTABLETAG="0"
+ fi
else
VERSION="${ISODATE}-${BRANCH}${hashprefix}${SHORTHASH}"
ISTAG="0"
+ ISSTABLETAG="0"
fi
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
@@ -102,6 +108,7 @@ else
TAG=""
VERSION=""
ISTAG="0"
+ ISSTABLETAG="0"
fi
-echo "$VERSION $ISODATE $MODIFIED $HASH $ISTAG"
+echo "$VERSION $ISODATE $MODIFIED $HASH $ISTAG $ISSTABLETAG"
diff --git a/known-bugs.txt b/known-bugs.txt
index c02897e501..8ad1ade007 100644
--- a/known-bugs.txt
+++ b/known-bugs.txt
@@ -1,6 +1,6 @@
OpenTTD's known bugs
-Last updated: 2019-02-24
-Release version: 1.9.0-beta3
+Last updated: 2019-03-03
+Release version: 1.9.0-RC1
------------------------------------------------------------------------
diff --git a/os/debian/changelog b/os/debian/changelog
index 858c15371b..2cb748ebe2 100644
--- a/os/debian/changelog
+++ b/os/debian/changelog
@@ -1,3 +1,9 @@
+openttd (1.9.0~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.9.0-RC1
+
+ -- OpenTTD Sun, 3 Mar 2019 23:00:00 +0000
+
openttd (1.9.0~beta3-0) unstable; urgency=low
* New upstream release 1.9.0-beta3
diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec
index 7f17b7ea9b..c44b2ada8d 100644
--- a/os/rpm/openttd.spec
+++ b/os/rpm/openttd.spec
@@ -17,9 +17,9 @@
#
Name: openttd
-Version: 1.9.beta3
+Version: 1.9.RC1
Release: 0
-%define srcver 1.9.0-beta3
+%define srcver 1.9.0-RC1
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 da45165d4f..8db7ae0a76 100644
--- a/os/windows/installer/install.nsi
+++ b/os/windows/installer/install.nsi
@@ -2,8 +2,8 @@
!define APPV_MAJOR 1
!define APPV_MINOR 9
!define APPV_MAINT 0
-!define APPV_BUILD 2
-!define APPV_EXTRA "-beta3"
+!define APPV_BUILD 3
+!define APPV_EXTRA "-RC1"
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
@@ -24,6 +24,7 @@
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "top.bmp"
+ManifestDPIAware true
BrandingText "OpenTTD Installer"
SetCompressor LZMA
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index a2f348faf0..10b38d35a1 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -21,7 +21,7 @@ Sub FindReplaceInFile(filename, to_find, replacement)
file.Close
End Sub
-Sub UpdateFile(modified, isodate, version, cur_date, githash, istag, filename)
+Sub UpdateFile(modified, isodate, version, cur_date, githash, istag, isstabletag, filename)
FSO.CopyFile filename & ".in", filename
FindReplaceInFile filename, "!!MODIFIED!!", modified
FindReplaceInFile filename, "!!ISODATE!!", isodate
@@ -29,10 +29,11 @@ Sub UpdateFile(modified, isodate, version, cur_date, githash, istag, filename)
FindReplaceInFile filename, "!!DATE!!", cur_date
FindReplaceInFile filename, "!!GITHASH!!", githash
FindReplaceInFile filename, "!!ISTAG!!", istag
+ FindReplaceInFile filename, "!!ISSTABLETAG!!", isstabletag
End Sub
Sub UpdateFiles(version)
- Dim modified, isodate, cur_date, githash, istag
+ Dim modified, isodate, cur_date, githash, istag, isstabletag
cur_date = DatePart("D", Date) & "." & DatePart("M", Date) & "." & DatePart("YYYY", Date)
If InStr(version, Chr(9)) Then
@@ -41,20 +42,23 @@ Sub UpdateFiles(version)
modified = Mid(isodate, InStr(isodate, Chr(9)) + 1)
githash = Mid(modified, InStr(modified, Chr(9)) + 1)
istag = Mid(githash, InStr(githash, Chr(9)) + 1)
+ isstabletag = Mid(istag, InStr(istag, Chr(9)) + 1)
' Remove tails from fields
version = Mid(version, 1, InStr(version, Chr(9)) - 1)
isodate = Mid(isodate, 1, InStr(isodate, Chr(9)) - 1)
modified = Mid(modified, 1, InStr(modified, Chr(9)) - 1)
githash = Mid(githash, 1, InStr(githash, Chr(9)) - 1)
+ istag = Mid(istag, 1, InStr(istag, Chr(9)) - 1)
Else
isodate = 0
modified = 1
githash = ""
istag = 0
+ isstabletag = 0
End If
- UpdateFile modified, isodate, version, cur_date, githash, istag, "../src/rev.cpp"
- UpdateFile modified, isodate, version, cur_date, githash, istag, "../src/os/windows/ottdres.rc"
+ UpdateFile modified, isodate, version, cur_date, githash, istag, isstabletag, "../src/rev.cpp"
+ UpdateFile modified, isodate, version, cur_date, githash, istag, isstabletag, "../src/os/windows/ottdres.rc"
End Sub
Function DetermineVersion()
@@ -143,7 +147,7 @@ Function DetermineVersion()
DetermineVersion = "norev000"
modified = 1
Else
- Dim version, hashprefix, istag
+ Dim version, hashprefix, istag, isstabletag
If modified = 0 Then
hashprefix = "-g"
ElseIf modified = 2 Then
@@ -155,12 +159,21 @@ Function DetermineVersion()
If tag <> "" Then
version = tag
istag = 1
+
+ Set stable_regexp = New RegExp
+ stable_regexp.Pattern = "^[0-9.]*$"
+ If stable_regexp.Test(tag) Then
+ isstabletag = 1
+ Else
+ isstabletag = 0
+ End If
Else
version = isodate & "-" & branch & hashprefix & shorthash
istag = 0
+ isstabletag = 0
End If
- DetermineVersion = version & Chr(9) & isodate & Chr(9) & modified & Chr(9) & hash & Chr(9) & istag
+ DetermineVersion = version & Chr(9) & isodate & Chr(9) & modified & Chr(9) & hash & Chr(9) & istag & Chr(9) & isstabletag
End If
End Function
diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj
index ceb9c3f233..d340c16e50 100644
--- a/projects/openttd_vs140.vcxproj
+++ b/projects/openttd_vs140.vcxproj
@@ -410,7 +410,6 @@
-
@@ -625,7 +624,6 @@
-
diff --git a/projects/openttd_vs140.vcxproj.filters b/projects/openttd_vs140.vcxproj.filters
index ac4873d994..d2b31be452 100644
--- a/projects/openttd_vs140.vcxproj.filters
+++ b/projects/openttd_vs140.vcxproj.filters
@@ -321,9 +321,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -966,9 +963,6 @@
Header Files
-
- Header Files
-
Header Files
diff --git a/projects/openttd_vs141.vcxproj b/projects/openttd_vs141.vcxproj
index b38b801139..96d2304991 100644
--- a/projects/openttd_vs141.vcxproj
+++ b/projects/openttd_vs141.vcxproj
@@ -410,7 +410,6 @@
-
@@ -625,7 +624,6 @@
-
diff --git a/projects/openttd_vs141.vcxproj.filters b/projects/openttd_vs141.vcxproj.filters
index ac4873d994..d2b31be452 100644
--- a/projects/openttd_vs141.vcxproj.filters
+++ b/projects/openttd_vs141.vcxproj.filters
@@ -321,9 +321,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -966,9 +963,6 @@
Header Files
-
- Header Files
-
Header Files
diff --git a/projects/openttd_vs142.vcxproj b/projects/openttd_vs142.vcxproj
index 1ab06df2df..93390400eb 100644
--- a/projects/openttd_vs142.vcxproj
+++ b/projects/openttd_vs142.vcxproj
@@ -410,7 +410,6 @@
-
@@ -625,7 +624,6 @@
-
diff --git a/projects/openttd_vs142.vcxproj.filters b/projects/openttd_vs142.vcxproj.filters
index ac4873d994..d2b31be452 100644
--- a/projects/openttd_vs142.vcxproj.filters
+++ b/projects/openttd_vs142.vcxproj.filters
@@ -321,9 +321,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -966,9 +963,6 @@
Header Files
-
- Header Files
-
Header Files
diff --git a/source.list b/source.list
index 72e2433a07..7bad659d44 100644
--- a/source.list
+++ b/source.list
@@ -71,9 +71,6 @@ rev.cpp
road.cpp
roadstop.cpp
screenshot.cpp
-#if SDL
- sdl.cpp
-#end
settings.cpp
signal.cpp
signs.cpp
@@ -314,7 +311,6 @@ roadstop_base.h
roadveh.h
safeguards.h
screenshot.h
-sdl.h
sound/sdl_s.h
video/sdl_v.h
settings_func.h
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index d6d99ae242..7c35663726 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -2103,7 +2103,19 @@ void UpdateAirplanesOnNewStation(const Station *st)
FOR_ALL_AIRCRAFT(v) {
if (!v->IsNormalAircraft() || v->targetairport != st->index) continue;
assert(v->state == FLYING);
+
+ Order *o = &v->current_order;
+ /* The aircraft is heading to a hangar, but the new station doesn't have one,
+ * or the aircraft can't land on the new station. Cancel current order. */
+ if (o->IsType(OT_GOTO_DEPOT) && !(o->GetDepotOrderType() & ODTFB_PART_OF_ORDERS) && o->GetDestination() == st->index &&
+ (!st->airport.HasHangar() || !CanVehicleUseStation(v, st))) {
+ o->MakeDummy();
+ SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP);
+ }
v->pos = v->previous_pos = AircraftGetEntryPoint(v, ap, rotation);
UpdateAircraftCache(v);
}
+
+ /* Heliports don't have a hangar. Invalidate all go to hangar orders from all aircraft. */
+ if (!st->airport.HasHangar()) RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, st->index, true);
}
diff --git a/src/cargomonitor.cpp b/src/cargomonitor.cpp
index b1d52d6b18..40a029ac53 100644
--- a/src/cargomonitor.cpp
+++ b/src/cargomonitor.cpp
@@ -117,8 +117,9 @@ int32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring)
* @param src_type type of \a src.
* @param src index of source.
* @param st station where the cargo is delivered to.
+ * @param dest industry index where the cargo is delivered to.
*/
-void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st)
+void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st, IndustryID dest)
{
if (amount == 0) return;
@@ -151,6 +152,7 @@ void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, Sour
/* Industry delivery. */
for (const Industry * const *ip = st->industries_near.Begin(); ip != st->industries_near.End(); ip++) {
+ if ((*ip)->index != dest) continue;
CargoMonitorID num = EncodeCargoIndustryMonitor(company, cargo_type, (*ip)->index);
CargoMonitorMap::iterator iter = _cargo_deliveries.find(num);
if (iter != _cargo_deliveries.end()) iter->second += amount;
diff --git a/src/cargomonitor.h b/src/cargomonitor.h
index e74f717e05..c7e5da135b 100644
--- a/src/cargomonitor.h
+++ b/src/cargomonitor.h
@@ -149,6 +149,6 @@ void ClearCargoPickupMonitoring(CompanyID company = INVALID_OWNER);
void ClearCargoDeliveryMonitoring(CompanyID company = INVALID_OWNER);
int32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring);
int32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring);
-void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st);
+void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st, IndustryID dest = INVALID_INDUSTRY);
#endif /* CARGOMONITOR_H */
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index c66068a854..3c287d9001 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -707,7 +707,7 @@ public:
this->BuildGroupList(company);
this->SetRows();
} else {
- this->SetSelectedGroup(group);
+ this->SetSelectedGroup(company, group);
}
this->FinishInitNested(company);
@@ -715,7 +715,7 @@ public:
this->InvalidateData(1);
}
- void SetSelectedGroup(GroupID group)
+ void SetSelectedGroup(CompanyID company, GroupID group)
{
this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
const Group *g = Group::Get(group);
@@ -730,7 +730,7 @@ public:
this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
this->groups.ForceRebuild();
- this->BuildGroupList((CompanyID)this->window_number);
+ this->BuildGroupList(company);
this->SetRows();
/* Position scrollbar to selected group */
@@ -1025,9 +1025,15 @@ public:
if (data != -1) {
/* data contains a VehicleType, rebuild list if it displayed */
if (this->livery_class == data + LC_GROUP_RAIL) {
- if (!Group::IsValidID(this->sel)) this->sel = INVALID_GROUP;
this->groups.ForceRebuild();
this->BuildGroupList((CompanyID)this->window_number);
+ this->SetRows();
+
+ if (!Group::IsValidID(this->sel)) {
+ this->sel = INVALID_GROUP;
+ if (this->groups.Length() > 0) this->sel = this->groups[0]->index;
+ }
+
this->SetDirty();
}
return;
@@ -1099,7 +1105,7 @@ void ShowCompanyLiveryWindow(CompanyID company, GroupID group)
if (w == NULL) {
new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group);
} else if (group != INVALID_GROUP) {
- w->SetSelectedGroup(group);
+ w->SetSelectedGroup(company, group);
}
}
diff --git a/src/crashlog.cpp b/src/crashlog.cpp
index 5ff19c2424..e2a5ab2de8 100644
--- a/src/crashlog.cpp
+++ b/src/crashlog.cpp
@@ -62,7 +62,6 @@
#include
#endif
#ifdef WITH_SDL
-# include "sdl.h"
# include
#endif /* WITH_SDL */
#ifdef WITH_ZLIB
@@ -268,14 +267,8 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
#endif /* WITH_PNG */
#ifdef WITH_SDL
-#ifdef DYNAMICALLY_LOADED_SDL
- if (SDL_CALL SDL_Linked_Version != NULL) {
-#else
- {
-#endif
- const SDL_version *v = SDL_CALL SDL_Linked_Version();
- buffer += seprintf(buffer, last, " SDL: %d.%d.%d\n", v->major, v->minor, v->patch);
- }
+ const SDL_version *v = SDL_Linked_Version();
+ buffer += seprintf(buffer, last, " SDL: %d.%d.%d\n", v->major, v->minor, v->patch);
#endif /* WITH_SDL */
#ifdef WITH_ZLIB
diff --git a/src/economy.cpp b/src/economy.cpp
index 8414f1c9b0..edfd5290a6 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1033,9 +1033,10 @@ static SmallIndustryList _cargo_delivery_destinations;
* @param cargo_type Type of cargo delivered
* @param num_pieces Amount of cargo delivered
* @param source The source of the cargo
+ * @param company The company delivering the cargo
* @return actually accepted pieces of cargo
*/
-static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint num_pieces, IndustryID source)
+static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint num_pieces, IndustryID source, CompanyID company)
{
/* Find the nearest industrytile to the station sign inside the catchment area, whose industry accepts the cargo.
* This fails in three cases:
@@ -1068,6 +1069,9 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n
ind->last_cargo_accepted_at[cargo_index] = _date;
num_pieces -= amount;
accepted += amount;
+
+ /* Update the cargo monitor. */
+ AddCargoDelivery(cargo_type, company, amount, ST_INDUSTRY, source, st, ind->index);
}
return accepted;
@@ -1093,38 +1097,38 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti
Station *st = Station::Get(dest);
/* Give the goods to the industry. */
- uint accepted = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY);
+ uint accepted_ind = DeliverGoodsToIndustry(st, cargo_type, num_pieces, src_type == ST_INDUSTRY ? src : INVALID_INDUSTRY, company->index);
/* If this cargo type is always accepted, accept all */
- if (HasBit(st->always_accepted, cargo_type)) accepted = num_pieces;
+ uint accepted_total = HasBit(st->always_accepted, cargo_type) ? num_pieces : accepted_ind;
/* Update station statistics */
- if (accepted > 0) {
+ if (accepted_total > 0) {
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_EVER_ACCEPTED);
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_CURRENT_MONTH);
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_ACCEPTED_BIGTICK);
}
/* Update company statistics */
- company->cur_economy.delivered_cargo[cargo_type] += accepted;
+ company->cur_economy.delivered_cargo[cargo_type] += accepted_total;
/* Increase town's counter for town effects */
const CargoSpec *cs = CargoSpec::Get(cargo_type);
- st->town->received[cs->town_effect].new_act += accepted;
+ st->town->received[cs->town_effect].new_act += accepted_total;
/* Increase town's counter for all goods types only if delivered near town*/
if(CB_Enabled()){
if (_settings_client.gui.cb_distance_check == 0 || (DistanceManhattan(st->town->xy, st->xy) <= _settings_client.gui.cb_distance_check)) {
- st->town->new_act_cargo[cargo_type] += accepted;
+ st->town->new_act_cargo[cargo_type] += accepted_total;
InvalidateWindowData(WC_CB_TOWN, st->town->index);
}
}
/* Determine profit */
- Money profit = GetTransportedGoodsIncome(accepted, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type);
+ Money profit = GetTransportedGoodsIncome(accepted_total, DistanceManhattan(source_tile, st->xy), days_in_transit, cargo_type);
/* Update the cargo monitor. */
- AddCargoDelivery(cargo_type, company->index, accepted, src_type, src, st);
+ AddCargoDelivery(cargo_type, company->index, accepted_total - accepted_ind, src_type, src, st);
/* Modify profit if a subsidy is in effect */
if (CheckSubsidised(cargo_type, company->index, src_type, src, st)) {
diff --git a/src/engine.cpp b/src/engine.cpp
index 9f500e1cdf..d539a48520 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -652,7 +652,14 @@ void StartupOneEngine(Engine *e, Date aging_date)
/* Don't randomise the start-date in the first two years after gamestart to ensure availability
* of engines in early starting games.
* Note: TTDP uses fixed 1922 */
+ SavedRandomSeeds saved_seeds;
+ SaveRandomSeeds(&saved_seeds);
+ SetRandomSeed(_settings_game.game_creation.generation_seed ^
+ ei->base_intro ^
+ e->type ^
+ e->GetGRFID());
uint32 r = Random();
+
e->intro_date = ei->base_intro <= ConvertYMDToDate(_settings_game.game_creation.starting_year + 2, 0, 1) ? ei->base_intro : (Date)GB(r, 0, 9) + ei->base_intro;
if (e->intro_date <= _date) {
e->age = (aging_date - e->intro_date) >> 5;
@@ -672,6 +679,7 @@ void StartupOneEngine(Engine *e, Date aging_date)
e->reliability_spd_dec = ei->decay_speed << 2;
+ RestoreRandomSeeds(saved_seeds);
CalcEngineReliability(e);
/* prevent certain engines from ever appearing. */
diff --git a/src/gfx_layout.h b/src/gfx_layout.h
index f6fc3b5c71..94cbac073a 100644
--- a/src/gfx_layout.h
+++ b/src/gfx_layout.h
@@ -19,6 +19,7 @@
#include |