diff --git a/Makefile.bundle.in b/Makefile.bundle.in
index 3da99689cd..4948dc642e 100644
--- a/Makefile.bundle.in
+++ b/Makefile.bundle.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.bundle.in 27430 2015-11-01 11:55:45Z frosch $
+# $Id: Makefile.bundle.in 27399 2015-09-17 13:12:21Z planetmaker $
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
diff --git a/Makefile.grf.in b/Makefile.grf.in
index aa81428358..6c6ad429c7 100644
--- a/Makefile.grf.in
+++ b/Makefile.grf.in
@@ -1,20 +1,17 @@
-# $Id: Makefile.grf.in 26708 2014-07-30 17:21:42Z rubidium $
+# $Id: Makefile.grf.in 27263 2015-05-02 09:59:55Z frosch $
# This file is part of OpenTTD.
# OpenTTD is free software; you can 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.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
#
-# Building requires GRFCodec and NFORenum. Older versions of GRFCodec are
-# known to miscompile the graphics.
+# Building requires GRFCodec.
#
-# Recent nightlies (including sources) of both can be found at:
+# Recent versions (including sources) can be found at:
# http://www.openttd.org/download-grfcodec
-# http://www.openttd.org/download-nforenum
#
-# The mercurial repository of both can be found at:
+# The mercurial repository can be found at:
# http://hg.openttdcoop.org/grfcodec
-# http://hg.openttdcoop.org/nforenum
#
diff --git a/bin/ai/regression/regression_info.nut b/bin/ai/regression/regression_info.nut
index 71352645f3..1f1e8e1267 100644
--- a/bin/ai/regression/regression_info.nut
+++ b/bin/ai/regression/regression_info.nut
@@ -1,4 +1,4 @@
-/* $Id: regression_info.nut 26895 2014-09-21 16:41:03Z fonsinchen $ */
+/* $Id: regression_info.nut 27192 2015-03-17 20:33:44Z frosch $ */
class Regression extends AIInfo {
function GetAuthor() { return "OpenTTD NoAI Developers Team"; }
@@ -6,7 +6,7 @@ class Regression extends AIInfo {
function GetShortName() { return "REGR"; }
function GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
function GetVersion() { return 1; }
- function GetAPIVersion() { return "1.5"; }
+ function GetAPIVersion() { return "1.6"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}
diff --git a/bin/baseset/opntitle.dat b/bin/baseset/opntitle.dat
index 730c176e0c..264aaff60b 100644
Binary files a/bin/baseset/opntitle.dat and b/bin/baseset/opntitle.dat differ
diff --git a/changelog.txt b/changelog.txt
index c110109386..df0745b15b 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,34 @@
+1.6.0 (2016-04-01)
+------------------------------------------------------------------------
+(None)
+
+
+1.6.0-RC1 (2016-03-01)
+------------------------------------------------------------------------
+- Feature: [NewGRF] Allow custom sound IDs in RV property 0x12, ship property 0x10 and aircraft property 0x12 (r27507)
+- Feature: When viewing online content of a particular type, hide content of other types unless they have been (auto)selected for download (r27469, r27468, r27444)
+- Feature: [NewGRF] Move sprite 8 positions in sprite aligner with ctrl+click [FS#6241] (r27451)
+- Feature: Lower the sell-vehicle and sell-chain buttons in the train depot GUI while dragging a vehicle over it [FS#6391] (r27450, r27446)
+- Feature: Make the object placement GUI an independent window (r27438, r27397, r27346)
+- Feature: [Build] Project files and compilation with MSVC2015 (r27385, r27382, r27381, r27380, r27379)
+- Feature: [NewGRF] Allow railtype NewGRF to define separate sprites for the fences on either track side [FS#6315] (r27354, r27343)
+- Feature: [NewGRF] Increase the maximum amount of industry types to 128 per NewGRF and 240 in total (r27279)
+- Feature: Make Ctrl+Remove-Roadstop also remove the road, just like for rail stations [FS#6252] (r27251)
+- Change: [NewGRF] Allow static NewGRF to enable the second rocky tile set (r27497)
+- Change: Round loading percentage in loading indicators and conditional orders towards 50%, so that 0% and 100% mean completely empty or full (r27426)
+- Change: [Build] Rework the configure system to make more use of pkg-config (r27377:r27366, r27361, r27360)
+- Change: Enable YAPF cache debugging with desync debug level 2 (r27332)
+- Change: [strgen] Default plural subparameter position for CARGO_xxx string control codes is subparameter 1 (r27295)
+- Change: [NewGRF] Translate industry variable A6 (r27267)
+- Change: Do not consider cargo that is already being loaded as waiting cargo wrt. the station rating [FS#6165] (r27256)
+- Change: Tune down terrain generation to reduce amount of long slopes (r27230)
+- Change: Generate more detailed curves at the coast (r27229)
+- Change: Slightly more water in the non-custom sea levels (r27228)
+- Change: Be more lenient about road stop removal when at least one stop could be removed [FS#6262] (r27225)
+- Fix: [Win32] Stdin/out/err need to be re-assigned differently if the runtime lib of MSVC2015 is used (r27481)
+- Fix: [Haiku] On Haiku use the appropriate system variable to obtain the include dir [FS#6401] (r27472)
+
+
1.5.3 (2015-12-01)
------------------------------------------------------------------------
(None)
diff --git a/config.lib b/config.lib
index 8022045b46..bd69093d8f 100644
--- a/config.lib
+++ b/config.lib
@@ -1,4 +1,4 @@
-# $Id: config.lib 27462 2015-12-01 19:36:48Z frosch $
+# $Id: config.lib 27532 2016-04-01 18:32:32Z frosch $
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -29,6 +29,7 @@ set_default() {
strip=""
lipo=""
awk="awk"
+ pkg_config="pkg-config"
os="DETECT"
endian="AUTO"
cpu_type="DETECT"
@@ -84,7 +85,8 @@ set_default() {
with_libtimidity="1"
with_freetype="1"
with_fontconfig="1"
- with_icu="1"
+ with_icu_layout="1"
+ with_icu_sort="1"
static_icu="0"
with_psp_config="1"
with_threads="1"
@@ -105,6 +107,7 @@ set_default() {
strip
lipo
awk
+ pkg_config
os
endian
cpu_type
@@ -159,7 +162,8 @@ set_default() {
with_libtimidity
with_freetype
with_fontconfig
- with_icu
+ with_icu_layout
+ with_icu_sort
static_icu
with_psp_config
with_threads
@@ -213,6 +217,8 @@ detect_params() {
--windres=*) windres="$optarg";;
--awk) prev_p="awk";;
--awk=*) awk="$optarg";;
+ --pkg-config) prev_p="pkg_config";;
+ --pkg-config=*) pkg_config="$optarg";;
--strip) prev_p="strip";;
--strip=*) strip="$optarg";;
--lipo) prev_p="lipo";;
@@ -383,12 +389,18 @@ detect_params() {
--without-libfontconfig) with_fontconfig="0";;
--with-libfontconfig=*) with_fontconfig="$optarg";;
- --with-icu) with_icu="2";;
- --without-icu) with_icu="0";;
- --with-icu=*) with_icu="$optarg";;
- --with-libicu) with_icu="2";;
- --without-libicu) with_icu="0";;
- --with-libicu=*) with_icu="$optarg";;
+ --with-icu) with_icu_layout="2";with_icu_sort="2";;
+ --without-icu) with_icu_layout="0";with_icu_sort="0";;
+ --with-icu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
+ --with-libicu) with_icu_layout="2";with_icu_sort="2";;
+ --without-libicu) with_icu_layout="0";with_icu_sort="0";;
+ --with-libicu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
+ --with-icu-layout) with_icu_layout="2";;
+ --without-icu-layout) with_icu_layout="0";;
+ --with-icu-layout=*) with_icu_layout="$optarg";;
+ --with-icu-sort) with_icu_sort="2";;
+ --without-icu-sort) with_icu_sort="0";;
+ --with-icu-sort=*) with_icu_sort="$optarg";;
--static-icu) static_icu="1";;
--static-icu=*) static_icu="$optarg";;
--static-libicu) static_icu="1";;
@@ -787,7 +799,7 @@ check_params() {
pre_detect_with_zlib=$with_zlib
detect_zlib
- if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; 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,"
@@ -838,7 +850,8 @@ check_params() {
detect_png
detect_freetype
detect_fontconfig
- detect_icu
+ detect_icu_layout
+ detect_icu_sort
detect_pspconfig
detect_libtimidity
@@ -1653,12 +1666,13 @@ make_cflags_and_ldflags() {
fi
if [ "$with_zlib" != "0" ]; then
- if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
- LIBS="$LIBS $zlib"
- else
- LIBS="$LIBS -lz"
- fi
CFLAGS="$CFLAGS -DWITH_ZLIB"
+ CFLAGS="$CFLAGS `$zlib_config --cflags | tr '\n\r' ' '`"
+ if [ "$enable_static" != "0" ]; then
+ LIBS="$LIBS `$zlib_config --libs --static | tr '\n\r' ' '`"
+ else
+ LIBS="$LIBS `$zlib_config --libs | tr '\n\r' ' '`"
+ fi
fi
if [ -n "$lzma_config" ]; then
@@ -1704,13 +1718,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
- if [ "$os" = "OSX" ]; then
- # fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
- # Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
- LIBS="$LIBS `$png_config --variable=prefix`/lib/libpng.a `$png_config --libs --static | sed s@-lpng[0-9]*@@`"
- else
- LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
- fi
+ LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`"
fi
@@ -1721,13 +1729,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
- if [ "$os" = "OSX" ]; then
- # fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
- # Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
- LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
- else
- LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
- fi
+ LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
fi
@@ -1738,26 +1740,31 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
- if [ "$os" = "OSX" ]; then
- LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
- else
- # Is it possible to do static with freetype, if so: how?
- LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
- fi
+ LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi
fi
- if [ -n "$icu_config" ]; then
- CFLAGS="$CFLAGS -DWITH_ICU"
- CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
+ if [ -n "$icu_layout_config" ]; then
+ CFLAGS="$CFLAGS -DWITH_ICU_LAYOUT"
+ CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`"
- # Some icu-configs have the 'feature' of not adding a space where others do add the space
if [ "$static_icu" != "0" ]; then
- LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' ' | sed s/licu/lsicu/g`"
+ LIBS="$LIBS `$icu_layout_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else
- LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' '`"
+ LIBS="$LIBS `$icu_layout_config --libs | tr '\n\r' ' '`"
+ fi
+ fi
+
+ if [ -n "$icu_sort_config" ]; then
+ CFLAGS="$CFLAGS -DWITH_ICU_SORT"
+ CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`"
+
+ if [ "$static_icu" != "0" ]; then
+ LIBS="$LIBS `$icu_sort_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
+ else
+ LIBS="$LIBS `$icu_sort_config --libs | tr '\n\r' ' '`"
fi
fi
@@ -1772,13 +1779,15 @@ make_cflags_and_ldflags() {
fi
fi
- if [ -n "$libtimidity" ]; then
- if [ "$enable_static" != "0" ]; then
- LIBS="$LIBS $libtimidity"
- else
- LIBS="$LIBS -ltimidity"
- fi
+ if [ -n "$libtimidity_config" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY"
+ CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
+
+ if [ "$enable_static" != "0" ]; then
+ LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
+ else
+ LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
+ fi
fi
if [ "$with_iconv" != "0" ]; then
@@ -1938,9 +1947,26 @@ check_compiler() {
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
- log 1 "checking $1... $compiler not found"
- log 1 "I couldn't detect any $6 binary for $3"
- exit 1
+ if [ -z "$5" ]; then
+ log 1 "checking $1... $compiler not found"
+ log 1 "I couldn't detect any $6 binary for $3"
+ exit 1
+ else
+ compiler="$3-$5"
+ fi
+ machine=`eval $compiler $9 2>/dev/null`
+ ret=$?
+ eval "$2=\"$compiler\""
+
+ log 2 "executing $compiler $9"
+ log 2 " returned $machine"
+ log 2 " exit code $ret"
+
+ if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
+ log 1 "checking $1... $compiler not found"
+ log 1 "I couldn't detect any $5 binary for $3"
+ exit 1
+ fi
fi
if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
@@ -2349,7 +2375,7 @@ detect_allegro() {
return 0
fi
- # By default on OSX we don't use SDL. The rest is auto-detect
+ # By default on OSX we don't use Allegro. The rest is auto-detect
if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
log 1 "checking Allegro... OSX, skipping"
@@ -2357,33 +2383,7 @@ detect_allegro() {
return 0
fi
- if [ "$with_allegro" = "1" ] || [ "$with_allegro" = "" ] || [ "$with_allegro" = "2" ]; then
- allegro_config="allegro-config"
- else
- allegro_config="$with_allegro"
- fi
-
- version=`$allegro_config --version 2>/dev/null`
- ret=$?
- log 2 "executing $allegro_config --version"
- log 2 " returned $version"
- log 2 " exit code $ret"
-
- if [ -z "$version" ] || [ "$ret" != "0" ]; then
- log 1 "checking Allegro... not found"
-
- # It was forced, so it should be found.
- if [ "$with_allegro" != "1" ]; then
- log 1 "configure: error: allegro-config couldn't be found"
- log 1 "configure: error: you supplied '$with_allegro', but it seems invalid"
- exit 1
- fi
-
- allegro_config=""
- return 0
- fi
-
- log 1 "checking Allegro... found"
+ detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4"
}
@@ -2429,33 +2429,7 @@ detect_sdl() {
sleep 5
fi
- if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then
- sdl_config="sdl-config"
- else
- sdl_config="$with_sdl"
- fi
-
- version=`$sdl_config --version 2>/dev/null`
- ret=$?
- log 2 "executing $sdl_config --version"
- log 2 " returned $version"
- log 2 " exit code $ret"
-
- if [ -z "$version" ] || [ "$ret" != "0" ]; then
- log 1 "checking SDL... not found"
-
- # It was forced, so it should be found.
- if [ "$with_sdl" != "1" ]; then
- log 1 "configure: error: sdl-config couldn't be found"
- log 1 "configure: error: you supplied '$with_sdl', but it seems invalid"
- exit 1
- fi
-
- sdl_config=""
- return 0
- fi
-
- log 1 "checking SDL... found"
+ detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
}
detect_osx_sdk() {
@@ -2636,10 +2610,13 @@ detect_library() {
fi
fi
if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then
- eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
+ if [ -z "$includeDir" ]; then
+ includeDir=`finddir B_SYSTEM_HEADERS_DIRECTORY`
+ fi
+ eval "$2=`ls -1 $includeDir/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
eval "res=\$$2"
if [ -z "$res" ]; then
- log 2 " trying /boot/common/include/$4$5... no"
+ log 2 " trying $includeDir/$4$5... no"
fi
fi
@@ -2708,7 +2685,7 @@ detect_library() {
}
detect_zlib() {
- detect_library "$with_zlib" "zlib" "libz.a" "" "zlib.h"
+ detect_pkg_config "$with_zlib" "zlib" "zlib_config" "1.2"
}
detect_lzo2() {
@@ -2716,7 +2693,7 @@ detect_lzo2() {
}
detect_libtimidity() {
- detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
+ detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
}
detect_pkg_config() {
@@ -2724,6 +2701,7 @@ detect_pkg_config() {
# $2 - package name ('liblzma')
# $3 - config name ('lzma_config', sets $lzma_config)
# $4 - minimum module version ('2.3')
+ # $5 - check for dedicated, 1 is "skif if dedicated"
# 0 means no, 1 is auto-detect, 2 is force
if [ "$1" = "0" ]; then
@@ -2733,10 +2711,17 @@ detect_pkg_config() {
return 0
fi
+ if [ "$5" = "1" ] && [ "$1" = "1" ] && [ "$enable_dedicated" != "0" ]; then
+ log 1 "checking $2... dedicated server, skipping"
+
+ eval "$3=\"\""
+ return 0
+ fi
+
log 2 "detecting $2"
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
- pkg_config_call="pkg-config $2"
+ pkg_config_call="$pkg_config $2"
else
pkg_config_call="$1"
fi
@@ -2758,7 +2743,7 @@ detect_pkg_config() {
# It was forced, so it should be found.
if [ "$1" != "1" ]; then
- log 1 "configure: error: pkg-config $2 couldn't be found"
+ log 1 "configure: error: $pkg_config $2 couldn't be found"
log 1 "configure: error: you supplied '$1', but it seems invalid"
exit 1
fi
@@ -2780,89 +2765,11 @@ detect_xdg_basedir() {
}
detect_png() {
- # 0 means no, 1 is auto-detect, 2 is force
- if [ "$with_png" = "0" ]; then
- log 1 "checking libpng... disabled"
-
- png_config=""
- return 0
- fi
-
- if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
- if [ "$with_png" != "1" ]; then
- log 1 "checking libpng... no zlib"
- log 1 "ERROR: libpng was forced, but zlib was not detected / disabled."
- log 1 "ERROR: libpng depends on zlib."
-
- exit 1
- fi
-
- log 1 "checking libpng... no zlib, skipping"
-
- png_config=""
- return 0
- fi
-
detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
}
detect_freetype() {
- # 0 means no, 1 is auto-detect, 2 is force
- if [ "$with_freetype" = "0" ]; then
- log 1 "checking libfreetype... disabled"
-
- freetype_config=""
- return 0
- fi
- if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then
- log 1 "checking libfreetype... dedicated server, skipping"
-
- freetype_config=""
- return 0
- fi
-
- if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
- if [ "$with_freetype" != "1" ]; then
- log 1 "checking libfreetype... no zlib"
- log 1 "ERROR: libfreetype was forced, but zlib was not detected / disabled."
- log 1 "ERROR: libfreetype depends on zlib."
-
- exit 1
- fi
-
- log 1 "checking libfreetype... no zlib, skipping"
-
- freetype_config=""
- return 0
- fi
-
- if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
- freetype_config="freetype-config"
- else
- freetype_config="$with_freetype"
- fi
-
- version=`$freetype_config --version 2>/dev/null`
- ret=$?
- log 2 "executing freetype_config --version"
- log 2 " returned $version"
- log 2 " exit code $ret"
-
- if [ -z "$version" ] || [ "$ret" != "0" ]; then
- log 1 "checking libfreetype... not found"
-
- # It was forced, so it should be found.
- if [ "$with_freetype" != "1" ]; then
- log 1 "configure: error: freetype-config couldn't be found"
- log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
- exit 1
- fi
-
- freetype_config=""
- return 0
- fi
-
- log 1 "checking libfreetype... found"
+ detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1"
}
detect_fontconfig() {
@@ -2873,19 +2780,6 @@ detect_fontconfig() {
fontconfig_config=""
return 0
fi
- if [ "$with_fontconfig" = "1" ] && [ "$enable_dedicated" != "0" ]; then
- log 1 "checking libfontconfig... dedicated server, skipping"
-
- fontconfig_config=""
- return 0
- fi
- if [ "$with_fontconfig" != "2" ] && [ -z "$freetype_config" ]; then
- log 1 "checking libfontconfig... no freetype, skipping"
-
- fontconfig_config=""
- return 0
- fi
-
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
log 1 "checking libfontconfig... WIN32, skipping"
fontconfig_config=""
@@ -2898,57 +2792,15 @@ detect_fontconfig() {
return 0
fi
- detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3"
+ detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1"
}
-detect_icu() {
- # 0 means no, 1 is auto-detect, 2 is force
- if [ "$with_icu" = "0" ]; then
- log 1 "checking libicu... disabled"
+detect_icu_layout() {
+ detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1"
+}
- icu_config=""
- return 0
- fi
- if [ "$with_icu" = "1" ] && [ "$enable_dedicated" != "0" ]; then
- log 1 "checking libicu... dedicated server, skipping"
-
- icu_config=""
- return 0
- fi
-
- if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
- icu_config="icu-config"
- else
- icu_config="$with_icu"
- fi
-
- version=`$icu_config --version 2>/dev/null`
- ret=$?
- check_version '3.6' "$version"
- version_ok=$?
- log 2 "executing $icu_config --version"
- log 2 " returned $version"
- log 2 " exit code $ret"
-
- if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
- if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
- log 1 "checking libicu... needs at least version 3.6.0, icu NOT enabled"
- else
- log 1 "checking libicu... not found"
- fi
-
- # It was forced, so it should be found.
- if [ "$with_icu" != "1" ]; then
- log 1 "configure: error: icu-config couldn't be found"
- log 1 "configure: error: you supplied '$with_icu', but it seems invalid"
- exit 1
- fi
-
- icu_config=""
- return 0
- fi
-
- log 1 "checking libicu... found"
+detect_icu_sort() {
+ detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1"
}
detect_pspconfig() {
@@ -3588,6 +3440,7 @@ showhelp() {
echo " --windres=WINDRES the windres to use [HOST-windres]"
echo " --strip=STRIP the strip to use [HOST-strip]"
echo " --awk=AWK the awk to use in configure [awk]"
+ echo " --pkg-config=PKG-CONFIG the pkg-config to use in configure [pkg-config]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
@@ -3662,23 +3515,30 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player"
- echo " --with-libtimidity enables libtimidity support"
- echo " --with-allegro[=allegro-config]"
+ echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
+ echo " enables libtimidity support"
+ echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
- echo " --with-sdl[=sdl-config] enables SDL video driver support"
- echo " --with-zlib[=zlib.a] enables zlib support"
+ echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support"
+ echo " --with-zlib[=\"pkg-config zlib\"]"
+ echo " enables zlib support"
echo " --with-liblzma[=\"pkg-config liblzma\"]"
echo " enables liblzma support"
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
- echo " --with-png[=libpng-config] enables libpng support"
- echo " --with-freetype[=freetype-config]"
+ echo " --with-png[=\"pkg-config libpng\"]"
+ echo " enables libpng support"
+ echo " --with-freetype[=\"pkg-config freetype2\"]"
echo " enables libfreetype support"
echo " --with-fontconfig[=\"pkg-config fontconfig\"]"
echo " enables fontconfig support"
echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]"
echo " enables XDG base directory support"
- echo " --with-icu[=icu-config] enables icu (used for right-to-left support)"
+ echo " --with-icu enables icu components for layout and sorting"
+ echo " --with-icu-layout[=\"pkg-config icu-lx\"]"
+ echo " enables icu components for layouting (right-to-left support)"
+ echo " --with-icu-sort[=\"pkg-config icu-i18n\"]"
+ echo " enables icu components for locale specific string sorting"
echo " --static-icu try to link statically (libsicu instead of"
echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support"
diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html
index 98351fcdcc..d34fe9840c 100644
--- a/docs/landscape_grid.html
+++ b/docs/landscape_grid.html
@@ -17,7 +17,7 @@
Landscape
-Six attributes hold the information about a tile.
+Nine attributes hold the information about a tile.
This can be seen in the Landscape document. This page tries to give an overview of used and free bits of
the array so you can quickly see what is used and what is not.
diff --git a/known-bugs.txt b/known-bugs.txt
index ed10aab79a..3cf3a2c7c3 100644
--- a/known-bugs.txt
+++ b/known-bugs.txt
@@ -1,6 +1,6 @@
OpenTTD's known bugs
-Last updated: 2015-12-01
-Release version: 1.5.3
+Last updated: 2016-04-01
+Release version: 1.6.0
------------------------------------------------------------------------
diff --git a/media/extra_grf/shore.nfo b/media/extra_grf/shore.nfo
index b7ff62b925..7040841549 100644
--- a/media/extra_grf/shore.nfo
+++ b/media/extra_grf/shore.nfo
@@ -1,5 +1,5 @@
//
-// $Id: shore.nfo 23993 2012-02-26 08:23:32Z rubidium $
+// $Id: shore.nfo 27265 2015-05-03 10:10:04Z frosch $
//
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -47,7 +47,7 @@
-1 sprites/shore.png 8bpp 82 200 64 32 -31 -1 normal
-1 sprites/shore.png 8bpp 162 200 64 31 -31 -8 normal
-1 * 6 07 83 01 \7! 03 0C
- -1 * 44 0C "Missing shore tile graphics for the toyland climate"
+ -1 * 52 0C "Missing shore tile graphics for the toyland climate"
-1 * 3 05 0D 0A
-1 sprites/shore.png 8bpp 290 200 64 15 -31 0 normal
-1 sprites/shore.png 8bpp 370 200 64 31 -31 -8 normal
diff --git a/media/openttd.desktop.in b/media/openttd.desktop.in
index 1045eac88a..9b16c1acc4 100644
--- a/media/openttd.desktop.in
+++ b/media/openttd.desktop.in
@@ -1,4 +1,4 @@
-# $Id: openttd.desktop.in 27270 2015-05-08 17:23:55Z frosch $
+# $Id: openttd.desktop.in 27221 2015-04-07 21:30:04Z frosch $
# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html
[Desktop Entry]
Type=Application
diff --git a/os/debian/changelog b/os/debian/changelog
index 4dd5b1155f..945a70e579 100644
--- a/os/debian/changelog
+++ b/os/debian/changelog
@@ -1,3 +1,15 @@
+openttd (1.6.0-0) unstable; urgency=low
+
+ * New upstream release 1.6.0
+
+ -- OpenTTD Fri, 01 Apr 2016 21:00:00 +0200
+
+openttd (1.6.0~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.6.0-RC1
+
+ -- OpenTTD Tue, 01 Mar 2016 21:00:00 +0100
+
openttd (1.5.3-0) unstable; urgency=low
* New upstream release 1.5.3
diff --git a/os/os2/installer/make_installer.cmd b/os/os2/installer/make_installer.cmd
index 289b6ea54a..6fe6dace66 100644
--- a/os/os2/installer/make_installer.cmd
+++ b/os/os2/installer/make_installer.cmd
@@ -1,6 +1,6 @@
@echo off
-set OPENTTD_VERSION=1.5.0
+set OPENTTD_VERSION=1.6.0
set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=1.2.0
diff --git a/os/rpm/openttd.spec b/os/rpm/openttd.spec
index cd19fd9219..5ad5a53cab 100644
--- a/os/rpm/openttd.spec
+++ b/os/rpm/openttd.spec
@@ -17,9 +17,9 @@
#
Name: openttd
-Version: 1.5.beta1
+Version: 1.6.beta1
Release: 0
-%define srcver 1.5.0-beta1
+%define srcver 1.6.0-beta1
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 2abec4a844..eb2445b62b 100644
--- a/os/windows/installer/install.nsi
+++ b/os/windows/installer/install.nsi
@@ -1,7 +1,7 @@
# Version numbers to update
!define APPV_MAJOR 1
-!define APPV_MINOR 5
-!define APPV_MAINT 3
+!define APPV_MINOR 6
+!define APPV_MAINT 0
!define APPV_BUILD 1
!define APPV_EXTRA ""
diff --git a/projects/generate b/projects/generate
index 269d018630..78fd3b437b 100755
--- a/projects/generate
+++ b/projects/generate
@@ -1,6 +1,6 @@
#!/bin/bash
-# $Id: generate 27152 2015-02-15 14:56:21Z frosch $
+# $Id: generate 27382 2015-08-10 20:36:57Z michi_cc $
# This file is part of OpenTTD.
# OpenTTD is free software; you can 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,6 +22,15 @@ then
exit 1
fi
+# openttd_vs140.sln is for MSVC 2015
+# openttd_vs140.vcxproj is for MSVC 2015
+# openttd_vs140.vcxproj.filters is for MSVC 2015
+# langs_vs140.vcxproj is for MSVC 2015
+# strgen_vs140.vcxproj is for MSVC 2015
+# strgen_vs140.vcxproj.filters is for MSVC 2015
+# generate_vs140.vcxproj is for MSVC 2015
+# version_vs140.vcxproj is for MSVC 2015
+
# openttd_vs100.sln is for MSVC 2010
# openttd_vs100.vcxproj is for MSVC 2010
# openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -306,11 +315,17 @@ generate "$openttd" "openttd_vs80.vcproj"
generate "$openttd" "openttd_vs90.vcproj"
generate "$openttdvcxproj" "openttd_vs100.vcxproj"
generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters"
+generate "$openttdvcxproj" "openttd_vs140.vcxproj"
+generate "$openttdfiles" "openttd_vs140.vcxproj.filters" "$openttdfilters"
generate "$lang" "langs_vs80.vcproj"
generate "$lang" "langs_vs90.vcproj"
generate "$langvcxproj" "langs_vs100.vcxproj"
generate "$langfiles" "langs_vs100.vcxproj.filters"
+generate "$langvcxproj" "langs_vs140.vcxproj"
+generate "$langfiles" "langs_vs140.vcxproj.filters"
generate "$settings" "settings_vs80.vcproj" "$settingscommand"
generate "$settings" "settings_vs90.vcproj" "$settingscommand"
generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs100.vcxproj.filters"
+generate "$settingsvcxproj" "settings_vs140.vcxproj" "$settingscommand"
+generate "$settingsfiles" "settings_vs140.vcxproj.filters"
diff --git a/projects/generate.vbs b/projects/generate.vbs
index e9ba2cb51a..25001f3e13 100755
--- a/projects/generate.vbs
+++ b/projects/generate.vbs
@@ -1,6 +1,6 @@
Option Explicit
-' $Id: generate.vbs 26227 2014-01-05 10:19:59Z zuu $
+' $Id: generate.vbs 27382 2015-08-10 20:36:57Z michi_cc $
'
' This file is part of OpenTTD.
' OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -10,6 +10,15 @@ Option Explicit
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
+' openttd_vs140.sln is for MSVC 2015
+' openttd_vs140.vcxproj is for MSVC 2015
+' openttd_vs140.vcxproj.filters is for MSVC 2015
+' langs_vs140.vcxproj is for MSVC 2015
+' strgen_vs140.vcxproj is for MSVC 2015
+' strgen_vs140.vcxproj.filters is for MSVC 2015
+' generate_vs140.vcxproj is for MSVC 2015
+' version_vs140.vcxproj is for MSVC 2015
+
' openttd_vs100.sln is for MSVC 2010
' openttd_vs100.vcxproj is for MSVC 2010
' openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -369,6 +378,8 @@ generate openttd, ROOT_DIR & "/projects/openttd_vs80.vcproj", Null
generate openttd, ROOT_DIR & "/projects/openttd_vs90.vcproj", Null
generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs100.vcxproj", Null
generate openttdfiles, ROOT_DIR & "/projects/openttd_vs100.vcxproj.filters", openttdfilters
+generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs140.vcxproj", Null
+generate openttdfiles, ROOT_DIR & "/projects/openttd_vs140.vcxproj.filters", openttdfilters
Dim lang, langvcxproj, langfiles
lang = load_lang_data(ROOT_DIR & "/src/lang", langvcxproj, langfiles)
@@ -376,6 +387,8 @@ generate lang, ROOT_DIR & "/projects/langs_vs80.vcproj", Null
generate lang, ROOT_DIR & "/projects/langs_vs90.vcproj", Null
generate langvcxproj, ROOT_DIR & "/projects/langs_vs100.vcxproj", Null
generate langfiles, ROOT_DIR & "/projects/langs_vs100.vcxproj.filters", Null
+generate langvcxproj, ROOT_DIR & "/projects/langs_vs140.vcxproj", Null
+generate langfiles, ROOT_DIR & "/projects/langs_vs140.vcxproj.filters", Null
Dim settings, settingsvcxproj, settingscommand, settingsfiles
settings = load_settings_data(ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles)
@@ -383,3 +396,5 @@ generate settings, ROOT_DIR & "/projects/settings_vs80.vcproj", settingscommand
generate settings, ROOT_DIR & "/projects/settings_vs90.vcproj", settingscommand
generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs100.vcxproj", settingscommand
generate settingsfiles, ROOT_DIR & "/projects/settings_vs100.vcxproj.filters", Null
+generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs140.vcxproj", settingscommand
+generate settingsfiles, ROOT_DIR & "/projects/settings_vs140.vcxproj.filters", Null
diff --git a/projects/openttd_vs100.vcxproj b/projects/openttd_vs100.vcxproj
index 3f6bdf5112..4028b149c6 100644
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -911,6 +911,7 @@
+
diff --git a/projects/openttd_vs100.vcxproj.filters b/projects/openttd_vs100.vcxproj.filters
index 8ef9a6d7b0..e4a09e19ca 100644
--- a/projects/openttd_vs100.vcxproj.filters
+++ b/projects/openttd_vs100.vcxproj.filters
@@ -1962,6 +1962,9 @@
Tables
+
+ Tables
+
Tables
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index 393795c2f4..5fb8188d8e 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -2942,6 +2942,10 @@
RelativePath=".\..\src\table\strgen_tables.h"
>
+
+
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index e1177703d7..6454ec6ac1 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -2939,6 +2939,10 @@
RelativePath=".\..\src\table\strgen_tables.h"
>
+
+
diff --git a/readme.txt b/readme.txt
index c2f8ce65b2..bda00f9f0f 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,5 +1,5 @@
-Last updated: 2015-12-01
-Release version: 1.5.3
+Last updated: 2016-04-01
+Release version: 1.6.0
------------------------------------------------------------------------
@@ -308,9 +308,9 @@ chosen main OpenTTD directory:
32bpp Sets: newgrf (or a subdirectory thereof)
Music Sets: baseset (or a subdirectory thereof)
AIs: ai (or a subdirectory thereof)
- AI Libraries: ai/libraries (or a subdirectory thereof)
+ AI Libraries: ai/library (or a subdirectory thereof)
Game Scripts (GS): game (or a subdirectory thereof)
- GS Libraries: game/libraries (or a subdirectory thereof)
+ GS Libraries: game/library (or a subdirectory thereof)
Savegames: save
Automatic Savegames: save/autosave
Scenarios: scenario
diff --git a/source.list b/source.list
index 3d49fa1380..193fd40424 100644
--- a/source.list
+++ b/source.list
@@ -677,6 +677,7 @@ table/roadveh_movement.h
table/sprites.h
table/station_land.h
table/strgen_tables.h
+table/string_colours.h
../objs/langs/table/strings.h
table/town_land.h
table/townname.h
diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
index 2cc5f3d344..ace9d201e9 100644
--- a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp
@@ -57,7 +57,7 @@ typedef sqvector ExpStateVec;
class SQCompiler
{
public:
- SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _lex(_ss(v), rg, up,ThrowError,this)
+ SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _token(0), _fs(NULL), _lex(_ss(v), rg, up, ThrowError, this), _debugline(0), _debugop(0)
{
_vm=v;
_sourcename = SQString::Create(_ss(v), sourcename);
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index b854d2e2af..35f72beb68 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -1,4 +1,4 @@
-/* $Id: ai_gui.cpp 27187 2015-03-15 12:19:58Z frosch $ */
+/* $Id: ai_gui.cpp 27468 2015-12-10 18:28:01Z zuu $ */
/*
* This file is part of OpenTTD.
@@ -901,8 +901,7 @@ struct AIConfigWindow : public Window {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
#if defined(ENABLE_NETWORK)
- ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI);
- _network_content_client.RequestContentList(CONTENT_TYPE_GAME);
+ ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI, CONTENT_TYPE_GAME);
#endif
}
break;
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index 194f65bcb6..24f16fe817 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -1,4 +1,4 @@
-/* $Id: ai_info.cpp 26774 2014-09-06 17:46:56Z rubidium $ */
+/* $Id: ai_info.cpp 27193 2015-03-17 20:45:57Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -28,7 +28,7 @@ static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 ||
strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
- strcmp(api_version, "1.5") == 0;
+ strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0;
}
#if defined(WIN32)
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 60ea45fd0b..faf11a818d 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1,4 +1,4 @@
-/* $Id: aircraft_cmd.cpp 27432 2015-11-01 12:03:13Z frosch $ */
+/* $Id: aircraft_cmd.cpp 27422 2015-10-30 16:20:00Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/base_consist.cpp b/src/base_consist.cpp
index f7f4dfbb11..08ffd2b982 100644
--- a/src/base_consist.cpp
+++ b/src/base_consist.cpp
@@ -1,4 +1,4 @@
-/* $Id: base_consist.cpp 27348 2015-07-30 18:45:29Z frosch $ */
+/* $Id: base_consist.cpp 27280 2015-05-11 16:40:06Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp
index 57dc395e1a..6800dae4fb 100644
--- a/src/clear_cmd.cpp
+++ b/src/clear_cmd.cpp
@@ -1,4 +1,4 @@
-/* $Id: clear_cmd.cpp 27214 2015-03-31 18:45:30Z frosch $ */
+/* $Id: clear_cmd.cpp 27200 2015-03-20 19:27:15Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/company_base.h b/src/company_base.h
index 9835f5f50e..1d9c22f283 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -1,4 +1,4 @@
-/* $Id: company_base.h 26081 2013-11-24 09:52:35Z rubidium $ */
+/* $Id: company_base.h 27381 2015-08-10 20:24:13Z michi_cc $ */
/*
* This file is part of OpenTTD.
@@ -47,7 +47,7 @@ struct CompanyInfrastructure {
}
};
-typedef Pool CompanyPool;
+typedef Pool CompanyPool;
extern CompanyPool _company_pool;
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index f55d0afb34..8ec18fa33a 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -1,4 +1,4 @@
-/* $Id: company_gui.cpp 27432 2015-11-01 12:03:13Z frosch $ */
+/* $Id: company_gui.cpp 27427 2015-10-30 17:24:30Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/core/pool_func.hpp b/src/core/pool_func.hpp
index 2c57dacba5..b89082b9f4 100644
--- a/src/core/pool_func.hpp
+++ b/src/core/pool_func.hpp
@@ -1,4 +1,4 @@
-/* $Id: pool_func.hpp 26057 2013-11-23 13:12:19Z rubidium $ */
+/* $Id: pool_func.hpp 27381 2015-08-10 20:24:13Z michi_cc $ */
/*
* This file is part of OpenTTD.
@@ -121,7 +121,7 @@ DEFINE_POOL_METHOD(inline void *)::AllocateItem(size_t size, size_t index)
item = (Titem *)MallocT(size);
}
this->data[index] = item;
- item->index = (uint)index;
+ item->index = (Tindex)(uint)index;
return item;
}
diff --git a/src/crashlog.cpp b/src/crashlog.cpp
index 009405882d..e24dcc06c4 100644
--- a/src/crashlog.cpp
+++ b/src/crashlog.cpp
@@ -1,4 +1,4 @@
-/* $Id: crashlog.cpp 26538 2014-04-28 21:06:51Z rubidium $ */
+/* $Id: crashlog.cpp 27367 2015-08-09 12:33:27Z rubidium $ */
/*
* This file is part of OpenTTD.
@@ -196,9 +196,9 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
# include
# include FT_FREETYPE_H
#endif /* WITH_FREETYPE */
-#ifdef WITH_ICU
+#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
# include
-#endif /* WITH_ICU */
+#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
# include
#endif
@@ -241,14 +241,19 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
buffer += seprintf(buffer, last, " FreeType: %d.%d.%d\n", major, minor, patch);
#endif /* WITH_FREETYPE */
-#ifdef WITH_ICU
+#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
/* 4 times 0-255, separated by dots (.) and a trailing '\0' */
char buf[4 * 3 + 3 + 1];
UVersionInfo ver;
u_getVersion(ver);
u_versionToString(ver, buf);
- buffer += seprintf(buffer, last, " ICU: %s\n", buf);
-#endif /* WITH_ICU */
+#ifdef WITH_ICU_SORT
+ buffer += seprintf(buffer, last, " ICU i18n: %s\n", buf);
+#endif
+#ifdef WITH_ICU_LAYOUT
+ buffer += seprintf(buffer, last, " ICU lx: %s\n", buf);
+#endif
+#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
buffer += seprintf(buffer, last, " LZMA: %s\n", lzma_version_string());
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index cad8eed13f..21091c3256 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -1,4 +1,4 @@
-/* $Id: depot_gui.cpp 27134 2015-02-01 20:54:24Z frosch $ */
+/* $Id: depot_gui.cpp 27450 2015-11-20 09:25:27Z alberth $ */
/*
* This file is part of OpenTTD.
@@ -201,6 +201,7 @@ struct DepotWindow : Window {
VehicleID vehicle_over; ///< Rail vehicle over which another one is dragged, \c INVALID_VEHICLE if none.
VehicleType type;
bool generate_list;
+ int hovered_widget; ///< Index of the widget being hovered during drag/drop. -1 if no drag is in progress.
VehicleList vehicle_list;
VehicleList wagon_list;
uint unitnumber_digits;
@@ -215,6 +216,7 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE;
this->generate_list = true;
+ this->hovered_widget = -1;
this->type = type;
this->num_columns = 1; // for non-trains this gets set in FinishInitNested()
this->unitnumber_digits = 2;
@@ -846,11 +848,29 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE;
this->SetWidgetDirty(WID_D_MATRIX);
+
+ if (this->hovered_widget != -1) {
+ this->SetWidgetLoweredState(this->hovered_widget, false);
+ this->SetWidgetDirty(this->hovered_widget);
+ this->hovered_widget = -1;
+ }
}
virtual void OnMouseDrag(Point pt, int widget)
{
- if (this->type != VEH_TRAIN || this->sel == INVALID_VEHICLE) return;
+ if (this->sel == INVALID_VEHICLE) return;
+ if (widget != this->hovered_widget) {
+ if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
+ this->SetWidgetLoweredState(this->hovered_widget, false);
+ this->SetWidgetDirty(this->hovered_widget);
+ }
+ this->hovered_widget = widget;
+ if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
+ this->SetWidgetLoweredState(this->hovered_widget, true);
+ this->SetWidgetDirty(this->hovered_widget);
+ }
+ }
+ if (this->type != VEH_TRAIN) return;
/* A rail vehicle is dragged.. */
if (widget != WID_D_MATRIX) { // ..outside of the depot matrix.
@@ -937,7 +957,9 @@ struct DepotWindow : Window {
default:
this->sel = INVALID_VEHICLE;
this->SetDirty();
+ break;
}
+ this->hovered_widget = -1;
_cursor.vehchain = false;
}
diff --git a/src/direction_func.h b/src/direction_func.h
index d124f84f45..bd10c8515b 100644
--- a/src/direction_func.h
+++ b/src/direction_func.h
@@ -1,4 +1,4 @@
-/* $Id: direction_func.h 27432 2015-11-01 12:03:13Z frosch $ */
+/* $Id: direction_func.h 27422 2015-10-30 16:20:00Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/economy.cpp b/src/economy.cpp
index 7c737b8970..a6fdf61edc 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1,4 +1,4 @@
-/* $Id: economy.cpp 27348 2015-07-30 18:45:29Z frosch $ */
+/* $Id: economy.cpp 27282 2015-05-11 16:58:09Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/error_gui.cpp b/src/error_gui.cpp
index ddb291067b..6b1c869dd0 100644
--- a/src/error_gui.cpp
+++ b/src/error_gui.cpp
@@ -1,4 +1,4 @@
-/* $Id: error_gui.cpp 27349 2015-07-30 18:48:25Z frosch $ */
+/* $Id: error_gui.cpp 27307 2015-06-20 12:57:34Z frosch $ */
/*
* This file is part of OpenTTD.
diff --git a/src/game/game_info.cpp b/src/game/game_info.cpp
index d753fa63f5..9733dfdde7 100644
--- a/src/game/game_info.cpp
+++ b/src/game/game_info.cpp
@@ -1,4 +1,4 @@
-/* $Id: game_info.cpp 26774 2014-09-06 17:46:56Z rubidium $ */
+/* $Id: game_info.cpp 27192 2015-03-17 20:33:44Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -25,7 +25,7 @@
static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
- strcmp(api_version, "1.5") == 0;
+ strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0;
}
#if defined(WIN32)
diff --git a/src/genworld.h b/src/genworld.h
index 06560926a9..a50164cea9 100644
--- a/src/genworld.h
+++ b/src/genworld.h
@@ -1,4 +1,4 @@
-/* $Id: genworld.h 23611 2011-12-19 20:56:50Z truebrain $ */
+/* $Id: genworld.h 27231 2015-04-11 18:45:18Z alberth $ */
/*
* This file is part of OpenTTD.
@@ -32,6 +32,17 @@ enum GenWorldMode {
GWM_HEIGHTMAP = 3, ///< Generate a newgame from a heightmap
};
+/** Smoothness presets. */
+enum TgenSmoothness {
+ TGEN_SMOOTHNESS_BEGIN, ///< First smoothness value.
+ TGEN_SMOOTHNESS_VERY_SMOOTH = TGEN_SMOOTHNESS_BEGIN, ///< Smoothness preset 'very smooth'.
+ TGEN_SMOOTHNESS_SMOOTH, ///< Smoothness preset 'smooth'.
+ TGEN_SMOOTHNESS_ROUGH, ///< Smoothness preset 'rough'.
+ TGEN_SMOOTHNESS_VERY_ROUGH, ///< Smoothness preset 'very rough'.
+
+ TGEN_SMOOTHNESS_END, ///< Used to iterate.
+};
+
static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY = 4; ///< Value for custom sea level in difficulty settings.
static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentage a user can specify for custom sea level.
static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level.
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index e0128e9243..714d2d2d01 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -1,4 +1,4 @@
-/* $Id: genworld_gui.cpp 27140 2015-02-08 21:05:48Z alberth $ */
+/* $Id: genworld_gui.cpp 27285 2015-05-16 12:01:19Z alberth $ */
/*
* This file is part of OpenTTD.
@@ -403,10 +403,10 @@ struct GenerateLandscapeWindow : public Window {
/* You can't select smoothness / non-water borders if not terragenesis */
if (mode == GLWM_GENERATE) {
- this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
- this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
- this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
- this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
+ this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL);
+ this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL);
+ this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges);
+ this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
WID_GL_WATER_NW, WID_GL_WATER_NE, WID_GL_WATER_SE, WID_GL_WATER_SW, WIDGET_LIST_END);
this->SetWidgetLoweredState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM);
@@ -416,7 +416,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetLoweredState(WID_GL_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
this->SetWidgetLoweredState(WID_GL_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
- this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC),
+ this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC),
WID_GL_TERRAIN_PULLDOWN, WID_GL_WATER_PULLDOWN, WIDGET_LIST_END);
}
@@ -432,7 +432,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetDisabledState(WID_GL_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC);
/* Do not allow a custom sea level with the original land generator. */
- if (_settings_newgame.game_creation.land_generator == 0 &&
+ if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL &&
_settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) {
_settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE;
}
@@ -655,7 +655,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_WATER_PULLDOWN: { // Water quantity
uint32 hidden_mask = 0;
/* Disable custom water level when the original map generator is active. */
- if (_settings_newgame.game_creation.land_generator == 0) {
+ if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL) {
SetBit(hidden_mask, CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY);
}
ShowDropDownMenu(this, _sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask);
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 163f9ee3ad..19e928686c 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -1,4 +1,4 @@
-/* $Id: gfx.cpp 27351 2015-07-30 18:53:31Z frosch $ */
+/* $Id: gfx.cpp 27381 2015-08-10 20:24:13Z michi_cc $ */
/*
* This file is part of OpenTTD.
@@ -23,6 +23,7 @@
#include "newgrf_debug.h"
#include "table/palettes.h"
+#include "table/string_colours.h"
#include "table/sprites.h"
#include "table/control_codes.h"
@@ -186,7 +187,7 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int
int grade_x = x2 - x;
/* Clipping rectangle. Slightly extended so we can ignore the width of the line. */
- uint extra = CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
+ int extra = (int)CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra };
/* prevent integer overflows. */
@@ -586,7 +587,7 @@ int GetStringLineCount(StringID str, int maxw)
*/
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
{
- Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
+ Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}
@@ -598,7 +599,7 @@ Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestio
*/
Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
{
- Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
+ Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box;
}
diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
index f24a80413a..5df42745e3 100644
--- a/src/gfx_layout.cpp
+++ b/src/gfx_layout.cpp
@@ -1,4 +1,4 @@
-/* $Id: gfx_layout.cpp 26482 2014-04-23 20:13:33Z rubidium $ */
+/* $Id: gfx_layout.cpp 27367 2015-08-09 12:33:27Z rubidium $ */
/*
* This file is part of OpenTTD.
@@ -17,9 +17,9 @@
#include "table/control_codes.h"
-#ifdef WITH_ICU
+#ifdef WITH_ICU_LAYOUT
#include
-#endif /* WITH_ICU */
+#endif /* WITH_ICU_LAYOUT */
#include "safeguards.h"
@@ -42,7 +42,7 @@ Font::Font(FontSize size, TextColour colour) :
assert(size < FS_END);
}
-#ifdef WITH_ICU
+#ifdef WITH_ICU_LAYOUT
/* Implementation details of LEFontInstance */
le_int32 Font::getUnitsPerEM() const
@@ -213,7 +213,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
return new ICUParagraphLayout(p);
}
-#endif /* WITH_ICU */
+#endif /* WITH_ICU_LAYOUT */
/*** Paragraph layout ***/
/**
@@ -654,7 +654,7 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
line.layout->Reflow();
} else {
/* Line is new, layout it */
-#ifdef WITH_ICU
+#ifdef WITH_ICU_LAYOUT
FontState old_state = state;
const char *old_str = str;
diff --git a/src/gfx_layout.h b/src/gfx_layout.h
index 1b9b9bbb4a..63afe478bb 100644
--- a/src/gfx_layout.h
+++ b/src/gfx_layout.h
@@ -1,4 +1,4 @@
-/* $Id: gfx_layout.h 26029 2013-11-17 17:08:20Z michi_cc $ */
+/* $Id: gfx_layout.h 27367 2015-08-09 12:33:27Z rubidium $ */
/*
* This file is part of OpenTTD.
@@ -19,12 +19,12 @@
#include