diff --git a/Doxyfile b/Doxyfile
index 957ba60e19..58d7f0a89a 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -195,7 +195,7 @@ EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
-PREDEFINED = ENABLE_NETWORK WITH_ZLIB WITH_LZO WITH_LZMA WITH_SDL WITH_PNG WITH_FONTCONFIG WITH_FREETYPE WITH_ICU UNICODE _UNICODE _GNU_SOURCE FINAL=
+PREDEFINED = ENABLE_NETWORK WITH_ZLIB WITH_LZO WITH_LZMA WITH_SDL WITH_PNG WITH_FONTCONFIG WITH_FREETYPE WITH_ICU_SORT WITH_ICU_LAYOUT UNICODE _UNICODE _GNU_SOURCE FINAL=
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
diff --git a/Makefile.bundle.in b/Makefile.bundle.in
index 63edb62d97..4366cf10a1 100644
--- a/Makefile.bundle.in
+++ b/Makefile.bundle.in
@@ -84,7 +84,7 @@ endif
$(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/"
ifdef MENU_DIR
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
- $(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
+ $(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | LC_ALL=C $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
endif
ifeq ($(TTD), openttd.exe)
@@ -172,6 +172,7 @@ install: bundle
$(Q)install -d "$(INSTALL_BINARY_DIR)"
$(Q)install -d "$(INSTALL_ICON_DIR)"
$(Q)install -d "$(INSTALL_DATA_DIR)/ai"
+ $(Q)install -d "$(INSTALL_DATA_DIR)/game"
$(Q)install -d "$(INSTALL_DATA_DIR)/baseset"
$(Q)install -d "$(INSTALL_DATA_DIR)/lang"
$(Q)install -d "$(INSTALL_DATA_DIR)/scripts"
@@ -182,6 +183,7 @@ else
endif
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang"
$(Q)install -m 644 "$(BUNDLE_DIR)/ai/"* "$(INSTALL_DATA_DIR)/ai"
+ $(Q)install -m 644 "$(BUNDLE_DIR)/game/"* "$(INSTALL_DATA_DIR)/game"
$(Q)install -m 644 "$(BUNDLE_DIR)/baseset/"* "$(INSTALL_DATA_DIR)/baseset"
$(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts"
ifndef DO_NOT_INSTALL_DOCS
diff --git a/Makefile.src.in b/Makefile.src.in
index 1d654d283f..0e190a4e62 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -210,7 +210,7 @@ endif
{ \
print $$0 \
} \
- ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | $(SORT) > Makefile.dep
+ ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | LC_ALL=C $(SORT) > Makefile.dep
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
diff --git a/bin/ai/compat_1.6.nut b/bin/ai/compat_1.6.nut
index fe985b90d0..8fb518e1b5 100644
--- a/bin/ai/compat_1.6.nut
+++ b/bin/ai/compat_1.6.nut
@@ -6,3 +6,5 @@
* 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 .
*/
+
+AILog.Info("1.6 API compatibility in effect.");
diff --git a/bin/ai/compat_1.7.nut b/bin/ai/compat_1.7.nut
new file mode 100644
index 0000000000..fe985b90d0
--- /dev/null
+++ b/bin/ai/compat_1.7.nut
@@ -0,0 +1,8 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can 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 .
+ */
diff --git a/bin/ai/regression/regression_info.nut b/bin/ai/regression/regression_info.nut
index 4e7aec7568..87676e1625 100644
--- a/bin/ai/regression/regression_info.nut
+++ b/bin/ai/regression/regression_info.nut
@@ -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.6"; }
+ function GetAPIVersion() { return "1.7"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}
diff --git a/bin/baseset/no_music.obm b/bin/baseset/no_music.obm
index f782d23ea0..40c3f76060 100644
--- a/bin/baseset/no_music.obm
+++ b/bin/baseset/no_music.obm
@@ -12,7 +12,7 @@ description.af_ZA = 'n Musiek stel sonder enige musiek.
description.ar_EG = مجموعة موسيقى بدون موسيقى
description.be_BY = "Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі.
description.bg_BG = Празен музикален пакет.
-description.ca_ES = Un joc de música sense cap música.
+description.ca_ES = Una llista de música sense cap peça.
description.cs_CZ = Prázná hudební sada.
description.cy_GB = Pecyn cerddoriaeth heb unrhyw gerddoriaeth ynddo.
description.da_DK = En musikpakke uden musik.
@@ -21,13 +21,15 @@ description.el_GR = Ένα πάκετο μουσικής χωρίς πραγμα
description.en_AU = A music pack without actual music.
description.en_US = A music pack without actual music.
description.es_ES = Un conjunto de música vacío.
+description.es_MX = Paquete de música vacío
description.et_EE = Muusikakogu ilma muusikata.
description.fi_FI = Musiikkipaketti, jossa ei ole musiikkia.
description.fr_FR = Un pack de musiques sans musiques.
description.ga_IE = Pacáiste ceoil gan aon cheol iarbhír ann.
description.gd_GB = Pacaid ciùil anns nach eil fonn sam bith.
description.gl_ES = Un conxunto de músicas sen ningunha música.
-description.hr_HR = Muzički paket bez ikakve muzike.
+description.he_IL = אוסף מנגינות ללא מנגינות.
+description.hr_HR = Glazbeni paket bez ikakve glazbe.
description.hu_HU = Zenei alapcsomag zene nélkül.
description.id_ID = Paket musik tanpa musik sungguhan.
description.is_IS = Tónlistarpakki sem er í raun án tónlistar.
diff --git a/bin/baseset/no_sound.obs b/bin/baseset/no_sound.obs
index 9954845a35..8bd8d30fe0 100644
--- a/bin/baseset/no_sound.obs
+++ b/bin/baseset/no_sound.obs
@@ -12,7 +12,7 @@ description.af_ZA = 'n Klank stel sonder enige klanke.
description.ar_EG = مجموعة صوت بدوت اصوات مضافة
description.be_BY = "Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў.
description.bg_BG = Празен звуков пакет.
-description.ca_ES = Un joc de sons sense cap so.
+description.ca_ES = Una llista de sons buida.
description.cs_CZ = Prázdná sada zvuků.
description.cy_GB = Pecyn sain heb unrhyw effeithiau sain ynddo.
description.da_DK = En lydpakke uden lyde.
@@ -21,6 +21,7 @@ description.el_GR = Ένα πάκετο ήχων χώρις ήχους.
description.en_AU = A sound pack without any sounds.
description.en_US = A sound pack without any sounds.
description.es_ES = Un conjunto de sonidos vacío.
+description.es_MX = Paquete de sonidos vacío
description.et_EE = Helikogu ilma helideta.
description.eu_ES = Soinurik gabeko soinu pakete bat
description.fi_FI = Äänipaketti, jossa ei ole ääniä.
@@ -28,6 +29,7 @@ description.fr_FR = Un pack de sons sans sons.
description.ga_IE = Pacáiste fuaimeanna gan aon fhuaimeanna ann.
description.gd_GB = Pacaid fhuaimean anns nach eil fuaim sam bith.
description.gl_ES = Un conxunto de sons sen ningún son
+description.he_IL = אוסף צלילים ללא צלילים.
description.hr_HR = Zvučni paket bez ikakvih zvukova.
description.hu_HU = Hang alapcsomag hangok nélkül.
description.id_ID = Paket efek suara tanpa suara apapun.
@@ -38,6 +40,7 @@ description.ko_KR = 아무런 효과음도 없는 효과음 팩입니다.
description.la_VA = Sarcina sonorum sine ullis sonis.
description.lb_LU = E Soundpack ouni iergendee Sound.
description.lt_LT = Garsų pakas be jokių garsų.
+description.lv_LV = Skaņu kopa bez skaņas.
description.nb_NO = En lydpakke uten noen lyder.
description.nl_NL = Een geluidset zonder geluid.
description.nn_NO = Ei lydpakke utan nokon lydar.
diff --git a/bin/baseset/orig_dos.obg b/bin/baseset/orig_dos.obg
index ffe230ccf2..3eb8c0ff97 100644
--- a/bin/baseset/orig_dos.obg
+++ b/bin/baseset/orig_dos.obg
@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe grafieke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS.
-description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS.
+description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel DOS.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro DOS).
description.cy_GB = Graffeg gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS-version.
@@ -22,12 +22,14 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe DOS edition graphics.
description.en_US = Original Transport Tycoon Deluxe DOS edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS.
+description.es_MX = Gráficos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni graafika.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán DOS.
description.gd_GB = Grafaigeachd aig an deasachadh DOS tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal de Transport Tycoon Deluxe para DOS.
+description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת DOS.
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi DOS.
@@ -38,6 +40,8 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS.
description.lb_LU = Original Transport Tycoon Deluxe DOS Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS leidimo grafika.
+description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS izdevuma grafika.
+description.ms_MY = Grafik asal Transport Tycoon Deluxe DOS edition.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe DOS-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS.
diff --git a/bin/baseset/orig_dos.obs b/bin/baseset/orig_dos.obs
index 5ae658692d..71fa44baf6 100644
--- a/bin/baseset/orig_dos.obs
+++ b/bin/baseset/orig_dos.obs
@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe klanke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS.
-description.ca_ES = Sons originals de Transport Tycoon Deluxe per a DOS.
+description.ca_ES = Sons originals del Transport Tycoon Deluxe pel DOS.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro DOS).
description.cy_GB = Effeithiau sain gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe DOS-version.
@@ -21,12 +21,14 @@ description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe
description.en_AU = Original Transport Tycoon Deluxe DOS edition sounds.
description.en_US = Original Transport Tycoon Deluxe DOS edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión DOS.
+description.es_MX = Sonidos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni helid.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán DOS.
description.gd_GB = Fuaimean aig an deasachadh DOS tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Sons da edición orixinal de Transport Tycoon Deluxe para DOS.
+description.he_IL = צלילי Transport Tycoon Deluxe המקורי בגרסת DOS.
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe DOS izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS verziójának hangjai.
description.id_ID = Efek suara orisinil Transport Tycoon Deluxe versi DOS.
diff --git a/bin/baseset/orig_dos_de.obg b/bin/baseset/orig_dos_de.obg
index 5649613eef..b081e4bc2f 100644
--- a/bin/baseset/orig_dos_de.obg
+++ b/bin/baseset/orig_dos_de.obg
@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS (German) uitgawe g
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) .
-description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS (Alemany).
+description.ca_ES = Gràfics originals del Transport Tycoon Deluxe (alemany) pel DOS.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (německá verze pro DOS).
description.cy_GB = Graffeg gwreiddiol fersiwn DOS (Almaenig) o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS (Tysk) version.
@@ -22,12 +22,14 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe DOS (German) edition graphics.
description.en_US = Original Transport Tycoon Deluxe DOS (German) edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS (Alemán).
+description.es_MX = Gráficos originales de Transport Tycoon Deluxe para DOS (en alemán).
description.et_EE = Algse Transport Tycoon Deluxe DOSi (Saksa) versiooni graafika.
description.fi_FI = Alkuperäiset Saksassa julkaistun Transport Tycoon Deluxen DOS-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS allemande).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán DOS (Gearmánach).
description.gd_GB = Grafaigeachd aig an deasachadh DOS (Gearmailteach) tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal (alemá) de Transport Tycoon Deluxe para DOS.
+description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת DOS (גרמנית).
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS (Njemački) izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS (német) verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi DOS (Jerman).
@@ -38,6 +40,7 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS (Germanica).
description.lb_LU = Original Transport Tycoon Deluxe DOS (Däitsch) Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS (Vokiečių) leidimo grafika.
+description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS (vācu) izdevuma grafika.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS (tysk).
description.nl_NL = Originele graphics van de Duitse Transport Tycoon Deluxe DOS-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS (tysk).
diff --git a/bin/baseset/orig_win.obg b/bin/baseset/orig_win.obg
index f9bd77934c..65a97c4770 100644
--- a/bin/baseset/orig_win.obg
+++ b/bin/baseset/orig_win.obg
@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe grafie
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows.
-description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a Windows.
+description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Graffeg gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe Windows-version.
@@ -22,12 +22,14 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe Windows edition graphics.
description.en_US = Original Transport Tycoon Deluxe Windows edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión Windows.
+description.es_MX = Gráficos originales de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni graafika.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen Windows-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Grafaigeachd aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal de Transport Tycoon Deluxe para Windows.
+description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת Windows.
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi Windows.
@@ -38,6 +40,8 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe Windows.
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo grafika.
+description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma grafika.
+description.ms_MY = Grafik asal Transport Tycoon Deluxe edisi Windows.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for Windows.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe Windows-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for Windows.
diff --git a/bin/baseset/orig_win.obm b/bin/baseset/orig_win.obm
index 203c0417c3..0682031547 100644
--- a/bin/baseset/orig_win.obm
+++ b/bin/baseset/orig_win.obm
@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe musiek
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز
description.be_BY = Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows.
-description.ca_ES = Música Original de Transport Tycoon Deluxe per a Windows.
+description.ca_ES = Música original del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní hudba Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Cerddoriaeth gwreiddiol fersion Windows o Transport Tycoon Deluxe.
description.da_DK = Originalmusik fra Transport Tycoon Deluxe Windows-version.
@@ -21,13 +21,15 @@ description.el_GR = Αρχική μουσική από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe Windows edition music.
description.en_US = Original Transport Tycoon Deluxe Windows edition music.
description.es_ES = Música original de Transport Tycoon Deluxe versión Windows.
+description.es_MX = Música original de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni muusika.
description.fi_FI = Alkuperäinen Transport Tycoon Deluxen Windows-version musiikki.
description.fr_FR = Musiques originales de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Ceol bunaidh Transport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Ceòl aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Música da edición orixinal de Transport Tycoon Deluxe para Windows.
-description.hr_HR = Originalna muzika za Transport Tycoon Deluxe Windows izdanje.
+description.he_IL = מנגינות Transport Tycoon Deluxe המקורי בגרסת Windows.
+description.hr_HR = Originalna glazba za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának zenéje.
description.id_ID = Musik pengiring orisinil Transport Tycoon Deluxe versi Windows.
description.is_IS = Upprunalega tónlistin úr Transport Tycoon Deluxe Windows útgáfunni.
diff --git a/bin/baseset/orig_win.obs b/bin/baseset/orig_win.obs
index 33164e9584..fa2178fd40 100644
--- a/bin/baseset/orig_win.obs
+++ b/bin/baseset/orig_win.obs
@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe klanke
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows.
-description.ca_ES = Sons originals de Transport Tycoon Deluxe per a Windows.
+description.ca_ES = Sons originals del Transport Tycoon Deluxe pel Windows.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro Windows).
description.cy_GB = Effeithiau sain gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe Windows-version.
@@ -21,12 +21,14 @@ description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe
description.en_AU = Original Transport Tycoon Deluxe Windows edition sounds.
description.en_US = Original Transport Tycoon Deluxe Windows edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión Windows.
+description.es_MX = Sonidos originales de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni helid.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen Windows-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Fuaimean aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Sons da edición orixinal de Transport Tycoon Deluxe para Windows.
+description.he_IL = צלילי Transport Tycoon Deluxe המקורי בגרסת Windows.
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának hangjai.
description.id_ID = Efek suara orisinil Transport Tycoon Deluxe versi Windows.
diff --git a/bin/game/compat_1.6.nut b/bin/game/compat_1.6.nut
index fe985b90d0..d25189db2a 100644
--- a/bin/game/compat_1.6.nut
+++ b/bin/game/compat_1.6.nut
@@ -6,3 +6,5 @@
* 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 .
*/
+
+GSLog.Info("1.6 API compatibility in effect.");
diff --git a/bin/game/compat_1.7.nut b/bin/game/compat_1.7.nut
new file mode 100644
index 0000000000..fe985b90d0
--- /dev/null
+++ b/bin/game/compat_1.7.nut
@@ -0,0 +1,8 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can 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 .
+ */
diff --git a/changelog.txt b/changelog.txt
index 4fa211c9f9..c110109386 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,30 +1,120 @@
+1.5.3 (2015-12-01)
+------------------------------------------------------------------------
+(None)
+
+
+1.5.3-RC1 (2015-11-01)
+------------------------------------------------------------------------
+- Fix: When selecting a refit cargo for orders, do not check whether the vehicle is in a depot or station, and do not ask whether the vehicle currently allows station-refitting. Also hide the refit cost for orders, it is not predictable (r27428)
+- Fix: Use the NewGRF railtype sorting order in the infrastructure window (r27427)
+- Fix: Crash when switching to or taking over companies, when an order window of a vehicle of the new company was opened. Now close those windows [FS#5842] (r27425)
+- Fix: Towns did not connect roads to existing roads, unless they had only a single roadbit. Otoh, towns also tried to connect to single roadbit tiles such as tunnels and depots, even though they were not connectable in the direction of interest [FS#6374] (r27424)
+- Fix: When towns expanded single-bit roadtiles using a grid-layout, they used the layout position of the neighbouring tile (r27423)
+- Fix: Aircraft picked the wrong airport entry point, if airports were rotated by 180 degree [FS#6341] (r27422)
+- Fix: Consider text and icon sizes when drawing the client list [FS#6265] (r27421)
+- Fix: GrowTownAtRoad sometimes returned false, even when a house was built [FS#6362] (r27420)
+- Fix: CmdSellRailWagon did not revert all actions properly when no orderlist could be allocated [FS#6369] (r27419)
+- Fix: Desync due to incorrect storage of segments with different railtype in the YAPF cache [FS#6329] [FS#6379] (r27418)
+- Fix: When a dedicated server was paused with no clients, the master server advertisement interval was slowed, causing deadvertisement of the server [FS#6368] (r27400)
+- Fix: [Makefile] Game script directory and compat*.nut were never installed on *nix (r27399)
+- Fix: There are two different availability conditions for fdatasync in the manpage. Use them both, since at least on some MinGW versions one is not enough (r27389)
+- Fix: win32 sound driver failed to report errors (r27383)
+- Fix: Clickareas in settings tree were misaligned when the filter warning was displayed, if the setting height was defined by the icons instead of the font [FS#6358] (r27366)
+- Fix: Center settings filter warning also vertically, and also in case of multiple lines (r27365)
+
+
+1.5.2 (2015-09-01)
+------------------------------------------------------------------------
+(None)
+
+
+1.5.2-RC1 (2015-08-01)
+------------------------------------------------------------------------
+- Change: Auto-complete partial roads when building level-crossings [FS#6283] (r27309)
+- Fix: Do not rerandomise the town name when only cost-estimating the founding [FS#6332] (r27341)
+- Fix: Make variety distribution not assume that sea level is at height 0.2 / 3 * TGPGetMaxHeight() [FS#6335] (r27331, r27330, r27329, r27328)
+- Fix: Remove corner-case optimisation for line drawing, which failed for dashed lines (r27324)
+- Fix: Clipping of inclined lines did not account for the 'horizontal width' being bigger than the 'real width' (r27323, r27322)
+- Fix: Incorrect owner assignment when adding/removing road/tram to/from bridges [FS#6317] (r27313, r27312)
+- Fix: Mark infrastructure window dirty in more cases (r27311)
+- Fix: Prevent breaking of tram-reversal points by adding more road pieces [FS#6283] (r27308)
+- Fix: Error message window with manager face failed with GUI zoom [FS#6259] (r27307)
+- Fix: Account for road-bridges and drive-through-stops in CanFollowRoad [FS#6320] (r27306, r27305)
+- Fix: Password window layout with GUI zoom [FS#6321] (r27304, r27303)
+- Fix: Speed-only timetables got assigned times in stations [FS#6313] (r27302, r27301)
+- Fix: Enforce the company's default service intervals when purchasing another company [FS#6254] (r27282, r27281)
+- Fix: Cloning/autoreplace/autorenew did not copy custom service intervals (r27280)
+
+
+1.5.1 (2015-06-01)
+------------------------------------------------------------------------
+(None)
+
+
+1.5.1-RC1 (2015-05-08)
+------------------------------------------------------------------------
+- Fix: Do not consider road junctions with trivial dead ends as branch points during town growth [FS#6245] (r27260, r27259, r27244)
+- Fix: ScriptList::RemoveList failed to remove a list from itself [FS#6287] (r27258)
+- Fix: Combined button+dropdown widgets in order and autoreplace GUI had incorrect hitbox when using GUI zoom [FS#6270] (r27255)
+- Fix: When building a lock on DC_AUTO-removable water-based objects, the water class was always set to canal [FS#6264] (r27254)
+- Fix: When crossing tram tracks with railroads, cost of extra roads was not being counted [FS#6282] (r27253)
+- Fix: Invalid infrastructure counting when crossing tram tracks with railroads [FS#6281] (r27252)
+- Fix: Broken error message in configure [FS#6286] (r27250)
+- Fix: In some cases town growth failure was considered as success [FS#6240] (r27249, r27247)
+- Fix: Town labels on smallmap and zoomed-out viewports were not centered [FS#6257] (r27248)
+- Fix: Removing a rail waypoint used the remove-rail-station cost [FS#6251] (r27245)
+- Fix: Duplicate frees due to pool item classes not having copy constructors [FS#6285] (r27243)
+- Fix: Crash when no AIs were installed due to improper handling of non-ASCII characters by the string pointer lexer [FS#6272] (r27233)
+- Fix: Compilation on DragonflyBSD [FS#6274] (r27224, r27223)
+- Fix: Use the current maximum speed as limited by bridges, orders etc. for all vehicle types alike when considering increased smoke emissions of vehicles [FS#6278] (r27222)
+- Fix: Multi-value keys in the desktop entry shall end with a trailing separator (r27221)
+- Fix: Draw path reservation on the whole bridge, not only on the bridge heads (r27209)
+- Fix: Draw correct overlay sprites for path reservations on bridges and tunnels (r27208)
+
+
+1.5.0 (2015-04-01)
+------------------------------------------------------------------------
+- Fix: [NewGRF] Add Misc. GRF Feature Flag 6 to enable the second rocky tile set [FS#6260] (r27200)
+
+
+1.5.0-RC1 (2015-03-18)
+------------------------------------------------------------------------
+- Feature: [NewGRF] Display relative offset changes in the sprite aligner [FS#6236] (r27174)
+- Fix: Original road vehicle acceleration crashed for vehicles taking over [FS#6255] (r27190)
+- Fix: GCC 5 compilation (r27185, r27183)
+- Fix: Data race due to lazy initialisation of objects [FS#5969] (r27178)
+- Fix: Compilation with MinGW64 (r27176)
+- Fix: Use the regular clipping functions in the sprite aligner instead of some magic [FS#6237] (r27173)
+- Fix: Windows randomly drops SetCursorPos calls, breaking the RMB-scrolling [FS#6238] (r27172)
+
+
1.5.0-beta2 (2015-02-24)
------------------------------------------------------------------------
-- Feature: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news. (r27164)
-- Feature: Allow changing max heightlevel in scenario editor. (r27151)
-- Feature: Make use of both rocky tile sets from the base graphics. (r27117)
-- Change: Scale (non-custom) default window sizes according to GUI zoom. (r27147)
-- Change: Make statusbar and chat-entry window use the same width as the toolbar. (r27146)
-- Change: The chatbox-width setting now uses percent of screen width instead of pixels. (r27144)
-- Change: [NewGRF] Interpret negative positions in industry layouts depending on GRF version. (r27138)
-- Fix: [SDL, Windows] Right-mouse-button scrolling scrolled/jumped too far, when OpenTTD lagged during mouse event processing. (r27167)
-- Fix: Toolbars were not invalidated when changing max-vehicles settings. [FS#6204] (r27163)
-- Fix: Tile selection was drawn outside of map in some cases. [FS#6208] (r27162)
-- Fix: Reimplement the viewport drawing algorithm. [FS#6156] [FS#6206] (r27161)
-- Fix: Issues with smallmap and viewport coordinates and transformations. (r27160, r27159, r27158)
-- Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. (r27157)
-- Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty. (r27148)
-- Fix: Oilrig empty-tile checks were incorrect due to wrong TileIndexDiff->TileIndexDiffC conversion. (r27137)
-- Fix: Misalignment in generate world window in case of small fonts. (r27135)
-- Fix: Dragging of free wagons in depot failed with GUI zoom. (r27133)
-- Fix: Reduce memory footprint of map array by shuffling its members. [FS#6218] (r27132, r27126)
-- Fix: Dropdown- and tooltip-windows should not steal the focus. (r27131)
-- Fix: [NewGRF] Action 7/9 condition 0A failed for present, but disabled, NewGRF. (r27119)
-- Fix: Road vehicles could not reverse to be sent to depots when the following tile has the right type to run on, but could not be entered. [FS#6183] (r27107)
-- Fix: Use the actual max speed of the vehicle in front when determining if a RV can overtake. [FS#6176] (r27106)
-- Fix: grow_counter was not properly bounded by growth_rate, but by some other value used to calculate growth_rate. [FS#6195] (r27105)
-- Fix: [Script] Support 64 bits integers in ScriptLists. [FS#6194] (r27104)
-- Fix: [Script] Money values would end up wrong in strings when outside the bounds of a 32 bits integer. [FS#6194] (r27102)
+- Feature: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news (r27164)
+- Feature: Allow changing max heightlevel in scenario editor (r27151)
+- Feature: Make use of both rocky tile sets from the base graphics (r27117)
+- Change: Scale (non-custom) default window sizes according to GUI zoom (r27147)
+- Change: Make statusbar and chat-entry window use the same width as the toolbar (r27146)
+- Change: The chatbox-width setting now uses percent of screen width instead of pixels (r27144)
+- Change: [NewGRF] Interpret negative positions in industry layouts depending on GRF version (r27138)
+- Fix: [SDL, Windows] Right-mouse-button scrolling scrolled/jumped too far, when OpenTTD lagged during mouse event processing (r27167)
+- Fix: Toolbars were not invalidated when changing max-vehicles settings [FS#6204] (r27163)
+- Fix: Tile selection was drawn outside of map in some cases [FS#6208] (r27162)
+- Fix: Reimplement the viewport drawing algorithm [FS#6156] [FS#6206] (r27161)
+- Fix: Issues with smallmap and viewport coordinates and transformations (r27160, r27159, r27158)
+- Fix: Mark bridge middle tiles dirty when building/removing/changing bridges (r27157)
+- Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty (r27148)
+- Fix: Oilrig empty-tile checks were incorrect due to wrong TileIndexDiff->TileIndexDiffC conversion (r27137)
+- Fix: Misalignment in generate world window in case of small fonts (r27135)
+- Fix: Dragging of free wagons in depot failed with GUI zoom (r27133)
+- Fix: Reduce memory footprint of map array by shuffling its members [FS#6218] (r27132, r27126)
+- Fix: Dropdown- and tooltip-windows should not steal the focus (r27131)
+- Fix: [NewGRF] Action 7/9 condition 0A failed for present, but disabled, NewGRF (r27119)
+- Fix: Road vehicles could not reverse to be sent to depots when the following tile has the right type to run on, but could not be entered [FS#6183] (r27107)
+- Fix: Use the actual max speed of the vehicle in front when determining if a RV can overtake [FS#6176] (r27106)
+- Fix: grow_counter was not properly bounded by growth_rate, but by some other value used to calculate growth_rate [FS#6195] (r27105)
+- Fix: [Script] Support 64 bits integers in ScriptLists [FS#6194] (r27104)
+- Fix: [Script] Money values would end up wrong in strings when outside the bounds of a 32 bits integer [FS#6194] (r27102)
1.5.0-beta1 (2014-12-24)
diff --git a/config.lib b/config.lib
index 07985a4f83..ace587fac6 100644
--- a/config.lib
+++ b/config.lib
@@ -1265,7 +1265,12 @@ make_compiler_cflags() {
# remark #2259: non-pointer conversion from ... to ... may lose significant bits
flags="$flags -wd2259"
# Use c++0x mode so static_assert() is available
- cxxflags="$cxxflags -std=c++0x"
+ cxxflags="$cxxflags -std=c++11"
+ fi
+
+ if [ $cc_version -lt 140 ]; then
+ log 1 "configure: error: ICC version is too old: `$1 -dumpversion`, minumum: 14.0"
+ exit 1
fi
if [ "$enable_lto" != "0" ]; then
@@ -1285,7 +1290,7 @@ make_compiler_cflags() {
# -W alone doesn't enable all warnings enabled by -Wall; on the other hand,
# -Weverything enables too many useless warnings that can't be disabled (as of 3.0)
- flags="$flags -Wall -W"
+ flags="$flags -Wall -W -Wextra"
# warning: unused parameter '...'
flags="$flags -Wno-unused-parameter"
@@ -1326,13 +1331,23 @@ make_compiler_cflags() {
flags="$flags -Wno-unused-variable"
fi
+ if [ "$cc_version" -ge "33" ]; then
+ # clang completed C++11 support in version 3.3
+ flags="$flags -std=c++11"
+ else
+ log 1 "configure: error: clang version is too old: `$1 -v 2>&1 | head -n 1`, minumum: 3.3"
+ exit 1
+ fi
+
# rdynamic is used to get useful stack traces from crash reports.
ldflags="$ldflags -rdynamic"
else
# Enable some things only for certain GCC versions
- cc_version=`$1 -dumpversion | cut -c 1,3`
+ # cc_version = major_version * 100 + minor_version
+ # For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305
+ cc_version=`$1 -dumpversion | $awk -F . '{printf "%d%02d", $1, $2}'`
- if [ $cc_version -lt 33 ]; then
+ if [ $cc_version -lt 303 ]; then
log 1 "configure: error: gcc older than 3.3 can't compile OpenTTD because of its poor template support"
exit 1
fi
@@ -1345,20 +1360,20 @@ make_compiler_cflags() {
if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
flags="$flags -Wno-unused-variable"
- if [ $cc_version -ge 46 ]; then
+ if [ $cc_version -ge 406 ]; then
# GCC 4.6 gives more warnings, disable them too
flags="$flags -Wno-unused-but-set-variable"
flags="$flags -Wno-unused-but-set-parameter"
fi
fi
- if [ $cc_version -ge 34 ]; then
+ if [ $cc_version -ge 304 ]; then
# Warn when a variable is used to initialise itself:
# int a = a;
flags="$flags -Winit-self"
fi
- if [ $cc_version -ge 40 ]; then
+ if [ $cc_version -ge 400 ]; then
# GCC 4.0+ complains about that we break strict-aliasing.
# On most places we don't see how to fix it, and it doesn't
# break anything. So disable strict-aliasing to make the
@@ -1369,7 +1384,7 @@ make_compiler_cflags() {
flags="$flags -Wcast-qual"
fi
- if [ $cc_version -ge 42 ]; then
+ if [ $cc_version -ge 402 ]; then
# GCC 4.2+ automatically assumes that signed overflows do
# not occur in signed arithmetics, whereas we are not
# sure that they will not happen. It furthermore complains
@@ -1380,25 +1395,37 @@ make_compiler_cflags() {
flags="$flags -Wnon-virtual-dtor"
fi
- if [ $cc_version -ge 43 ]; then
+ if [ $cc_version -ge 403 ] && [ $cc_version -lt 600 ]; then
# Use gnu++0x mode so static_assert() is available.
# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
- cxxflags="$cxxflags -std=gnu++0x"
+ cxxflags="$cxxflags -std=gnu++11"
fi
- if [ $cc_version -eq 45 ]; then
+ if [ $cc_version -eq 405 ]; then
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680
flags="$flags -fno-tree-vrp"
fi
- if [ $cc_version -ge 47 ]; then
+ if [ $cc_version -eq 407 ]; then
# Disable -Wnarrowing which gives many warnings, such as:
# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
# They are valid according to the C++ standard, but useless.
cxxflags="$cxxflags -Wno-narrowing"
+ fi
+
+ if [ $cc_version -ge 407 ]; then
# Disable bogus 'attempt to free a non-heap object' warning
flags="$flags -Wno-free-nonheap-object"
+ else
+ log 1 "configure: error: GCC version is too old: `$1 -dumpversion`, minumum: 4.7"
+ exit 1
+ fi
+
+ if [ $cc_version -ge 600 ]; then
+ # -flifetime-dse=2 (default since GCC 6) doesn't play
+ # well with our custom pool item allocator
+ cxxflags="$cxxflags -flifetime-dse=1 -std=gnu++14"
fi
if [ "$enable_lto" != "0" ]; then
@@ -1406,7 +1433,7 @@ make_compiler_cflags() {
has_lto=`$1 -dumpspecs | grep '\%{flto'`
if [ -n "$has_lto" ]; then
# Use LTO only if we see LTO exists and is requested
- if [ $cc_version -lt 46 ]; then
+ if [ $cc_version -lt 406 ]; then
flags="$flags -flto"
else
flags="$flags -flto=jobserver"
@@ -1490,7 +1517,7 @@ make_cflags_and_ldflags() {
fi
if [ $enable_debug -le 2 ]; then
- cc_host_is_gcc=`basename "$cc_host" | grep "gcc" &>/dev/null`
+ cc_host_is_gcc=`basename "$cc_host" | grep "gcc" 2>/dev/null`
if [ -n "$cc_host_is_gcc" ]; then
# Define only when compiling with GCC. Some GLIBC versions use GNU
# extensions in a way that breaks build with at least ICC.
@@ -1498,14 +1525,17 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
fi
- cc_build_is_gcc=`basename "$cc_build" | grep "gcc" &>/dev/null`
+ cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null`
if [ -n "$cc_build_is_gcc" ]; then
- # Just add -O1 to the tools needed for building.
+ # Add -O1 and fortify source to the tools needed for building, on gcc
CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
+ elif [ -n "`basename "$cc_build" | grep "clang" 2>/dev/null`" ]; then
+ # Add -O1 to the tools needed for building, on clang
+ CFLAGS_BUILD="$CFLAGS_BUILD -O1"
fi
fi
- if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
+ if [ "$os" = "OSX" ] && [ $cc_version -eq 400 ]; then
# Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization,
# wrongly optimizing ^= in loops. This disables the failing optimisation.
CFLAGS="$CFLAGS -fno-expensive-optimizations"
@@ -1529,7 +1559,7 @@ make_cflags_and_ldflags() {
LDFLAGS="$LDFLAGS -mwin32"
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
- if [ $cc_version -lt 46 ]; then
+ if [ $cc_version -lt 406 ]; then
flags="$flags -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
fi
@@ -1542,10 +1572,10 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32"
- if [ $cc_version -ge 44 ]; then
+ if [ $cc_version -ge 404 ]; then
LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
fi
- if [ $cc_version -ge 47 ]; then
+ if [ $cc_version -ge 407 ]; then
CFLAGS="$CFLAGS -mno-ms-bitfields"
fi
fi
@@ -1596,7 +1626,7 @@ make_cflags_and_ldflags() {
LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS"
fi
- if [ "$enable_universal" = "0" ] && [ $cc_version -gt 40 ]; then
+ if [ "$enable_universal" = "0" ] && [ $cc_version -gt 400 ]; then
# Only set the min version when not doing an universal build.
# Universal builds set the version elsewhere.
if [ "$cpu_type" = "64" ]; then
@@ -1774,7 +1804,7 @@ make_cflags_and_ldflags() {
# GCC 4.0+ doesn't like the DirectX includes (gives tons of
# warnings on it we won't be able to fix). For now just
# suppress those warnings.
- if [ $cc_version -ge 40 ]; then
+ if [ $cc_version -ge 400 ]; then
CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
fi
fi
@@ -2610,10 +2640,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
diff --git a/configure b/configure
index 6b2c9d87b7..5edbca1867 100755
--- a/configure
+++ b/configure
@@ -149,7 +149,7 @@ AWKCOMMAND='
# Read the source.list and process it
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
-SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
+SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`"
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`"
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`"
diff --git a/findversion.sh b/findversion.sh
index 6be52b696f..639d2a0eeb 100755
--- a/findversion.sh
+++ b/findversion.sh
@@ -99,7 +99,7 @@ elif [ -d "$ROOT_DIR/.git" ]; then
# No rev? Maybe it is a custom git-svn clone
REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
fi
- TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`"
+ TAG="`git describe --tags 2>/dev/null`"
if [ -n "$TAG" ]; then
BRANCH=""
REV="$TAG"
diff --git a/os/debian/changelog b/os/debian/changelog
index d56400af01..4dd5b1155f 100644
--- a/os/debian/changelog
+++ b/os/debian/changelog
@@ -1,3 +1,51 @@
+openttd (1.5.3-0) unstable; urgency=low
+
+ * New upstream release 1.5.3
+
+ -- OpenTTD Tue, 01 Dec 2015 21:00:00 +0100
+
+openttd (1.5.3~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.5.3-RC1
+
+ -- OpenTTD Sun, 01 Nov 2015 14:00:00 +0100
+
+openttd (1.5.2-0) unstable; urgency=low
+
+ * New upstream release 1.5.2
+
+ -- OpenTTD Tue, 01 Sep 2015 21:00:00 +0200
+
+openttd (1.5.2~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.5.2-RC1
+
+ -- OpenTTD Sat, 01 Aug 2015 13:00:00 +0200
+
+openttd (1.5.1-0) unstable; urgency=low
+
+ * New upstream release 1.5.1
+
+ -- OpenTTD Mon, 01 Jun 2015 21:00:00 +0200
+
+openttd (1.5.1~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.5.1-RC1
+
+ -- OpenTTD Fri, 08 May 2015 21:00:00 +0200
+
+openttd (1.5.0-0) unstable; urgency=low
+
+ * New upstream release 1.5.0
+
+ -- OpenTTD Wed, 01 Apr 2015 21:00:00 +0200
+
+openttd (1.5.0~RC1-0) unstable; urgency=low
+
+ * New upstream release 1.5.0-RC1
+
+ -- OpenTTD Wed, 18 Mar 2015 21:00:00 +0100
+
openttd (1.5.0~beta2-0) unstable; urgency=low
* New upstream release 1.5.0-beta2
diff --git a/os/os2/installer/make_installer.cmd b/os/os2/installer/make_installer.cmd
index 6fe6dace66..de01554a07 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.6.0
+set OPENTTD_VERSION=1.7.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 5ad5a53cab..711693bcf7 100644
--- a/os/rpm/openttd.spec
+++ b/os/rpm/openttd.spec
@@ -17,9 +17,9 @@
#
Name: openttd
-Version: 1.6.beta1
+Version: 1.7.beta1
Release: 0
-%define srcver 1.6.0-beta1
+%define srcver 1.7.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 ebe9ed3dcd..9eb869f2d3 100644
--- a/os/windows/installer/install.nsi
+++ b/os/windows/installer/install.nsi
@@ -1,6 +1,6 @@
# Version numbers to update
!define APPV_MAJOR 1
-!define APPV_MINOR 6
+!define APPV_MINOR 7
!define APPV_MAINT 0
!define APPV_BUILD 0
!define APPV_EXTRA "-beta1"
diff --git a/projects/langs_vs100.vcxproj b/projects/langs_vs100.vcxproj
index 078a7b374a..fc77e03bec 100644
--- a/projects/langs_vs100.vcxproj
+++ b/projects/langs_vs100.vcxproj
@@ -317,6 +317,12 @@
..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)
..\bin\lang\slovenian.lng;%(Outputs)
+
+ Generating spanish_MX language file
+ ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"
+ ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)
+ ..\bin\lang\spanish_MX.lng;%(Outputs)
+
Generating spanish language file
..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"
diff --git a/projects/langs_vs100.vcxproj.filters b/projects/langs_vs100.vcxproj.filters
index fb16aa64e0..0afc8c969a 100644
--- a/projects/langs_vs100.vcxproj.filters
+++ b/projects/langs_vs100.vcxproj.filters
@@ -142,6 +142,9 @@
Translations
+
+ Translations
+
Translations
diff --git a/projects/langs_vs140.vcxproj b/projects/langs_vs140.vcxproj
index 0907bfa6f5..b866630d00 100644
--- a/projects/langs_vs140.vcxproj
+++ b/projects/langs_vs140.vcxproj
@@ -317,6 +317,12 @@
..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)
..\bin\lang\slovenian.lng;%(Outputs)
+
+ Generating spanish_MX language file
+ ..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"
+ ..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)
+ ..\bin\lang\spanish_MX.lng;%(Outputs)
+
Generating spanish language file
..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"
diff --git a/projects/langs_vs140.vcxproj.filters b/projects/langs_vs140.vcxproj.filters
index fb16aa64e0..0afc8c969a 100644
--- a/projects/langs_vs140.vcxproj.filters
+++ b/projects/langs_vs140.vcxproj.filters
@@ -142,6 +142,9 @@
Translations
+
+ Translations
+
Translations
diff --git a/projects/langs_vs80.vcproj b/projects/langs_vs80.vcproj
index 1413a80d27..e683d57353 100644
--- a/projects/langs_vs80.vcproj
+++ b/projects/langs_vs80.vcproj
@@ -738,6 +738,21 @@
/>
+
+
+
+
+
diff --git a/projects/langs_vs90.vcproj b/projects/langs_vs90.vcproj
index db6fef1a43..c1f028233e 100644
--- a/projects/langs_vs90.vcproj
+++ b/projects/langs_vs90.vcproj
@@ -739,6 +739,21 @@
/>
+
+
+
+
+
diff --git a/projects/openttd_vs100.vcxproj b/projects/openttd_vs100.vcxproj
index 0571ef4862..18a3cb23ba 100644
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -102,7 +102,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -156,7 +156,7 @@
/MP %(AdditionalOptions)
Disabled
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -204,7 +204,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -256,7 +256,7 @@
/MP %(AdditionalOptions)
Disabled
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -571,6 +571,7 @@
+
diff --git a/projects/openttd_vs100.vcxproj.filters b/projects/openttd_vs100.vcxproj.filters
index 0b6dc573b4..16848eb7b8 100644
--- a/projects/openttd_vs100.vcxproj.filters
+++ b/projects/openttd_vs100.vcxproj.filters
@@ -942,6 +942,9 @@
Header Files
+
+ Header Files
+
Header Files
diff --git a/projects/openttd_vs100.vcxproj.in b/projects/openttd_vs100.vcxproj.in
index 7a4f0bce81..c6b16455a9 100644
--- a/projects/openttd_vs100.vcxproj.in
+++ b/projects/openttd_vs100.vcxproj.in
@@ -102,7 +102,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -156,7 +156,7 @@
/MP %(AdditionalOptions)
Disabled
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -204,7 +204,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -256,7 +256,7 @@
/MP %(AdditionalOptions)
Disabled
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
diff --git a/projects/openttd_vs140.vcxproj b/projects/openttd_vs140.vcxproj
index 88f7b44ddd..5aa11e6f4a 100644
--- a/projects/openttd_vs140.vcxproj
+++ b/projects/openttd_vs140.vcxproj
@@ -105,7 +105,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -163,7 +163,7 @@
Disabled
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -214,7 +214,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -270,7 +270,7 @@
Disabled
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -588,6 +588,7 @@
+
@@ -886,6 +887,8 @@
+
+
diff --git a/projects/openttd_vs140.vcxproj.filters b/projects/openttd_vs140.vcxproj.filters
index 06800ffdaf..16848eb7b8 100644
--- a/projects/openttd_vs140.vcxproj.filters
+++ b/projects/openttd_vs140.vcxproj.filters
@@ -942,6 +942,9 @@
Header Files
+
+ Header Files
+
Header Files
@@ -1836,6 +1839,12 @@
Save/Load handlers
+
+ Save/Load handlers
+
+
+ Save/Load handlers
+
Tables
diff --git a/projects/openttd_vs140.vcxproj.in b/projects/openttd_vs140.vcxproj.in
index 8089278bff..76b16b5109 100644
--- a/projects/openttd_vs140.vcxproj.in
+++ b/projects/openttd_vs140.vcxproj.in
@@ -105,7 +105,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -163,7 +163,7 @@
Disabled
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -214,7 +214,7 @@
Size
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)
true
Sync
MultiThreaded
@@ -270,7 +270,7 @@
Disabled
true
..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
index f6b938ed7d..9f4e2bbf3e 100644
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -156,7 +156,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -257,7 +257,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -362,7 +362,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -1558,6 +1558,10 @@
RelativePath=".\..\src\safeguards.h"
>
+
+
diff --git a/projects/openttd_vs80.vcproj.in b/projects/openttd_vs80.vcproj.in
index 57938f9e91..587871dca0 100644
--- a/projects/openttd_vs80.vcproj.in
+++ b/projects/openttd_vs80.vcproj.in
@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -156,7 +156,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -257,7 +257,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -362,7 +362,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj
index 84e6fffa3c..930522942c 100644
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -155,7 +155,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -255,7 +255,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -359,7 +359,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -1555,6 +1555,10 @@
RelativePath=".\..\src\safeguards.h"
>
+
+
diff --git a/projects/openttd_vs90.vcproj.in b/projects/openttd_vs90.vcproj.in
index 2793927bdb..ce90ab5f29 100644
--- a/projects/openttd_vs90.vcproj.in
+++ b/projects/openttd_vs90.vcproj.in
@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -155,7 +155,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -255,7 +255,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -359,7 +359,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
diff --git a/source.list b/source.list
index 62b1dd3f43..2b177a0889 100644
--- a/source.list
+++ b/source.list
@@ -310,6 +310,7 @@ road_type.h
roadstop_base.h
roadveh.h
safeguards.h
+scope.h
screenshot.h
sdl.h
sound/sdl_s.h
@@ -422,6 +423,7 @@ core/alloc_type.hpp
core/backup_type.hpp
core/bitmath_func.cpp
core/bitmath_func.hpp
+core/container_func.hpp
core/endian_func.hpp
core/endian_type.hpp
core/enum_type.hpp
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
index 67b299bcec..540975fb5c 100644
--- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
+++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
@@ -119,10 +119,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
const SQChar *sErr = 0;
if(sq_gettop(v)>=1) {
if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) {
- pf(v,"\nAN ERROR HAS OCCURED [%s]\n",sErr);
+ pf(v,"\nAN ERROR HAS OCCURRED [%s]\n",sErr);
}
else{
- pf(v,"\nAN ERROR HAS OCCURED [unknown]\n");
+ pf(v,"\nAN ERROR HAS OCCURRED [unknown]\n");
}
sqstd_printcallstack(v);
}
diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp
index f02fee29f6..0d769bf1f7 100644
--- a/src/3rdparty/squirrel/squirrel/sqapi.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp
@@ -798,7 +798,8 @@ SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx)
switch(type) {
case OT_TABLE:
if(type(mt) == OT_TABLE) {
- if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle"); v->Pop();}
+ if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle");
+ v->Pop();}
else if(type(mt)==OT_NULL) {
_table(self)->SetDelegate(NULL); v->Pop(); }
else return sq_aux_invalidtype(v,type);
diff --git a/src/3rdparty/squirrel/squirrel/sqdebug.cpp b/src/3rdparty/squirrel/squirrel/sqdebug.cpp
index 74272e432a..b163fae52e 100644
--- a/src/3rdparty/squirrel/squirrel/sqdebug.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqdebug.cpp
@@ -105,7 +105,7 @@ void SQVM::Raise_IdxError(const SQObject &o)
void SQVM::Raise_CompareError(const SQObject &o1, const SQObject &o2)
{
SQObjectPtr oval1 = PrintObjVal(o1), oval2 = PrintObjVal(o2);
- Raise_Error("comparsion between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2));
+ Raise_Error("comparison between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2));
}
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 0c557d790b..a0720e2ea5 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -28,6 +28,7 @@
#include "../widgets/dropdown_type.h"
#include "../widgets/dropdown_func.h"
#include "../hotkeys.h"
+#include "../core/geometry_func.hpp"
#include "ai.hpp"
#include "ai_gui.hpp"
@@ -766,6 +767,22 @@ struct AIConfigWindow : public Window {
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = 8 * this->line_height;
break;
+
+ case WID_AIC_CHANGE: {
+ SetDParam(0, STR_AI_CONFIG_CHANGE_GAMESCRIPT);
+ Dimension dim = GetStringBoundingBox(STR_AI_CONFIG_CHANGE);
+
+ SetDParam(0, STR_AI_CONFIG_CHANGE_NONE);
+ dim = maxdim(dim, GetStringBoundingBox(STR_AI_CONFIG_CHANGE));
+
+ SetDParam(0, STR_AI_CONFIG_CHANGE_AI);
+ dim = maxdim(dim, GetStringBoundingBox(STR_AI_CONFIG_CHANGE));
+
+ dim.width += padding.width;
+ dim.height += padding.height;
+ *size = maxdim(*size, dim);
+ break;
+ }
}
}
@@ -901,8 +918,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 ec7c896cee..e862b62466 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -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.6") == 0;
+ strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0 || strcmp(api_version, "1.7") == 0;
}
#if defined(WIN32)
diff --git a/src/aircraft.h b/src/aircraft.h
index cbb424423f..ab5a382245 100644
--- a/src/aircraft.h
+++ b/src/aircraft.h
@@ -94,7 +94,7 @@ struct Aircraft FINAL : public SpecializedVehicle {
void UpdateDeltaXY(Direction direction);
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; }
bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); }
- SpriteID GetImage(Direction direction, EngineImageType image_type) const;
+ void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
int GetDisplaySpeed() const { return this->cur_speed; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
int GetSpeedOldUnits() const { return this->vcache.cached_max_speed * 10 / 128; }
@@ -142,7 +142,7 @@ struct Aircraft FINAL : public SpecializedVehicle {
*/
#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var)
-SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type);
+void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result);
Station *GetTargetAirportIfValid(const Aircraft *v);
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index ca5759ec69..81ec7c9e84 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -157,64 +157,69 @@ static StationID FindNearestHangar(const Aircraft *v)
return index;
}
-SpriteID Aircraft::GetImage(Direction direction, EngineImageType image_type) const
+void Aircraft::GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const
{
uint8 spritenum = this->spritenum;
if (is_custom_sprite(spritenum)) {
- SpriteID sprite = GetCustomVehicleSprite(this, direction, image_type);
- if (sprite != 0) return sprite;
+ GetCustomVehicleSprite(this, direction, image_type, result);
+ if (result->IsValid()) return;
spritenum = this->GetEngine()->original_image_index;
}
assert(IsValidImageIndex(spritenum));
- return direction + _aircraft_sprite[spritenum];
+ result->Set(direction + _aircraft_sprite[spritenum]);
}
-SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type)
+void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result)
{
assert(v->subtype == AIR_HELICOPTER);
const Aircraft *w = v->Next()->Next();
if (is_custom_sprite(v->spritenum)) {
- SpriteID sprite = GetCustomRotorSprite(v, false, image_type);
- if (sprite != 0) return sprite;
+ GetCustomRotorSprite(v, false, image_type, result);
+ if (result->IsValid()) return;
}
/* Return standard rotor sprites if there are no custom sprites for this helicopter */
- return SPR_ROTOR_STOPPED + w->state;
+ result->Set(SPR_ROTOR_STOPPED + w->state);
}
-static SpriteID GetAircraftIcon(EngineID engine, EngineImageType image_type)
+static void GetAircraftIcon(EngineID engine, EngineImageType image_type, VehicleSpriteSeq *result)
{
const Engine *e = Engine::Get(engine);
uint8 spritenum = e->u.air.image_index;
if (is_custom_sprite(spritenum)) {
- SpriteID sprite = GetCustomVehicleIcon(engine, DIR_W, image_type);
- if (sprite != 0) return sprite;
+ GetCustomVehicleIcon(engine, DIR_W, image_type, result);
+ if (result->IsValid()) return;
spritenum = e->original_image_index;
}
assert(IsValidImageIndex(spritenum));
- return DIR_W + _aircraft_sprite[spritenum];
+ result->Set(DIR_W + _aircraft_sprite[spritenum]);
}
void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type)
{
- SpriteID sprite = GetAircraftIcon(engine, image_type);
- const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
+ VehicleSpriteSeq seq;
+ GetAircraftIcon(engine, image_type, &seq);
+
+ Rect rect;
+ seq.GetBounds(&rect);
preferred_x = Clamp(preferred_x,
- left - UnScaleGUI(real_sprite->x_offs),
- right - UnScaleGUI(real_sprite->width) - UnScaleGUI(real_sprite->x_offs));
- DrawSprite(sprite, pal, preferred_x, y);
+ left - UnScaleGUI(rect.left),
+ right - UnScaleGUI(rect.right));
+
+ seq.Draw(preferred_x, y, pal, pal == PALETTE_CRASH);
if (!(AircraftVehInfo(engine)->subtype & AIR_CTOL)) {
- SpriteID rotor_sprite = GetCustomRotorIcon(engine, image_type);
- if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
- DrawSprite(rotor_sprite, PAL_NONE, preferred_x, y - ScaleGUITrad(5));
+ VehicleSpriteSeq rotor_seq;
+ GetCustomRotorIcon(engine, image_type, &rotor_seq);
+ if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
+ rotor_seq.Draw(preferred_x, y - ScaleGUITrad(5), PAL_NONE, false);
}
}
@@ -229,12 +234,16 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
*/
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type)
{
- const Sprite *spr = GetSprite(GetAircraftIcon(engine, image_type), ST_NORMAL);
+ VehicleSpriteSeq seq;
+ GetAircraftIcon(engine, image_type, &seq);
+
+ Rect rect;
+ seq.GetBounds(&rect);
- width = UnScaleGUI(spr->width);
- height = UnScaleGUI(spr->height);
- xoffs = UnScaleGUI(spr->x_offs);
- yoffs = UnScaleGUI(spr->y_offs);
+ width = UnScaleGUI(rect.right - rect.left + 1);
+ height = UnScaleGUI(rect.bottom - rect.top + 1);
+ xoffs = UnScaleGUI(rect.left);
+ yoffs = UnScaleGUI(rect.top);
}
/**
@@ -325,7 +334,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->date_of_last_service = _date;
v->build_year = u->build_year = _cur_year;
- v->cur_image = u->cur_image = SPR_IMG_QUERY;
+ v->sprite_seq.Set(SPR_IMG_QUERY);
+ u->sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
u->random_bits = VehicleRandomBits();
@@ -357,7 +367,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
w->vehstatus = VS_HIDDEN | VS_UNCLICKABLE;
w->spritenum = 0xFF;
w->subtype = AIR_ROTOR;
- w->cur_image = SPR_ROTOR_STOPPED;
+ w->sprite_seq.Set(SPR_ROTOR_STOPPED);
w->random_bits = VehicleRandomBits();
/* Use rotor's air.state to store the rotor animation frame */
w->state = HRS_ROTOR_STOPPED;
@@ -476,21 +486,21 @@ static void HelicopterTickHandler(Aircraft *v)
int tick = ++u->tick_counter;
int spd = u->cur_speed >> 4;
- SpriteID img;
+ VehicleSpriteSeq seq;
if (spd == 0) {
u->state = HRS_ROTOR_STOPPED;
- img = GetRotorImage(v, EIT_ON_MAP);
- if (u->cur_image == img) return;
+ GetRotorImage(v, EIT_ON_MAP, &seq);
+ if (u->sprite_seq == seq) return;
} else if (tick >= spd) {
u->tick_counter = 0;
u->state++;
if (u->state > HRS_ROTOR_MOVING_3) u->state = HRS_ROTOR_MOVING_1;
- img = GetRotorImage(v, EIT_ON_MAP);
+ GetRotorImage(v, EIT_ON_MAP, &seq);
} else {
return;
}
- u->cur_image = img;
+ u->sprite_seq = seq;
u->UpdatePositionAndViewport();
}
@@ -510,7 +520,9 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
v->UpdatePosition();
v->UpdateViewport(true, false);
- if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v, EIT_ON_MAP);
+ if (v->subtype == AIR_HELICOPTER) {
+ GetRotorImage(v, EIT_ON_MAP, &v->Next()->Next()->sprite_seq);
+ }
Aircraft *u = v->Next();
@@ -521,7 +533,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
- u->cur_image = v->cur_image;
+ u->sprite_seq.CopyWithoutPalette(v->sprite_seq); // the shadow is never coloured
u->UpdatePositionAndViewport();
@@ -817,7 +829,7 @@ static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc,
/* We are northwest or southeast of the airport */
dir = delta_y < 0 ? DIAGDIR_NW : DIAGDIR_SE;
}
- dir = ChangeDiagDir(dir, (DiagDirDiff)ReverseDiagDir(DirToDiagDir(rotation)));
+ dir = ChangeDiagDir(dir, DiagDirDifference(DIAGDIR_NE, DirToDiagDir(rotation)));
return apc->entry_points[dir];
}
@@ -1291,7 +1303,9 @@ void Aircraft::MarkDirty()
{
this->colourmap = PAL_NONE;
this->UpdateViewport(true, false);
- if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this, EIT_ON_MAP);
+ if (this->subtype == AIR_HELICOPTER) {
+ GetRotorImage(this, EIT_ON_MAP, &this->Next()->Next()->sprite_seq);
+ }
}
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index c3379d3951..6693b1f8ad 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -83,11 +83,14 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
{
bool rtl = _current_text_dir == TD_RTL;
- SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type);
- const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
+ VehicleSpriteSeq seq;
+ v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
- int width = UnScaleGUI(real_sprite->width);
- int x_offs = UnScaleGUI(real_sprite->x_offs);
+ Rect rect;
+ seq.GetBounds(&rect);
+
+ int width = UnScaleGUI(rect.right - rect.left + 1);
+ int x_offs = UnScaleGUI(rect.left);
int x = rtl ? right - width - x_offs : left - x_offs;
bool helicopter = v->subtype == AIR_HELICOPTER;
@@ -95,17 +98,18 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
int heli_offs = 0;
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(sprite, pal, x, y + y_offs);
+ seq.Draw(x, y + y_offs, pal, (v->vehstatus & VS_CRASHED) != 0);
if (helicopter) {
const Aircraft *a = Aircraft::From(v);
- SpriteID rotor_sprite = GetCustomRotorSprite(a, true, image_type);
- if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
+ VehicleSpriteSeq rotor_seq;
+ GetCustomRotorSprite(a, true, image_type, &rotor_seq);
+ if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
heli_offs = ScaleGUITrad(5);
- DrawSprite(rotor_sprite, PAL_NONE, x, y + y_offs - heli_offs);
+ rotor_seq.Draw(x, y + y_offs - heli_offs, PAL_NONE, false);
}
if (v->index == selection) {
x += x_offs;
- y += UnScaleGUI(real_sprite->y_offs) + y_offs - heli_offs;
- DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(real_sprite->height) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
+ y += UnScaleGUI(rect.top) + y_offs - heli_offs;
+ DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(rect.bottom - rect.top + 1) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
}
}
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index 193c5ac4a8..04c9f95a97 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -433,6 +433,7 @@ void AddArticulatedParts(Vehicle *first)
v->x_pos = first->x_pos;
v->y_pos = first->y_pos;
v->z_pos = first->z_pos;
+ v->date_of_last_service = first->date_of_last_service;
v->build_year = first->build_year;
v->vehstatus = first->vehstatus & ~VS_STOPPED;
@@ -440,7 +441,7 @@ void AddArticulatedParts(Vehicle *first)
v->max_age = 0;
v->engine_type = engine_type;
v->value = 0;
- v->cur_image = SPR_IMG_QUERY;
+ v->sprite_seq.Set(SPR_IMG_QUERY);
v->random_bits = VehicleRandomBits();
if (flip_image) v->spritenum++;
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 691042a1d5..1074d1dd78 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -87,7 +87,7 @@ class ReplaceVehicleWindow : public Window {
byte sort_criteria; ///< Criteria of sorting vehicles.
bool descending_sort_order; ///< Order of sorting vehicles.
bool show_hidden_engines; ///< Whether to show the hidden engines.
- RailType sel_railtype; ///< Type of rail tracks selected.
+ RailType sel_railtype; ///< Type of rail tracks selected. #INVALID_RAILTYPE to show all.
Scrollbar *vscroll[2];
/**
@@ -104,7 +104,7 @@ class ReplaceVehicleWindow : public Window {
/* Ensure that the wagon/engine selection fits the engine. */
if ((rvi->railveh_type == RAILVEH_WAGON) == show_engines) return false;
- if (draw_left && show_engines) {
+ if (draw_left && this->sel_railtype != INVALID_RAILTYPE) {
/* Ensure that the railtype is specific to the selected one */
if (rvi->railtype != this->sel_railtype) return false;
}
@@ -211,24 +211,7 @@ class ReplaceVehicleWindow : public Window {
public:
ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
{
- if (vehicletype == VEH_TRAIN) {
- /* For rail vehicles find the most used vehicle type, which is usually
- * better than 'just' the first/previous vehicle type. */
- uint type_count[RAILTYPE_END];
- memset(type_count, 0, sizeof(type_count));
-
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
- if (e->u.rail.railveh_type == RAILVEH_WAGON) continue;
- type_count[e->u.rail.railtype] += GetGroupNumEngines(_local_company, id_g, e->index);
- }
-
- this->sel_railtype = RAILTYPE_BEGIN;
- for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) {
- if (type_count[this->sel_railtype] < type_count[rt]) this->sel_railtype = rt;
- }
- }
-
+ this->sel_railtype = INVALID_RAILTYPE;
this->replace_engines = true; // start with locomotives (all other vehicles will not read this bool)
this->engines[0].ForceRebuild();
this->engines[1].ForceRebuild();
@@ -288,12 +271,9 @@ public:
break;
}
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE: {
- StringID str = this->GetWidget(widget)->widget_data;
- SetDParam(0, STR_REPLACE_ENGINES);
- Dimension d = GetStringBoundingBox(str);
- SetDParam(0, STR_REPLACE_WAGONS);
- d = maxdim(d, GetStringBoundingBox(str));
+ case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
+ Dimension d = GetStringBoundingBox(STR_REPLACE_ENGINES);
+ d = maxdim(d, GetStringBoundingBox(STR_REPLACE_WAGONS));
d.width += padding.width;
d.height += padding.height;
*size = maxdim(*size, d);
@@ -367,7 +347,7 @@ public:
break;
}
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
+ case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN:
SetDParam(0, this->replace_engines ? STR_REPLACE_ENGINES : STR_REPLACE_WAGONS);
break;
}
@@ -432,12 +412,8 @@ public:
this->SetWidgetDisabledState(WID_RV_STOP_REPLACE, this->sel_engine[0] == INVALID_ENGINE || !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group));
if (this->window_number == VEH_TRAIN) {
- /* sets the colour of that art thing */
- this->GetWidget(WID_RV_TRAIN_FLUFF_LEFT)->colour = _company_colours[_local_company];
- this->GetWidget(WID_RV_TRAIN_FLUFF_RIGHT)->colour = _company_colours[_local_company];
-
/* Show the selected railtype in the pulldown menu */
- this->GetWidget(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = GetRailTypeInfo(sel_railtype)->strings.replace_text;
+ this->GetWidget(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = sel_railtype == INVALID_RAILTYPE ? STR_REPLACE_ALL_RAILTYPE : GetRailTypeInfo(sel_railtype)->strings.replace_text;
}
this->DrawWidgets();
@@ -483,15 +459,16 @@ public:
DisplayVehicleSortDropDown(this, static_cast(this->window_number), this->sort_criteria, WID_RV_SORT_DROPDOWN);
break;
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
- this->replace_engines = !(this->replace_engines);
- this->engines[0].ForceRebuild();
- this->reset_sel_engine = true;
- this->SetDirty();
+ case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
+ DropDownList *list = new DropDownList();
+ *list->Append() = new DropDownListStringItem(STR_REPLACE_ENGINES, 1, false);
+ *list->Append() = new DropDownListStringItem(STR_REPLACE_WAGONS, 0, false);
+ ShowDropDownList(this, list, this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
break;
+ }
case WID_RV_TRAIN_RAILTYPE_DROPDOWN: // Railtype selection dropdown menu
- ShowDropDownList(this, GetRailTypeDropDownList(true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
+ ShowDropDownList(this, GetRailTypeDropDownList(true, true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
break;
case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
@@ -566,6 +543,14 @@ public:
break;
}
+ case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
+ this->replace_engines = index != 0;
+ this->engines[0].ForceRebuild();
+ this->reset_sel_engine = true;
+ this->SetDirty();
+ break;
+ }
+
case WID_RV_START_REPLACE:
this->ReplaceClick_StartReplace(index != 0);
break;
@@ -611,7 +596,13 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetFill(1, 0), SetResize(1, 0),
+ NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN), SetDataTip(STR_BLACK_STRING, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
+ EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
+ EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
@@ -631,20 +622,16 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), SetFill(1, 0), SetResize(1, 0),
+ EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(150, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_TOGGLE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_ENGINE_WAGON_SELECT, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_LEFT), SetMinimalSize(15, 12), EndContainer(),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetResize(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_RIGHT), SetMinimalSize(16, 12), EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index a3083e40b3..deedaf34b5 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -20,6 +20,11 @@
/** Instantiation of the 32bpp with animation blitter factory. */
static FBlitter_32bppAnim iFBlitter_32bppAnim;
+Blitter_32bppAnim::~Blitter_32bppAnim()
+{
+ free(this->anim_buf);
+}
+
template
inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
diff --git a/src/blitter/32bpp_anim.hpp b/src/blitter/32bpp_anim.hpp
index e707c4437d..a0a022e49f 100644
--- a/src/blitter/32bpp_anim.hpp
+++ b/src/blitter/32bpp_anim.hpp
@@ -29,6 +29,8 @@ public:
anim_buf_height(0)
{}
+ ~Blitter_32bppAnim();
+
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp
index 2e9589aee2..f9eb88df54 100644
--- a/src/clear_cmd.cpp
+++ b/src/clear_cmd.cpp
@@ -56,7 +56,7 @@ void DrawHillyLandTile(const TileInfo *ti)
if (ti->tileh != SLOPE_FLAT) {
DrawGroundSprite(SPR_FLAT_ROUGH_LAND + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
} else {
- DrawGroundSprite(_landscape_clear_sprites_rough[GB(ti->x ^ ti->y, 4, 3)], PAL_NONE);
+ DrawGroundSprite(_landscape_clear_sprites_rough[GB(TileHash(ti->x, ti->y), 0, 3)], PAL_NONE);
}
}
diff --git a/src/command_func.h b/src/command_func.h
index c4cc51e3da..3369475675 100644
--- a/src/command_func.h
+++ b/src/command_func.h
@@ -81,7 +81,7 @@ CommandCallback CcBuildBridge;
/* dock_gui.cpp */
CommandCallback CcBuildDocks;
-CommandCallback CcBuildCanal;
+CommandCallback CcPlaySound_SPLAT_WATER;
/* depot_gui.cpp */
CommandCallback CcCloneVehicle;
@@ -97,19 +97,19 @@ CommandCallback CcAddVehicleNewGroup;
CommandCallback CcBuildIndustry;
/* main_gui.cpp */
-CommandCallback CcPlaySound10;
+CommandCallback CcPlaySound_EXPLOSION;
CommandCallback CcPlaceSign;
CommandCallback CcTerraform;
CommandCallback CcGiveMoney;
/* rail_gui.cpp */
-CommandCallback CcPlaySound1E;
+CommandCallback CcPlaySound_SPLAT_RAIL;
CommandCallback CcRailDepot;
CommandCallback CcStation;
CommandCallback CcBuildRailTunnel;
/* road_gui.cpp */
-CommandCallback CcPlaySound1D;
+CommandCallback CcPlaySound_SPLAT_OTHER;
CommandCallback CcBuildRoadTunnel;
CommandCallback CcRoadDepot;
CommandCallback CcRoadStop;
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 1343acb91b..0be6679583 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -1764,7 +1764,8 @@ struct CompanyInfrastructureWindow : Window
if (this->railtypes != RAILTYPES_NONE) {
/* Draw name of each valid railtype. */
- for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
+ RailType rt;
+ FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) {
SetDParam(0, GetRailTypeInfo(rt)->strings.name);
DrawString(r.left + offs_left, r.right - offs_right, y += FONT_HEIGHT_NORMAL, STR_WHITE_STRING);
@@ -1781,7 +1782,8 @@ struct CompanyInfrastructureWindow : Window
case WID_CI_RAIL_COUNT: {
/* Draw infrastructure count for each valid railtype. */
uint32 rail_total = c->infrastructure.GetRailTotal();
- for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
+ RailType rt;
+ FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) {
this->DrawCountLine(r, y, c->infrastructure.rail[rt], RailMaintenanceCost(rt, c->infrastructure.rail[rt], rail_total));
}
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 8d9e04113d..9cfc8e8f9d 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -45,6 +45,38 @@
/* scriptfile handling */
static bool _script_running; ///< Script is running (used to abort execution when #ConReturn is encountered).
+/** File list storage for the console, for caching the last 'ls' command. */
+class ConsoleFileList : public FileList {
+public:
+ ConsoleFileList() : FileList()
+ {
+ this->file_list_valid = false;
+ }
+
+ /** Declare the file storage cache as being invalid, also clears all stored files. */
+ void InvalidateFileList()
+ {
+ this->Clear();
+ this->file_list_valid = false;
+ }
+
+ /**
+ * (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload.
+ * @param Always reload the file storage cache.
+ */
+ void ValidateFileList(bool force_reload = false)
+ {
+ if (force_reload || !this->file_list_valid) {
+ this->BuildFileList(FT_SAVEGAME, SLO_LOAD);
+ this->file_list_valid = true;
+ }
+ }
+
+ bool file_list_valid; ///< If set, the file list is valid.
+};
+
+static ConsoleFileList _console_file_list; ///< File storage cache for the console.
+
/* console command defines */
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
#define DEF_CONSOLE_HOOK(function) static ConsoleHookResult function(bool echo)
@@ -286,7 +318,7 @@ DEF_CONSOLE_CMD(ConSave)
char *filename = str_fmt("%s.sav", argv[1]);
IConsolePrint(CC_DEFAULT, "Saving map...");
- if (SaveOrLoad(filename, SL_SAVE, SAVE_DIR) != SL_OK) {
+ if (SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, SAVE_DIR) != SL_OK) {
IConsolePrint(CC_ERROR, "Saving map failed");
} else {
IConsolePrintF(CC_DEFAULT, "Map successfully saved to %s", filename);
@@ -315,42 +347,6 @@ DEF_CONSOLE_CMD(ConSaveConfig)
return true;
}
-/**
- * Get savegame file informations.
- * @param file The savegame filename to return information about. Can be the actual name
- * or a numbered entry into the filename list.
- * @return FiosItem The information on the file.
- */
-static const FiosItem *GetFiosItem(const char *file)
-{
- _saveload_mode = SLD_LOAD_GAME;
- BuildFileList();
-
- for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
- if (strcmp(file, item->name) == 0) return item;
- if (strcmp(file, item->title) == 0) return item;
- }
-
- /* If no name matches, try to parse it as number */
- char *endptr;
- int i = strtol(file, &endptr, 10);
- if (file == endptr || *endptr != '\0') i = -1;
-
- if (IsInsideMM(i, 0, _fios_items.Length())) return _fios_items.Get(i);
-
- /* As a last effort assume it is an OpenTTD savegame and
- * that the ".sav" part was not given. */
- char long_file[MAX_PATH];
- seprintf(long_file, lastof(long_file), "%s.sav", file);
- for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
- if (strcmp(long_file, item->name) == 0) return item;
- if (strcmp(long_file, item->title) == 0) return item;
- }
-
- return NULL;
-}
-
-
DEF_CONSOLE_CMD(ConLoad)
{
if (argc == 0) {
@@ -361,24 +357,21 @@ DEF_CONSOLE_CMD(ConLoad)
if (argc != 2) return false;
const char *file = argv[1];
- const FiosItem *item = GetFiosItem(file);
+ _console_file_list.ValidateFileList();
+ const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
- switch (item->type) {
- case FIOS_TYPE_FILE: case FIOS_TYPE_OLDFILE: {
- _switch_mode = SM_LOAD_GAME;
- SetFiosType(item->type);
-
- strecpy(_file_to_saveload.name, FiosBrowseTo(item), lastof(_file_to_saveload.name));
- strecpy(_file_to_saveload.title, item->title, lastof(_file_to_saveload.title));
- break;
- }
- default: IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
+ if (GetAbstractFileType(item->type) == FT_SAVEGAME) {
+ _switch_mode = SM_LOAD_GAME;
+ _file_to_saveload.SetMode(item->type);
+ _file_to_saveload.SetName(FiosBrowseTo(item));
+ _file_to_saveload.SetTitle(item->title);
+ } else {
+ IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
}
} else {
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
- FiosFreeSavegameList();
return true;
}
@@ -393,7 +386,8 @@ DEF_CONSOLE_CMD(ConRemove)
if (argc != 2) return false;
const char *file = argv[1];
- const FiosItem *item = GetFiosItem(file);
+ _console_file_list.ValidateFileList();
+ const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
if (!FiosDelete(item->name)) {
IConsolePrintF(CC_ERROR, "%s: Failed to delete file", file);
@@ -402,7 +396,7 @@ DEF_CONSOLE_CMD(ConRemove)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
- FiosFreeSavegameList();
+ _console_file_list.InvalidateFileList();
return true;
}
@@ -415,13 +409,11 @@ DEF_CONSOLE_CMD(ConListFiles)
return true;
}
- BuildFileList();
-
- for (uint i = 0; i < _fios_items.Length(); i++) {
- IConsolePrintF(CC_DEFAULT, "%d) %s", i, _fios_items[i].title);
+ _console_file_list.ValidateFileList(true);
+ for (uint i = 0; i < _console_file_list.Length(); i++) {
+ IConsolePrintF(CC_DEFAULT, "%d) %s", i, _console_file_list[i].title);
}
- FiosFreeSavegameList();
return true;
}
@@ -436,7 +428,8 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
if (argc != 2) return false;
const char *file = argv[1];
- const FiosItem *item = GetFiosItem(file);
+ _console_file_list.ValidateFileList(true);
+ const FiosItem *item = _console_file_list.FindItem(file);
if (item != NULL) {
switch (item->type) {
case FIOS_TYPE_DIR: case FIOS_TYPE_DRIVE: case FIOS_TYPE_PARENT:
@@ -448,7 +441,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
- FiosFreeSavegameList();
+ _console_file_list.InvalidateFileList();
return true;
}
@@ -462,8 +455,8 @@ DEF_CONSOLE_CMD(ConPrintWorkingDirectory)
}
/* XXX - Workaround for broken file handling */
- FiosGetSavegameList(SLD_LOAD_GAME);
- FiosFreeSavegameList();
+ _console_file_list.ValidateFileList(true);
+ _console_file_list.InvalidateFileList();
FiosGetDescText(&path, NULL);
IConsolePrint(CC_DEFAULT, path);
diff --git a/src/core/container_func.hpp b/src/core/container_func.hpp
new file mode 100644
index 0000000000..1b8e8ad847
--- /dev/null
+++ b/src/core/container_func.hpp
@@ -0,0 +1,35 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can 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 .
+ */
+
+/** @file container_func.hpp Functions related to use of containers. */
+
+template unsigned int container_unordered_remove_if (C &container, UP predicate) {
+ unsigned int removecount = 0;
+ for (auto it = container.begin(); it != container.end();) {
+ if (predicate(*it)) {
+ removecount++;
+ if (std::next(it) != container.end()) {
+ *it = std::move(container.back());
+ container.pop_back();
+ } else {
+ container.pop_back();
+ break;
+ }
+ } else {
+ ++it;
+ }
+ }
+ return removecount;
+}
+
+template unsigned int container_unordered_remove(C &container, const V &value) {
+ return container_unordered_remove_if (container, [&](const typename C::value_type &v) {
+ return v == value;
+ });
+}
diff --git a/src/core/multimap.hpp b/src/core/multimap.hpp
index e906677141..da6a33ef45 100644
--- a/src/core/multimap.hpp
+++ b/src/core/multimap.hpp
@@ -15,7 +15,7 @@
#include