Compare commits

..

2 Commits

Author SHA1 Message Date
frosch
ed5ccce41b (svn r27195) [1.5] -Update: Documentation 2015-03-29 20:42:26 +03:00
frosch
6b42179419 (svn r27194) [1.5] -Change: New titlegame (Emperor Jake) 2015-03-29 20:42:13 +03:00
333 changed files with 6944 additions and 23932 deletions

View File

@@ -1 +0,0 @@
1.6.0 27532 0 1.6.0

View File

@@ -172,7 +172,6 @@ install: bundle
$(Q)install -d "$(INSTALL_BINARY_DIR)" $(Q)install -d "$(INSTALL_BINARY_DIR)"
$(Q)install -d "$(INSTALL_ICON_DIR)" $(Q)install -d "$(INSTALL_ICON_DIR)"
$(Q)install -d "$(INSTALL_DATA_DIR)/ai" $(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)/baseset"
$(Q)install -d "$(INSTALL_DATA_DIR)/lang" $(Q)install -d "$(INSTALL_DATA_DIR)/lang"
$(Q)install -d "$(INSTALL_DATA_DIR)/scripts" $(Q)install -d "$(INSTALL_DATA_DIR)/scripts"
@@ -183,7 +182,6 @@ else
endif endif
$(Q)install -m 644 "$(BUNDLE_DIR)/lang/"* "$(INSTALL_DATA_DIR)/lang" $(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)/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)/baseset/"* "$(INSTALL_DATA_DIR)/baseset"
$(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts" $(Q)install -m 644 "$(BUNDLE_DIR)/scripts/"* "$(INSTALL_DATA_DIR)/scripts"
ifndef DO_NOT_INSTALL_DOCS ifndef DO_NOT_INSTALL_DOCS

View File

@@ -5,13 +5,16 @@
# 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. # 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 <http://www.gnu.org/licenses/>. # 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 <http://www.gnu.org/licenses/>.
# #
# Building requires GRFCodec. # Building requires GRFCodec and NFORenum. Older versions of GRFCodec are
# known to miscompile the graphics.
# #
# Recent versions (including sources) can be found at: # Recent nightlies (including sources) of both can be found at:
# http://www.openttd.org/download-grfcodec # http://www.openttd.org/download-grfcodec
# http://www.openttd.org/download-nforenum
# #
# The mercurial repository can be found at: # The mercurial repository of both can be found at:
# http://hg.openttdcoop.org/grfcodec # http://hg.openttdcoop.org/grfcodec
# http://hg.openttdcoop.org/nforenum
# #

View File

@@ -1,16 +0,0 @@
#!/bin/sh
mkdir -p ../translations/lang
git diff 1.6/master -- src/lang/english.txt | tail -n +5 | grep '^[+]' | cut -b 2- | \
grep -v "^STR_TABLET_CLOSE\b" | \
grep -v "^STR_TABLET_SHIFT\b" | \
grep -v "^STR_TABLET_CTRL\b" | \
cat > ../translations/lang/english.txt
for f in src/lang/*.txt; do
[ "$f" = src/lang/english.txt ] && continue
rm -f ../translations/lang/`basename $f`
cat ../translations/lang/english.txt | grep '^STR' | while read name text; do
grep "^$name\b" $f >> ../translations/lang/`basename $f`
done
done

View File

@@ -1,13 +0,0 @@
#!/bin/sh
for f in ../translations/lang/*.txt; do
[ "$f" = ../translations/lang/english.txt ] && continue
out=src/lang/`basename $f`
grep "^# Android strings" $out > /dev/null || [ -z "`tail -c 2 $out`" ] || echo >> $out
{ grep -v "^# Android strings" $out ; echo "# Android strings" ; } > $out.new
mv -f $out.new $out
cat $f | grep '^STR' | while read name text; do
{ grep -v "^$name\b" $out ; printf "%-64s%s\n" "$name" "$text" ; } > $out.new
mv -f $out.new $out
done
done

View File

@@ -6,5 +6,3 @@
* 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. * 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 <http://www.gnu.org/licenses/>. * 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 <http://www.gnu.org/licenses/>.
*/ */
AILog.Info("1.5 API compatibility in effect.");

View File

@@ -1,8 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/

View File

@@ -6,7 +6,7 @@ class Regression extends AIInfo {
function GetShortName() { return "REGR"; } 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 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 GetVersion() { return 1; }
function GetAPIVersion() { return "1.6"; } function GetAPIVersion() { return "1.5"; }
function GetDate() { return "2007-03-18"; } function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; } function CreateInstance() { return "Regression"; }
} }

View File

@@ -12,7 +12,7 @@ description.af_ZA = 'n Musiek stel sonder enige musiek.
description.ar_EG = مجموعة موسيقى بدون موسيقى description.ar_EG = مجموعة موسيقى بدون موسيقى
description.be_BY = "Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі. description.be_BY = "Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі.
description.bg_BG = Празен музикален пакет. description.bg_BG = Празен музикален пакет.
description.ca_ES = Una llista de música sense cap peça. description.ca_ES = Un joc de música sense cap música.
description.cs_CZ = Prázná hudební sada. description.cs_CZ = Prázná hudební sada.
description.cy_GB = Pecyn cerddoriaeth heb unrhyw gerddoriaeth ynddo. description.cy_GB = Pecyn cerddoriaeth heb unrhyw gerddoriaeth ynddo.
description.da_DK = En musikpakke uden musik. description.da_DK = En musikpakke uden musik.
@@ -27,7 +27,7 @@ description.fr_FR = Un pack de musiques sans musiques.
description.ga_IE = Pacáiste ceoil gan aon cheol iarbhír ann. 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.gd_GB = Pacaid ciùil anns nach eil fonn sam bith.
description.gl_ES = Un conxunto de músicas sen ningunha música. description.gl_ES = Un conxunto de músicas sen ningunha música.
description.hr_HR = Glazbeni paket bez ikakve glazbe. description.hr_HR = Muzički paket bez ikakve muzike.
description.hu_HU = Zenei alapcsomag zene nélkül. description.hu_HU = Zenei alapcsomag zene nélkül.
description.id_ID = Paket musik tanpa musik sungguhan. description.id_ID = Paket musik tanpa musik sungguhan.
description.is_IS = Tónlistarpakki sem er í raun án tónlistar. description.is_IS = Tónlistarpakki sem er í raun án tónlistar.

View File

@@ -12,7 +12,7 @@ description.af_ZA = 'n Klank stel sonder enige klanke.
description.ar_EG = مجموعة صوت بدوت اصوات مضافة description.ar_EG = مجموعة صوت بدوت اصوات مضافة
description.be_BY = "Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў. description.be_BY = "Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў.
description.bg_BG = Празен звуков пакет. description.bg_BG = Празен звуков пакет.
description.ca_ES = Una llista de sons buida. description.ca_ES = Un joc de sons sense cap so.
description.cs_CZ = Prázdná sada zvuků. description.cs_CZ = Prázdná sada zvuků.
description.cy_GB = Pecyn sain heb unrhyw effeithiau sain ynddo. description.cy_GB = Pecyn sain heb unrhyw effeithiau sain ynddo.
description.da_DK = En lydpakke uden lyde. description.da_DK = En lydpakke uden lyde.

Binary file not shown.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe grafieke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS. description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS. description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS.
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel DOS. description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro 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.cy_GB = Graffeg gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS-version. description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS-version.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe klanke.
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS. description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS. description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS.
description.ca_ES = Sons originals del Transport Tycoon Deluxe pel DOS. description.ca_ES = Sons originals de Transport Tycoon Deluxe per a DOS.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro 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.cy_GB = Effeithiau sain gwreiddiol fersiwn DOS o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe DOS-version. description.da_DK = Originallyd fra Transport Tycoon Deluxe DOS-version.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS (German) uitgawe g
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس
description.be_BY = Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS. description.be_BY = Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) . description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) .
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe (alemany) pel DOS. description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS (Alemany).
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (německá verze pro 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.cy_GB = Graffeg gwreiddiol fersiwn DOS (Almaenig) o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS (Tysk) version. description.da_DK = Originalgrafik fra Transport Tycoon Deluxe DOS (Tysk) version.

View File

@@ -13,7 +13,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe grafie
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows. description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows. description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows.
description.ca_ES = Gràfics originals del Transport Tycoon Deluxe pel Windows. description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a Windows.
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro 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.cy_GB = Graffeg gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originalgrafik fra Transport Tycoon Deluxe Windows-version. description.da_DK = Originalgrafik fra Transport Tycoon Deluxe Windows-version.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe musiek
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز
description.be_BY = Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows. description.be_BY = Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows. description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows.
description.ca_ES = Música original del Transport Tycoon Deluxe pel Windows. description.ca_ES = Música Original de Transport Tycoon Deluxe per a Windows.
description.cs_CZ = Původní hudba Transport Tycoon Deluxe (verze pro 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.cy_GB = Cerddoriaeth gwreiddiol fersion Windows o Transport Tycoon Deluxe.
description.da_DK = Originalmusik fra Transport Tycoon Deluxe Windows-version. description.da_DK = Originalmusik fra Transport Tycoon Deluxe Windows-version.
@@ -27,7 +27,7 @@ description.fr_FR = Musiques originales de Transport Tycoon Deluxe (version Wind
description.ga_IE = Ceol bunaidh Transport Tycoon Deluxe, eagrán 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.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.gl_ES = Música da edición orixinal de Transport Tycoon Deluxe para Windows.
description.hr_HR = Originalna glazba za Transport Tycoon Deluxe Windows izdanje. description.hr_HR = Originalna muzika za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának zenéje. 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.id_ID = Musik pengiring orisinil Transport Tycoon Deluxe versi Windows.
description.is_IS = Upprunalega tónlistin úr Transport Tycoon Deluxe Windows útgáfunni. description.is_IS = Upprunalega tónlistin úr Transport Tycoon Deluxe Windows útgáfunni.
@@ -35,7 +35,7 @@ description.it_IT = Musica originale di Transport Tycoon Deluxe, edizione Window
description.ja_JP = Transport Tycoon Deluxe オリジナル版 音楽 (Windows) description.ja_JP = Transport Tycoon Deluxe オリジナル版 音楽 (Windows)
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 음악입니다. description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 음악입니다.
description.la_VA = Musica ex editione originale Transport Tycoon Deluxe Windows. description.la_VA = Musica ex editione originale Transport Tycoon Deluxe Windows.
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Musik. description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Music.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo muzika. description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo muzika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma mūzika. description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma mūzika.
description.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows. description.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows.

View File

@@ -12,7 +12,7 @@ description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe klanke
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows. description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows. description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows.
description.ca_ES = Sons originals del Transport Tycoon Deluxe pel Windows. description.ca_ES = Sons originals de Transport Tycoon Deluxe per a Windows.
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro 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.cy_GB = Effeithiau sain gwreiddiol fersiwn Windows o Transport Tycoon Deluxe.
description.da_DK = Originallyd fra Transport Tycoon Deluxe Windows-version. description.da_DK = Originallyd fra Transport Tycoon Deluxe Windows-version.

View File

@@ -6,5 +6,3 @@
* 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. * 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 <http://www.gnu.org/licenses/>. * 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 <http://www.gnu.org/licenses/>.
*/ */
GSLog.Info("1.5 API compatibility in effect.");

View File

@@ -1,8 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/

View File

@@ -1,113 +1,3 @@
1.6.0 (2016-04-01)
------------------------------------------------------------------------
(None)
1.6.0-RC1 (2016-03-01)
------------------------------------------------------------------------
- Feature: [NewGRF] Allow custom sound IDs in RV property 0x12, ship property 0x10 and aircraft property 0x12 (r27507)
- Feature: When viewing online content of a particular type, hide content of other types unless they have been (auto)selected for download (r27469, r27468, r27444)
- Feature: [NewGRF] Move sprite 8 positions in sprite aligner with ctrl+click [FS#6241] (r27451)
- Feature: Lower the sell-vehicle and sell-chain buttons in the train depot GUI while dragging a vehicle over it [FS#6391] (r27450, r27446)
- Feature: Make the object placement GUI an independent window (r27438, r27397, r27346)
- Feature: [Build] Project files and compilation with MSVC2015 (r27385, r27382, r27381, r27380, r27379)
- Feature: [NewGRF] Allow railtype NewGRF to define separate sprites for the fences on either track side [FS#6315] (r27354, r27343)
- Feature: [NewGRF] Increase the maximum amount of industry types to 128 per NewGRF and 240 in total (r27279)
- Feature: Make Ctrl+Remove-Roadstop also remove the road, just like for rail stations [FS#6252] (r27251)
- Change: [NewGRF] Allow static NewGRF to enable the second rocky tile set (r27497)
- Change: Round loading percentage in loading indicators and conditional orders towards 50%, so that 0% and 100% mean completely empty or full (r27426)
- Change: [Build] Rework the configure system to make more use of pkg-config (r27377:r27366, r27361, r27360)
- Change: Enable YAPF cache debugging with desync debug level 2 (r27332)
- Change: [strgen] Default plural subparameter position for CARGO_xxx string control codes is subparameter 1 (r27295)
- Change: [NewGRF] Translate industry variable A6 (r27267)
- Change: Do not consider cargo that is already being loaded as waiting cargo wrt. the station rating [FS#6165] (r27256)
- Change: Tune down terrain generation to reduce amount of long slopes (r27230)
- Change: Generate more detailed curves at the coast (r27229)
- Change: Slightly more water in the non-custom sea levels (r27228)
- Change: Be more lenient about road stop removal when at least one stop could be removed [FS#6262] (r27225)
- Fix: [Win32] Stdin/out/err need to be re-assigned differently if the runtime lib of MSVC2015 is used (r27481)
- Fix: [Haiku] On Haiku use the appropriate system variable to obtain the include dir [FS#6401] (r27472)
1.5.3 (2015-12-01)
------------------------------------------------------------------------
(None)
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) 1.5.0-RC1 (2015-03-18)
------------------------------------------------------------------------ ------------------------------------------------------------------------
- Feature: [NewGRF] Display relative offset changes in the sprite aligner [FS#6236] (r27174) - Feature: [NewGRF] Display relative offset changes in the sprite aligner [FS#6236] (r27174)

View File

@@ -29,7 +29,6 @@ set_default() {
strip="" strip=""
lipo="" lipo=""
awk="awk" awk="awk"
pkg_config="pkg-config"
os="DETECT" os="DETECT"
endian="AUTO" endian="AUTO"
cpu_type="DETECT" cpu_type="DETECT"
@@ -85,8 +84,7 @@ set_default() {
with_libtimidity="1" with_libtimidity="1"
with_freetype="1" with_freetype="1"
with_fontconfig="1" with_fontconfig="1"
with_icu_layout="1" with_icu="1"
with_icu_sort="1"
static_icu="0" static_icu="0"
with_psp_config="1" with_psp_config="1"
with_threads="1" with_threads="1"
@@ -107,7 +105,6 @@ set_default() {
strip strip
lipo lipo
awk awk
pkg_config
os os
endian endian
cpu_type cpu_type
@@ -162,8 +159,7 @@ set_default() {
with_libtimidity with_libtimidity
with_freetype with_freetype
with_fontconfig with_fontconfig
with_icu_layout with_icu
with_icu_sort
static_icu static_icu
with_psp_config with_psp_config
with_threads with_threads
@@ -217,8 +213,6 @@ detect_params() {
--windres=*) windres="$optarg";; --windres=*) windres="$optarg";;
--awk) prev_p="awk";; --awk) prev_p="awk";;
--awk=*) awk="$optarg";; --awk=*) awk="$optarg";;
--pkg-config) prev_p="pkg_config";;
--pkg-config=*) pkg_config="$optarg";;
--strip) prev_p="strip";; --strip) prev_p="strip";;
--strip=*) strip="$optarg";; --strip=*) strip="$optarg";;
--lipo) prev_p="lipo";; --lipo) prev_p="lipo";;
@@ -389,18 +383,12 @@ detect_params() {
--without-libfontconfig) with_fontconfig="0";; --without-libfontconfig) with_fontconfig="0";;
--with-libfontconfig=*) with_fontconfig="$optarg";; --with-libfontconfig=*) with_fontconfig="$optarg";;
--with-icu) with_icu_layout="2";with_icu_sort="2";; --with-icu) with_icu="2";;
--without-icu) with_icu_layout="0";with_icu_sort="0";; --without-icu) with_icu="0";;
--with-icu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";; --with-icu=*) with_icu="$optarg";;
--with-libicu) with_icu_layout="2";with_icu_sort="2";; --with-libicu) with_icu="2";;
--without-libicu) with_icu_layout="0";with_icu_sort="0";; --without-libicu) with_icu="0";;
--with-libicu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";; --with-libicu=*) with_icu="$optarg";;
--with-icu-layout) with_icu_layout="2";;
--without-icu-layout) with_icu_layout="0";;
--with-icu-layout=*) with_icu_layout="$optarg";;
--with-icu-sort) with_icu_sort="2";;
--without-icu-sort) with_icu_sort="0";;
--with-icu-sort=*) with_icu_sort="$optarg";;
--static-icu) static_icu="1";; --static-icu) static_icu="1";;
--static-icu=*) static_icu="$optarg";; --static-icu=*) static_icu="$optarg";;
--static-libicu) static_icu="1";; --static-libicu) static_icu="1";;
@@ -538,10 +526,10 @@ check_params() {
log 1 " PREPROCESSOR is only available for OSX" log 1 " PREPROCESSOR is only available for OSX"
exit 1 exit 1
fi fi
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP # OS only allows DETECT, UNIX, OSX, FREEBSD, OPENBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP)$'`" ]; then
log 1 "configure: error: invalid option --os=$os" log 1 "configure: error: invalid option --os=$os"
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]" log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|WINCE|PSP]"
exit 1 exit 1
fi fi
# cpu_type can be either 32 or 64 # cpu_type can be either 32 or 64
@@ -799,7 +787,7 @@ check_params() {
pre_detect_with_zlib=$with_zlib pre_detect_with_zlib=$with_zlib
detect_zlib detect_zlib
if [ "$with_zlib" = "0" ] || [ -z "$zlib-config" ]; then if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
log 1 "WARNING: zlib was not detected or disabled" log 1 "WARNING: zlib was not detected or disabled"
log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features" log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features"
log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps," log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps,"
@@ -850,8 +838,7 @@ check_params() {
detect_png detect_png
detect_freetype detect_freetype
detect_fontconfig detect_fontconfig
detect_icu_layout detect_icu
detect_icu_sort
detect_pspconfig detect_pspconfig
detect_libtimidity detect_libtimidity
@@ -1048,7 +1035,7 @@ check_params() {
# of the tags folder, the folder of the tag does not have a .svn folder # of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout. # anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)" log 1 "checking revision... svn detection (tag)"
elif [ -e "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection" log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection" log 1 "checking revision... hg detection"
@@ -1067,7 +1054,7 @@ check_params() {
fi fi
if [ "$doc_dir" = "1" ]; then if [ "$doc_dir" = "1" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
doc_dir="share/doc/openttd" doc_dir="share/doc/openttd"
else else
doc_dir="$data_dir/docs" doc_dir="$data_dir/docs"
@@ -1077,7 +1064,7 @@ check_params() {
fi fi
if [ "$icon_theme_dir" = "1" ]; then if [ "$icon_theme_dir" = "1" ]; then
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
icon_theme_dir="share/icons/hicolor" icon_theme_dir="share/icons/hicolor"
else else
icon_theme_dir="" icon_theme_dir=""
@@ -1111,7 +1098,7 @@ check_params() {
if [ "$man_dir" = "1" ]; then if [ "$man_dir" = "1" ]; then
# add manpage on UNIX systems # add manpage on UNIX systems
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
man_dir="share/man/man6" man_dir="share/man/man6"
else else
man_dir="" man_dir=""
@@ -1122,7 +1109,7 @@ check_params() {
if [ "$menu_dir" = "1" ]; then if [ "$menu_dir" = "1" ]; then
# add a freedesktop menu item only for some UNIX systems # add a freedesktop menu item only for some UNIX systems
if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
menu_dir="share/applications" menu_dir="share/applications"
else else
menu_dir="" menu_dir=""
@@ -1551,7 +1538,7 @@ make_cflags_and_ldflags() {
fi fi
fi fi
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
LIBS="$LIBS -lpthread" LIBS="$LIBS -lpthread"
fi fi
@@ -1578,6 +1565,10 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -pthread" LIBS="$LIBS -pthread"
fi fi
if [ "$os" = "FREEBSD" ]; then
LIBS="$LIBS -lpthread"
fi
if [ "$os" = "OSX" ]; then if [ "$os" = "OSX" ]; then
LDFLAGS="$LDFLAGS -framework Cocoa" LDFLAGS="$LDFLAGS -framework Cocoa"
@@ -1619,7 +1610,7 @@ make_cflags_and_ldflags() {
fi fi
# Most targets act like UNIX, just with some additions # Most targets act like UNIX, just with some additions
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
CFLAGS="$CFLAGS -DUNIX" CFLAGS="$CFLAGS -DUNIX"
fi fi
# And others like Windows # And others like Windows
@@ -1666,13 +1657,12 @@ make_cflags_and_ldflags() {
fi fi
if [ "$with_zlib" != "0" ]; then if [ "$with_zlib" != "0" ]; then
CFLAGS="$CFLAGS -DWITH_ZLIB" if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
CFLAGS="$CFLAGS `$zlib_config --cflags | tr '\n\r' ' '`" LIBS="$LIBS $zlib"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$zlib_config --libs --static | tr '\n\r' ' '`"
else else
LIBS="$LIBS `$zlib_config --libs | tr '\n\r' ' '`" LIBS="$LIBS -lz"
fi fi
CFLAGS="$CFLAGS -DWITH_ZLIB"
fi fi
if [ -n "$lzma_config" ]; then if [ -n "$lzma_config" ]; then
@@ -1718,7 +1708,13 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`" if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$png_config --variable=prefix`/lib/libpng.a `$png_config --libs --static | sed s@-lpng[0-9]*@@`"
else
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`"
fi fi
@@ -1729,7 +1725,13 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
fi fi
@@ -1740,31 +1742,26 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`" if [ "$os" = "OSX" ]; then
LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
else
# Is it possible to do static with freetype, if so: how?
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi fi
fi fi
if [ -n "$icu_layout_config" ]; then if [ -n "$icu_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_LAYOUT" CFLAGS="$CFLAGS -DWITH_ICU"
CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`"
# Some icu-configs have the 'feature' of not adding a space where others do add the space
if [ "$static_icu" != "0" ]; then if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_layout_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`" LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' ' | sed s/licu/lsicu/g`"
else else
LIBS="$LIBS `$icu_layout_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' '`"
fi
fi
if [ -n "$icu_sort_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_SORT"
CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`"
if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_sort_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else
LIBS="$LIBS `$icu_sort_config --libs | tr '\n\r' ' '`"
fi fi
fi fi
@@ -1779,15 +1776,13 @@ make_cflags_and_ldflags() {
fi fi
fi fi
if [ -n "$libtimidity_config" ]; then if [ -n "$libtimidity" ]; then
CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`" LIBS="$LIBS $libtimidity"
else else
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`" LIBS="$LIBS -ltimidity"
fi fi
CFLAGS="$CFLAGS -DLIBTIMIDITY"
fi fi
if [ "$with_iconv" != "0" ]; then if [ "$with_iconv" != "0" ]; then
@@ -1947,26 +1942,9 @@ check_compiler() {
log 2 " exit code $ret" log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
if [ -z "$5" ]; then log 1 "checking $1... $compiler not found"
log 1 "checking $1... $compiler not found" log 1 "I couldn't detect any $6 binary for $3"
log 1 "I couldn't detect any $6 binary for $3" exit 1
exit 1
else
compiler="$3-$5"
fi
machine=`eval $compiler $9 2>/dev/null`
ret=$?
eval "$2=\"$compiler\""
log 2 "executing $compiler $9"
log 2 " returned $machine"
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $5 binary for $3"
exit 1
fi
fi fi
if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
@@ -2290,54 +2268,52 @@ detect_awk() {
detect_os() { detect_os() {
if [ "$os" = "DETECT" ]; then if [ "$os" = "DETECT" ]; then
# Detect UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP # Detect UNIX, OSX, FREEBSD, OPENBSD, NETBSD, HPUX, MORPHOS, BEOS, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP
# Try first via dumpmachine, then via uname # Try first via dumpmachine, then via uname
os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk ' os=`echo "$host" | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit} /linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit} /darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit} /freebsd/ { print "FREEBSD"; exit}
/dragonfly/ { print "DRAGONFLY"; exit} /openbsd/ { print "OPENBSD"; exit}
/openbsd/ { print "OPENBSD"; exit} /netbsd/ { print "NETBSD"; exit}
/netbsd/ { print "NETBSD"; exit} /hp-ux/ { print "HPUX"; exit}
/hp-ux/ { print "HPUX"; exit} /morphos/ { print "MORPHOS"; exit}
/morphos/ { print "MORPHOS"; exit} /beos/ { print "BEOS"; exit}
/beos/ { print "BEOS"; exit} /haiku/ { print "HAIKU"; exit}
/haiku/ { print "HAIKU"; exit} /sunos/ { print "SUNOS"; exit}
/sunos/ { print "SUNOS"; exit} /solaris/ { print "SUNOS"; exit}
/solaris/ { print "SUNOS"; exit} /cygwin/ { print "CYGWIN"; exit}
/cygwin/ { print "CYGWIN"; exit} /mingw/ { print "MINGW"; exit}
/mingw/ { print "MINGW"; exit} /os2/ { print "OS2"; exit}
/os2/ { print "OS2"; exit} /dos/ { print "DOS"; exit}
/dos/ { print "DOS"; exit} /wince/ { print "WINCE"; exit}
/wince/ { print "WINCE"; exit} /psp/ { print "PSP"; exit}
/psp/ { print "PSP"; exit}
'` '`
if [ -z "$os" ]; then if [ -z "$os" ]; then
os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk ' os=`LC_ALL=C uname | tr '[A-Z]' '[a-z]' | $awk '
/linux/ { print "UNIX"; exit} /linux/ { print "UNIX"; exit}
/darwin/ { print "OSX"; exit} /darwin/ { print "OSX"; exit}
/freebsd/ { print "FREEBSD"; exit} /freebsd/ { print "FREEBSD"; exit}
/dragonfly/ { print "DRAGONFLY"; exit} /openbsd/ { print "OPENBSD"; exit}
/openbsd/ { print "OPENBSD"; exit} /netbsd/ { print "NETBSD"; exit}
/netbsd/ { print "NETBSD"; exit} /hp-ux/ { print "HPUX"; exit}
/hp-ux/ { print "HPUX"; exit} /morphos/ { print "MORPHOS"; exit}
/morphos/ { print "MORPHOS"; exit} /beos/ { print "BEOS"; exit}
/beos/ { print "BEOS"; exit} /haiku/ { print "HAIKU"; exit}
/haiku/ { print "HAIKU"; exit} /sunos/ { print "SUNOS"; exit}
/sunos/ { print "SUNOS"; exit} /cygwin/ { print "CYGWIN"; exit}
/cygwin/ { print "CYGWIN"; exit} /mingw/ { print "MINGW"; exit}
/mingw/ { print "MINGW"; exit} /os\/2/ { print "OS2"; exit}
/os\/2/ { print "OS2"; exit} /gnu/ { print "UNIX"; exit}
/gnu/ { print "UNIX"; exit}
'` '`
fi fi
if [ -z "$os" ]; then if [ -z "$os" ]; then
log 1 "detecting OS... none detected" log 1 "detecting OS... none detected"
log 1 "I couldn't detect your OS. Please use --os=OS to force one" log 1 "I couldn't detect your OS. Please use --os=OS to force one"
log 1 "Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP" log 1 "Allowed values are: UNIX, OSX, FREEBSD, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP"
exit 1 exit 1
fi fi
@@ -2375,7 +2351,7 @@ detect_allegro() {
return 0 return 0
fi fi
# By default on OSX we don't use Allegro. The rest is auto-detect # By default on OSX we don't use SDL. The rest is auto-detect
if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
log 1 "checking Allegro... OSX, skipping" log 1 "checking Allegro... OSX, skipping"
@@ -2383,7 +2359,33 @@ detect_allegro() {
return 0 return 0
fi fi
detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4" if [ "$with_allegro" = "1" ] || [ "$with_allegro" = "" ] || [ "$with_allegro" = "2" ]; then
allegro_config="allegro-config"
else
allegro_config="$with_allegro"
fi
version=`$allegro_config --version 2>/dev/null`
ret=$?
log 2 "executing $allegro_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking Allegro... not found"
# It was forced, so it should be found.
if [ "$with_allegro" != "1" ]; then
log 1 "configure: error: allegro-config couldn't be found"
log 1 "configure: error: you supplied '$with_allegro', but it seems invalid"
exit 1
fi
allegro_config=""
return 0
fi
log 1 "checking Allegro... found"
} }
@@ -2429,7 +2431,33 @@ detect_sdl() {
sleep 5 sleep 5
fi fi
detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2" if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then
sdl_config="sdl-config"
else
sdl_config="$with_sdl"
fi
version=`$sdl_config --version 2>/dev/null`
ret=$?
log 2 "executing $sdl_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking SDL... not found"
# It was forced, so it should be found.
if [ "$with_sdl" != "1" ]; then
log 1 "configure: error: sdl-config couldn't be found"
log 1 "configure: error: you supplied '$with_sdl', but it seems invalid"
exit 1
fi
sdl_config=""
return 0
fi
log 1 "checking SDL... found"
} }
detect_osx_sdk() { detect_osx_sdk() {
@@ -2610,13 +2638,10 @@ detect_library() {
fi fi
fi fi
if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then
if [ -z "$includeDir" ]; then eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
includeDir=`finddir B_SYSTEM_HEADERS_DIRECTORY`
fi
eval "$2=`ls -1 $includeDir/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
eval "res=\$$2" eval "res=\$$2"
if [ -z "$res" ]; then if [ -z "$res" ]; then
log 2 " trying $includeDir/$4$5... no" log 2 " trying /boot/common/include/$4$5... no"
fi fi
fi fi
@@ -2685,7 +2710,7 @@ detect_library() {
} }
detect_zlib() { detect_zlib() {
detect_pkg_config "$with_zlib" "zlib" "zlib_config" "1.2" detect_library "$with_zlib" "zlib" "libz.a" "" "zlib.h"
} }
detect_lzo2() { detect_lzo2() {
@@ -2693,7 +2718,7 @@ detect_lzo2() {
} }
detect_libtimidity() { detect_libtimidity() {
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1" detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
} }
detect_pkg_config() { detect_pkg_config() {
@@ -2701,7 +2726,6 @@ detect_pkg_config() {
# $2 - package name ('liblzma') # $2 - package name ('liblzma')
# $3 - config name ('lzma_config', sets $lzma_config) # $3 - config name ('lzma_config', sets $lzma_config)
# $4 - minimum module version ('2.3') # $4 - minimum module version ('2.3')
# $5 - check for dedicated, 1 is "skif if dedicated"
# 0 means no, 1 is auto-detect, 2 is force # 0 means no, 1 is auto-detect, 2 is force
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
@@ -2711,17 +2735,10 @@ detect_pkg_config() {
return 0 return 0
fi fi
if [ "$5" = "1" ] && [ "$1" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking $2... dedicated server, skipping"
eval "$3=\"\""
return 0
fi
log 2 "detecting $2" log 2 "detecting $2"
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
pkg_config_call="$pkg_config $2" pkg_config_call="pkg-config $2"
else else
pkg_config_call="$1" pkg_config_call="$1"
fi fi
@@ -2743,7 +2760,7 @@ detect_pkg_config() {
# It was forced, so it should be found. # It was forced, so it should be found.
if [ "$1" != "1" ]; then if [ "$1" != "1" ]; then
log 1 "configure: error: $pkg_config $2 couldn't be found" log 1 "configure: error: pkg-config $2 couldn't be found"
log 1 "configure: error: you supplied '$1', but it seems invalid" log 1 "configure: error: you supplied '$1', but it seems invalid"
exit 1 exit 1
fi fi
@@ -2765,11 +2782,89 @@ detect_xdg_basedir() {
} }
detect_png() { detect_png() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$with_png" = "0" ]; then
log 1 "checking libpng... disabled"
png_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_png" != "1" ]; then
log 1 "checking libpng... no zlib"
log 1 "ERROR: libpng was forced, but zlib was not detected / disabled."
log 1 "ERROR: libpng depends on zlib."
exit 1
fi
log 1 "checking libpng... no zlib, skipping"
png_config=""
return 0
fi
detect_pkg_config "$with_png" "libpng" "png_config" "1.2" detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
} }
detect_freetype() { detect_freetype() {
detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1" # 0 means no, 1 is auto-detect, 2 is force
if [ "$with_freetype" = "0" ]; then
log 1 "checking libfreetype... disabled"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfreetype... dedicated server, skipping"
freetype_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_freetype" != "1" ]; then
log 1 "checking libfreetype... no zlib"
log 1 "ERROR: libfreetype was forced, but zlib was not detected / disabled."
log 1 "ERROR: libfreetype depends on zlib."
exit 1
fi
log 1 "checking libfreetype... no zlib, skipping"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
freetype_config="freetype-config"
else
freetype_config="$with_freetype"
fi
version=`$freetype_config --version 2>/dev/null`
ret=$?
log 2 "executing freetype_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking libfreetype... not found"
# It was forced, so it should be found.
if [ "$with_freetype" != "1" ]; then
log 1 "configure: error: freetype-config couldn't be found"
log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
exit 1
fi
freetype_config=""
return 0
fi
log 1 "checking libfreetype... found"
} }
detect_fontconfig() { detect_fontconfig() {
@@ -2780,6 +2875,19 @@ detect_fontconfig() {
fontconfig_config="" fontconfig_config=""
return 0 return 0
fi fi
if [ "$with_fontconfig" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfontconfig... dedicated server, skipping"
fontconfig_config=""
return 0
fi
if [ "$with_fontconfig" != "2" ] && [ -z "$freetype_config" ]; then
log 1 "checking libfontconfig... no freetype, skipping"
fontconfig_config=""
return 0
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
log 1 "checking libfontconfig... WIN32, skipping" log 1 "checking libfontconfig... WIN32, skipping"
fontconfig_config="" fontconfig_config=""
@@ -2792,15 +2900,57 @@ detect_fontconfig() {
return 0 return 0
fi fi
detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1" detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3"
} }
detect_icu_layout() { detect_icu() {
detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1" # 0 means no, 1 is auto-detect, 2 is force
} if [ "$with_icu" = "0" ]; then
log 1 "checking libicu... disabled"
detect_icu_sort() { icu_config=""
detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1" return 0
fi
if [ "$with_icu" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libicu... dedicated server, skipping"
icu_config=""
return 0
fi
if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
icu_config="icu-config"
else
icu_config="$with_icu"
fi
version=`$icu_config --version 2>/dev/null`
ret=$?
check_version '3.6' "$version"
version_ok=$?
log 2 "executing $icu_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
log 1 "checking libicu... needs at least version 3.6.0, icu NOT enabled"
else
log 1 "checking libicu... not found"
fi
# It was forced, so it should be found.
if [ "$with_icu" != "1" ]; then
log 1 "configure: error: icu-config couldn't be found"
log 1 "configure: error: you supplied '$with_icuconfig', but it seems invalid"
exit 1
fi
icu_config=""
return 0
fi
log 1 "checking libicu... found"
} }
detect_pspconfig() { detect_pspconfig() {
@@ -3440,12 +3590,11 @@ showhelp() {
echo " --windres=WINDRES the windres to use [HOST-windres]" echo " --windres=WINDRES the windres to use [HOST-windres]"
echo " --strip=STRIP the strip to use [HOST-strip]" echo " --strip=STRIP the strip to use [HOST-strip]"
echo " --awk=AWK the awk to use in configure [awk]" echo " --awk=AWK the awk to use in configure [awk]"
echo " --pkg-config=PKG-CONFIG the pkg-config to use in configure [pkg-config]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]" echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]" echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/" echo " DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/" echo " MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
echo " MINGW/OS2/DOS/WINCE/PSP/HAIKU" echo " DOS/WINCE/PSP/HAIKU"
echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)" echo " --endian=ENDIAN set the endian of the HOST (AUTO/LE/BE)"
echo "" echo ""
echo "Paths:" echo "Paths:"
@@ -3515,30 +3664,23 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use" echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the" echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player" echo " midi-player"
echo " --with-libtimidity[=\"pkg-config libtimidity\"]" echo " --with-libtimidity enables libtimidity support"
echo " enables libtimidity support" echo " --with-allegro[=allegro-config]"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support" echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)" echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support" echo " --with-sdl[=sdl-config] enables SDL video driver support"
echo " --with-zlib[=\"pkg-config zlib\"]" echo " --with-zlib[=zlib.a] enables zlib support"
echo " enables zlib support"
echo " --with-liblzma[=\"pkg-config liblzma\"]" echo " --with-liblzma[=\"pkg-config liblzma\"]"
echo " enables liblzma support" echo " enables liblzma support"
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support" echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
echo " --with-png[=\"pkg-config libpng\"]" echo " --with-png[=libpng-config] enables libpng support"
echo " enables libpng support" echo " --with-freetype[=freetype-config]"
echo " --with-freetype[=\"pkg-config freetype2\"]"
echo " enables libfreetype support" echo " enables libfreetype support"
echo " --with-fontconfig[=\"pkg-config fontconfig\"]" echo " --with-fontconfig[=\"pkg-config fontconfig\"]"
echo " enables fontconfig support" echo " enables fontconfig support"
echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]" echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]"
echo " enables XDG base directory support" echo " enables XDG base directory support"
echo " --with-icu enables icu components for layout and sorting" echo " --with-icu[=icu-config] enables icu (used for right-to-left support)"
echo " --with-icu-layout[=\"pkg-config icu-lx\"]"
echo " enables icu components for layouting (right-to-left support)"
echo " --with-icu-sort[=\"pkg-config icu-i18n\"]"
echo " enables icu components for locale specific string sorting"
echo " --static-icu try to link statically (libsicu instead of" echo " --static-icu try to link statically (libsicu instead of"
echo " libicu; can fail as the new name is guessed)" echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support" echo " --with-iconv[=iconv-path] enables iconv support"

View File

@@ -17,7 +17,7 @@
</head> </head>
<body style="direction: ltr;"> <body style="direction: ltr;">
<h3 style="font-weight: bold;">Landscape</h3> <h3 style="font-weight: bold;">Landscape</h3>
<span style="font-weight: bold;"></span>Nine attributes hold the information about a tile. <span style="font-weight: bold;"></span>Six attributes hold the information about a tile.
This can be seen in the <a href="landscape.html">Landscape</a> document. This page tries to give an overview of used and free bits of This can be seen in the <a href="landscape.html">Landscape</a> document. This page tries to give an overview of used and free bits of
the array so you can quickly see what is used and what is not. the array so you can quickly see what is used and what is not.
<ul> <ul>

View File

@@ -70,11 +70,7 @@ ROOT_DIR=`pwd`
# Determine if we are using a modified version # Determine if we are using a modified version
# Assume the dir is not modified # Assume the dir is not modified
MODIFIED="0" MODIFIED="0"
if [ -f "$ROOT_DIR/.ottdrev" ]; then if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
# We are an exported source bundle
cat $ROOT_DIR/.ottdrev
exit
elif [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
# We are an svn checkout # We are an svn checkout
if [ -n "`svnversion | grep 'M'`" ]; then if [ -n "`svnversion | grep 'M'`" ]; then
MODIFIED="2" MODIFIED="2"
@@ -88,7 +84,7 @@ elif [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
else else
REV="r$REV_NR" REV="r$REV_NR"
fi fi
elif [ -e "$ROOT_DIR/.git" ]; then elif [ -d "$ROOT_DIR/.git" ]; then
# We are a git checkout # We are a git checkout
# Refresh the index to make sure file stat info is in sync, then look for modifications # Refresh the index to make sure file stat info is in sync, then look for modifications
git update-index --refresh >/dev/null git update-index --refresh >/dev/null
@@ -126,6 +122,10 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
# No rev? Maybe it is a custom hgsubversion clone # No rev? Maybe it is a custom hgsubversion clone
REV_NR=`LC_ALL=C HGPLAIN= hg parent --template="{svnrev}"` REV_NR=`LC_ALL=C HGPLAIN= hg parent --template="{svnrev}"`
fi fi
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
# We are an exported source bundle
cat $ROOT_DIR/.ottdrev
exit
else else
# We don't know # We don't know
MODIFIED="1" MODIFIED="1"
@@ -134,7 +134,6 @@ else
REV_NR="" REV_NR=""
fi fi
MODIFIED="0" # This prevents Andorid build from connecting to a public servers
if [ "$MODIFIED" -eq "2" ]; then if [ "$MODIFIED" -eq "2" ]; then
REV="${REV}M" REV="${REV}M"
fi fi

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs OpenTTD's known bugs
Last updated: 2016-04-01 Last updated: 2015-03-18
Release version: 1.6.0 Release version: 1.5.0-RC1
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@@ -47,7 +47,7 @@
-1 sprites/shore.png 8bpp 82 200 64 32 -31 -1 normal -1 sprites/shore.png 8bpp 82 200 64 32 -31 -1 normal
-1 sprites/shore.png 8bpp 162 200 64 31 -31 -8 normal -1 sprites/shore.png 8bpp 162 200 64 31 -31 -8 normal
-1 * 6 07 83 01 \7! 03 0C -1 * 6 07 83 01 \7! 03 0C
-1 * 52 0C "Missing shore tile graphics for the toyland climate" -1 * 44 0C "Missing shore tile graphics for the toyland climate"
-1 * 3 05 0D 0A -1 * 3 05 0D 0A
-1 sprites/shore.png 8bpp 290 200 64 15 -31 0 normal -1 sprites/shore.png 8bpp 290 200 64 15 -31 0 normal
-1 sprites/shore.png 8bpp 370 200 64 31 -31 -8 normal -1 sprites/shore.png 8bpp 370 200 64 31 -31 -8 normal

View File

@@ -9,4 +9,4 @@ Exec=!!TTD!!
Terminal=false Terminal=false
Categories=!!MENU_GROUP!! Categories=!!MENU_GROUP!!
Comment=A clone of Transport Tycoon Deluxe Comment=A clone of Transport Tycoon Deluxe
Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo; Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo

View File

@@ -1,57 +1,3 @@
openttd (1.6.0-0) unstable; urgency=low
* New upstream release 1.6.0
-- OpenTTD <info@openttd.org> Fri, 01 Apr 2016 21:00:00 +0200
openttd (1.6.0~RC1-0) unstable; urgency=low
* New upstream release 1.6.0-RC1
-- OpenTTD <info@openttd.org> Tue, 01 Mar 2016 21:00:00 +0100
openttd (1.5.3-0) unstable; urgency=low
* New upstream release 1.5.3
-- OpenTTD <info@openttd.org> 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 <info@openttd.org> Sun, 01 Nov 2015 14:00:00 +0100
openttd (1.5.2-0) unstable; urgency=low
* New upstream release 1.5.2
-- OpenTTD <info@openttd.org> 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 <info@openttd.org> Sat, 01 Aug 2015 13:00:00 +0200
openttd (1.5.1-0) unstable; urgency=low
* New upstream release 1.5.1
-- OpenTTD <info@openttd.org> 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 <info@openttd.org> Fri, 08 May 2015 21:00:00 +0200
openttd (1.5.0-0) unstable; urgency=low
* New upstream release 1.5.0
-- OpenTTD <info@openttd.org> Wed, 01 Apr 2015 21:00:00 +0200
openttd (1.5.0~RC1-0) unstable; urgency=low openttd (1.5.0~RC1-0) unstable; urgency=low
* New upstream release 1.5.0-RC1 * New upstream release 1.5.0-RC1

View File

@@ -1,6 +1,6 @@
@echo off @echo off
set OPENTTD_VERSION=1.6.0 set OPENTTD_VERSION=1.5.0
set OPENSFX_VERSION=0.8.0 set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0 set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=1.2.0 set OPENGFX_VERSION=1.2.0

View File

@@ -17,9 +17,9 @@
# #
Name: openttd Name: openttd
Version: 1.6.beta1 Version: 1.5.beta1
Release: 0 Release: 0
%define srcver 1.6.0-beta1 %define srcver 1.5.0-beta1
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0 License: GPL-2.0
Group: Amusements/Games/Strategy/Other Group: Amusements/Games/Strategy/Other

View File

@@ -1,9 +1,9 @@
# Version numbers to update # Version numbers to update
!define APPV_MAJOR 1 !define APPV_MAJOR 1
!define APPV_MINOR 6 !define APPV_MINOR 5
!define APPV_MAINT 0 !define APPV_MAINT 0
!define APPV_BUILD 1 !define APPV_BUILD 2
!define APPV_EXTRA "" !define APPV_EXTRA "-RC1"
!define APPNAME "OpenTTD" ; Define application name !define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version !define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version

View File

@@ -22,15 +22,6 @@ then
exit 1 exit 1
fi fi
# openttd_vs140.sln is for MSVC 2015
# openttd_vs140.vcxproj is for MSVC 2015
# openttd_vs140.vcxproj.filters is for MSVC 2015
# langs_vs140.vcxproj is for MSVC 2015
# strgen_vs140.vcxproj is for MSVC 2015
# strgen_vs140.vcxproj.filters is for MSVC 2015
# generate_vs140.vcxproj is for MSVC 2015
# version_vs140.vcxproj is for MSVC 2015
# openttd_vs100.sln is for MSVC 2010 # openttd_vs100.sln is for MSVC 2010
# openttd_vs100.vcxproj is for MSVC 2010 # openttd_vs100.vcxproj is for MSVC 2010
# openttd_vs100.vcxproj.filters is for MSVC 2010 # openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -315,17 +306,11 @@ generate "$openttd" "openttd_vs80.vcproj"
generate "$openttd" "openttd_vs90.vcproj" generate "$openttd" "openttd_vs90.vcproj"
generate "$openttdvcxproj" "openttd_vs100.vcxproj" generate "$openttdvcxproj" "openttd_vs100.vcxproj"
generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters" generate "$openttdfiles" "openttd_vs100.vcxproj.filters" "$openttdfilters"
generate "$openttdvcxproj" "openttd_vs140.vcxproj"
generate "$openttdfiles" "openttd_vs140.vcxproj.filters" "$openttdfilters"
generate "$lang" "langs_vs80.vcproj" generate "$lang" "langs_vs80.vcproj"
generate "$lang" "langs_vs90.vcproj" generate "$lang" "langs_vs90.vcproj"
generate "$langvcxproj" "langs_vs100.vcxproj" generate "$langvcxproj" "langs_vs100.vcxproj"
generate "$langfiles" "langs_vs100.vcxproj.filters" generate "$langfiles" "langs_vs100.vcxproj.filters"
generate "$langvcxproj" "langs_vs140.vcxproj"
generate "$langfiles" "langs_vs140.vcxproj.filters"
generate "$settings" "settings_vs80.vcproj" "$settingscommand" generate "$settings" "settings_vs80.vcproj" "$settingscommand"
generate "$settings" "settings_vs90.vcproj" "$settingscommand" generate "$settings" "settings_vs90.vcproj" "$settingscommand"
generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand" generate "$settingsvcxproj" "settings_vs100.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs100.vcxproj.filters" generate "$settingsfiles" "settings_vs100.vcxproj.filters"
generate "$settingsvcxproj" "settings_vs140.vcxproj" "$settingscommand"
generate "$settingsfiles" "settings_vs140.vcxproj.filters"

View File

@@ -10,15 +10,6 @@ Option Explicit
Dim FSO Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject") Set FSO = CreateObject("Scripting.FileSystemObject")
' openttd_vs140.sln is for MSVC 2015
' openttd_vs140.vcxproj is for MSVC 2015
' openttd_vs140.vcxproj.filters is for MSVC 2015
' langs_vs140.vcxproj is for MSVC 2015
' strgen_vs140.vcxproj is for MSVC 2015
' strgen_vs140.vcxproj.filters is for MSVC 2015
' generate_vs140.vcxproj is for MSVC 2015
' version_vs140.vcxproj is for MSVC 2015
' openttd_vs100.sln is for MSVC 2010 ' openttd_vs100.sln is for MSVC 2010
' openttd_vs100.vcxproj is for MSVC 2010 ' openttd_vs100.vcxproj is for MSVC 2010
' openttd_vs100.vcxproj.filters is for MSVC 2010 ' openttd_vs100.vcxproj.filters is for MSVC 2010
@@ -378,8 +369,6 @@ generate openttd, ROOT_DIR & "/projects/openttd_vs80.vcproj", Null
generate openttd, ROOT_DIR & "/projects/openttd_vs90.vcproj", Null generate openttd, ROOT_DIR & "/projects/openttd_vs90.vcproj", Null
generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs100.vcxproj", Null generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs100.vcxproj", Null
generate openttdfiles, ROOT_DIR & "/projects/openttd_vs100.vcxproj.filters", openttdfilters generate openttdfiles, ROOT_DIR & "/projects/openttd_vs100.vcxproj.filters", openttdfilters
generate openttdvcxproj, ROOT_DIR & "/projects/openttd_vs140.vcxproj", Null
generate openttdfiles, ROOT_DIR & "/projects/openttd_vs140.vcxproj.filters", openttdfilters
Dim lang, langvcxproj, langfiles Dim lang, langvcxproj, langfiles
lang = load_lang_data(ROOT_DIR & "/src/lang", langvcxproj, langfiles) lang = load_lang_data(ROOT_DIR & "/src/lang", langvcxproj, langfiles)
@@ -387,8 +376,6 @@ generate lang, ROOT_DIR & "/projects/langs_vs80.vcproj", Null
generate lang, ROOT_DIR & "/projects/langs_vs90.vcproj", Null generate lang, ROOT_DIR & "/projects/langs_vs90.vcproj", Null
generate langvcxproj, ROOT_DIR & "/projects/langs_vs100.vcxproj", Null generate langvcxproj, ROOT_DIR & "/projects/langs_vs100.vcxproj", Null
generate langfiles, ROOT_DIR & "/projects/langs_vs100.vcxproj.filters", Null generate langfiles, ROOT_DIR & "/projects/langs_vs100.vcxproj.filters", Null
generate langvcxproj, ROOT_DIR & "/projects/langs_vs140.vcxproj", Null
generate langfiles, ROOT_DIR & "/projects/langs_vs140.vcxproj.filters", Null
Dim settings, settingsvcxproj, settingscommand, settingsfiles Dim settings, settingsvcxproj, settingscommand, settingsfiles
settings = load_settings_data(ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles) settings = load_settings_data(ROOT_DIR & "/src/table", settingsvcxproj, settingscommand, settingsfiles)
@@ -396,5 +383,3 @@ generate settings, ROOT_DIR & "/projects/settings_vs80.vcproj", settingscommand
generate settings, ROOT_DIR & "/projects/settings_vs90.vcproj", settingscommand generate settings, ROOT_DIR & "/projects/settings_vs90.vcproj", settingscommand
generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs100.vcxproj", settingscommand generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs100.vcxproj", settingscommand
generate settingsfiles, ROOT_DIR & "/projects/settings_vs100.vcxproj.filters", Null generate settingsfiles, ROOT_DIR & "/projects/settings_vs100.vcxproj.filters", Null
generate settingsvcxproj, ROOT_DIR & "/projects/settings_vs140.vcxproj", settingscommand
generate settingsfiles, ROOT_DIR & "/projects/settings_vs140.vcxproj.filters", Null

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>generate</ProjectName>
<ProjectGuid>{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}</ProjectGuid>
<RootNamespace>generate</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\source.list">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Running %27generate.vbs%27 ...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)generate.vbs"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)openttd_vs80.vcproj;$(SolutionDir)openttd_vs90.vcproj;$(SolutionDir)openttd_vs100.vcxproj;$(SolutionDir)openttd_vs100.vcxproj.filters;$(SolutionDir)langs_vs80.vcproj;$(SolutionDir)langs_vs90.vcproj;$(SolutionDir)langs_vs100.vcxproj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,384 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>langs</ProjectName>
<ProjectGuid>{0F066B23-18DF-4284-8265-F4A5E7E3B966}</ProjectGuid>
<RootNamespace>langs</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\langs\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Message>Generating strings.h</Message>
<Command>..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table</Command>
</PreBuildEvent>
<Midl>
<TypeLibraryName>./langs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\afrikaans.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating afrikaans language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\afrikaans.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\arabic_egypt.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating arabic_egypt language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\arabic_egypt.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating basque language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\basque.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating belarusian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\belarusian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\brazilian_portuguese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating brazilian_portuguese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\brazilian_portuguese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\bulgarian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating bulgarian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\bulgarian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\catalan.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating catalan language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\catalan.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\croatian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating croatian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\croatian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\czech.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating czech language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\czech.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\danish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating danish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\danish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\dutch.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating dutch language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\dutch.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_AU.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english_AU language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english_AU.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_US.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english_US language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english_US.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\esperanto.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating esperanto language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\esperanto.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\estonian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating estonian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\estonian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\faroese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating faroese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\faroese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\finnish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating finnish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\finnish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\french.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating french language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\french.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\gaelic.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating gaelic language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\gaelic.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\galician.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating galician language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\galician.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\german.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating german language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\german.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\greek.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating greek language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\greek.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\hebrew.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating hebrew language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\hebrew.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\hungarian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating hungarian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\hungarian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\icelandic.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating icelandic language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\icelandic.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\indonesian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating indonesian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\indonesian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\irish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating irish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\irish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\italian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating italian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\italian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\japanese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating japanese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\japanese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\korean.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating korean language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\korean.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\latin.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating latin language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\latin.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\latvian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating latvian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\latvian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\lithuanian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating lithuanian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\lithuanian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\luxembourgish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating luxembourgish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\luxembourgish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\malay.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating malay language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\malay.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_bokmal.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating norwegian_bokmal language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\norwegian_bokmal.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_nynorsk.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating norwegian_nynorsk language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\norwegian_nynorsk.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\polish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating polish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\polish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\portuguese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating portuguese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\portuguese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\romanian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating romanian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\romanian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\russian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating russian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\russian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\serbian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating serbian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\serbian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\simplified_chinese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating simplified_chinese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\simplified_chinese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovak.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating slovak language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovak.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovenian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating slovenian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\slovenian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\spanish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating swedish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\swedish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\tamil.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating tamil language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\tamil.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\thai.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating thai language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\thai.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\traditional_chinese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating traditional_chinese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\traditional_chinese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\turkish.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating turkish language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\turkish.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\ukrainian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating ukrainian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\ukrainian.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\vietnamese.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating vietnamese language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\vietnamese.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\welsh.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating welsh language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\welsh.lng;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,173 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Translations">
<UniqueIdentifier>{2a164580-9033-4a01-974b-b21da507efda}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt" />
<CustomBuild Include="..\src\lang\afrikaans.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\arabic_egypt.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\brazilian_portuguese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\bulgarian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\catalan.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\croatian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\czech.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\danish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\dutch.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_AU.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\english_US.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\esperanto.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\estonian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\faroese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\finnish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\french.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\gaelic.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\galician.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\german.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\greek.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\hebrew.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\hungarian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\icelandic.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\indonesian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\irish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\italian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\japanese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\korean.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\latin.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\latvian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\lithuanian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\luxembourgish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\malay.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_bokmal.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\norwegian_nynorsk.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\polish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\portuguese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\romanian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\russian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\serbian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\simplified_chinese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovak.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\slovenian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\swedish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\tamil.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\thai.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\traditional_chinese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\turkish.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\ukrainian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\vietnamese.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\welsh.txt">
<Filter>Translations</Filter>
</CustomBuild>
</ItemGroup>
</Project>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Translations">
<UniqueIdentifier>{2a164580-9033-4a01-974b-b21da507efda}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt" />
!!FILES!!
</ItemGroup>
</Project>

View File

@@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>langs</ProjectName>
<ProjectGuid>{0F066B23-18DF-4284-8265-F4A5E7E3B966}</ProjectGuid>
<RootNamespace>langs</RootNamespace>
<Keyword>MakeFileProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\langs\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Message>Generating strings.h</Message>
<Command>..\objs\strgen\strgen.exe -s ..\src\lang -d ..\objs\langs\table</Command>
</PreBuildEvent>
<Midl>
<TypeLibraryName>./langs.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\src\lang\english.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating english language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\english.lng;%(Outputs)</Outputs>
</CustomBuild>
!!FILES!!
</ItemGroup>
<ItemGroup>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -626,7 +626,6 @@
<ClInclude Include="..\src\tilehighlight_type.h" /> <ClInclude Include="..\src\tilehighlight_type.h" />
<ClInclude Include="..\src\tilematrix_type.hpp" /> <ClInclude Include="..\src\tilematrix_type.hpp" />
<ClInclude Include="..\src\timetable.h" /> <ClInclude Include="..\src\timetable.h" />
<ClInclude Include="..\src\toolbar_type.h" />
<ClInclude Include="..\src\toolbar_gui.h" /> <ClInclude Include="..\src\toolbar_gui.h" />
<ClInclude Include="..\src\town.h" /> <ClInclude Include="..\src\town.h" />
<ClInclude Include="..\src\town_type.h" /> <ClInclude Include="..\src\town_type.h" />
@@ -899,7 +898,6 @@
<ClInclude Include="..\src\table\sprites.h" /> <ClInclude Include="..\src\table\sprites.h" />
<ClInclude Include="..\src\table\station_land.h" /> <ClInclude Include="..\src\table\station_land.h" />
<ClInclude Include="..\src\table\strgen_tables.h" /> <ClInclude Include="..\src\table\strgen_tables.h" />
<ClInclude Include="..\src\table\string_colours.h" />
<ClInclude Include="..\src\..\objs\langs\table\strings.h" /> <ClInclude Include="..\src\..\objs\langs\table\strings.h" />
<ClInclude Include="..\src\table\town_land.h" /> <ClInclude Include="..\src\table\town_land.h" />
<ClInclude Include="..\src\table\townname.h" /> <ClInclude Include="..\src\table\townname.h" />

View File

@@ -1107,9 +1107,6 @@
<ClInclude Include="..\src\timetable.h"> <ClInclude Include="..\src\timetable.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\toolbar_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\toolbar_gui.h"> <ClInclude Include="..\src\toolbar_gui.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@@ -1926,9 +1923,6 @@
<ClInclude Include="..\src\table\strgen_tables.h"> <ClInclude Include="..\src\table\strgen_tables.h">
<Filter>Tables</Filter> <Filter>Tables</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\table\string_colours.h">
<Filter>Tables</Filter>
</ClInclude>
<ClInclude Include="..\src\..\objs\langs\table\strings.h"> <ClInclude Include="..\src\..\objs\langs\table\strings.h">
<Filter>Tables</Filter> <Filter>Tables</Filter>
</ClInclude> </ClInclude>

View File

@@ -1,94 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openttd", "openttd_vs140.vcxproj", "{668328A0-B40E-4CDB-BD72-D0064424414A}"
ProjectSection(ProjectDependencies) = postProject
{0817F629-589E-4A3B-B81A-8647BC571E35} = {0817F629-589E-4A3B-B81A-8647BC571E35}
{E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strgen", "strgen_vs140.vcxproj", "{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "langs", "langs_vs140.vcxproj", "{0F066B23-18DF-4284-8265-F4A5E7E3B966}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version_vs140.vcxproj", "{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate", "generate_vs140.vcxproj", "{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settings", "settings_vs140.vcxproj", "{0817F629-589E-4A3B-B81A-8647BC571E35}"
ProjectSection(ProjectDependencies) = postProject
{E9548DE9-F089-49B7-93A6-30BE2CC311C7} = {E9548DE9-F089-49B7-93A6-30BE2CC311C7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settingsgen", "settingsgen_vs140.vcxproj", "{E9548DE9-F089-49B7-93A6-30BE2CC311C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.ActiveCfg = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|Win32.Build.0 = Debug|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.ActiveCfg = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Debug|x64.Build.0 = Debug|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.ActiveCfg = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|Win32.Build.0 = Release|Win32
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.ActiveCfg = Release|x64
{668328A0-B40E-4CDB-BD72-D0064424414A}.Release|x64.Build.0 = Release|x64
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|Win32.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Debug|x64.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|Win32.Build.0 = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.ActiveCfg = Debug|Win32
{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}.Release|x64.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|Win32.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Debug|x64.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|Win32.Build.0 = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.ActiveCfg = Debug|Win32
{0F066B23-18DF-4284-8265-F4A5E7E3B966}.Release|x64.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|Win32.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Debug|x64.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|Win32.Build.0 = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.ActiveCfg = Debug|Win32
{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}.Release|x64.Build.0 = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|Win32.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Debug|x64.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|Win32.ActiveCfg = Debug|Win32
{2F31FD79-D1AC-43C4-89F3-B0D5E4E53E34}.Release|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|Win32.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Debug|x64.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|Win32.Build.0 = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.ActiveCfg = Debug|Win32
{0817F629-589E-4A3B-B81A-8647BC571E35}.Release|x64.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|Win32.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Debug|x64.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|Win32.Build.0 = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.ActiveCfg = Debug|Win32
{E9548DE9-F089-49B7-93A6-30BE2CC311C7}.Release|x64.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection
EndGlobal

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
!!FILTERS!!
</ItemGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />
<None Include="..\readme.txt" />
</ItemGroup>
</Project>

View File

@@ -1,332 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>openttd</ProjectName>
<ProjectGuid>{668328A0-B40E-4CDB-BD72-D0064424414A}</ProjectGuid>
<RootNamespace>openttd</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\objs\$(Platform)\$(Configuration)\</OutDir>
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<TypeLibraryName>.\Release/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<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)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>4Bytes</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\Debug/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<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)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<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)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StructMemberAlignment>Default</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>FastCall</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<OptimizeReferences>true</OptimizeReferences>
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/openttd.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/J /Zc:throwingNew %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalIncludeDirectories>..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<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)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>false</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CallingConvention>Cdecl</CallingConvention>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0809</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>winmm.lib;ws2_32.lib;imm32.lib;libpng.lib;zlibstat.lib;lzo2.lib;liblzma.lib;libfreetype2.lib;icuuc.lib;icuin.lib;icudt.lib;icule.lib;iculx.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>1048576</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\media\openttd.ico" />
<None Include="..\readme.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="langs_vs100.vcxproj">
<Project>{0f066b23-18df-4284-8265-f4a5e7e3b966}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="strgen_vs100.vcxproj">
<Project>{a133a442-bd0a-4ade-b117-ad7545e4bdd1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="version_vs100.vcxproj">
<Project>{1a2b3c5e-1c23-41a5-9c9b-acba2aa75fec}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -1778,10 +1778,6 @@
RelativePath=".\..\src\timetable.h" RelativePath=".\..\src\timetable.h"
> >
</File> </File>
<File
RelativePath=".\..\src\toolbar_type.h"
>
</File>
<File <File
RelativePath=".\..\src\toolbar_gui.h" RelativePath=".\..\src\toolbar_gui.h"
> >
@@ -2894,10 +2890,6 @@
RelativePath=".\..\src\table\strgen_tables.h" RelativePath=".\..\src\table\strgen_tables.h"
> >
</File> </File>
<File
RelativePath=".\..\src\table\string_colours.h"
>
</File>
<File <File
RelativePath=".\..\src\..\objs\langs\table\strings.h" RelativePath=".\..\src\..\objs\langs\table\strings.h"
> >

View File

@@ -1775,10 +1775,6 @@
RelativePath=".\..\src\timetable.h" RelativePath=".\..\src\timetable.h"
> >
</File> </File>
<File
RelativePath=".\..\src\toolbar_type.h"
>
</File>
<File <File
RelativePath=".\..\src\toolbar_gui.h" RelativePath=".\..\src\toolbar_gui.h"
> >
@@ -2891,10 +2887,6 @@
RelativePath=".\..\src\table\strgen_tables.h" RelativePath=".\..\src\table\strgen_tables.h"
> >
</File> </File>
<File
RelativePath=".\..\src\table\string_colours.h"
>
</File>
<File <File
RelativePath=".\..\src\..\objs\langs\table\strings.h" RelativePath=".\..\src\..\objs\langs\table\strings.h"
> >

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settings</ProjectName>
<ProjectGuid>{0817F629-589E-4A3B-B81A-8647BC571E35}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<SettingsCommandLine>
..\objs\settings\settings_gen.exe -o ..\objs\settings\table\settings.h -b ..\src\table\settings.h.preamble -a ..\src\table\settings.h.postamble ..\src\table\company_settings.ini ..\src\table\currency_settings.ini ..\src\table\gameopt_settings.ini ..\src\table\misc_settings.ini ..\src\table\settings.ini ..\src\table\win32_settings.ini ..\src\table\window_settings.ini
</SettingsCommandLine>
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\objs\settings\table\settings.h</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\settings.h</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<None Include="..\src\table\company_settings.ini" />
<None Include="..\src\table\currency_settings.ini" />
<None Include="..\src\table\gameopt_settings.ini" />
<None Include="..\src\table\misc_settings.ini" />
<None Include="..\src\table\settings.ini" />
<None Include="..\src\table\win32_settings.ini" />
<None Include="..\src\table\window_settings.ini" />
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="INI">
<UniqueIdentifier>{21deca6c-8df4-4f34-9dad-17d7781cd5a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\company_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\currency_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\gameopt_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\misc_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\win32_settings.ini">
<Filter>INI</Filter>
</None>
<None Include="..\src\table\window_settings.ini">
<Filter>INI</Filter>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
</Project>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="INI">
<UniqueIdentifier>{21deca6c-8df4-4f34-9dad-17d7781cd5a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
</Project>

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settings</ProjectName>
<ProjectGuid>{0817F629-589E-4A3B-B81A-8647BC571E35}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<SettingsCommandLine>
!!FILTERS!!
</SettingsCommandLine>
</PropertyGroup>
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SettingsCommandLine)</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\objs\settings\table\settings.h</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\table\settings.h</NMakeOutput>
</PropertyGroup>
<ItemGroup>
!!FILES!!
</ItemGroup>
<ItemGroup>
<None Include="..\src\table\settings.h.postamble" />
<None Include="..\src\table\settings.h.preamble" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,83 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>settingsgen</ProjectName>
<ProjectGuid>{E9548DE9-F089-49B7-93A6-30BE2CC311C7}</ProjectGuid>
<RootNamespace>settings</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\settings\</IntDir>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">settings_gen</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<CustomBuildStep>
<Inputs>%(Inputs)</Inputs>
</CustomBuildStep>
<ClCompile>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<PreprocessorDefinitions>SETTINGSGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerOutput>All</AssemblerOutput>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<OutputFile>$(OutDir)settings_gen.exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<SubSystem>Console</SubSystem>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp" />
<ClCompile Include="..\src\misc\getoptdata.cpp" />
<ClCompile Include="..\src\ini_load.cpp" />
<ClCompile Include="..\src\settingsgen\settingsgen.cpp" />
<ClCompile Include="..\src\string.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\misc\getoptdata.h" />
<ClInclude Include="..\src\ini_type.h" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\strings_type.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{a4678737-b3b3-4be5-9db1-fa6ccd164c59}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\getoptdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\ini_load.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\settingsgen\settingsgen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\misc\getoptdata.h" />
<ClInclude Include="..\src\ini_type.h" />
<ClInclude Include="..\src\core\smallvec_type.hpp" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\strings_type.h" />
</ItemGroup>
</Project>

View File

@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>strgen</ProjectName>
<ProjectGuid>{A133A442-BD0A-4ADE-B117-AD7545E4BDD1}</ProjectGuid>
<RootNamespace>strgen</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\strgen\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<TypeLibraryName>.\Debug/strgen.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>MinSpace</Optimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<PreprocessorDefinitions>STRGEN;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x041d</Culture>
</ResourceCompile>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)strgen.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp" />
<ClCompile Include="..\src\strgen\strgen_base.cpp" />
<ClCompile Include="..\src\strgen\strgen.cpp" />
<ClCompile Include="..\src\string.cpp" />
<ClCompile Include="..\src\misc\getoptdata.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\core\alloc_func.hpp" />
<ClInclude Include="..\src\table\control_codes.h" />
<ClInclude Include="..\src\debug.h" />
<ClInclude Include="..\src\core\endian_func.hpp" />
<ClInclude Include="..\src\stdafx.h" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\misc\getoptdata.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{5894294c-d4dc-41f0-be31-e56cff4e0405}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\core\alloc_func.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\strgen\strgen_base.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\strgen\strgen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\misc\getoptdata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\core\alloc_func.hpp" />
<ClInclude Include="..\src\table\control_codes.h" />
<ClInclude Include="..\src\debug.h" />
<ClInclude Include="..\src\core\endian_func.hpp" />
<ClInclude Include="..\src\stdafx.h" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\misc\getoptdata.h" />
</ItemGroup>
</Project>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>version</ProjectName>
<ProjectGuid>{1A2B3C5E-1C23-41A5-9C9B-ACBA2AA75FEC}</ProjectGuid>
<RootNamespace>version</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\version\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\objs\version\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)/determineversion.vbs"</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cscript "$(ProjectDir)/determineversion.vbs"</NMakeReBuildCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\rev.cpp</NMakeOutput>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">del ..\src\rev.cpp</NMakeCleanCommandLine>
</PropertyGroup>
<ItemGroup>
<None Include="..\src\os\windows\ottdres.rc.in" />
<None Include="..\src\rev.cpp.in" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,5 +1,5 @@
Last updated: 2016-04-01 Last updated: 2015-03-18
Release version: 1.6.0 Release version: 1.5.0-RC1
------------------------------------------------------------------------ ------------------------------------------------------------------------
@@ -308,9 +308,9 @@ chosen main OpenTTD directory:
32bpp Sets: newgrf (or a subdirectory thereof) 32bpp Sets: newgrf (or a subdirectory thereof)
Music Sets: baseset (or a subdirectory thereof) Music Sets: baseset (or a subdirectory thereof)
AIs: ai (or a subdirectory thereof) AIs: ai (or a subdirectory thereof)
AI Libraries: ai/library (or a subdirectory thereof) AI Libraries: ai/libraries (or a subdirectory thereof)
Game Scripts (GS): game (or a subdirectory thereof) Game Scripts (GS): game (or a subdirectory thereof)
GS Libraries: game/library (or a subdirectory thereof) GS Libraries: game/libraries (or a subdirectory thereof)
Savegames: save Savegames: save
Automatic Savegames: save/autosave Automatic Savegames: save/autosave
Scenarios: scenario Scenarios: scenario

View File

@@ -93,7 +93,6 @@ tgp.cpp
tile_map.cpp tile_map.cpp
tilearea.cpp tilearea.cpp
townname.cpp townname.cpp
tutorial_gui.cpp
#if WIN32 #if WIN32
#else #else
#if WINCE #if WINCE
@@ -144,7 +143,6 @@ base_media_func.h
base_station_base.h base_station_base.h
bmp.h bmp.h
bridge.h bridge.h
build_confirmation_func.h
cargo_type.h cargo_type.h
cargoaction.h cargoaction.h
cargomonitor.h cargomonitor.h
@@ -367,7 +365,6 @@ tilehighlight_func.h
tilehighlight_type.h tilehighlight_type.h
tilematrix_type.hpp tilematrix_type.hpp
timetable.h timetable.h
toolbar_type.h
toolbar_gui.h toolbar_gui.h
town.h town.h
town_type.h town_type.h
@@ -454,7 +451,6 @@ airport_gui.cpp
autoreplace_gui.cpp autoreplace_gui.cpp
bootstrap_gui.cpp bootstrap_gui.cpp
bridge_gui.cpp bridge_gui.cpp
build_confirmation_gui.cpp
build_vehicle_gui.cpp build_vehicle_gui.cpp
cheat_gui.cpp cheat_gui.cpp
company_gui.cpp company_gui.cpp
@@ -668,7 +664,6 @@ table/roadveh_movement.h
table/sprites.h table/sprites.h
table/station_land.h table/station_land.h
table/strgen_tables.h table/strgen_tables.h
table/string_colours.h
../objs/langs/table/strings.h ../objs/langs/table/strings.h
table/town_land.h table/town_land.h
table/townname.h table/townname.h
@@ -910,12 +905,6 @@ script/api/script_window.cpp
# Blitters # Blitters
#if DEDICATED #if DEDICATED
#else #else
blitter/16bpp_base.cpp
blitter/16bpp_base.hpp
blitter/16bpp_anim.cpp
blitter/16bpp_anim.hpp
blitter/16bpp_simple.cpp
blitter/16bpp_simple.hpp
blitter/32bpp_anim.cpp blitter/32bpp_anim.cpp
blitter/32bpp_anim.hpp blitter/32bpp_anim.hpp
#if SSE #if SSE
@@ -1123,7 +1112,7 @@ music/null_m.cpp
#else #else
#if MORPHOS #if MORPHOS
#else #else
music/libtimidity.cpp music/extmidi.cpp
#end #end
#end #end
#end #end

View File

@@ -1261,28 +1261,10 @@ struct BufState{
WChar buf_lexfeed(SQUserPointer file) WChar buf_lexfeed(SQUserPointer file)
{ {
/* Convert an UTF-8 character into a WChar */ BufState *buf=(BufState*)file;
BufState *buf = (BufState *)file; if(buf->size<(buf->ptr+1))
const char *p = &buf->buf[buf->ptr]; return 0;
return buf->buf[buf->ptr++];
if (buf->size < buf->ptr + 1) return 0;
/* Read the first character, and get the length based on UTF-8 specs. If invalid, bail out. */
uint len = Utf8EncodedCharLen(*p);
if (len == 0) {
buf->ptr++;
return -1;
}
/* Read the remaining bits. */
if (buf->size < buf->ptr + len) return 0;
buf->ptr += len;
/* Convert the character, and when definitely invalid, bail out as well. */
WChar c;
if (Utf8Decode(&c, p) != len) return -1;
return c;
} }
SQRESULT sq_compilebuffer(HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,SQBool raiseerror) { SQRESULT sq_compilebuffer(HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,SQBool raiseerror) {

View File

@@ -57,7 +57,7 @@ typedef sqvector<ExpState> ExpStateVec;
class SQCompiler class SQCompiler
{ {
public: public:
SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _token(0), _fs(NULL), _lex(_ss(v), rg, up, ThrowError, this), _debugline(0), _debugop(0) SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _lex(_ss(v), rg, up,ThrowError,this)
{ {
_vm=v; _vm=v;
_sourcename = SQString::Create(_ss(v), sourcename); _sourcename = SQString::Create(_ss(v), sourcename);

View File

@@ -108,7 +108,7 @@ struct AIListWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{ {
if (widget == WID_AIL_LIST) { if (widget == WID_AIL_LIST) {
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM); this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
resize->width = 1; resize->width = 1;
resize->height = this->line_height; resize->height = this->line_height;
@@ -121,16 +121,16 @@ struct AIListWindow : public Window {
switch (widget) { switch (widget) {
case WID_AIL_LIST: { case WID_AIL_LIST: {
/* Draw a list of all available AIs. */ /* Draw a list of all available AIs. */
int y = Center(r.top, this->line_height); int y = this->GetWidget<NWidgetBase>(WID_AIL_LIST)->pos_y;
/* First AI in the list is hardcoded to random */ /* First AI in the list is hardcoded to random */
if (this->vscroll->IsVisible(0)) { if (this->vscroll->IsVisible(0)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE); DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y + WD_MATRIX_TOP, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
y += this->line_height; y += this->line_height;
} }
ScriptInfoList::const_iterator it = this->info_list->begin(); ScriptInfoList::const_iterator it = this->info_list->begin();
for (int i = 1; it != this->info_list->end(); i++, it++) { for (int i = 1; it != this->info_list->end(); i++, it++) {
if (this->vscroll->IsVisible(i)) { if (this->vscroll->IsVisible(i)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE); DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
y += this->line_height; y += this->line_height;
} }
} }
@@ -346,7 +346,7 @@ struct AISettingsWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{ {
if (widget == WID_AIS_BACKGROUND) { if (widget == WID_AIS_BACKGROUND) {
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM); this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
resize->width = 1; resize->width = 1;
resize->height = this->line_height; resize->height = this->line_height;
@@ -368,6 +368,7 @@ struct AISettingsWindow : public Window {
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : SETTING_BUTTON_WIDTH + 8); uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : SETTING_BUTTON_WIDTH + 8);
uint text_right = r.right - (rtl ? SETTING_BUTTON_WIDTH + 8 : WD_FRAMERECT_RIGHT); uint text_right = r.right - (rtl ? SETTING_BUTTON_WIDTH + 8 : WD_FRAMERECT_RIGHT);
int y = r.top; int y = r.top;
int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2; int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2;
int text_y_offset = (this->line_height - FONT_HEIGHT_NORMAL) / 2; int text_y_offset = (this->line_height - FONT_HEIGHT_NORMAL) / 2;
@@ -412,7 +413,7 @@ struct AISettingsWindow : public Window {
} }
} }
DrawString(text_left, text_right, Center(y, this->line_height), str, colour); DrawString(text_left, text_right, y + text_y_offset, str, colour);
y += this->line_height; y += this->line_height;
} }
} }
@@ -660,41 +661,39 @@ static const NWidgetPart _nested_ai_config_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(), EndContainer(),
NWidget(WWT_PANEL, COLOUR_MAUVE, WID_AIC_BACKGROUND), NWidget(WWT_PANEL, COLOUR_MAUVE, WID_AIC_BACKGROUND),
NWidget(NWID_HORIZONTAL), SetPIP(7, 7, 7), NWidget(NWID_VERTICAL), SetPIP(4, 4, 4),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5), NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR), NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR), NWidget(NWID_SPACER), SetMinimalSize(6, 0),
EndContainer(), NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
EndContainer(), EndContainer(),
NWidget(NWID_VERTICAL), SetPIP(4, 4, 4), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL), NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
NWidget(NWID_SPACER), SetMinimalSize(6, 0),
NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetSizingType(NWST_STEP), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(), EndContainer(),
}; };
@@ -759,12 +758,12 @@ struct AIConfigWindow : public Window {
{ {
switch (widget) { switch (widget) {
case WID_AIC_GAMELIST: case WID_AIC_GAMELIST:
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM); this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = this->line_height; size->height = 1 * this->line_height;
break; break;
case WID_AIC_LIST: case WID_AIC_LIST:
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM); this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = 8 * this->line_height; size->height = 8 * this->line_height;
break; break;
} }
@@ -802,14 +801,14 @@ struct AIConfigWindow : public Window {
text = STR_JUST_RAW_STRING; text = STR_JUST_RAW_STRING;
} }
DrawString(r.left + 10, r.right - 10, Center(r.top, this->line_height), text, DrawString(r.left + 10, r.right - 10, r.top + WD_MATRIX_TOP, text,
(this->selected_slot == OWNER_DEITY) ? TC_WHITE : (IsEditable(OWNER_DEITY) ? TC_ORANGE : TC_SILVER)); (this->selected_slot == OWNER_DEITY) ? TC_WHITE : (IsEditable(OWNER_DEITY) ? TC_ORANGE : TC_SILVER));
break; break;
} }
case WID_AIC_LIST: { case WID_AIC_LIST: {
int y = Center(r.top, this->line_height); int y = r.top;
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) { for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) {
StringID text; StringID text;
@@ -821,7 +820,7 @@ struct AIConfigWindow : public Window {
} else { } else {
text = STR_AI_CONFIG_RANDOM_AI; text = STR_AI_CONFIG_RANDOM_AI;
} }
DrawString(r.left + 10, r.right - 10, y, text, DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, text,
(this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER)); (this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER));
y += this->line_height; y += this->line_height;
} }
@@ -902,7 +901,8 @@ struct AIConfigWindow : public Window {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR); ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else { } else {
#if defined(ENABLE_NETWORK) #if defined(ENABLE_NETWORK)
ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI, CONTENT_TYPE_GAME); ShowNetworkContentListWindow(NULL, CONTENT_TYPE_AI);
_network_content_client.RequestContentList(CONTENT_TYPE_GAME);
#endif #endif
} }
break; break;
@@ -1074,7 +1074,7 @@ struct AIDebugWindow : public Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{ {
if (widget == WID_AID_LOG_PANEL) { if (widget == WID_AID_LOG_PANEL) {
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL); resize->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
size->height = 14 * resize->height + this->top_offset + this->bottom_offset; size->height = 14 * resize->height + this->top_offset + this->bottom_offset;
} }
} }
@@ -1090,8 +1090,6 @@ struct AIDebugWindow : public Window {
bool dirty = false; bool dirty = false;
Dimension d = GetSpriteSize(SPR_COMPANY_ICON);
uint offset_y = Center(0, GetMinSizing(NWST_STEP, d.height + WD_MATRIX_TOP + WD_MATRIX_BOTTOM + 1), d.height);
/* Paint the company icons */ /* Paint the company icons */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
NWidgetCore *button = this->GetWidget<NWidgetCore>(i + WID_AID_COMPANY_BUTTON_START); NWidgetCore *button = this->GetWidget<NWidgetCore>(i + WID_AID_COMPANY_BUTTON_START);
@@ -1112,7 +1110,7 @@ struct AIDebugWindow : public Window {
if (!valid) continue; if (!valid) continue;
byte offset = (i == ai_debug_company) ? 1 : 0; byte offset = (i == ai_debug_company) ? 1 : 0;
DrawCompanyIcon(i, Center(button->pos_x + offset, button->current_x, d.width), button->pos_y + offset + offset_y); DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(WID_AID_COMPANY_BUTTON_START + i)->pos_y + 2 + offset);
} }
/* Set button colour for Game Script. */ /* Set button colour for Game Script. */
@@ -1191,7 +1189,7 @@ struct AIDebugWindow : public Window {
ScriptLog::LogData *log = this->GetLogPointer(); ScriptLog::LogData *log = this->GetLogPointer();
if (log == NULL) return; if (log == NULL) return;
int y = Center(this->top_offset, this->resize.step_height); int y = this->top_offset;
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < log->used; i++) { for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < log->used; i++) {
int pos = (i + log->pos + 1 - log->used + log->count) % log->count; int pos = (i + log->pos + 1 - log->used + log->count) % log->count;
if (log->lines[pos] == NULL) break; if (log->lines[pos] == NULL) break;

View File

@@ -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 || 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.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;
} }
#if defined(WIN32) #if defined(WIN32)

View File

@@ -809,7 +809,7 @@ static byte AircraftGetEntryPoint(const Aircraft *v, const AirportFTAClass *apc,
/* We are northwest or southeast of the airport */ /* We are northwest or southeast of the airport */
dir = delta_y < 0 ? DIAGDIR_NW : DIAGDIR_SE; dir = delta_y < 0 ? DIAGDIR_NW : DIAGDIR_SE;
} }
dir = ChangeDiagDir(dir, DiagDirDifference(DIAGDIR_NE, DirToDiagDir(rotation))); dir = ChangeDiagDir(dir, (DiagDirDiff)ReverseDiagDir(DirToDiagDir(rotation)));
return apc->entry_points[dir]; return apc->entry_points[dir];
} }

View File

@@ -28,7 +28,6 @@
#include "hotkeys.h" #include "hotkeys.h"
#include "vehicle_func.h" #include "vehicle_func.h"
#include "gui.h" #include "gui.h"
#include "command_func.h"
#include "widgets/airport_widget.h" #include "widgets/airport_widget.h"
@@ -80,7 +79,6 @@ struct BuildAirToolbarWindow : Window {
~BuildAirToolbarWindow() ~BuildAirToolbarWindow()
{ {
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false); if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
} }
@@ -115,13 +113,13 @@ struct BuildAirToolbarWindow : Window {
} }
} }
virtual void OnPlaceObject(Point pt, TileIndex tile) virtual void OnPlaceObject(Point pt, TileIndex tile)
{ {
switch (this->last_user_action) { switch (this->last_user_action) {
case WID_AT_AIRPORT: { case WID_AT_AIRPORT:
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION); PlaceAirport(tile);
break; break;
}
case WID_AT_DEMOLISH: case WID_AT_DEMOLISH:
PlaceProc_DemolishArea(tile); PlaceProc_DemolishArea(tile);
@@ -129,7 +127,6 @@ struct BuildAirToolbarWindow : Window {
default: NOT_REACHED(); default: NOT_REACHED();
} }
MoveAllWindowsOffScreen();
} }
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
@@ -139,27 +136,17 @@ struct BuildAirToolbarWindow : Window {
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
{ {
if (pt.x == -1) return; if (pt.x != -1 && select_proc == DDSP_DEMOLISH_AREA) {
MoveAllHiddenWindowsBackToScreen(); GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
switch (select_proc) {
case DDSP_BUILD_STATION:
assert(start_tile == end_tile);
PlaceAirport(end_tile);
break;
case DDSP_DEMOLISH_AREA:
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
break;
default: NOT_REACHED();
} }
} }
virtual void OnPlaceObjectAbort() virtual void OnPlaceObjectAbort()
{ {
MoveAllHiddenWindowsBackToScreen();
this->RaiseButtons(); this->RaiseButtons();
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR); DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
DeleteWindowById(WC_SELECT_STATION, 0); DeleteWindowById(WC_SELECT_STATION, 0);
ResetObjectToPlace();
} }
static HotkeyList hotkeys; static HotkeyList hotkeys;
@@ -217,7 +204,7 @@ Window *ShowBuildAirToolbar()
{ {
if (!Company::IsValidID(_local_company)) return NULL; if (!Company::IsValidID(_local_company)) return NULL;
DeleteToolbarLinkedWindows(); DeleteWindowByClass(WC_BUILD_TOOLBAR);
return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR); return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR);
} }
@@ -318,7 +305,6 @@ public:
d.width += padding.width; d.width += padding.width;
d.height += padding.height; d.height += padding.height;
*size = maxdim(*size, d); *size = maxdim(*size, d);
size->height = GetMinSizing(NWST_STEP, size->height);
break; break;
} }
@@ -330,7 +316,7 @@ public:
size->width = max(size->width, GetStringBoundingBox(as->name).width); size->width = max(size->width, GetStringBoundingBox(as->name).width);
} }
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM); this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = 5 * this->line_height; size->height = 5 * this->line_height;
break; break;
} }
@@ -382,9 +368,7 @@ public:
if (!as->IsAvailable()) { if (!as->IsAvailable()) {
GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER); GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER);
} }
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, Center(y, this->line_height), as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
y += this->line_height; y += this->line_height;
} }
break; break;
@@ -570,41 +554,35 @@ static const NWidgetPart _nested_build_airport_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN), NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
/* Airport dropdown selector and picture. */ NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2), NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetSizingType(NWST_STEP), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0), NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP), NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0), NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
EndContainer(), EndContainer(),
/* Airport parameters and info. */ NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(NWID_HORIZONTAL), NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
EndContainer(),
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
EndContainer(), EndContainer(),
/* Bottom panel. */ NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2), EndContainer(),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0), /* Bottom panel. */
NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0), NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0), NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0), NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP), SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
EndContainer(), NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0), SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0), NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
EndContainer(), EndContainer(),
}; };

View File

@@ -22,7 +22,6 @@
#include "window_gui.h" #include "window_gui.h"
#include "engine_gui.h" #include "engine_gui.h"
#include "settings_func.h" #include "settings_func.h"
#include "settings_gui.h"
#include "core/geometry_func.hpp" #include "core/geometry_func.hpp"
#include "rail_gui.h" #include "rail_gui.h"
#include "widgets/dropdown_func.h" #include "widgets/dropdown_func.h"
@@ -260,7 +259,7 @@ public:
switch (widget) { switch (widget) {
case WID_RV_SORT_ASCENDING_DESCENDING: { case WID_RV_SORT_ASCENDING_DESCENDING: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data); Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + Window::SortButtonWidth(); d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height; d.height += padding.height;
*size = maxdim(*size, d); *size = maxdim(*size, d);
break; break;
@@ -269,7 +268,7 @@ public:
case WID_RV_LEFT_MATRIX: case WID_RV_LEFT_MATRIX:
case WID_RV_RIGHT_MATRIX: case WID_RV_RIGHT_MATRIX:
resize->height = GetEngineListHeight((VehicleType)this->window_number); resize->height = GetEngineListHeight((VehicleType)this->window_number);
size->height = (widget == WID_RV_RIGHT_MATRIX ? 3 : 4) * resize->height; size->height = (this->window_number <= VEH_ROAD ? 8 : 4) * resize->height;
break; break;
case WID_RV_LEFT_DETAILS: case WID_RV_LEFT_DETAILS:
@@ -319,7 +318,6 @@ public:
d = maxdim(d, GetStringBoundingBox(rti->strings.replace_text)); d = maxdim(d, GetStringBoundingBox(rti->strings.replace_text));
} }
d.width += padding.width; d.width += padding.width;
d.width += SETTING_BUTTON_HEIGHT;
d.height += padding.height; d.height += padding.height;
*size = maxdim(*size, d); *size = maxdim(*size, d);
break; break;
@@ -331,7 +329,6 @@ public:
d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i])); d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i]));
} }
d.width += padding.width; d.width += padding.width;
d.width += SETTING_BUTTON_HEIGHT;
d.height += padding.height; d.height += padding.height;
*size = maxdim(*size, d); *size = maxdim(*size, d);
break; break;
@@ -399,7 +396,7 @@ public:
str = STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED; str = STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED;
} }
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, Center(r.top + WD_FRAMERECT_TOP, r.bottom - r.top - WD_FRAMERECT_TOP), str, TC_BLACK, SA_HOR_CENTER); DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_BLACK, SA_HOR_CENTER);
break; break;
} }
@@ -614,26 +611,28 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(NWID_VERTICAL), NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL), NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL), 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), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA), NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR), NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR), NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
EndContainer(), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
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(),
EndContainer(),
NWidget(NWID_HORIZONTAL), 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(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), NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
@@ -674,26 +673,28 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(NWID_VERTICAL), NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL), NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA), NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR), NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR), NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
EndContainer(), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL), 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(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_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(),

View File

@@ -44,8 +44,4 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src)
if (HasBit(src->vehicle_flags, VF_TIMETABLE_STARTED)) SetBit(this->vehicle_flags, VF_TIMETABLE_STARTED); if (HasBit(src->vehicle_flags, VF_TIMETABLE_STARTED)) SetBit(this->vehicle_flags, VF_TIMETABLE_STARTED);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(this->vehicle_flags, VF_AUTOFILL_TIMETABLE); if (HasBit(src->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(this->vehicle_flags, VF_AUTOFILL_TIMETABLE);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME); if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
if (HasBit(src->vehicle_flags, VF_SERVINT_IS_PERCENT) != HasBit(this->vehicle_flags, VF_SERVINT_IS_PERCENT)) {
ToggleBit(this->vehicle_flags, VF_SERVINT_IS_PERCENT);
}
if (HasBit(src->vehicle_flags, VF_SERVINT_IS_CUSTOM)) SetBit(this->vehicle_flags, VF_SERVINT_IS_CUSTOM);
} }

View File

@@ -1,386 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 16bpp_anim.cpp Implementation of the optimized 32 bpp blitter with animation support. */
#include "../stdafx.h"
#include "../video/video_driver.hpp"
#include "../zoom_func.h"
#include "16bpp_anim.hpp"
#include "../table/sprites.h"
/** Instantiation of the 16bpp with animation blitter factory. */
static FBlitter_16bppAnim iFBlitter_16bppAnim;
template <BlitterMode mode>
void Blitter_16bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
const Pixel *src, *src_line;
Colour16 *dst, *dst_line;
Anim *anim, *anim_line;
/* Find where to start reading in the source sprite */
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
anim_line = this->anim_buf + ((Colour16 *)bp->dst - (Colour16 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
dst_line += bp->pitch;
src = src_line;
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
anim = anim_line;
anim_line += this->anim_buf_width;
for (int x = 0; x < bp->width; x++) {
switch (mode) {
case BM_COLOUR_REMAP:
/* In case the m-channel is zero, do not remap this pixel in any way */
anim->m = 0;
anim->v = 0;
if (src->m == 0) {
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
} else {
uint8 r = bp->remap[src->m];
if (r != 0) {
*dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(r), src->v), src->a, *dst);
if (src->a == 15 && r >= PALETTE_ANIM_START) {
anim->m = r - PALETTE_ANIM_START + 1;
anim->v = src->v >> 1;
}
}
}
break;
case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */
/* Make the current colour a bit more black, so it looks like this image is transparent */
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
anim->m = 0;
anim->v = 0;
break;
default:
if (src->a == 15 && src->m >= PALETTE_ANIM_START) {
*dst = AdjustBrightness(LookupColourInPalette(src->m), src->v);
anim->m = src->m - PALETTE_ANIM_START + 1;
anim->v = src->v >> 1;
} else {
if (src->a != 0) {
if (src->m >= PALETTE_ANIM_START) {
*dst = ComposeColourPANoCheck(AdjustBrightness(LookupColourInPalette(src->m), src->v), src->a, *dst);
} else {
*dst = ComposeColourPA(src->c, src->a, *dst);
}
}
anim->m = 0;
anim->v = 0;
}
break;
}
dst++;
src += ScaleByZoom(1, zoom);
}
}
}
void Blitter_16bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent Draw() */
Blitter_16bppOptimized::Draw(bp, mode, zoom);
return;
}
switch (mode) {
default: NOT_REACHED();
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
}
}
void Blitter_16bppAnim::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */
Blitter_16bppOptimized::DrawColourMappingRect(dst, width, height, pal);
return;
}
Colour16 *udst = (Colour16 *)dst;
Anim *anim;
anim = this->anim_buf + ((Colour16 *)dst - (Colour16 *)_screen.dst_ptr);
if (pal == PALETTE_TO_TRANSPARENT) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeTransparent(*udst, 154);
anim->m = 0;
anim->v = 0;
udst++;
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
if (pal == PALETTE_NEWSPAPER) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeGrey(*udst);
anim->m = 0;
anim->v = 0;
udst++;
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
}
void Blitter_16bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
{
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return;
Anim *anim = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr) + x + y * this->anim_buf_width;
if (colour >= PALETTE_ANIM_START) {
anim->m = colour - PALETTE_ANIM_START + 1;
anim->v = DEFAULT_BRIGHTNESS >> 1;
} else {
anim->m = 0;
anim->v = 0;
}
}
void Blitter_16bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
{
if (_screen_disable_anim) {
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */
Blitter_16bppOptimized::DrawRect(video, width, height, colour);
return;
}
Colour16 colour16 = LookupColourInPalette(colour);
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
do {
Colour16 *dst = (Colour16 *)video;
Anim *anim = anim_line;
for (int i = width; i > 0; i--) {
*dst = colour16;
/* Set the colour in the anim-buffer too */
if (colour >= PALETTE_ANIM_START) {
anim->m = colour - PALETTE_ANIM_START + 1;
anim->v = DEFAULT_BRIGHTNESS >> 1;
} else {
anim->m = 0;
anim->v = 0;
}
dst++;
anim++;
}
video = (Colour16 *)video + _screen.pitch;
anim_line += this->anim_buf_width;
} while (--height);
}
void Blitter_16bppAnim::CopyFromBuffer(void *video, const void *src, int width, int height)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
Colour16 *dst = (Colour16 *)video;
const uint8 *usrc = (const uint8 *)src;
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
for (; height > 0; height--) {
/* We need to keep those for palette animation. */
Colour16 *dst_pal = dst;
Anim *anim_pal = anim_line;
memcpy(dst, usrc, width * sizeof(Colour16));
usrc += width * sizeof(Colour16);
dst += _screen.pitch;
/* Copy back the anim-buffer */
memcpy(anim_line, usrc, width * sizeof(Anim));
usrc += width * sizeof(Anim);
anim_line += this->anim_buf_width;
/* Okay, it is *very* likely that the image we stored is using
* the wrong palette animated colours. There are two things we
* can do to fix this. The first is simply reviewing the whole
* screen after we copied the buffer, i.e. run PaletteAnimate,
* however that forces a full screen redraw which is expensive
* for just the cursor. This just copies the implementation of
* palette animation, much cheaper though slightly nastier. */
for (int i = 0; i < width; i++) {
uint8 colour = anim_pal->m;
if (colour) {
/* Update this pixel */
*dst_pal = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim_pal->v << 1);
}
dst_pal++;
anim_pal++;
}
}
}
void Blitter_16bppAnim::CopyToBuffer(const void *video, void *dst, int width, int height)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint8 *udst = (uint8 *)dst;
const Colour16 *src = (const Colour16 *)video;
const Anim *anim_line = this->anim_buf + ((const Colour16 *)video - (Colour16 *)_screen.dst_ptr);
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(Colour16));
src += _screen.pitch;
udst += width * sizeof(Colour16);
/* Copy the anim-buffer */
memcpy(udst, anim_line, width * sizeof(Anim));
udst += width * sizeof(Anim);
anim_line += this->anim_buf_width;
}
}
void Blitter_16bppAnim::ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y)
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
const Anim *src;
Anim *dst;
int left = left_ref, top = top_ref, width = width_ref, height = height_ref;
/* We need to scroll the anim-buffer too */
if (scroll_y > 0) {
/* Calculate pointers */
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Decrease height and increase top */
top += scroll_y;
height -= scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
for (int h = height; h > 0; h--) {
memcpy(dst, src, width * sizeof(Anim));
src -= this->anim_buf_width;
dst -= this->anim_buf_width;
}
} else {
/* Calculate pointers */
dst = this->anim_buf + left + top * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
/* the y-displacement may be 0 therefore we have to use memmove,
* because source and destination may overlap */
for (int h = height; h > 0; h--) {
memmove(dst, src, width * sizeof(Anim));
src += _screen.pitch;
dst += _screen.pitch;
}
}
Blitter_16bppOptimized::ScrollBuffer(video, left_ref, top_ref, width_ref, height_ref, scroll_x, scroll_y);
}
int Blitter_16bppAnim::BufferSize(int width, int height)
{
return width * height * (sizeof(Anim) + sizeof(Colour16));
}
void Blitter_16bppAnim::PaletteAnimate(const Palette &palette)
{
assert(!_screen_disable_anim);
/* If first_dirty is 0, it is for 8bpp indication to send the new
* palette. However, only the animation colours might possibly change.
* Especially when going between toyland and non-toyland. */
assert(palette.first_dirty == PALETTE_ANIM_START || palette.first_dirty == 0);
for (int i = 0; i < 256; i++) {
this->palette[i] = To16(palette.palette[i]);
}
const Anim *anim = this->anim_buf;
Colour16 *dst = (Colour16 *)_screen.dst_ptr;
/* Let's walk the anim buffer and try to find the pixels */
for (int y = this->anim_buf_height; y != 0 ; y--) {
for (int x = this->anim_buf_width; x != 0 ; x--) {
uint8 colour = anim->m;
if (colour) {
/* Update this pixel */
*dst = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim->v << 1);
}
dst++;
anim++;
}
dst += _screen.pitch - this->anim_buf_width;
}
/* Make sure the backend redraws the whole screen */
VideoDriver::GetInstance()->MakeDirty(0, 0, _screen.width, _screen.height);
}
Blitter::PaletteAnimation Blitter_16bppAnim::UsePaletteAnimation()
{
return Blitter::PALETTE_ANIMATION_BLITTER;
}
void Blitter_16bppAnim::PostResize()
{
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height) {
/* The size of the screen changed; we can assume we can wipe all data from our buffer */
free(this->anim_buf);
this->anim_buf = CallocT<Anim>(_screen.width * _screen.height);
this->anim_buf_width = _screen.width;
this->anim_buf_height = _screen.height;
}
}

View File

@@ -1,75 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 16bpp_anim.hpp A 16 bpp blitter with animation support. */
#ifndef BLITTER_16BPP_ANIM_HPP
#define BLITTER_16BPP_ANIM_HPP
#include "16bpp_simple.hpp"
class Blitter_16bppOptimized: public Blitter_16bppSimple {
// TODO: implement that
};
/** The optimised 16 bpp blitter with palette animation. */
class Blitter_16bppAnim : public Blitter_16bppOptimized {
protected:
// PALETTE_ANIM_SIZE is less than 32, so we'll use 5 bits for color index, and 3 bits for brightness, losing 1 bit compared to struct Pixel
struct Anim {
unsigned m : 5 __attribute__((packed)); ///< Color index channel, packed 5 bits, 0 = no animation, 1 = PALETTE_ANIM_START
unsigned v : 3 __attribute__((packed)); ///< Brightness-channel, packed 3 bits
};
Anim *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
int anim_buf_width; ///< The width of the animation buffer.
int anim_buf_height; ///< The height of the animation buffer.
Colour16 palette[256]; ///< The current palette.
public:
Blitter_16bppAnim() :
anim_buf(NULL),
anim_buf_width(0),
anim_buf_height(0)
{}
/* 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);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y);
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(const Palette &palette);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 3; }
/* virtual */ const char *GetName() { return "16bpp-anim"; }
/* virtual */ void PostResize();
/**
* Look up the colour in the current palette.
*/
inline Colour16 LookupColourInPalette(uint8 index)
{
return this->palette[index];
}
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
};
/** Factory for the 16bpp blitter with animation. */
class FBlitter_16bppAnim : public BlitterFactory {
public:
FBlitter_16bppAnim() : BlitterFactory("16bpp-anim-broken", "16bpp Animation Blitter, currently broken (palette animation)") {}
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppAnim(); }
};
#endif /* BLITTER_16BPP_ANIM_HPP */

View File

@@ -1,147 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 16bpp_base.cpp Implementation of base for 32 bpp blitters. */
#include "../stdafx.h"
#include "16bpp_base.hpp"
void *Blitter_16bppBase::MoveTo(void *video, int x, int y)
{
return (uint16 *)video + x + y * _screen.pitch;
}
void Blitter_16bppBase::SetPixel(void *video, int x, int y, uint8 colour)
{
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
}
void Blitter_16bppBase::DrawRect(void *video, int width, int height, uint8 colour)
{
Colour16 target = LookupColourInPalette(colour);
do {
Colour16 *dst = (Colour16 *)video;
for (int i = width; i > 0; i--) {
*dst = target;
dst++;
}
video = (uint16 *)video + _screen.pitch;
} while (--height);
}
void Blitter_16bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
{
uint16 *dst = (uint16 *)video;
const uint16 *usrc = (const uint16 *)src;
for (; height > 0; height--) {
memcpy(dst, usrc, width * sizeof(uint16));
usrc += width;
dst += _screen.pitch;
}
}
void Blitter_16bppBase::CopyToBuffer(const void *video, void *dst, int width, int height)
{
uint16 *udst = (uint16 *)dst;
const uint16 *src = (const uint16 *)video;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint16));
src += _screen.pitch;
udst += width;
}
}
void Blitter_16bppBase::CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch)
{
uint16 *udst = (uint16 *)dst;
const uint16 *src = (const uint16 *)video;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint16));
src += _screen.pitch;
udst += dst_pitch;
}
}
void Blitter_16bppBase::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
{
const Colour16 *src;
Colour16 *dst;
if (scroll_y > 0) {
/* Calculate pointers */
dst = (Colour16 *)video + left + (top + height - 1) * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrease height and increase top */
top += scroll_y;
height -= scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
for (int h = height; h > 0; h--) {
memcpy(dst, src, width * sizeof(Colour16));
src -= _screen.pitch;
dst -= _screen.pitch;
}
} else {
/* Calculate pointers */
dst = (Colour16 *)video + left + top * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);
/* Adjust left & width */
if (scroll_x >= 0) {
dst += scroll_x;
left += scroll_x;
width -= scroll_x;
} else {
src -= scroll_x;
width += scroll_x;
}
/* the y-displacement may be 0 therefore we have to use memmove,
* because source and destination may overlap */
for (int h = height; h > 0; h--) {
memmove(dst, src, width * sizeof(Colour16));
src += _screen.pitch;
dst += _screen.pitch;
}
}
}
int Blitter_16bppBase::BufferSize(int width, int height)
{
return width * height * sizeof(Colour16);
}
void Blitter_16bppBase::PaletteAnimate(const Palette &palette)
{
/* By default, 16bpp doesn't have palette animation */
}
Blitter::PaletteAnimation Blitter_16bppBase::UsePaletteAnimation()
{
return Blitter::PALETTE_ANIMATION_NONE;
}

View File

@@ -1,225 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 16bpp_base.hpp Base for all 16 bits blitters. */
#ifndef BLITTER_16BPP_BASE_HPP
#define BLITTER_16BPP_BASE_HPP
#include "base.hpp"
#include "../core/bitmath_func.hpp"
#include "../core/math_func.hpp"
#include "../gfx_func.h"
/** Base for all 16bpp blitters. */
class Blitter_16bppBase : public Blitter {
public:
// TODO: GCC-specific attributes
struct Colour16 {
unsigned b : 5 __attribute__((packed)); ///< Blue-channel, packed 5 bits
unsigned g : 6 __attribute__((packed)); ///< Green-channel, packed 6 bits
unsigned r : 5 __attribute__((packed)); ///< Red-channel, packed 5 bits
Colour16(uint8 r = 0, uint8 g = 0, uint8 b = 0):
b(b), g(g), r(r)
{
}
};
struct Pixel {
Colour16 c;
unsigned a : 4 __attribute__((packed)); ///< Alpha-channel, packed 4 bits
unsigned v : 4 __attribute__((packed)); ///< Brightness-channel, packed 4 bits
unsigned m : 8 __attribute__((packed)); ///< Remap-channel, cannot pack it, because it's palette lookup index, so it must be in range 0-255
};
/* virtual */ uint8 GetScreenDepth() { return 16; }
/* virtual */ void *MoveTo(void *video, int x, int y);
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(const Palette &palette);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 2; }
/**
* Convert from rgb values to screen native 16bpp colour
*/
static inline Colour16 To16(uint8 r, uint8 g, uint8 b)
{
return Colour16(r >> 3, g >> 2, b >> 3);
}
/**
* Convert from 32bpp colour to screen native 16bpp colour
*/
static inline Colour16 To16(Colour c)
{
return To16(c.r, c.g, c.b);
}
/**
* Look up the colour in the current palette.
*/
static inline Colour LookupColourInPalette32(uint index)
{
return _cur_palette.palette[index];
}
/**
* Look up the colour in the current palette.
*/
static inline Colour16 LookupColourInPalette(uint index)
{
return To16(LookupColourInPalette32(index));
}
/**
* Compose a colour based on RGBA values and the current pixel value.
* @param r range is from 0 to 31.
* @param g range is from 0 to 63.
* @param b range is from 0 to 31.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourRGBANoCheck(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
{
/* The 16 is wrong, it should be 15, but 16 is much faster... */
return Colour16 ( ((int)(r - current.r) * a) / 16 + current.r,
((int)(g - current.g) * a) / 16 + current.g,
((int)(b - current.b) * a) / 16 + current.b );
}
/**
* Compose a colour based on RGBA values and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
* @param r range is from 0 to 31.
* @param g range is from 0 to 63.
* @param b range is from 0 to 31.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourRGBA(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
{
if (a == 0) return current;
if (a >= 15) return Colour16(r, g, b);
return ComposeColourRGBANoCheck(r, g, b, a, current);
}
/**
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
* @param a range is from 0 to 16.
*/
static inline Colour16 ComposeColourPANoCheck(Colour16 colour, uint8 a, Colour16 current)
{
return ComposeColourRGBANoCheck(colour.r, colour.g, colour.b, a, current);
}
/**
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
* @param a range is from 0 to 15.
*/
static inline Colour16 ComposeColourPA(Colour16 colour, uint8 a, Colour16 current)
{
if (a == 0) return current;
if (a >= 15) return colour;
return ComposeColourPANoCheck(colour, a, current);
}
/**
* Make a pixel looks like it is transparent.
* @param colour the colour already on the screen.
* @param nom the amount of transparency, nominator, makes colour lighter.
* @param denom denominator, makes colour darker.
* @return the new colour for the screen.
*/
static inline Colour16 MakeTransparent(Colour16 colour, uint nom, uint denom = 256)
{
uint r = colour.r;
uint g = colour.g;
uint b = colour.b;
return Colour16( r * nom / denom,
g * nom / denom,
b * nom / denom );
}
/**
* Make a colour grey - based.
* @param colour the colour to make grey.
* @return the new colour, now grey.
*/
static inline Colour16 MakeGrey(Colour16 colour)
{
uint8 r = colour.r;
uint8 g = colour.g;
uint8 b = colour.b;
/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
* divide by it to normalize the value to a byte again. See heightmap.cpp for
* information about the formula. */
uint grey = (((r << 3) * 19595) + ((g << 2) * 38470) + ((b << 3) * 7471)) / 65536;
return To16(grey, grey, grey);
}
/**
* Make a colour dark grey, for specialized 32bpp remapping.
* @param r red component
* @param g green component
* @param b blue component
* @return the brightness value of the new colour, now dark grey.
*/
static inline uint8 MakeDark(Colour16 colour)
{
uint8 r = colour.r;
uint8 g = colour.g;
uint8 b = colour.b;
/* Magic-numbers are ~66% of those used in MakeGrey() */
return (((r << 3) * 13063) + ((g << 2) * 25647) + ((b << 3) * 4981)) / 65536;
}
enum { DEFAULT_BRIGHTNESS = 8 };
/**
* @param brightness range is from 0 to 15.
*/
static inline Colour16 AdjustBrightness(Colour16 colour, uint8 brightness)
{
/* Shortcut for normal brightness */
if (brightness == DEFAULT_BRIGHTNESS) return colour;
uint16 ob = 0;
uint16 r = colour.r * brightness / DEFAULT_BRIGHTNESS;
uint16 g = colour.g * brightness / DEFAULT_BRIGHTNESS;
uint16 b = colour.b * brightness / DEFAULT_BRIGHTNESS;
/* Sum overbright */
if (r > 31) ob += r - 31;
if (g > 63) ob += g - 63;
if (b > 31) ob += b - 31;
if (ob == 0) return Colour16(r, g, b);
/* Reduce overbright strength */
ob /= 2;
return Colour16( r >= 31 ? 31 : min(r + ob * (31 - r) / 32, 31),
g >= 63 ? 63 : min(g + ob * (63 - g) / 64, 63),
b >= 31 ? 31 : min(b + ob * (31 - b) / 32, 31) );
}
};
#endif /* BLITTER_16BPP_BASE_HPP */

View File

@@ -1,173 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 32bpp_simple.cpp Implementation of the simple 32 bpp blitter. */
#include "../stdafx.h"
#include "../zoom_func.h"
#include "16bpp_simple.hpp"
#include "../table/sprites.h"
/** Instantiation of the simple 16bpp blitter factory. */
static FBlitter_16bppSimple iFBlitter_16bppSimple;
template <BlitterMode mode>
void Blitter_16bppSimple::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
const Pixel *src, *src_line;
Colour16 *dst, *dst_line;
/* Find where to start reading in the source sprite */
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
dst_line += bp->pitch;
src = src_line;
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
for (int x = 0; x < bp->width; x++) {
switch (mode) {
case BM_COLOUR_REMAP:
/* In case the m-channel is zero, do not remap this pixel in any way */
if (src->m == 0) {
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
} else {
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
}
break;
case BM_CRASH_REMAP:
if (src->m == 0) {
if (src->a != 0) {
uint8 g = MakeDark(src->c);
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
}
} else {
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
}
break;
case BM_TRANSPARENT:
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
* we produce a result the newgrf maker didn't expect ;) */
/* Make the current colour a bit more black, so it looks like this image is transparent */
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
break;
case BM_BLACK_REMAP:
if (src->a != 0) {
*dst = Colour16(0, 0, 0);
}
break;
default:
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
break;
}
dst++;
src += ScaleByZoom(1, zoom);
}
}
}
void Blitter_16bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
switch (mode) {
default: NOT_REACHED();
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
case BM_BLACK_REMAP: Draw<BM_BLACK_REMAP> (bp, zoom); return;
}
}
void Blitter_16bppSimple::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
{
Colour16 *udst = (Colour16 *)dst;
if (pal == PALETTE_TO_TRANSPARENT) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeTransparent(*udst, 154);
udst++;
}
udst = udst - width + _screen.pitch;
} while (--height);
return;
}
if (pal == PALETTE_NEWSPAPER) {
do {
for (int i = 0; i != width; i++) {
*udst = MakeGrey(*udst);
udst++;
}
udst = udst - width + _screen.pitch;
} while (--height);
return;
}
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
}
Sprite *Blitter_16bppSimple::Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
{
Pixel *dst;
Sprite *dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + (size_t)sprite->height * (size_t)sprite->width * sizeof(Pixel));
dest_sprite->height = sprite->height;
dest_sprite->width = sprite->width;
dest_sprite->x_offs = sprite->x_offs;
dest_sprite->y_offs = sprite->y_offs;
dst = (Pixel *)dest_sprite->data;
SpriteLoader::CommonPixel *src = (SpriteLoader::CommonPixel *)sprite->data;
for (int i = 0; i < sprite->height * sprite->width; i++) {
if (src->m == 0) {
dst[i].c = To16(src->r, src->g, src->b);
dst[i].a = src->a / 16;
dst[i].m = 0;
dst[i].v = 0;
} else {
/* Get brightest value */
uint8 rgb_max = max(src->r, max(src->g, src->b));
#if 0
/* Pre-convert the mapping channel to a RGB value,
use 32bpp AdjustBrightness() variant for better colors,
because this function is not called each frame */
if (rgb_max == 0) rgb_max = Blitter_32bppBase::DEFAULT_BRIGHTNESS;
dst[i].c = To16(Blitter_32bppBase::AdjustBrightness(LookupColourInPalette32(src->m), rgb_max));
dst[i].v = rgb_max / 16;
#endif
rgb_max /= 16;
/* Black pixel (8bpp or old 32bpp image), so use default value */
if (rgb_max == 0) rgb_max = DEFAULT_BRIGHTNESS;
/* Pre-convert the mapping channel to a RGB value,
use 32bpp AdjustBrightness() variant for better colors,
because this function is not called each frame */
dst[i].c = AdjustBrightness(LookupColourInPalette(src->m), rgb_max);
dst[i].v = rgb_max;
dst[i].a = src->a / 16;
dst[i].m = src->m;
}
src++;
}
return dest_sprite;
}

View File

@@ -1,36 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file 16bpp_simple.hpp Simple 16 bpp blitter. */
#ifndef BLITTER_16BPP_SIMPLE_HPP
#define BLITTER_16BPP_SIMPLE_HPP
#include "16bpp_base.hpp"
#include "factory.hpp"
/** The most trivial 32 bpp blitter (without palette animation). */
class Blitter_16bppSimple : public Blitter_16bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
/* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
/* virtual */ const char *GetName() { return "16bpp-simple"; }
};
/** Factory for the simple 16 bpp blitter. */
class FBlitter_16bppSimple : public BlitterFactory {
public:
FBlitter_16bppSimple() : BlitterFactory("16bpp-simple", "16bpp Simple Blitter (no palette animation)") {}
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppSimple(); }
};
#endif /* BLITTER_16BPP_SIMPLE_HPP */

View File

@@ -24,7 +24,6 @@
#include "cmd_helper.h" #include "cmd_helper.h"
#include "tunnelbridge_map.h" #include "tunnelbridge_map.h"
#include "road_gui.h" #include "road_gui.h"
#include "tilehighlight_func.h"
#include "widgets/bridge_widget.h" #include "widgets/bridge_widget.h"
@@ -199,7 +198,6 @@ public:
sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field. sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field.
text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field. text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field.
resize->height = max(sprite_dim.height, text_dim.height) + 2; // Max of both sizes + account for matrix edges. resize->height = max(sprite_dim.height, text_dim.height) + 2; // Max of both sizes + account for matrix edges.
resize->height = GetMinSizing(NWST_STEP, resize->height);
this->bridgetext_offset = WD_MATRIX_LEFT + sprite_dim.width + 1; // Left edge of text, 1 pixel distance from the sprite. this->bridgetext_offset = WD_MATRIX_LEFT + sprite_dim.width + 1; // Left edge of text, 1 pixel distance from the sprite.
size->width = this->bridgetext_offset + text_dim.width + WD_MATRIX_RIGHT; size->width = this->bridgetext_offset + text_dim.width + WD_MATRIX_RIGHT;
@@ -235,8 +233,7 @@ public:
SetDParam(1, b->speed); SetDParam(1, b->speed);
SetDParam(0, b->material); SetDParam(0, b->material);
uint y_sprite = Center(y, this->resize.step_height, GetSpriteSize(b->sprite).height); DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y + this->resize.step_height - 1 - GetSpriteSize(b->sprite).height);
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y_sprite);
DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height, DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height,
_game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO); _game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO);
y += this->resize.step_height; y += this->resize.step_height;
@@ -433,8 +430,6 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
new BuildBridgeWindow(&_build_bridge_desc, start, end, type, bl); new BuildBridgeWindow(&_build_bridge_desc, start, end, type, bl);
} else { } else {
delete bl; delete bl;
SetSelectionTilesDirty();
_thd.Reset();
ShowErrorMessage(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, errmsg, WL_INFO, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE); ShowErrorMessage(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, errmsg, WL_INFO, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
} }
} }

View File

@@ -1,25 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file build_confirmation_func.h Transparent confirmation dialog for building anything on the map. */
#ifndef BUILD_CONFIRMATION_FUNC_H
#define BUILD_CONFIRMATION_FUNC_H
#include "stdafx.h"
#include "window_func.h"
#include "widget_type.h"
void ShowBuildConfirmationWindow();
void HideBuildConfirmationWindow();
bool ConfirmationWindowShown();
bool BuildConfirmationWindowProcessViewportClick();
#endif /* BUILD_CONFIRMATION_FUNC_H */

View File

@@ -1,262 +0,0 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can 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 <http://www.gnu.org/licenses/>.
*/
/** @file build_confirmation_gui.cpp Transparent confirmation dialog for building anything on the map. */
#include "stdafx.h"
#include "string_func.h"
#include "strings_func.h"
#include "window_func.h"
#include "widget_type.h"
#include "window_gui.h"
#include "gfx_func.h"
#include "tilehighlight_func.h"
#include "viewport_func.h"
#include "zoom_func.h"
#include "settings_type.h"
#include "station_gui.h"
#include "build_confirmation_func.h"
#include "widgets/build_confirmation_widget.h"
#include "widgets/misc_widget.h"
#include "table/strings.h"
#include "safeguards.h"
static const NWidgetPart _nested_station_build_info_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_TT_BACKGROUND), SetMinimalSize(200, 32), EndContainer(),
};
static WindowDesc _station_build_info_desc(
WDP_MANUAL, NULL, 0, 0, // Coordinates and sizes are not used,
WC_TOOLTIPS, WC_NONE,
WDF_NO_FOCUS,
_nested_station_build_info_widgets, lengthof(_nested_station_build_info_widgets)
);
/** Window for displaying accepted goods for a station. */
struct StationBuildInfoWindow : public Window
{
StationCoverageType sct;
static void show()
{
StationCoverageType sct;
if (FindWindowByClass(WC_BUILD_STATION) != NULL) sct = SCT_ALL;
else if (FindWindowByClass(WC_BUS_STATION) != NULL) sct = SCT_PASSENGERS_ONLY;
else if (FindWindowByClass(WC_TRUCK_STATION) != NULL) sct = SCT_NON_PASSENGERS_ONLY;
else return;
new StationBuildInfoWindow(sct);
}
StationBuildInfoWindow(StationCoverageType sct) : Window(&_station_build_info_desc)
{
this->sct = sct;
this->InitNested();
CLRBITS(this->flags, WF_WHITE_BORDER);
}
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt;
pt.y = GetMainViewTop();
pt.x = _screen.width - sm_width - FindWindowById(WC_MAIN_TOOLBAR, 0)->width;
return pt;
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
size->width = GetStringBoundingBox(STR_STATION_BUILD_COVERAGE_AREA_TITLE).width * 2.5;
size->height = GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, size->width) * 2;
/* Increase slightly to have some space around the box. */
size->width += 2 + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
size->height += 2 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
}
virtual void DrawWidget(const Rect &r, int widget) const
{
/* There is only one widget. */
GfxFillRect(r.left, r.top, r.right, r.bottom, PC_BLACK);
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_LIGHT_YELLOW);
int top = r.top + WD_FRAMERECT_TOP;
top = DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, false);
if (top - r.top <= GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, r.right - r.left) * 1.5) {
DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, true);
}
}
};
/** GUI for confirming building actions. */
struct BuildConfirmationWindow : Window {
// TODO: show estimated price
static bool shown; ///< Just to speed up window hiding, HideBuildConfirmationWindow() is called very often.
Point selstart; ///< The selection start on the viewport.
Point selend; ///< The selection end on the viewport.
BuildConfirmationWindow(WindowDesc *desc) : Window(desc)
{
// Save tile selection points, they will be reset by subsequent code, and we must keep them
selstart = _thd.selstart;
selend = _thd.selend;
this->InitNested(0);
Point pt;
const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_BC_OK);
pt.x = w->viewport->scrollpos_x + ScaleByZoom(_cursor.pos.x - nvp->current_x / 2, w->viewport->zoom);
pt.y = w->viewport->scrollpos_y + ScaleByZoom(_cursor.pos.y - nvp->current_y / 4, w->viewport->zoom);
nvp->InitializeViewport(this, 0, w->viewport->zoom);
nvp->disp_flags |= ND_SHADE_DIMMED;
this->viewport->scrollpos_x = pt.x;
this->viewport->scrollpos_y = pt.y;
this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
BuildConfirmationWindow::shown = true;
}
~BuildConfirmationWindow()
{
BuildConfirmationWindow::shown = false;
}
void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
case WID_BC_OK:
if (pt.y <= (int)GetWidget<NWidgetViewport>(WID_BC_OK)->current_y / 2) {
_thd.selstart = selstart;
_thd.selend = selend;
ConfirmPlacingObject();
ToolbarSelectLastTool();
} else {
ResetObjectToPlace();
}
break;
}
HideBuildConfirmationWindow(); // this == NULL after this call
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
case WID_BC_OK:
size->width = GetMinSizing(NWST_BUTTON) * 2;
size->height = GetMinSizing(NWST_BUTTON) * 3;
break;
}
}
virtual void OnPaint()
{
this->DrawWidgets();
DrawButtonFrame(0, 0, this->width - 1, this->height / 2 - 2, STR_BUTTON_OK);
DrawButtonFrame(0, this->height / 2, this->width - 1, this->height / 2 - 1, STR_BUTTON_CANCEL);
}
void DrawButtonFrame(int x, int y, int w, int h, int str)
{
DrawFrameRect(x, y, x + w, y + h, COLOUR_GREY, FR_BORDERONLY);
Dimension d = GetStringBoundingBox(str);
DrawFrameRect(x + w / 2 - d.width / 2 - 1,
Center(y, h) - 2,
x + w / 2 + d.width / 2 + 1,
Center(y, h) + d.height,
COLOUR_GREY, FR_NONE);
DrawString(x, x + w, Center(y, h), str, TC_FROMSTRING, SA_HOR_CENTER);
}
};
bool BuildConfirmationWindow::shown = false;
static const NWidgetPart _nested_build_confirmation_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_BC_PANEL),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_BC_OK), SetSizingType(NWST_VIEWPORT), SetResize(1, 1), SetFill(1, 1), //SetPadding(2, 2, 2, 2),
EndContainer(),
};
static WindowDesc _build_confirmation_desc(
WDP_MANUAL, "build_confirmation", 0, 0,
WC_BUILD_CONFIRMATION, WC_NONE,
0,
_nested_build_confirmation_widgets, lengthof(_nested_build_confirmation_widgets)
);
/**
* Show build confirmation window under the mouse cursor
*/
void ShowBuildConfirmationWindow()
{
HideBuildConfirmationWindow();
if (!_settings_client.gui.build_confirmation || _shift_pressed) {
ConfirmPlacingObject();
ToolbarSelectLastTool();
return;
}
BuildConfirmationWindow *w = new BuildConfirmationWindow(&_build_confirmation_desc);
int old_left = w->left;
int old_top = w->top;
w->left = _cursor.pos.x - w->width / 2;
w->top = _cursor.pos.y - w->height / 4;
w->viewport->left += w->left - old_left;
w->viewport->top += w->top - old_top;
w->SetDirty();
SetDirtyBlocks(0, 0, _screen.width, _screen.height); // I don't know what does this do, but it looks important
StationBuildInfoWindow::show();
}
/**
* Destory build confirmation window, this does not cancel current action
*/
void HideBuildConfirmationWindow()
{
if (!BuildConfirmationWindow::shown) return;
DeleteWindowById(WC_BUILD_CONFIRMATION, 0);
DeleteWindowById(WC_TOOLTIPS, 0);
}
bool ConfirmationWindowShown()
{
return BuildConfirmationWindow::shown;
}
bool BuildConfirmationWindowProcessViewportClick()
{
if (!BuildConfirmationWindow::shown) return false;
Window *w = FindWindowById(WC_BUILD_CONFIRMATION, 0);
if (w != NULL && IsInsideBS(_cursor.pos.x, w->left, w->width) && IsInsideBS(_cursor.pos.y, w->top, w->height)) {
Point pt;
pt.x = _cursor.pos.x - w->left;
pt.y = _cursor.pos.y - w->top;
w->OnClick(pt, WID_BC_OK, 1);
return true;
}
HideBuildConfirmationWindow();
_thd.new_outersize = _thd.outersize; // Revert station catchment area highlight, which is getting set to zero inside drawing funcs
return false;
}

View File

@@ -46,8 +46,7 @@
*/ */
uint GetEngineListHeight(VehicleType type) uint GetEngineListHeight(VehicleType type)
{ {
uint size = max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height); return max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
return GetMinSizing(NWST_STEP, size);
} }
static const NWidgetPart _nested_build_vehicle_widgets[] = { static const NWidgetPart _nested_build_vehicle_widgets[] = {
@@ -58,30 +57,25 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = {
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY), NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY), NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(), EndContainer(),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_VERTICAL), NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetSizingType(NWST_STEP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA), SetSizingType(NWST_STEP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES), SetSizingType(NWST_STEP),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA), SetSizingType(NWST_STEP),
EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
EndContainer(),
/* Vehicle list. */
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR), NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
/* Panel with details. */
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 1), EndContainer(),
EndContainer(), EndContainer(),
/* Vehicle list. */
NWidget(NWID_HORIZONTAL),
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
EndContainer(),
/* Panel with details. */
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
/* Build/rename buttons, resize button. */ /* Build/rename buttons, resize button. */
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BV_BUILD_SEL), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BV_BUILD_SEL),
@@ -1399,7 +1393,6 @@ struct BuildVehicleWindow : Window {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data); Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better. d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height; d.height += padding.height;
d.height = GetMinSizing(NWST_STEP, d.height);
*size = maxdim(*size, d); *size = maxdim(*size, d);
break; break;
} }

View File

@@ -112,7 +112,7 @@ static void DrawTile_Clear(TileInfo *ti)
break; break;
case CLEAR_ROCKS: case CLEAR_ROCKS:
DrawGroundSprite((HasGrfMiscBit(GMB_SECOND_ROCKY_TILE_SET) && (TileHash(ti->x, ti->y) & 1) ? SPR_FLAT_ROCKY_LAND_2 : SPR_FLAT_ROCKY_LAND_1) + SlopeToSpriteOffset(ti->tileh), PAL_NONE); DrawGroundSprite((TileHash(ti->x, ti->y) & 1 ? SPR_FLAT_ROCKY_LAND_2 : SPR_FLAT_ROCKY_LAND_1) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
break; break;
case CLEAR_FIELDS: case CLEAR_FIELDS:

View File

@@ -26,8 +26,6 @@
#include "signal_func.h" #include "signal_func.h"
#include "core/backup_type.hpp" #include "core/backup_type.hpp"
#include "object_base.h" #include "object_base.h"
#include "string_func.h"
#include "tilehighlight_func.h"
#include "table/strings.h" #include "table/strings.h"

View File

@@ -45,7 +45,7 @@ struct CompanyInfrastructure {
} }
}; };
typedef Pool<Company, CompanyID, 1, MAX_COMPANIES> CompanyPool; typedef Pool<Company, CompanyByte, 1, MAX_COMPANIES> CompanyPool;
extern CompanyPool _company_pool; extern CompanyPool _company_pool;

View File

@@ -904,10 +904,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
Game::NewEvent(new ScriptEventCompanyBankrupt(c_index)); Game::NewEvent(new ScriptEventCompanyBankrupt(c_index));
CompanyAdminRemove(c_index, (CompanyRemoveReason)reason); CompanyAdminRemove(c_index, (CompanyRemoveReason)reason);
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) { if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
InvalidateWindowData(WC_MAIN_TOOLBAR_RIGHT, 0);
}
break; break;
} }

View File

@@ -35,7 +35,6 @@
#include "road_func.h" #include "road_func.h"
#include "water.h" #include "water.h"
#include "station_func.h" #include "station_func.h"
#include "widget_type.h"
#include "zoom_func.h" #include "zoom_func.h"
#include "widgets/company_widget.h" #include "widgets/company_widget.h"
@@ -530,7 +529,7 @@ public:
uint Height(uint width) const uint Height(uint width) const
{ {
return GetMinSizing(NWST_STEP, max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2)); return max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2);
} }
bool Selectable() const bool Selectable() const
@@ -931,112 +930,102 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = {
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP),
NWidget(NWID_SPACER), SetFill(1, 0), NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_VERTICAL), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting.
NWidget(NWID_SPACER), SetFill(0, 1), NWidget(NWID_VERTICAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP), NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting. NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
NWidget(NWID_VERTICAL), NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(NWID_SPACER), SetFill(0, 1),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting. EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting.
NWidget(NWID_VERTICAL),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(NWID_VERTICAL), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP), NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN), NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP),
NWidget(NWID_SPACER), SetMinimalSize(0, 4), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP), NWidget(NWID_HORIZONTAL),
EndContainer(), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0), NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP), EndContainer(),
EndContainer(), NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP), EndContainer(),
EndContainer(), NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP), EndContainer(),
EndContainer(), NWidget(NWID_HORIZONTAL),
EndContainer(), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0),
NWidget(NWID_VERTICAL), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP), NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
EndContainer(), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(NWID_HORIZONTAL), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0), NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
EndContainer(),
EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetFill(0, 1), NWidget(NWID_SPACER), SetFill(0, 1),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2), NWidget(NWID_SPACER), SetMinimalSize(0, 2),
@@ -1086,7 +1075,7 @@ class SelectCompanyManagerFaceWindow : public Window
/* Draw the value/bool in white (0xC). If the button clicked adds 1px to x and y text coordinates (IsWindowWidgetLowered()). */ /* Draw the value/bool in white (0xC). If the button clicked adds 1px to x and y text coordinates (IsWindowWidgetLowered()). */
DrawString(nwi_widget->pos_x + nwi_widget->IsLowered(), nwi_widget->pos_x + nwi_widget->current_x - 1 - nwi_widget->IsLowered(), DrawString(nwi_widget->pos_x + nwi_widget->IsLowered(), nwi_widget->pos_x + nwi_widget->current_x - 1 - nwi_widget->IsLowered(),
Center(nwi_widget->pos_y + nwi_widget->IsLowered(), nwi_widget->current_y), str, TC_WHITE, SA_HOR_CENTER); nwi_widget->pos_y + 1 + nwi_widget->IsLowered(), str, TC_WHITE, SA_HOR_CENTER);
} }
} }
@@ -1136,10 +1125,6 @@ public:
Dimension yesno_dim = maxdim(GetStringBoundingBox(STR_FACE_YES), GetStringBoundingBox(STR_FACE_NO)); Dimension yesno_dim = maxdim(GetStringBoundingBox(STR_FACE_YES), GetStringBoundingBox(STR_FACE_NO));
yesno_dim.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT; yesno_dim.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
yesno_dim.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; yesno_dim.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
yesno_dim.width = GetMinSizing(NWST_STEP, yesno_dim.width);
yesno_dim.height = GetMinSizing(NWST_STEP, yesno_dim.height);
/* Size of the number button + arrows. */ /* Size of the number button + arrows. */
Dimension number_dim = {0, 0}; Dimension number_dim = {0, 0};
for (int val = 1; val <= 12; val++) { for (int val = 1; val <= 12; val++) {
@@ -1283,12 +1268,12 @@ public:
case WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT: case WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT:
case WID_SCMF_TIE_EARRING_TEXT: { case WID_SCMF_TIE_EARRING_TEXT: {
StringID str = PART_TEXTS_IS_FEMALE[(widget - WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT) * 2 + this->is_female]; StringID str = PART_TEXTS_IS_FEMALE[(widget - WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT) * 2 + this->is_female];
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), str, TC_GOLD, SA_RIGHT); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_GOLD, SA_RIGHT);
break; break;
} }
case WID_SCMF_LIPS_MOUSTACHE_TEXT: case WID_SCMF_LIPS_MOUSTACHE_TEXT:
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT);
break; break;
case WID_SCMF_HAS_GLASSES_TEXT: case WID_SCMF_HAS_GLASSES_TEXT:
@@ -1300,7 +1285,7 @@ public:
case WID_SCMF_CHIN_TEXT: case WID_SCMF_CHIN_TEXT:
case WID_SCMF_JACKET_TEXT: case WID_SCMF_JACKET_TEXT:
case WID_SCMF_COLLAR_TEXT: case WID_SCMF_COLLAR_TEXT:
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT);
break; break;
@@ -1779,8 +1764,7 @@ struct CompanyInfrastructureWindow : Window
if (this->railtypes != RAILTYPES_NONE) { if (this->railtypes != RAILTYPES_NONE) {
/* Draw name of each valid railtype. */ /* Draw name of each valid railtype. */
RailType rt; for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) { if (HasBit(this->railtypes, rt)) {
SetDParam(0, GetRailTypeInfo(rt)->strings.name); SetDParam(0, GetRailTypeInfo(rt)->strings.name);
DrawString(r.left + offs_left, r.right - offs_right, y += FONT_HEIGHT_NORMAL, STR_WHITE_STRING); DrawString(r.left + offs_left, r.right - offs_right, y += FONT_HEIGHT_NORMAL, STR_WHITE_STRING);
@@ -1797,8 +1781,7 @@ struct CompanyInfrastructureWindow : Window
case WID_CI_RAIL_COUNT: { case WID_CI_RAIL_COUNT: {
/* Draw infrastructure count for each valid railtype. */ /* Draw infrastructure count for each valid railtype. */
uint32 rail_total = c->infrastructure.GetRailTotal(); uint32 rail_total = c->infrastructure.GetRailTotal();
RailType rt; for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
FOR_ALL_SORTED_RAILTYPES(rt) {
if (HasBit(this->railtypes, rt)) { if (HasBit(this->railtypes, rt)) {
this->DrawCountLine(r, y, c->infrastructure.rail[rt], RailMaintenanceCost(rt, c->infrastructure.rail[rt], rail_total)); this->DrawCountLine(r, y, c->infrastructure.rail[rt], RailMaintenanceCost(rt, c->infrastructure.rail[rt], rail_total));
} }

View File

@@ -425,20 +425,6 @@ DEF_CONSOLE_CMD(ConListFiles)
return true; return true;
} }
/* Open the cheat window. */
DEF_CONSOLE_CMD(ConOpenCheats)
{
if (argc == 0) {
IConsoleHelp("Open the cheat window. Usage: 'open_cheats'");
return true;
}
extern void ShowCheatWindow();
ShowCheatWindow();
return true;
}
/* Change the dir via console */ /* Change the dir via console */
DEF_CONSOLE_CMD(ConChangeDirectory) DEF_CONSOLE_CMD(ConChangeDirectory)
{ {
@@ -1942,8 +1928,6 @@ void IConsoleStdLibRegister()
IConsoleCmdRegister("save", ConSave); IConsoleCmdRegister("save", ConSave);
IConsoleCmdRegister("saveconfig", ConSaveConfig); IConsoleCmdRegister("saveconfig", ConSaveConfig);
IConsoleCmdRegister("ls", ConListFiles); IConsoleCmdRegister("ls", ConListFiles);
IConsoleCmdRegister("open_cheats", ConOpenCheats);
IConsoleCmdRegister("cheats", ConOpenCheats);
IConsoleCmdRegister("cd", ConChangeDirectory); IConsoleCmdRegister("cd", ConChangeDirectory);
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory); IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
IConsoleCmdRegister("clear", ConClearBuffer); IConsoleCmdRegister("clear", ConClearBuffer);

View File

@@ -22,7 +22,6 @@
#include "console_func.h" #include "console_func.h"
#include "rev.h" #include "rev.h"
#include "video/video_driver.hpp" #include "video/video_driver.hpp"
#include "textbuf_gui.h"
#include "widgets/console_widget.h" #include "widgets/console_widget.h"
@@ -30,10 +29,6 @@
#include "safeguards.h" #include "safeguards.h"
#ifdef __ANDROID__
#include <SDL_screenkeyboard.h>
#endif
static const uint ICON_HISTORY_SIZE = 20; static const uint ICON_HISTORY_SIZE = 20;
static const uint ICON_LINE_SPACING = 2; static const uint ICON_LINE_SPACING = 2;
static const uint ICON_RIGHT_BORDERWIDTH = 10; static const uint ICON_RIGHT_BORDERWIDTH = 10;
@@ -234,16 +229,6 @@ struct IConsoleWindow : Window
} }
} }
virtual void OnQueryTextFinished(char *str)
{
_focused_window = this;
if (str == NULL) return;
_iconsole_cmdline.Assign(str);
this->OnKeyPress(0, WKC_RETURN);
}
virtual void OnHundredthTick() virtual void OnHundredthTick()
{ {
if (IConsoleLine::Truncate() && if (IConsoleLine::Truncate() &&
@@ -445,25 +430,9 @@ void IConsoleSwitch()
{ {
switch (_iconsole_mode) { switch (_iconsole_mode) {
case ICONSOLE_CLOSED: case ICONSOLE_CLOSED:
#ifdef __ANDROID__ new IConsoleWindow();
{
char buf[1024] = "";
for (const IConsoleLine *print = IConsoleLine::Get(0); print != NULL; print = print->previous) {
if (print->buffer && print->buffer[0]) {
strecat(buf, print->buffer, lastof(buf));
strecat(buf, "\n", lastof(buf));
}
}
strecat(buf, "\n\n\n\n\n\n\n\n", lastof(buf)); // Move all text to top
SDL_ANDROID_SetScreenKeyboardHintMesage(buf);
char text[512] = "";
SDL_ANDROID_GetScreenKeyboardTextInput(text, sizeof(text) - 1); /* Invoke Android built-in screen keyboard */
IConsoleCmdExec(text);
}
#else
new IConsoleWindow();
#endif
break; break;
case ICONSOLE_OPENED: case ICONSOLE_FULL: case ICONSOLE_OPENED: case ICONSOLE_FULL:
DeleteWindowById(WC_CONSOLE, 0); DeleteWindowById(WC_CONSOLE, 0);
break; break;

View File

@@ -121,7 +121,7 @@ DEFINE_POOL_METHOD(inline void *)::AllocateItem(size_t size, size_t index)
item = (Titem *)MallocT<byte>(size); item = (Titem *)MallocT<byte>(size);
} }
this->data[index] = item; this->data[index] = item;
item->index = (Tindex)(uint)index; item->index = (uint)index;
return item; return item;
} }

View File

@@ -196,9 +196,9 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
# include <ft2build.h> # include <ft2build.h>
# include FT_FREETYPE_H # include FT_FREETYPE_H
#endif /* WITH_FREETYPE */ #endif /* WITH_FREETYPE */
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) #ifdef WITH_ICU
# include <unicode/uversion.h> # include <unicode/uversion.h>
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ #endif /* WITH_ICU */
#ifdef WITH_LZMA #ifdef WITH_LZMA
# include <lzma.h> # include <lzma.h>
#endif #endif
@@ -241,19 +241,14 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
buffer += seprintf(buffer, last, " FreeType: %d.%d.%d\n", major, minor, patch); buffer += seprintf(buffer, last, " FreeType: %d.%d.%d\n", major, minor, patch);
#endif /* WITH_FREETYPE */ #endif /* WITH_FREETYPE */
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) #ifdef WITH_ICU
/* 4 times 0-255, separated by dots (.) and a trailing '\0' */ /* 4 times 0-255, separated by dots (.) and a trailing '\0' */
char buf[4 * 3 + 3 + 1]; char buf[4 * 3 + 3 + 1];
UVersionInfo ver; UVersionInfo ver;
u_getVersion(ver); u_getVersion(ver);
u_versionToString(ver, buf); u_versionToString(ver, buf);
#ifdef WITH_ICU_SORT buffer += seprintf(buffer, last, " ICU: %s\n", buf);
buffer += seprintf(buffer, last, " ICU i18n: %s\n", buf); #endif /* WITH_ICU */
#endif
#ifdef WITH_ICU_LAYOUT
buffer += seprintf(buffer, last, " ICU lx: %s\n", buf);
#endif
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA #ifdef WITH_LZMA
buffer += seprintf(buffer, last, " LZMA: %s\n", lzma_version_string()); buffer += seprintf(buffer, last, " LZMA: %s\n", lzma_version_string());

View File

@@ -16,9 +16,6 @@
#include "string_func.h" #include "string_func.h"
#include "fileio_func.h" #include "fileio_func.h"
#include "settings_type.h" #include "settings_type.h"
#ifdef __ANDROID__
#include <android/log.h>
#endif
#include <time.h> #include <time.h>
@@ -112,9 +109,6 @@ char *DumpDebugFacilityNames(char *buf, char *last)
*/ */
static void debug_print(const char *dbg, const char *buf) static void debug_print(const char *dbg, const char *buf)
{ {
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_INFO, "OpenTTD", "[%s] %s", dbg, buf);
#endif
#if defined(ENABLE_NETWORK) #if defined(ENABLE_NETWORK)
if (_debug_socket != INVALID_SOCKET) { if (_debug_socket != INVALID_SOCKET) {
char buf2[1024 + 32]; char buf2[1024 + 32];

View File

@@ -62,8 +62,8 @@ static const NWidgetPart _nested_train_depot_widgets[] = {
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_D_SHOW_SELL_CHAIN), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_D_SHOW_SELL_CHAIN),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_D_SELL_CHAIN), SetDataTip(SPR_SELL_CHAIN_TRAIN, STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP), SetResize(0, 1), SetFill(0, 1), NWidget(WWT_IMGBTN, COLOUR_GREY, WID_D_SELL_CHAIN), SetDataTip(SPR_SELL_CHAIN_TRAIN, STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP), SetResize(0, 1), SetFill(0, 1),
EndContainer(), EndContainer(),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetDataTip(0x0, STR_NULL),
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL), NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetDataTip(0x0, STR_NULL),
EndContainer(), EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_D_V_SCROLL), NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_D_V_SCROLL),
EndContainer(), EndContainer(),
@@ -229,7 +229,6 @@ struct DepotWindow : Window {
VehicleID vehicle_over; ///< Rail vehicle over which another one is dragged, \c INVALID_VEHICLE if none. VehicleID vehicle_over; ///< Rail vehicle over which another one is dragged, \c INVALID_VEHICLE if none.
VehicleType type; VehicleType type;
bool generate_list; bool generate_list;
int hovered_widget; ///< Index of the widget being hovered during drag/drop. -1 if no drag is in progress.
VehicleList vehicle_list; VehicleList vehicle_list;
VehicleList wagon_list; VehicleList wagon_list;
uint unitnumber_digits; uint unitnumber_digits;
@@ -244,7 +243,6 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE; this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE; this->vehicle_over = INVALID_VEHICLE;
this->generate_list = true; this->generate_list = true;
this->hovered_widget = -1;
this->type = type; this->type = type;
this->num_columns = 1; // for non-trains this gets set in FinishInitNested() this->num_columns = 1; // for non-trains this gets set in FinishInitNested()
this->unitnumber_digits = 2; this->unitnumber_digits = 2;
@@ -299,7 +297,7 @@ struct DepotWindow : Window {
/* Length of consist in tiles with 1 fractional digit (rounded up) */ /* Length of consist in tiles with 1 fractional digit (rounded up) */
SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE)); SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE));
SetDParam(1, 1); SetDParam(1, 1);
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height, FONT_HEIGHT_SMALL), STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter
break; break;
} }
@@ -309,28 +307,26 @@ struct DepotWindow : Window {
default: NOT_REACHED(); default: NOT_REACHED();
} }
uint diff_x, y_sprite, y_num; uint diff_x, diff_y;
if (v->IsGroundVehicle()) { if (v->IsGroundVehicle()) {
/* Arrange unitnumber and flag horizontally */ /* Arrange unitnumber and flag horizontally */
diff_x = this->flag_width + WD_FRAMERECT_LEFT; diff_x = this->flag_width + WD_FRAMERECT_LEFT;
y_sprite = Center(y, this->resize.step_height, this->flag_height); diff_y = (this->resize.step_height - this->flag_height) / 2 - 2;
y_num = Center(y, this->resize.step_height);
} else { } else {
/* Arrange unitnumber and flag vertically */ /* Arrange unitnumber and flag vertically */
diff_x = WD_FRAMERECT_LEFT; diff_x = WD_FRAMERECT_LEFT;
y_num = Center(y, this->resize.step_height, FONT_HEIGHT_NORMAL + this->flag_height + 2); diff_y = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
y_sprite = y_num + FONT_HEIGHT_NORMAL;
} }
int text_left = rtl ? right - this->header_width - 1 : left + diff_x; int text_left = rtl ? right - this->header_width - 1 : left + diff_x;
int text_right = rtl ? right - diff_x : left + this->header_width - 1; int text_right = rtl ? right - diff_x : left + this->header_width - 1;
if (free_wagon) { if (free_wagon) {
DrawString(text_left, text_right, Center(y, this->resize.step_height), STR_DEPOT_NO_ENGINE); DrawString(text_left, text_right, y + 2, STR_DEPOT_NO_ENGINE);
} else { } else {
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y_sprite); DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y + diff_y);
SetDParam(0, v->unitnumber); SetDParam(0, v->unitnumber);
DrawString(text_left, text_right, y_num, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA); DrawString(text_left, text_right, y + 2, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
} }
} }
@@ -347,7 +343,7 @@ struct DepotWindow : Window {
uint16 num = this->vscroll->GetPosition() * this->num_columns; uint16 num = this->vscroll->GetPosition() * this->num_columns;
int maxval = min(this->vehicle_list.Length(), num + (rows_in_display * this->num_columns)); int maxval = min(this->vehicle_list.Length(), num + (rows_in_display * this->num_columns));
int y; int y;
for (y = r.top; num < maxval; y += this->resize.step_height) { // Draw the rows for (y = r.top + 1; num < maxval; y += this->resize.step_height) { // Draw the rows
for (byte i = 0; i < this->num_columns && num < maxval; i++, num++) { for (byte i = 0; i < this->num_columns && num < maxval; i++, num++) {
/* Draw all vehicles in the current row */ /* Draw all vehicles in the current row */
const Vehicle *v = this->vehicle_list[num]; const Vehicle *v = this->vehicle_list[num];
@@ -629,7 +625,6 @@ struct DepotWindow : Window {
int base_width = this->count_width + this->header_width; int base_width = this->count_width + this->header_width;
resize->height = max<uint>(GetVehicleImageCellSize(this->type, EIT_IN_DEPOT).height, min_height); resize->height = max<uint>(GetVehicleImageCellSize(this->type, EIT_IN_DEPOT).height, min_height);
resize->height = GetMinSizing(NWST_STEP, resize->height);
if (this->type == VEH_TRAIN) { if (this->type == VEH_TRAIN) {
resize->width = 1; resize->width = 1;
size->width = base_width + 2 * ScaleGUITrad(29); // about 2 parts size->width = base_width + 2 * ScaleGUITrad(29); // about 2 parts
@@ -872,29 +867,11 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE; this->sel = INVALID_VEHICLE;
this->vehicle_over = INVALID_VEHICLE; this->vehicle_over = INVALID_VEHICLE;
this->SetWidgetDirty(WID_D_MATRIX); this->SetWidgetDirty(WID_D_MATRIX);
if (this->hovered_widget != -1) {
this->SetWidgetLoweredState(this->hovered_widget, false);
this->SetWidgetDirty(this->hovered_widget);
this->hovered_widget = -1;
}
} }
virtual void OnMouseDrag(Point pt, int widget) virtual void OnMouseDrag(Point pt, int widget)
{ {
if (this->sel == INVALID_VEHICLE) return; if (this->type != VEH_TRAIN || this->sel == INVALID_VEHICLE) return;
if (widget != this->hovered_widget) {
if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
this->SetWidgetLoweredState(this->hovered_widget, false);
this->SetWidgetDirty(this->hovered_widget);
}
this->hovered_widget = widget;
if (this->hovered_widget == WID_D_SELL || this->hovered_widget == WID_D_SELL_CHAIN) {
this->SetWidgetLoweredState(this->hovered_widget, true);
this->SetWidgetDirty(this->hovered_widget);
}
}
if (this->type != VEH_TRAIN) return;
/* A rail vehicle is dragged.. */ /* A rail vehicle is dragged.. */
if (widget != WID_D_MATRIX) { // ..outside of the depot matrix. if (widget != WID_D_MATRIX) { // ..outside of the depot matrix.
@@ -981,9 +958,7 @@ struct DepotWindow : Window {
default: default:
this->sel = INVALID_VEHICLE; this->sel = INVALID_VEHICLE;
this->SetDirty(); this->SetDirty();
break;
} }
this->hovered_widget = -1;
_cursor.vehchain = false; _cursor.vehchain = false;
} }

View File

@@ -61,11 +61,11 @@ static inline Direction ReverseDir(Direction d)
/** /**
* Calculate the difference between two directions * Calculate the difference between to directions
* *
* @param d0 The first direction as the base * @param d0 The first direction as the base
* @param d1 The second direction as the offset from the base * @param d1 The second direction as the offset from the base
* @return The difference how the second direction drifts of the first one. * @return The difference how the second directions drifts of the first one.
*/ */
static inline DirDiff DirDifference(Direction d0, Direction d1) static inline DirDiff DirDifference(Direction d0, Direction d1)
{ {
@@ -79,7 +79,7 @@ static inline DirDiff DirDifference(Direction d0, Direction d1)
/** /**
* Applies two differences together * Applies two differences together
* *
* This function adds two differences together and returns the resulting * This function adds two differences together and return the resulting
* difference. So adding two DIRDIFF_REVERSE together results in the * difference. So adding two DIRDIFF_REVERSE together results in the
* DIRDIFF_SAME difference. * DIRDIFF_SAME difference.
* *
@@ -123,20 +123,6 @@ static inline DiagDirection ReverseDiagDir(DiagDirection d)
return (DiagDirection)(2 ^ d); return (DiagDirection)(2 ^ d);
} }
/**
* Calculate the difference between two DiagDirection values
*
* @param d0 The first direction as the base
* @param d1 The second direction as the offset from the base
* @return The difference how the second direction drifts of the first one.
*/
static inline DiagDirDiff DiagDirDifference(DiagDirection d0, DiagDirection d1)
{
assert(IsValidDiagDirection(d0));
assert(IsValidDiagDirection(d1));
/* Cast to uint so compiler can use bitmask. Result can never be negative. */
return (DiagDirDiff)((uint)(d0 - d1) % 4);
}
/** /**
* Applies a difference on a DiagDirection * Applies a difference on a DiagDirection

View File

@@ -105,7 +105,6 @@ struct BuildDocksToolbarWindow : Window {
~BuildDocksToolbarWindow() ~BuildDocksToolbarWindow()
{ {
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false); if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
} }
@@ -147,7 +146,7 @@ struct BuildDocksToolbarWindow : Window {
case WID_DT_DEPOT: // Build depot button case WID_DT_DEPOT: // Build depot button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return; if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT | HT_SCROLL_VIEWPORT)) ShowBuildDocksDepotPicker(this); if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
break; break;
case WID_DT_STATION: // Build station button case WID_DT_STATION: // Build station button
@@ -157,7 +156,7 @@ struct BuildDocksToolbarWindow : Window {
case WID_DT_BUOY: // Build buoy button case WID_DT_BUOY: // Build buoy button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return; if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT | HT_SCROLL_VIEWPORT); HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT);
break; break;
case WID_DT_RIVER: // Build river button (in scenario editor) case WID_DT_RIVER: // Build river button (in scenario editor)
@@ -182,21 +181,33 @@ struct BuildDocksToolbarWindow : Window {
break; break;
case WID_DT_LOCK: // Build lock button case WID_DT_LOCK: // Build lock button
/* Reuse DDSP_REMOVE_TRUCKSTOP. */ DoCommandP(tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_REMOVE_TRUCKSTOP);
break; break;
case WID_DT_DEMOLISH: // Demolish aka dynamite button case WID_DT_DEMOLISH: // Demolish aka dynamite button
PlaceProc_DemolishArea(tile); PlaceProc_DemolishArea(tile);
break; break;
case WID_DT_STATION: // Build station button case WID_DT_DEPOT: // Build depot button
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION); DoCommandP(tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
break; break;
case WID_DT_DEPOT: // Build depot button case WID_DT_STATION: { // Build station button
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
/* tile is always the land tile, so need to evaluate _thd.pos */
CommandContainer cmdcont = { tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
/* Determine the watery part of the dock. */
DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile));
TileIndex tile_to = (dir != INVALID_DIAGDIR ? TileAddByDiagDir(tile, ReverseDiagDir(dir)) : tile);
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, tile_to));
break;
}
case WID_DT_BUOY: // Build buoy button case WID_DT_BUOY: // Build buoy button
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_SINGLE_TILE); DoCommandP(tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
break; break;
case WID_DT_RIVER: // Build river button (in scenario editor) case WID_DT_RIVER: // Build river button (in scenario editor)
@@ -204,26 +215,16 @@ struct BuildDocksToolbarWindow : Window {
break; break;
case WID_DT_BUILD_AQUEDUCT: // Build aqueduct button case WID_DT_BUILD_AQUEDUCT: // Build aqueduct button
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_BRIDGE); DoCommandP(tile, GetOtherAqueductEnd(tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
break; break;
default: NOT_REACHED(); default: NOT_REACHED();
} }
MoveAllWindowsOffScreen();
} }
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
{ {
switch (last_clicked_widget) { VpSelectTilesWithMethod(pt.x, pt.y, select_method);
case WID_DT_BUILD_AQUEDUCT:
case WID_DT_LOCK:
case WID_DT_STATION:
this->OnPlacePresize(pt, TileVirtXY(pt.x, pt.y));
break;
default:
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
break;
}
} }
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
@@ -239,52 +240,14 @@ struct BuildDocksToolbarWindow : Window {
case DDSP_CREATE_RIVER: case DDSP_CREATE_RIVER:
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcBuildCanal); DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcBuildCanal);
break; break;
case DDSP_BUILD_STATION: {
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
/* Tile is always the land tile, so need to evaluate _thd.pos. */
CommandContainer cmdcont = { start_tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
//SetObjectToPlace(SPR_CURSOR_DOCK, PAL_NONE, HT_SPECIAL, this->window_class, this->window_number);
ShowSelectStationIfNeeded(cmdcont, TileArea(start_tile, end_tile));
VpStartPreSizing();
break;
}
case DDSP_BUILD_BRIDGE:
DoCommandP(start_tile, GetOtherAqueductEnd(start_tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
VpStartPreSizing();
break;
case DDSP_REMOVE_TRUCKSTOP: { // Reusing for locks.
TileIndex middle_tile = start_tile;
if (start_tile != end_tile) middle_tile = TileAddByDiagDir(start_tile, DiagdirBetweenTiles(start_tile, end_tile));
DoCommandP(middle_tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
VpStartPreSizing();
break;
}
case DDSP_SINGLE_TILE:
assert(start_tile == end_tile);
switch (last_clicked_widget) {
case WID_DT_BUOY:
DoCommandP(end_tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
break;
case WID_DT_DEPOT: // Build depot button
DoCommandP(end_tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
break;
default: NOT_REACHED();
}
default: break; default: break;
} }
MoveAllHiddenWindowsBackToScreen();
} }
} }
virtual void OnPlaceObjectAbort() virtual void OnPlaceObjectAbort()
{ {
MoveAllHiddenWindowsBackToScreen();
this->RaiseButtons(); this->RaiseButtons();
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER); DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
@@ -293,19 +256,8 @@ struct BuildDocksToolbarWindow : Window {
DeleteWindowByClass(WC_BUILD_BRIDGE); DeleteWindowByClass(WC_BUILD_BRIDGE);
} }
virtual void SelectLastTool()
{
// User misplaced something - activate last selected tool again
if (this->last_clicked_widget == WIDGET_LIST_END)
return;
Point dummy = {0, 0};
this->RaiseWidget(this->last_clicked_widget);
this->OnClick(dummy, this->last_clicked_widget, 0);
}
virtual void OnPlacePresize(Point pt, TileIndex tile_from) virtual void OnPlacePresize(Point pt, TileIndex tile_from)
{ {
if (!IsValidTile(tile_from)) return;
TileIndex tile_to = tile_from; TileIndex tile_to = tile_from;
if (this->last_clicked_widget == WID_DT_BUILD_AQUEDUCT) { if (this->last_clicked_widget == WID_DT_BUILD_AQUEDUCT) {
@@ -395,7 +347,7 @@ Window *ShowBuildDocksToolbar()
{ {
if (!Company::IsValidID(_local_company)) return NULL; if (!Company::IsValidID(_local_company)) return NULL;
DeleteToolbarLinkedWindows(); DeleteWindowByClass(WC_BUILD_TOOLBAR);
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER); return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
} }
@@ -421,7 +373,7 @@ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
/** Window definition for the build docks in scenario editor window. */ /** Window definition for the build docks in scenario editor window. */
static WindowDesc _build_docks_scen_toolbar_desc( static WindowDesc _build_docks_scen_toolbar_desc(
WDP_ALIGN_TOOLBAR, "toolbar_water_scen", 0, 0, WDP_AUTO, "toolbar_water_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE, WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION, WDF_CONSTRUCTION,
_nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets) _nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)
@@ -434,7 +386,6 @@ static WindowDesc _build_docks_scen_toolbar_desc(
*/ */
Window *ShowBuildDocksScenToolbar() Window *ShowBuildDocksScenToolbar()
{ {
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER); return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
} }
@@ -605,10 +556,10 @@ static const NWidgetPart _nested_build_docks_depot_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 3), NWidget(NWID_SPACER), SetMinimalSize(0, 3),
NWidget(NWID_HORIZONTAL_LTR), NWidget(NWID_HORIZONTAL_LTR),
NWidget(NWID_SPACER), SetMinimalSize(3, 0), NWidget(NWID_SPACER), SetMinimalSize(3, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(2, 0), NWidget(NWID_SPACER), SetMinimalSize(2, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP), NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(3, 0), NWidget(NWID_SPACER), SetMinimalSize(3, 0),
EndContainer(), EndContainer(),

View File

@@ -300,7 +300,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
/* Single player cheated to AI company. /* Single player cheated to AI company.
* There are no spectators in single player, so we must pick some other company. */ * There are no spectators in single player, so we must pick some other company. */
assert(!_networking); assert(!_networking);
Backup<CompanyByte> cur_company2(_current_company, FILE_LINE); Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
Company *c; Company *c;
FOR_ALL_COMPANIES(c) { FOR_ALL_COMPANIES(c) {
if (c->index != old_owner) { if (c->index != old_owner) {
@@ -308,7 +308,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
break; break;
} }
} }
cur_company2.Restore(); cur_company.Restore();
assert(old_owner != _local_company); assert(old_owner != _local_company);
} }
@@ -431,38 +431,11 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
FreeUnitIDGenerator(VEH_SHIP, new_owner), FreeUnitIDGenerator(VEH_AIRCRAFT, new_owner) FreeUnitIDGenerator(VEH_SHIP, new_owner), FreeUnitIDGenerator(VEH_AIRCRAFT, new_owner)
}; };
/* Override company settings to new company defaults in case we need to convert them.
* This is required as the CmdChangeServiceInt doesn't copy the supplied value when it is non-custom
*/
if (new_owner != INVALID_OWNER) {
Company *old_company = Company::Get(old_owner);
Company *new_company = Company::Get(new_owner);
old_company->settings.vehicle.servint_aircraft = new_company->settings.vehicle.servint_aircraft;
old_company->settings.vehicle.servint_trains = new_company->settings.vehicle.servint_trains;
old_company->settings.vehicle.servint_roadveh = new_company->settings.vehicle.servint_roadveh;
old_company->settings.vehicle.servint_ships = new_company->settings.vehicle.servint_ships;
old_company->settings.vehicle.servint_ispercent = new_company->settings.vehicle.servint_ispercent;
}
Vehicle *v; Vehicle *v;
FOR_ALL_VEHICLES(v) { FOR_ALL_VEHICLES(v) {
if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) { if (v->owner == old_owner && IsCompanyBuildableVehicleType(v->type)) {
assert(new_owner != INVALID_OWNER); assert(new_owner != INVALID_OWNER);
/* Correct default values of interval settings while maintaining custom set ones.
* This prevents invalid values on mismatching company defaults being accepted.
*/
if (!v->ServiceIntervalIsCustom()) {
Company *new_company = Company::Get(new_owner);
/* Technically, passing the interval is not needed as the command will query the default value itself.
* However, do not rely on that behaviour.
*/
int interval = CompanyServiceInterval(new_company, v->type);
DoCommand(v->tile, v->index, interval | (new_company->settings.vehicle.servint_ispercent << 17), DC_EXEC | DC_BANKRUPT, CMD_CHANGE_SERVICE_INT);
}
v->owner = new_owner; v->owner = new_owner;
/* Owner changes, clear cache */ /* Owner changes, clear cache */
@@ -1651,9 +1624,7 @@ static void LoadUnloadVehicle(Vehicle *front)
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, load_amount) : cargo_count; uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, load_amount) : cargo_count;
bool remaining = false; // Are there cargo entities in this vehicle that can still be unloaded here? bool remaining = false; // Are there cargo entities in this vehicle that can still be unloaded here?
if (payment != NULL) { payment->SetCargo(v->cargo_type);
payment->SetCargo(v->cargo_type);
}
if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) { if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
/* The station does not accept our goods anymore. */ /* The station does not accept our goods anymore. */
@@ -1692,9 +1663,7 @@ static void LoadUnloadVehicle(Vehicle *front)
} }
} }
if (payment != NULL) { amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
}
remaining = v->cargo.UnloadCount() > 0; remaining = v->cargo.UnloadCount() > 0;
if (amount_unloaded > 0) { if (amount_unloaded > 0) {
dirty_vehicle = true; dirty_vehicle = true;

View File

@@ -182,30 +182,21 @@ public:
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{ {
switch (widget) { if (widget != WID_EM_MESSAGE) return;
case WID_EM_MESSAGE: {
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT); CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
this->height_summary = GetStringHeight(this->summary_msg, text_width); if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
if (this->textref_stack_size > 0) StopTextRefStackUsage(); int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
this->height_summary = GetStringHeight(this->summary_msg, text_width);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM; if (this->textref_stack_size > 0) StopTextRefStackUsage();
if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
size->height = max(size->height, panel_height); uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM;
break; if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
}
case WID_EM_FACE: { size->height = max(size->height, panel_height);
Dimension face_size = GetSpriteSize(SPR_GRADIENT);
size->width = max(size->width, face_size.width);
size->height = max(size->height, face_size.height);
break;
}
}
} }
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)

View File

@@ -292,11 +292,7 @@ static const char * const _subdirs[] = {
"ai" PATHSEP "library" PATHSEP, "ai" PATHSEP "library" PATHSEP,
"game" PATHSEP, "game" PATHSEP,
"game" PATHSEP "library" PATHSEP, "game" PATHSEP "library" PATHSEP,
#ifdef __ANDROID__
"screenshot" PATHSEP, "screenshot" PATHSEP,
#else
"screenshot" PATHSEP,
#endif
}; };
assert_compile(lengthof(_subdirs) == NUM_SUBDIRS); assert_compile(lengthof(_subdirs) == NUM_SUBDIRS);
@@ -1319,21 +1315,6 @@ void DeterminePaths(const char *exe)
_searchpaths[SP_AUTODOWNLOAD_DIR] = NULL; _searchpaths[SP_AUTODOWNLOAD_DIR] = NULL;
} }
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */
#ifdef __ANDROID__
// Copy savegames from "full" OpenTTD to "lite" save directory
char curdir[PATH_MAX];
if (getcwd(curdir, sizeof(curdir)) && strstr(curdir, "org.openttd.sdl.lowmem")) {
// No, I won't implement file copying in C, shell script is just fine for this job
DEBUG(misc, 1, "Copying savegames from ../../org.openttd.sdl/files/.openttd/save to %s", curdir);
system("cd ../../org.openttd.sdl/files/.openttd/save && "
"for F in *.sav ; do "
"ls \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" || "
"cat \"$F\" > \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" ; "
"done");
chdir(curdir);
}
#endif
} }
/** /**

View File

@@ -35,16 +35,12 @@
#include "table/strings.h" #include "table/strings.h"
#include "safeguards.h" #include "safeguards.h"
#ifdef __ANDROID__
#include <SDL_android.h>
#endif
SaveLoadDialogMode _saveload_mode; SaveLoadDialogMode _saveload_mode;
LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK. LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK.
static bool _fios_path_changed; static bool _fios_path_changed;
static bool _savegame_sort_dirty; static bool _savegame_sort_dirty;
static const char *NETWORK_SAVE_FILENAME = "network-save.sav";
/** /**
@@ -111,9 +107,6 @@ static const NWidgetPart _nested_load_dialog_widgets[] = {
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_NEWGRF_INFO), SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_NULL), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_NEWGRF_INFO), SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_NULL), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_TOOLTIP), SetFill(1, 0), SetResize(1, 0), NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
EndContainer(), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_NETWORK_BUTTON, STR_SAVELOAD_LOAD_NETWORK_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY), NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
@@ -187,7 +180,7 @@ static const NWidgetPart _nested_save_dialog_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY), NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1), NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1),
NWidget(NWID_HORIZONTAL), NWidget(NWID_HORIZONTAL),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SL_SAVE_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_SAVE_NETWORK_BUTTON, STR_SAVELOAD_SAVE_NETWORK_TOOLTIP), SetFill(1, 1), SetResize(1, 0), NWidget(NWID_SPACER), SetResize(1, 0), SetFill(1, 1),
NWidget(WWT_RESIZEBOX, COLOUR_GREY), NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
@@ -289,7 +282,6 @@ public:
this->FinishInitNested(0); this->FinishInitNested(0);
this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST); this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST);
if (mode == SLD_SAVE_GAME) this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
/* pause is only used in single-player, non-editor mode, non-menu mode. It /* pause is only used in single-player, non-editor mode, non-menu mode. It
* will be unpaused in the WE_DESTROY event handler. */ * will be unpaused in the WE_DESTROY event handler. */
@@ -374,7 +366,7 @@ public:
if (item == this->selected) { if (item == this->selected) {
GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE); GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE);
} }
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height), item->title, _fios_colours[item->type]); DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, item->title, _fios_colours[item->type]);
y += this->resize.step_height; y += this->resize.step_height;
if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break; if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
} }
@@ -485,8 +477,8 @@ public:
break; break;
case WID_SL_DRIVES_DIRECTORIES_LIST: case WID_SL_DRIVES_DIRECTORIES_LIST:
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL); resize->height = FONT_HEIGHT_NORMAL;
size->height = resize->height * 5 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; size->height = resize->height * 10 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
break; break;
case WID_SL_SORT_BYNAME: case WID_SL_SORT_BYNAME:
case WID_SL_SORT_BYDATE: { case WID_SL_SORT_BYDATE: {
@@ -632,32 +624,6 @@ public:
/* Note, this is also called via the OSK; and we need to lower the button. */ /* Note, this is also called via the OSK; and we need to lower the button. */
this->HandleButtonClick(WID_SL_SAVE_GAME); this->HandleButtonClick(WID_SL_SAVE_GAME);
break; break;
case WID_SL_SAVE_NETWORK_BUTTON:
_settings_client.gui.save_to_network = !_settings_client.gui.save_to_network;
this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
this->SetDirty();
break;
case WID_SL_LOAD_NETWORK_BUTTON: {
char savePath[PATH_MAX];
FiosMakeSavegameName(savePath, NETWORK_SAVE_FILENAME, lastof(savePath));
#ifdef __ANDROID__
if (!SDL_ANDROID_CloudLoad(savePath, NULL, "OpenTTD")) {
break;
}
#endif
_load_check_data.Clear();
SaveOrLoadResult res = SaveOrLoad(savePath, SL_LOAD_CHECK, SAVE_DIR, false);
if (res == SL_OK && !_load_check_data.HasErrors()) {
strecpy(_file_to_saveload.name, savePath, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, "", lastof(_file_to_saveload.title));
if (!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
}
}
break;
}
} }
} }

View File

@@ -383,7 +383,7 @@ static void LoadFreeTypeFont(FontSize fs)
return; return;
found_face: found_face:
new FreeTypeFontCache(fs, face, RescaleFrom854x480(settings->size)); new FreeTypeFontCache(fs, face, settings->size);
} }
@@ -460,7 +460,7 @@ static void *AllocateFont(size_t size)
static bool GetFontAAState(FontSize size) static bool GetFontAAState(FontSize size)
{ {
/* AA is only supported for 32 bpp */ /* AA is only supported for 32 bpp */
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32 && BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 16) return false; if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
switch (size) { switch (size) {
default: NOT_REACHED(); default: NOT_REACHED();

View File

@@ -632,8 +632,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (split != NULL) *split = '\0'; if (split != NULL) *split = '\0';
/* First create a pattern to match the wanted language. */ /* First create a pattern to match the wanted language. */
//FcPattern *pat = FcNameParse((FcChar8*)lang); FcPattern *pat = FcNameParse((FcChar8*)lang);
FcPattern *pat = FcPatternCreate();
/* We only want to know the filename. */ /* We only want to know the filename. */
FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SPACING, FC_SLANT, FC_WEIGHT, NULL); FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SPACING, FC_SLANT, FC_WEIGHT, NULL);
/* Get the list of filenames matching the wanted language. */ /* Get the list of filenames matching the wanted language. */
@@ -646,7 +645,6 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (fs != NULL) { if (fs != NULL) {
int best_weight = -1; int best_weight = -1;
const char *best_font = NULL; const char *best_font = NULL;
int best_missing_glypths = 65536;
for (int i = 0; i < fs->nfont; i++) { for (int i = 0; i < fs->nfont; i++) {
FcPattern *font = fs->fonts[i]; FcPattern *font = fs->fonts[i];
@@ -656,32 +654,28 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
if (res != FcResultMatch || file == NULL) { if (res != FcResultMatch || file == NULL) {
continue; continue;
} }
DEBUG(freetype, 1, "Got font %s", file);
int missing = 0;
/* Get a font with the right spacing .*/ /* Get a font with the right spacing .*/
int value = 0; int value = 0;
FcPatternGetInteger(font, FC_SPACING, 0, &value); FcPatternGetInteger(font, FC_SPACING, 0, &value);
if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) missing += 1; if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) continue;
/* Do not use those that explicitly say they're slanted. */ /* Do not use those that explicitly say they're slanted. */
FcPatternGetInteger(font, FC_SLANT, 0, &value); FcPatternGetInteger(font, FC_SLANT, 0, &value);
if (value != 0) missing += 1; if (value != 0) continue;
/* We want the fatter font as they look better at small sizes. */ /* We want the fatter font as they look better at small sizes. */
FcPatternGetInteger(font, FC_WEIGHT, 0, &value); FcPatternGetInteger(font, FC_WEIGHT, 0, &value);
if (value <= best_weight) missing += 1; if (value <= best_weight) continue;
callback->SetFontNames(settings, (const char*)file); callback->SetFontNames(settings, (const char*)file);
missing = callback->FindMissingGlyphs(NULL); bool missing = callback->FindMissingGlyphs(NULL);
DEBUG(freetype, 1, "Font \"%s\" misses %d glyphs for lang %s", file, missing, lang); DEBUG(freetype, 1, "Font \"%s\" misses%s glyphs", file, missing ? "" : " no");
if (missing < best_missing_glypths) { if (!missing) {
best_weight = value; best_weight = value;
best_font = (const char *)file; best_font = (const char *)file;
best_missing_glypths = missing;
if (missing == 0) break;
} }
} }
@@ -689,7 +683,6 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
ret = true; ret = true;
callback->SetFontNames(settings, best_font); callback->SetFontNames(settings, best_font);
InitFreeType(callback->Monospace()); InitFreeType(callback->Monospace());
DEBUG(freetype, 1, "Selected font %s for lang %s", best_font, lang);
} }
/* Clean up the list of filenames. */ /* Clean up the list of filenames. */

View File

@@ -25,7 +25,7 @@
static bool CheckAPIVersion(const char *api_version) static bool CheckAPIVersion(const char *api_version)
{ {
return strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 || return strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0 || strcmp(api_version, "1.4") == 0 ||
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0; strcmp(api_version, "1.5") == 0;
} }
#if defined(WIN32) #if defined(WIN32)

View File

@@ -32,17 +32,6 @@ enum GenWorldMode {
GWM_HEIGHTMAP = 3, ///< Generate a newgame from a heightmap GWM_HEIGHTMAP = 3, ///< Generate a newgame from a heightmap
}; };
/** Smoothness presets. */
enum TgenSmoothness {
TGEN_SMOOTHNESS_BEGIN, ///< First smoothness value.
TGEN_SMOOTHNESS_VERY_SMOOTH = TGEN_SMOOTHNESS_BEGIN, ///< Smoothness preset 'very smooth'.
TGEN_SMOOTHNESS_SMOOTH, ///< Smoothness preset 'smooth'.
TGEN_SMOOTHNESS_ROUGH, ///< Smoothness preset 'rough'.
TGEN_SMOOTHNESS_VERY_ROUGH, ///< Smoothness preset 'very rough'.
TGEN_SMOOTHNESS_END, ///< Used to iterate.
};
static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY = 4; ///< Value for custom sea level in difficulty settings. static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY = 4; ///< Value for custom sea level in difficulty settings.
static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentage a user can specify for custom sea level. static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE = 1; ///< Minimum percentage a user can specify for custom sea level.
static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level. static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE = 90; ///< Maximum percentage a user can specify for custom sea level.

View File

@@ -28,7 +28,6 @@
#include "core/random_func.hpp" #include "core/random_func.hpp"
#include "progress.h" #include "progress.h"
#include "error.h" #include "error.h"
#include "settings_gui.h"
#include "widgets/genworld_widget.h" #include "widgets/genworld_widget.h"
@@ -63,20 +62,20 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
EndContainer(), EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN), NWidget(WWT_PANEL, COLOUR_BROWN),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), NWidget(NWID_SPACER), SetMinimalSize(0, 10),
/* Landscape selection. */
NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 10),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 11),
NWidget(NWID_HORIZONTAL), SetPIP(10, 5, 10), NWidget(NWID_HORIZONTAL), SetPIP(10, 5, 10),
/* Landscape selection. */
NWidget(NWID_VERTICAL), SetPIP(10, 0, 10),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(20, 0),
NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0),
/* Left column with labels. */ /* Left column with labels. */
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
@@ -169,7 +168,7 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
NWidget(NWID_SPACER), SetFill(1, 1), NWidget(NWID_SPACER), SetFill(1, 1),
EndContainer(), EndContainer(),
EndContainer(), EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 10), NWidget(NWID_SPACER), SetMinimalSize(0, 9), SetFill(1, 1),
EndContainer(), EndContainer(),
}; };
@@ -404,10 +403,10 @@ struct GenerateLandscapeWindow : public Window {
/* You can't select smoothness / non-water borders if not terragenesis */ /* You can't select smoothness / non-water borders if not terragenesis */
if (mode == GLWM_GENERATE) { if (mode == GLWM_GENERATE) {
this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL); this->SetWidgetDisabledState(WID_GL_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == LG_ORIGINAL); this->SetWidgetDisabledState(WID_GL_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges); this->SetWidgetDisabledState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM, this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
WID_GL_WATER_NW, WID_GL_WATER_NE, WID_GL_WATER_SE, WID_GL_WATER_SW, WIDGET_LIST_END); WID_GL_WATER_NW, WID_GL_WATER_NE, WID_GL_WATER_SE, WID_GL_WATER_SW, WIDGET_LIST_END);
this->SetWidgetLoweredState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM); this->SetWidgetLoweredState(WID_GL_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM);
@@ -417,7 +416,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetLoweredState(WID_GL_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE)); this->SetWidgetLoweredState(WID_GL_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
this->SetWidgetLoweredState(WID_GL_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW)); this->SetWidgetLoweredState(WID_GL_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == LG_ORIGINAL && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC), this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 && (_settings_newgame.game_creation.landscape == LT_ARCTIC || _settings_newgame.game_creation.landscape == LT_TROPIC),
WID_GL_TERRAIN_PULLDOWN, WID_GL_WATER_PULLDOWN, WIDGET_LIST_END); WID_GL_TERRAIN_PULLDOWN, WID_GL_WATER_PULLDOWN, WIDGET_LIST_END);
} }
@@ -433,7 +432,7 @@ struct GenerateLandscapeWindow : public Window {
this->SetWidgetDisabledState(WID_GL_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC); this->SetWidgetDisabledState(WID_GL_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC);
/* Do not allow a custom sea level with the original land generator. */ /* Do not allow a custom sea level with the original land generator. */
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL && if (_settings_newgame.game_creation.land_generator == 0 &&
_settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) { _settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) {
_settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE; _settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE;
} }
@@ -458,7 +457,6 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_MAPSIZE_Y_PULLDOWN: case WID_GL_MAPSIZE_Y_PULLDOWN:
SetDParamMaxValue(0, MAX_MAP_SIZE); SetDParamMaxValue(0, MAX_MAP_SIZE);
*size = maxdim(*size, GetStringBoundingBox(STR_JUST_INT)); *size = maxdim(*size, GetStringBoundingBox(STR_JUST_INT));
size->width = size->width + GetMinSizing(NWST_BUTTON);
break; break;
case WID_GL_SNOW_LEVEL_TEXT: case WID_GL_SNOW_LEVEL_TEXT:
@@ -469,8 +467,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_HEIGHTMAP_SIZE_TEXT: case WID_GL_HEIGHTMAP_SIZE_TEXT:
SetDParam(0, this->x); SetDParam(0, this->x);
SetDParam(1, this->y); SetDParam(1, this->y);
//*size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE)); *size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE));
size->height = SETTING_BUTTON_HEIGHT;
break; break;
case WID_GL_TOWN_PULLDOWN: case WID_GL_TOWN_PULLDOWN:
@@ -494,19 +491,18 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_VARIETY_PULLDOWN: strs = _variety; break; case WID_GL_VARIETY_PULLDOWN: strs = _variety; break;
case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: strs = _rotation; break; case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: strs = _rotation; break;
case WID_GL_BORDERS_RANDOM: case WID_GL_BORDERS_RANDOM:
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL)); *size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL));
break; break;
case WID_GL_WATER_NE: case WID_GL_WATER_NE:
case WID_GL_WATER_NW: case WID_GL_WATER_NW:
case WID_GL_WATER_SE: case WID_GL_WATER_SE:
case WID_GL_WATER_SW: case WID_GL_WATER_SW:
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM))); *size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM)));
break; break;
case WID_GL_HEIGHTMAP_NAME_TEXT: case WID_GL_HEIGHTMAP_NAME_TEXT:
size->width = 0; size->width = 0;
size->height = SETTING_BUTTON_HEIGHT;
break; break;
default: default:
@@ -659,7 +655,7 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_WATER_PULLDOWN: { // Water quantity case WID_GL_WATER_PULLDOWN: { // Water quantity
uint32 hidden_mask = 0; uint32 hidden_mask = 0;
/* Disable custom water level when the original map generator is active. */ /* Disable custom water level when the original map generator is active. */
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL) { if (_settings_newgame.game_creation.land_generator == 0) {
SetBit(hidden_mask, CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY); SetBit(hidden_mask, CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY);
} }
ShowDropDownMenu(this, _sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask); ShowDropDownMenu(this, _sea_lakes, _settings_newgame.difficulty.quantity_sea_lakes, WID_GL_WATER_PULLDOWN, 0, hidden_mask);
@@ -950,9 +946,7 @@ struct CreateScenarioWindow : public Window
} }
*size = maxdim(*size, GetStringBoundingBox(str)); *size = maxdim(*size, GetStringBoundingBox(str));
size->width += padding.width; size->width += padding.width;
size->width = GetMinSizing(NWST_BUTTON, size->width);
size->height += padding.height; size->height += padding.height;
size->height = GetMinSizing(NWST_BUTTON, size->height);
} }
virtual void OnClick(Point pt, int widget, int click_count) virtual void OnClick(Point pt, int widget, int click_count)
@@ -1071,16 +1065,11 @@ static const NWidgetPart _nested_create_scenario_widgets[] = {
NWidget(NWID_SPACER), SetMinimalSize(0, 10), NWidget(NWID_SPACER), SetMinimalSize(0, 10),
/* Landscape style selection. */ /* Landscape style selection. */
NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10), NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE), NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE), NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE), NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1),
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE), NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
NWidget(NWID_SPACER), SetFill(1, 1), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL), SetPIP(10, 8, 10), NWidget(NWID_HORIZONTAL), SetPIP(10, 8, 10),
/* Green generation type buttons: 'Flat land' and 'Random land'. */ /* Green generation type buttons: 'Flat land' and 'Random land'. */
NWidget(NWID_VERTICAL), SetPIP(10, 6, 10), NWidget(NWID_VERTICAL), SetPIP(10, 6, 10),

View File

@@ -23,7 +23,6 @@
#include "newgrf_debug.h" #include "newgrf_debug.h"
#include "table/palettes.h" #include "table/palettes.h"
#include "table/string_colours.h"
#include "table/sprites.h" #include "table/sprites.h"
#include "table/control_codes.h" #include "table/control_codes.h"
@@ -35,15 +34,11 @@ byte _support8bpp;
CursorVars _cursor; CursorVars _cursor;
bool _ctrl_pressed; ///< Is Ctrl pressed? bool _ctrl_pressed; ///< Is Ctrl pressed?
bool _shift_pressed; ///< Is Shift pressed? bool _shift_pressed; ///< Is Shift pressed?
bool _move_pressed;
byte _fast_forward; byte _fast_forward;
bool _left_button_down; ///< Is left mouse button pressed? bool _left_button_down; ///< Is left mouse button pressed?
bool _left_button_clicked; ///< Is left mouse button clicked? bool _left_button_clicked; ///< Is left mouse button clicked?
bool _right_button_down; ///< Is right mouse button pressed? bool _right_button_down; ///< Is right mouse button pressed?
bool _right_button_clicked; ///< Is right mouse button clicked? bool _right_button_clicked; ///< Is right mouse button clicked?
Point _right_button_down_pos; ///< Pos of right mouse button click, for drag and drop
DrawPixelInfo _screen; DrawPixelInfo _screen;
bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot) bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
bool _exit_game; bool _exit_game;
@@ -180,35 +175,40 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int
assert(width > 0); assert(width > 0);
if (y2 == y || x2 == x) { if (y2 == y) {
/* Special case: horizontal/vertical line. All checks already done in GfxPreprocessLine. */ /* Special case: horizontal line. */
blitter->DrawLine(video, x, y, x2, y2, screen_width, screen_height, colour, width, dash); blitter->DrawLine(video,
Clamp(x, 0, screen_width), y,
Clamp(x2, 0, screen_width), y2,
screen_width, screen_height, colour, width, dash);
return;
}
if (x2 == x) {
/* Special case: vertical line. */
blitter->DrawLine(video,
x, Clamp(y, 0, screen_height),
x2, Clamp(y2, 0, screen_height),
screen_width, screen_height, colour, width, dash);
return; return;
} }
int grade_y = y2 - y; int grade_y = y2 - y;
int grade_x = x2 - x; int grade_x = x2 - x;
/* Clipping rectangle. Slightly extended so we can ignore the width of the line. */
int extra = (int)CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra };
/* prevent integer overflows. */ /* prevent integer overflows. */
int margin = 1; int margin = 1;
while (INT_MAX / abs(grade_y) < max(abs(clip.left - x), abs(clip.right - x))) { while (INT_MAX / abs(grade_y) < max(abs(x), abs(screen_width - x))) {
grade_y /= 2; grade_y /= 2;
grade_x /= 2; grade_x /= 2;
margin *= 2; // account for rounding errors margin *= 2; // account for rounding errors
} }
/* Imagine that the line is infinitely long and it intersects with /* If the line is outside the screen on the same side at X positions 0
* infinitely long left and right edges of the clipping rectangle. * and screen_width, we don't need to draw anything. */
* If both intersection points are outside the clipping rectangle int offset_0 = y - x * grade_y / grade_x;
* and both on the same side of it, we don't need to draw anything. */ int offset_width = y + (screen_width - x) * grade_y / grade_x;
int left_isec_y = y + (clip.left - x) * grade_y / grade_x; if ((offset_0 > screen_height + width / 2 + margin && offset_width > screen_height + width / 2 + margin) ||
int right_isec_y = y + (clip.right - x) * grade_y / grade_x; (offset_0 < -width / 2 - margin && offset_width < -width / 2 - margin)) {
if ((left_isec_y > clip.bottom + margin && right_isec_y > clip.bottom + margin) ||
(left_isec_y < clip.top - margin && right_isec_y < clip.top - margin)) {
return; return;
} }
@@ -590,7 +590,7 @@ int GetStringLineCount(StringID str, int maxw)
*/ */
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion) Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
{ {
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)}; Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
return box; return box;
} }
@@ -602,7 +602,7 @@ Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestio
*/ */
Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion) Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
{ {
Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)}; Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
return box; return box;
} }
@@ -852,50 +852,6 @@ void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub,
} }
} }
/**
* Draw a sprite, centered at x:y, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param x Left coordinate of image in pixels
* @param y Top coordinate of image in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, ZoomLevel zoom)
{
Dimension size = GetSpriteSize(img, NULL, zoom);
DrawSprite(img, pal, x - size.width / 2, y - size.height / 2, sub, zoom);
}
/**
* Draw a sprite, centered in rect, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param left Left coordinate of image bounding box in pixels
* @param top Top coordinate of image bounding box in pixels
* @param right Right coordinate of image bounding box in pixels
* @param bottom Bottom coordinate of image bounding box in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub, ZoomLevel zoom)
{
DrawSpriteCentered(img, pal, (left + right) / 2, (top + bottom) / 2, sub, zoom);
}
/**
* Draw a sprite, centered in rect, not in a viewport
* @param img Image number to draw
* @param pal Palette to use.
* @param rect Image bounding box in pixels
* @param sub If available, draw only specified part of the sprite
* @param zoom Zoom level of sprite
*/
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &rect, const SubSprite *sub, ZoomLevel zoom)
{
DrawSpriteCenteredRect(img, pal, rect.left, rect.top, rect.right, rect.bottom, sub, zoom);
}
/** /**
* The code for setting up the blitter mode and sprite information before finally drawing the sprite. * The code for setting up the blitter mode and sprite information before finally drawing the sprite.
* @param sprite The sprite to draw. * @param sprite The sprite to draw.
@@ -1245,8 +1201,6 @@ void ScreenSizeChanged()
/* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */ /* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */
_cursor.visible = false; _cursor.visible = false;
CheckWindowMinSizings();
} }
void UndrawMouseCursor() void UndrawMouseCursor()
@@ -1264,6 +1218,11 @@ void UndrawMouseCursor()
void DrawMouseCursor() void DrawMouseCursor()
{ {
#if defined(WINCE)
/* Don't ever draw the mouse for WinCE, as we work with a stylus */
return;
#endif
/* Don't draw the mouse cursor if the screen is not ready */ /* Don't draw the mouse cursor if the screen is not ready */
if (_screen.dst_ptr == NULL) return; if (_screen.dst_ptr == NULL) return;
@@ -1719,104 +1678,3 @@ void SortResolutions(int count)
{ {
QSortT(_resolutions, count, &compare_res); QSortT(_resolutions, count, &compare_res);
} }
/**
* Returns the initial value for a margin, after telling where are the left and right margins and where we want to draw/write (begining/end of line)
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
* @return the margin we asked
*/
int InitTempMargin(int left, int right, bool to_end_line)
{
return to_end_line ^ (_current_text_dir == TD_RTL) ? right :left;
}
/**
* Consumes a space in an horizontal margin
* @param space: amount of space used
* @param here: the margin where to add the space
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void AddSpace(int space, int &here, bool to_end_line)
{
here += to_end_line ^ (_current_text_dir == TD_RTL) ? -space : space;
}
/**
* After drawing something, update a margin
* @param end is where we ended drawing (usually the return value of a DrawString function)
* @param margin is the margin we want to update
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginEnd(int end, int &margin, bool to_end_line)
{
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(end, margin) : max(end, margin);
}
/**
* After drawing something, horizontal margins are updated
* @param end: last position drawn
* @param left is the left margin of the horizontal space drawn
* @param right: right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line)
{
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
right = end;
} else {
left = end;
}
}
/**
* After drawing something of a certain width, update margins
* @param width: used space
* @param initial left margin
* @param initial right margin
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line)
{
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
right -= width;
} else {
left += width;
}
}
/**
* Draws a string in a delimited space; temporal margin gets updated
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin of the horizontal space we want to draw to
* @param top: vertical position
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
* @param string to draw
* @param colour for the string
* @param alignment of the string (only left or right alignment)
* @param underline
*/
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour, StringAlignment align, bool underline)
{
int end = DrawString(left, right, top, str, colour, align, underline);
UpdateMarginEnd(end, margin, align == SA_RIGHT);
}
/**
* Draws a sprite in a delimited space; temporal margin gets updated
* @param width of the sprite
* @param left is the left margin of the horizontal space we want to draw to
* @param right: right margin of the horizontal space
* @param top: vertical position
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
* @param sprite
* @param palette
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
*/
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line, SubSprite *sub)
{
DrawSprite(img, pal, to_end_line ^ (_current_text_dir == TD_RTL) ? right - width : left, top, sub);
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(right - width, margin): max(margin, left + width);
}

View File

@@ -45,7 +45,6 @@
#include "gfx_type.h" #include "gfx_type.h"
#include "strings_type.h" #include "strings_type.h"
#include "string_type.h" #include "string_type.h"
#include "core/math_func.hpp"
void GameLoop(); void GameLoop();
@@ -57,15 +56,12 @@ extern byte _support8bpp;
extern CursorVars _cursor; extern CursorVars _cursor;
extern bool _ctrl_pressed; ///< Is Ctrl pressed? extern bool _ctrl_pressed; ///< Is Ctrl pressed?
extern bool _shift_pressed; ///< Is Shift pressed? extern bool _shift_pressed; ///< Is Shift pressed?
extern bool _move_pressed;
extern byte _fast_forward; extern byte _fast_forward;
extern bool _left_button_down; extern bool _left_button_down;
extern bool _left_button_clicked; extern bool _left_button_clicked;
extern bool _right_button_down; extern bool _right_button_down;
extern bool _right_button_clicked; extern bool _right_button_clicked;
extern Point _right_button_down_pos;
extern DrawPixelInfo _screen; extern DrawPixelInfo _screen;
extern bool _screen_disable_anim; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot) extern bool _screen_disable_anim; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
@@ -96,9 +92,6 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo);
Dimension GetSpriteSize(SpriteID sprid, Point *offset = NULL, ZoomLevel zoom = ZOOM_LVL_GUI); Dimension GetSpriteSize(SpriteID sprid, Point *offset = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL); void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL);
void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI); void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &r, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
/** How to align the to-be drawn text. */ /** How to align the to-be drawn text. */
enum StringAlignment { enum StringAlignment {
@@ -179,39 +172,6 @@ int GetCharacterHeight(FontSize size);
/** Height of characters in the large (#FS_MONO) font. */ /** Height of characters in the large (#FS_MONO) font. */
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO)) #define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
int InitTempMargin(int left, int right, bool to_end_line);
void AddSpace(int space, int &here, bool to_end_line);
void UpdateMarginEnd(int end, int &margin, bool to_end_line);
void UpdateMarginWidth(int adding, int &margin, bool to_end_line);
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line);
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line);
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line = false, SubSprite *sub = NULL);
/**
* Return where to start drawing a centered object inside a widget.
* @param top The top coordinate (or the left coordinate) of the widget.
* @param height The height (or width) of the widget.
* @param size The height (or width) of the object to draw.
* @return The coordinate where to start drawing the centered object.
*/
static inline int Center(int top, int height, uint size = FONT_HEIGHT_NORMAL)
{
return top + (height - size) / 2;
}
/**
* Returns fint/button size, rescaled to current screen resolution from the base Android resolution, which is 854x480
* @param value The value to rescale
* @return Rescaled value, using lesser of the curret screen coordinates
*/
static inline int RescaleFrom854x480(int value)
{
return min(value * _cur_resolution.width / 854, value * _cur_resolution.height / 480);
}
extern DrawPixelInfo *_cur_dpi; extern DrawPixelInfo *_cur_dpi;
TextColour GetContrastColour(uint8 background); TextColour GetContrastColour(uint8 background);

View File

@@ -17,9 +17,9 @@
#include "table/control_codes.h" #include "table/control_codes.h"
#ifdef WITH_ICU_LAYOUT #ifdef WITH_ICU
#include <unicode/ustring.h> #include <unicode/ustring.h>
#endif /* WITH_ICU_LAYOUT */ #endif /* WITH_ICU */
#include "safeguards.h" #include "safeguards.h"
@@ -42,7 +42,7 @@ Font::Font(FontSize size, TextColour colour) :
assert(size < FS_END); assert(size < FS_END);
} }
#ifdef WITH_ICU_LAYOUT #ifdef WITH_ICU
/* Implementation details of LEFontInstance */ /* Implementation details of LEFontInstance */
le_int32 Font::getUnitsPerEM() const le_int32 Font::getUnitsPerEM() const
@@ -213,7 +213,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
return new ICUParagraphLayout(p); return new ICUParagraphLayout(p);
} }
#endif /* WITH_ICU_LAYOUT */ #endif /* WITH_ICU */
/*** Paragraph layout ***/ /*** Paragraph layout ***/
/** /**
@@ -654,7 +654,7 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
line.layout->Reflow(); line.layout->Reflow();
} else { } else {
/* Line is new, layout it */ /* Line is new, layout it */
#ifdef WITH_ICU_LAYOUT #ifdef WITH_ICU
FontState old_state = state; FontState old_state = state;
const char *old_str = str; const char *old_str = str;

Some files were not shown because too many files have changed in this diff Show More