1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 11:39:11 +00:00

Compare commits

..

4 Commits

Author SHA1 Message Date
frosch
2875c68208 (svn r27532) -Release: 1.6.0 2016-04-01 18:32:32 +00:00
frosch
235e714eee (svn r27531) [1.6] -Update: Documentation 2016-04-01 18:27:37 +00:00
frosch
0989010748 (svn r27519) [1.6] -Update: Documentation 2016-03-01 20:06:23 +00:00
frosch
d1104cc515 (svn r27517) [1.6] -Branch: for incrementing numbers 2016-03-01 19:49:40 +00:00
303 changed files with 4990 additions and 12172 deletions

1
.gitignore vendored
View File

@@ -7,7 +7,6 @@ bin/ai/*
bin/baseset/*
!bin/baseset/openttd.grf
!bin/baseset/opntitle.dat
!bin/baseset/orig_extra.grf
!bin/baseset/orig_*.obg
!bin/baseset/orig_*.obs
!bin/baseset/no_sound.obs

View File

@@ -195,7 +195,7 @@ EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = ENABLE_NETWORK WITH_ZLIB WITH_LZO WITH_LZMA WITH_SDL WITH_PNG WITH_FONTCONFIG WITH_FREETYPE WITH_ICU_SORT WITH_ICU_LAYOUT UNICODE _UNICODE _GNU_SOURCE FINAL=
PREDEFINED = ENABLE_NETWORK WITH_ZLIB WITH_LZO WITH_LZMA WITH_SDL WITH_PNG WITH_FONTCONFIG WITH_FREETYPE WITH_ICU UNICODE _UNICODE _GNU_SOURCE FINAL=
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------

View File

@@ -84,7 +84,7 @@ endif
$(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/"
ifdef MENU_DIR
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | LC_ALL=C $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
endif
ifeq ($(TTD), openttd.exe)

View File

@@ -44,18 +44,22 @@ PNG_FILES := $(GRF_DIR)/*.png $(GRF_DIR)/rivers/*.png
# Build the GRF.
ifdef GRFCODEC
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_extra.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm
all: $(BIN_DIR)/openttd.grf $(BIN_DIR)/orig_dos.obg $(BIN_DIR)/orig_dos_de.obg $(BIN_DIR)/orig_win.obg $(BIN_DIR)/orig_dos.obs $(BIN_DIR)/orig_win.obs $(BIN_DIR)/no_sound.obs $(BIN_DIR)/orig_win.obm $(BIN_DIR)/no_music.obm
else
all:
endif
# Make sure the sprites directory exists.
$(OBJS_DIR)/sprites:
$(Q)-mkdir "$@"
$(OBJS_DIR)/langfiles.tmp: $(LANG_DIR)/*.txt
$(E) '$(STAGE) Collecting baseset translations'
$(Q) cat $^ > $@
$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/orig_extra.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
$(BIN_DIR)/%.obg: $(BASESET_DIR)/%.obg $(BIN_DIR)/openttd.grf $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/translations.awk
$(E) '$(STAGE) Updating $(notdir $@)'
$(Q) sed 's/^ORIG_EXTRA.GRF = *[0-9a-f]*$$/ORIG_EXTRA.GRF = '`$(MD5SUM) $(BIN_DIR)/orig_extra.grf | sed 's@ .*@@'`'/' $< > $@.tmp
$(Q) sed 's/^OPENTTD.GRF = *[0-9a-f]*$$/OPENTTD.GRF = '`$(MD5SUM) $(BIN_DIR)/openttd.grf | sed 's@ .*@@'`'/' $< > $@.tmp
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $@.tmp >$@
$(Q) rm $@.tmp
@@ -68,9 +72,8 @@ $(BIN_DIR)/%.obm: $(BASESET_DIR)/%.obm $(OBJS_DIR)/langfiles.tmp $(BASESET_DIR)/
$(Q) awk -v langfiles='$(OBJS_DIR)/langfiles.tmp' -f $(BASESET_DIR)/translations.awk $< >$@
# Compile extra grf
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites $(GRF_DIR)/assemble_nfo.awk
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-mkdir -p $(OBJS_DIR)/sprites
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/openttd.nfo > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
@@ -78,17 +81,6 @@ $(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf
$(Q)cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf
# The copy operation of PNG_FILES is duplicated from the target 'openttd.grf', thus those targets may not run in parallel.
$(BIN_DIR)/orig_extra.grf: $(PNG_FILES) $(NFO_FILES) $(GRF_DIR)/assemble_nfo.awk | $(BIN_DIR)/openttd.grf
$(E) '$(STAGE) Assembling orig_extra.nfo'
$(Q)-mkdir -p $(OBJS_DIR)/sprites
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) awk -f $(GRF_DIR)/assemble_nfo.awk $(GRF_DIR)/orig_extra.nfo > $(OBJS_DIR)/sprites/orig_extra.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/orig_extra.nfo
$(E) '$(STAGE) Compiling orig_extra.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/orig_extra.grf
$(Q)cp $(OBJS_DIR)/orig_extra.grf $(BIN_DIR)/orig_extra.grf
# Clean up temporary files.
clean:
$(Q)rm -f *.bak *.grf

View File

@@ -152,7 +152,7 @@ mrproper:
distclean: mrproper
maintainer-clean: distclean
$(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/orig_extra.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm
$(Q)rm -f $(BIN_DIR)/baseset/openttd.grf $(BIN_DIR)/baseset/*.obg $(BIN_DIR)/baseset/*.obs $(BIN_DIR)/baseset/*.obm
depend:
@for dir in $(SRC_DIRS); do \

View File

@@ -210,7 +210,7 @@ endif
{ \
print $$0 \
} \
' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | LC_ALL=C $(SORT) > Makefile.dep
' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | $(SORT) > Makefile.dep
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak

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.
* 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.6 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 GetDescription() { return "This runs regression-tests on some commands. On the same map the result should always be the same."; }
function GetVersion() { return 1; }
function GetAPIVersion() { return "1.7"; }
function GetAPIVersion() { return "1.6"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}

View File

@@ -21,15 +21,12 @@ description.el_GR = Ένα πάκετο μουσικής χωρίς πραγμα
description.en_AU = A music pack without actual music.
description.en_US = A music pack without actual music.
description.es_ES = Un conjunto de música vacío.
description.es_MX = Paquete de música vacío
description.et_EE = Muusikakogu ilma muusikata.
description.eu_ES = Musika gabeko musika paketea.
description.fi_FI = Musiikkipaketti, jossa ei ole musiikkia.
description.fr_FR = Un pack de musiques sans musiques.
description.ga_IE = Pacáiste ceoil gan aon cheol iarbhír ann.
description.gd_GB = Pacaid ciùil anns nach eil fonn sam bith.
description.gl_ES = Un conxunto de músicas sen ningunha música.
description.he_IL = אוסף מנגינות ללא מנגינות.
description.hr_HR = Glazbeni paket bez ikakve glazbe.
description.hu_HU = Zenei alapcsomag zene nélkül.
description.id_ID = Paket musik tanpa musik sungguhan.
@@ -41,7 +38,6 @@ description.la_VA = Sarcina musicae sine ulla musica.
description.lb_LU = E Musikpack ouni aktuell Musik.
description.lt_LT = Muzikos pakas be muzikos.
description.lv_LV = Mūzikas kopa bez mūzikas
description.ms_MY = Pek muzik tanpa muzik sebenar.
description.nb_NO = En musikkpakke uten noe musikk.
description.nl_NL = Een muziekset zonder muziek.
description.nn_NO = Ei musikkpakke utan noko musikk.

View File

@@ -21,7 +21,6 @@ description.el_GR = Ένα πάκετο ήχων χώρις ήχους.
description.en_AU = A sound pack without any sounds.
description.en_US = A sound pack without any sounds.
description.es_ES = Un conjunto de sonidos vacío.
description.es_MX = Paquete de sonidos vacío
description.et_EE = Helikogu ilma helideta.
description.eu_ES = Soinurik gabeko soinu pakete bat
description.fi_FI = Äänipaketti, jossa ei ole ääniä.
@@ -29,7 +28,6 @@ description.fr_FR = Un pack de sons sans sons.
description.ga_IE = Pacáiste fuaimeanna gan aon fhuaimeanna ann.
description.gd_GB = Pacaid fhuaimean anns nach eil fuaim sam bith.
description.gl_ES = Un conxunto de sons sen ningún son
description.he_IL = אוסף צלילים ללא צלילים.
description.hr_HR = Zvučni paket bez ikakvih zvukova.
description.hu_HU = Hang alapcsomag hangok nélkül.
description.id_ID = Paket efek suara tanpa suara apapun.
@@ -40,7 +38,6 @@ description.ko_KR = 아무런 효과음도 없는 효과음 팩입니다.
description.la_VA = Sarcina sonorum sine ullis sonis.
description.lb_LU = E Soundpack ouni iergendee Sound.
description.lt_LT = Garsų pakas be jokių garsų.
description.lv_LV = Skaņu kopa bez skaņas.
description.nb_NO = En lydpakke uten noen lyder.
description.nl_NL = Een geluidset zonder geluid.
description.nn_NO = Ei lydpakke utan nokon lydar.

Binary file not shown.

Binary file not shown.

View File

@@ -22,15 +22,12 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe DOS edition graphics.
description.en_US = Original Transport Tycoon Deluxe DOS edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS.
description.es_MX = Gráficos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni graafika.
description.eu_ES = Transport Tycoon Deluxe originaleko DOS edizioko grafikoak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán DOS.
description.gd_GB = Grafaigeachd aig an deasachadh DOS tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal de Transport Tycoon Deluxe para DOS.
description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת DOS.
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi DOS.
@@ -41,8 +38,6 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS.
description.lb_LU = Original Transport Tycoon Deluxe DOS Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS izdevuma grafika.
description.ms_MY = Grafik asal Transport Tycoon Deluxe DOS edition.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe DOS-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS.
@@ -64,21 +59,21 @@ description.zh_CN = 运输大亨DOS豪华版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版的圖形。
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

View File

@@ -21,15 +21,12 @@ description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe
description.en_AU = Original Transport Tycoon Deluxe DOS edition sounds.
description.en_US = Original Transport Tycoon Deluxe DOS edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión DOS.
description.es_MX = Sonidos originales de Transport Tycoon Deluxe para DOS.
description.et_EE = Algse Transport Tycoon Deluxe DOSi versiooni helid.
description.eu_ES = Transport Tycoon Deluxe originaleko DOS edizioko soinuak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen DOS-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version DOS).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán DOS.
description.gd_GB = Fuaimean aig an deasachadh DOS tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Sons da edición orixinal de Transport Tycoon Deluxe para DOS.
description.he_IL = צלילי Transport Tycoon Deluxe המקורי בגרסת DOS.
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe DOS izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS verziójának hangjai.
description.id_ID = Efek suara orisinil Transport Tycoon Deluxe versi DOS.

View File

@@ -22,14 +22,12 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe DOS (German) edition graphics.
description.en_US = Original Transport Tycoon Deluxe DOS (German) edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión DOS (Alemán).
description.es_MX = Gráficos originales de Transport Tycoon Deluxe para DOS (en alemán).
description.et_EE = Algse Transport Tycoon Deluxe DOSi (Saksa) versiooni graafika.
description.fi_FI = Alkuperäiset Saksassa julkaistun Transport Tycoon Deluxen DOS-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version DOS allemande).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán DOS (Gearmánach).
description.gd_GB = Grafaigeachd aig an deasachadh DOS (Gearmailteach) tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal (alemá) de Transport Tycoon Deluxe para DOS.
description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת DOS (גרמנית).
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe DOS (Njemački) izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe DOS (német) verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi DOS (Jerman).
@@ -40,7 +38,6 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 도스 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe DOS (Germanica).
description.lb_LU = Original Transport Tycoon Deluxe DOS (Däitsch) Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe DOS (Vokiečių) leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe DOS (vācu) izdevuma grafika.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for DOS (tysk).
description.nl_NL = Originele graphics van de Duitse Transport Tycoon Deluxe DOS-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for DOS (tysk).
@@ -62,21 +59,21 @@ description.zh_CN = 运输大亨DOS豪华德语版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe DOS 版 (德國版) 的圖形。
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

Binary file not shown.

View File

@@ -22,14 +22,12 @@ description.el_GR = Αρχικά γραφικά από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe Windows edition graphics.
description.en_US = Original Transport Tycoon Deluxe Windows edition graphics.
description.es_ES = Gráficos originales de Transport Tycoon Deluxe versión Windows.
description.es_MX = Gráficos originales de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni graafika.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen Windows-version grafiikat.
description.fr_FR = Graphiques originaux de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Grafaicí bunaidhTransport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Grafaigeachd aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Graficos da edición orixinal de Transport Tycoon Deluxe para Windows.
description.he_IL = גרפיקות Transport Tycoon Deluxe המקורי בגרסת Windows.
description.hr_HR = Originalna grafika za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának grafikája.
description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi Windows.
@@ -40,8 +38,6 @@ description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에
description.la_VA = Graphica ex editione originale Transport Tycoon Deluxe Windows.
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Grafik.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo grafika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma grafika.
description.ms_MY = Grafik asal Transport Tycoon Deluxe edisi Windows.
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for Windows.
description.nl_NL = Originele graphics van de Transport Tycoon Deluxe Windows-versie.
description.nn_NO = Original grafikk frå Transport Tycoon Deluxe for Windows.
@@ -63,21 +59,21 @@ description.zh_CN = 运输大亨Windows豪华版原版图形包.
description.zh_TW = 原版 Transport Tycoon Deluxe Windows 版的圖形。
[files]
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = ORIG_EXTRA.GRF
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = OPENTTD.GRF
[md5s]
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
ORIG_EXTRA.GRF = 0b10a95c0adee710ecca9c3d676be4f3
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF = 505d96061556d3bb5cec6234096ec5bc
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

View File

@@ -21,14 +21,12 @@ description.el_GR = Αρχική μουσική από το Transport Tycoon Del
description.en_AU = Original Transport Tycoon Deluxe Windows edition music.
description.en_US = Original Transport Tycoon Deluxe Windows edition music.
description.es_ES = Música original de Transport Tycoon Deluxe versión Windows.
description.es_MX = Música original de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni muusika.
description.fi_FI = Alkuperäinen Transport Tycoon Deluxen Windows-version musiikki.
description.fr_FR = Musiques originales de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Ceol bunaidh Transport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Ceòl aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Música da edición orixinal de Transport Tycoon Deluxe para Windows.
description.he_IL = מנגינות Transport Tycoon Deluxe המקורי בגרסת Windows.
description.hr_HR = Originalna glazba za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának zenéje.
description.id_ID = Musik pengiring orisinil Transport Tycoon Deluxe versi Windows.
@@ -40,7 +38,6 @@ description.la_VA = Musica ex editione originale Transport Tycoon Deluxe Windows
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Musik.
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo muzika.
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma mūzika.
description.ms_MY = Muzik asal Transport Tycoon Deluxe edisi Windows.
description.nb_NO = Original musikk fra Transport Tycoon Deluxe for Windows.
description.nl_NL = Originele muziek van de Transport Tycoon Deluxe Windows-versie.
description.nn_NO = Original musikk frå Transport Tycoon Deluxe for Windows.

View File

@@ -21,15 +21,12 @@ description.el_GR = Αρχικοί ήχοι από το Transport Tycoon Deluxe
description.en_AU = Original Transport Tycoon Deluxe Windows edition sounds.
description.en_US = Original Transport Tycoon Deluxe Windows edition sounds.
description.es_ES = Sonidos originales de Transport Tycoon Deluxe versión Windows.
description.es_MX = Sonidos originales de Transport Tycoon Deluxe para Windows.
description.et_EE = Algse Transport Tycoon Deluxe Windowsi versiooni helid.
description.eu_ES = Transport Tycoon Deluxe originaleko Windows edizioko grafikoak.
description.fi_FI = Alkuperäiset Transport Tycoon Deluxen Windows-version äänet.
description.fr_FR = Sons originaux de Transport Tycoon Deluxe (version Windows).
description.ga_IE = Fuaimeanna bunaidh Transport Tycoon Deluxe, eagrán Windows.
description.gd_GB = Fuaimean aig an deasachadh Windows tùsail aig Transport Tycoon Deluxe.
description.gl_ES = Sons da edición orixinal de Transport Tycoon Deluxe para Windows.
description.he_IL = צלילי Transport Tycoon Deluxe המקורי בגרסת Windows.
description.hr_HR = Originalni zvukovi za Transport Tycoon Deluxe Windows izdanje.
description.hu_HU = Az eredeti Transport Tycoon Deluxe Windows verziójának hangjai.
description.id_ID = Efek suara orisinil Transport Tycoon Deluxe versi Windows.

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.
* 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.6 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,123 +1,3 @@
1.7.2-RC1 (2017-12-11)
------------------------------------------------------------------------
- Change: When train depots have a horizontal scrollbar, allow scrolling 1 tile beyond the longest train, so you can actually attach a wagon at the end (r27937)
- Fix: When moving wagons in the depot, the drag highlight did not exactly match the length of the dragged wagon chain (r27936)
- Fix: [Win32] Right mouse scrolling didn't work properly with the Windows 10 Fall Creators Update [FS#6629] (r27935)
- Fix: Forest, candyfloss forest and battery farm skipped the first animation frame [FS#6639] (r27932)
- Fix: Glyphs in range U+0020 to U+00FF may only be defined in orig_extra.grf, not in openttd.grf [FS#6620] (r27915)
- Fix: 'unban' console command was not handling IPv6 adresses properly (r27914, r27913)
- Fix: Keep the 'link' between industry chain and smallmap windows whenever possible [FS#6585] (r27905)
- Fix: When the last vehicle is removed from a shared orders group, hide the 'Stop sharing' button in the vehicle orders window [FS#6593] (r27904)
- Fix: Tooltip of 'increase service interval' said 'decrease' [FS#6606] (r27895)
- Fix: Console command parser passed invalid strings to the debug output, if command lines had many parameters [FS#6576] (r27884, r27883)
1.7.1 (2017-06-13)
------------------------------------------------------------------------
(None)
1.7.1-RC1 (2017-05-04)
------------------------------------------------------------------------
- Fix: Add missing game script event for ships arriving at a station [FS#6560] (r27859, r27858)
- Fix: StringID truncation to 16 bits broke string remapping test [FS#6555] (r27851)
- Fix: Infinite loop in pathfinder when checking safe waiting position from a waypoint [FS#5926] (r27846)
- Fix: [YAPF] Consider depot as destination before reversing path and applying penalty (r27843)
- Fix: Don't consider locks or ship depots as clear water when placing industries (r27841)
- Fix: Small news window's fake caption was not sized to fit its text (r27838)
- Fix: Black remap did nothing in 8bpp-simple blitter (r27837)
- Fix: Misaligned resize icon due to widget bounds being inclusive (r27831)
- Fix: Update viewport sign dimensions when changing GUI zoom level (r27827, r27819)
- Fix: Vehicle viewport is not user scrollable so flag window as such (r27823)
- Fix: Allow dropdown to be drawn above origin widget even with scrollbar (r27820)
- Fix: 32bpp-anim blitters assumed that pitch and width of the screen were equal [FS#6545] (r27796)
- Fix: Chat text background overflowed due to missing padding [FS#6526] (r27794)
- Fix: Failed to load lzo compressed savegames sometimes [FS#6450] (r27793)
- Fix: [Win32] Mark OpenTTD as DPI-aware to avoid OS window scaling that breaks mouse input [FS#6366] (r27791, r27790)
- Fix: [NewGRF] Get vehicle load amount after executing new cargo trigger [FS#6536] (r27788)
- Fix: AI configuration changed incorrect parameter when some parameters are hidden [FS#6479] (r27787, r27786)
- Fix: Buoys not always drawn after being placed depending on zoom level [FS#6508] (r27785)
- Fix: Allow rail conversion even if ship is on tile [FS#6505] (r27784)
1.7.0 (2017-04-01)
------------------------------------------------------------------------
(None)
1.7.0-RC1 (2017-03-11)
------------------------------------------------------------------------
- Feature: [NewGRF] Extend the DCxx range to D800-DFFF (r27769)
- Feature: [NewGRF, script] Increase the maximum number of GameScript texts to 64k, and NewGRF texts to 512k (r27758)
- Feature: [NewGRF] CB 37 results 0x0401 and 0x0800-0BFF for improved control of display of input cargos in the industry GUI (r27751)
- Feature: Sprites missing in outdated basesets are now provided by openttd.grf (r27732, r27731, r27730)
- Feature: [NewGRF] String command 9A 1E to print the name of a cargo type (r27707, r27706)
- Feature: [Debug] Assign descriptive names to threads [FS#6471] (r27674, r27673, r27670)
- Feature: [NewGRF] Allow composing vehicles from multiple sprites (r27668)
- Change: Enable realistic train and road vehicle acceleration by default (r27760)
- Change: Hide the drive-in stops from the tram station picker (r27734)
- Change: Do not count static NewGRF when checking for the maximum number of NewGRFs in a game (r27729)
- Change: Limit waypoint area by maximum station spread during dragging (r27710)
- Change: [Build] Re-enable Wnarrowing for gcc 4.9+ [FS#6532] (r27709, r27703)
- Change: List railtype of rail tiles explicitly in the tile info window (r27686)
- Change: Re-arrange the autoreplace GUI for trains, and do not filter it by railtype by default (r27683)
- Change: Various performance improvements to CargoDist and LinkGraphs (r27682, r27681, r27614, r27613, r27612, r27611)
- Change: Improve randomisation of rough land appearance (r27657)
- Change: [Build] Enable C++11 for clang 3.3 (r27654)
- Fix: Insufficient thread synchronisation when switching blitters lead to crashes [FS#6510] (r27775)
- Fix: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows [FS#5889] (r27774)
- Fix: Intro games other than the traditional nightly one would cause townname NewGRFs to not get activated in the game options [FS#5819] (r27772)
- Fix: Some variables were not reset between loading old savegames, which made loading them fail [FS#6540] (r27770)
- Fix: Removing secondary roadtypes from bridges was factor 2 too cheap [FS#6538] (r27746)
- Fix: Extra viewports did not center on the selected tile [FS#6537] (r27743)
- Fix: [Build] Building on newer OSX versions with newer SDKs [FS#6295, FS#6502] (r27727, r27675)
- Fix: Improve error message when trying to build rail track over a depot (r27726)
- Fix: Rescanning NewGRF in-game could break the loaded NewGRF, if very many NewGRF were in use (r27721)
- Fix: Text could overflow various GUI elements [FS#6527] (r27713)
- Fix: Memory leak when reloading NewGRF (r27690, r27688, r27687)
- Fix: When removing objects of bankrupt companies the tiles may revert to canal. In that case also check the ownership of the canal [FS#6511] (r27656)
- Fix: Make the console file commands operate independent of the save/load GUI (r27645)
- Fix: When dragging vehicles in group or depot GUI, draw the complete articulated vehicle (r27632)
- Fix: When dragging multiple vehicles in the depot, make the destination gap as long as the chain instead of just considering the first vehicle (r27629)
- Fix: [Build] Change the GCC version detection so that it works with two-digit and truncated versions [FS#6487] (r27623, r27616)
- Fix: Do not hide filtered and highlighted industries by overlapping tiles in the zoomed-out smallmap (r27622, r27621, r27620)
- Fix: [Script] Kill scripts, when a non-suspendable valuator call takes way too long [FS#6473] (r27594)
1.6.1 (2016-07-01)
------------------------------------------------------------------------
- Fix: Compilation and optimisation issues with GCC6 (r27606, r27605, r27595)
- Fix: Compilation with --disable-network [FS#6481] (r27602)
- Fix: [NewGRF] shift-and-add-divide/modulo varadjusts use signed division/modulo (r27600)
- Fix: Company 0 could accept engine previews before they were offered (r27598)
1.6.1-RC1 (2016-06-01)
------------------------------------------------------------------------
- Feature: Mexican Spanish (r27564, r27553, r27552)
- Change: Performance improvement for dedicated servers by skipping drawing calls earlier in the process [FS#6402] (r27579)
- Fix: Automatic servicing of road vehicles compared path finder costs with tile distances, thus vehicles went to depots which were factor 100 too far away [FS#6410] (r27586)
- Fix: Enforce a non-zero load amount for all vehicles, so that vehicles can process their cargo reservations [FS#6437] (r27585, r27584)
- Fix: Do not decrease the column width of depot windows when vehicles with high unitnumbers leave [FS#6415] (r27583)
- Fix: Button size computation in script configuration window [FS#6461] (r27581)
- Fix: [NewGRF] Set date of last service on construction also for wagons and articulated parts [FS#6395] (r27580)
- Fix: Vehicles could not be hidden from the purchase list when they were in exclusive preview [FS#6454] (r27578)
- Fix: Dock and roadstop picker, client list and town authority window did not auto-resize according to their content when they were positioned at the bottom of the screen [FS#6386] (r27577)
- Fix: Various incorrect but uncritical size computations in the content client [FS#6449] (r27576, r27570)
- Fix: Memory leak when disabling palette animation [FS#6404] (r27575)
- Fix: [NewGRF] The house id as returned by house variable 66 was incorrect when querying neighboured tiles [FS#6432] (r27574)
- Fix: [Build] Compilation failure with gcc 6.1 due to headers included after safeguards.h [FS#6467] (r27573)
- Fix: Convenience savegame bump to distinguish 1.6 savegames from 1.5 savegames [FS#6442] (r27572)
- Fix: [Build] Force sorting to be locale independent, so files are always ordered the same and by that token better diff-able (r27562, r27558)
- Fix: Typos in comments and string (r27561, r27560)
- Fix: [Build] bashism that caused different CFLAGS with bash vs dash (r27557)
- Fix: Use a more appropiate sound effect for convert-rail (r27547)
- Fix: Remove SetFill from vehicle GUI buttons, so that the viewport is resized instead of them in case of long window titles (r27546)
- Fix: [Script] Generation of API wrappers (r27545, r27544, r27543)
- Fix: [Windows] ICU got disabled for Windows builds, breaking RTL support [FS#6427] (r27542)
- Fix: [NewGRF] Station spritelayouts did not accept the var10 flag for the palette [FS#6435] (r27534)
1.6.0 (2016-04-01)
------------------------------------------------------------------------
(None)

View File

@@ -58,8 +58,8 @@ set_default() {
enable_translator="0"
enable_unicode="1"
enable_console="1";
enable_assert="1"
enable_strip="0"
enable_assert="0"
enable_strip="1"
enable_universal="0"
enable_osx_g5="0"
enable_cocoa_quartz="1"
@@ -1285,7 +1285,7 @@ make_compiler_cflags() {
# -W alone doesn't enable all warnings enabled by -Wall; on the other hand,
# -Weverything enables too many useless warnings that can't be disabled (as of 3.0)
flags="$flags -Wall -W -Wextra"
flags="$flags -Wall -W"
# warning: unused parameter '...'
flags="$flags -Wno-unused-parameter"
@@ -1326,20 +1326,13 @@ make_compiler_cflags() {
flags="$flags -Wno-unused-variable"
fi
if [ "$cc_version" -ge "33" ]; then
# clang completed C++11 support in version 3.3
flags="$flags -std=c++11"
fi
# rdynamic is used to get useful stack traces from crash reports.
ldflags="$ldflags -rdynamic"
else
# Enable some things only for certain GCC versions
# cc_version = major_version * 100 + minor_version
# For example: "3.3" -> 303, "4.9.2" -> 409, "6" -> 600, "23.5" -> 2305
cc_version=`$1 -dumpversion | $awk -F . '{printf "%d%02d", $1, $2}'`
cc_version=`$1 -dumpversion | cut -c 1,3`
if [ $cc_version -lt 303 ]; then
if [ $cc_version -lt 33 ]; then
log 1 "configure: error: gcc older than 3.3 can't compile OpenTTD because of its poor template support"
exit 1
fi
@@ -1352,20 +1345,20 @@ make_compiler_cflags() {
if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
flags="$flags -Wno-unused-variable"
if [ $cc_version -ge 406 ]; then
if [ $cc_version -ge 46 ]; then
# GCC 4.6 gives more warnings, disable them too
flags="$flags -Wno-unused-but-set-variable"
flags="$flags -Wno-unused-but-set-parameter"
fi
fi
if [ $cc_version -ge 304 ]; then
if [ $cc_version -ge 34 ]; then
# Warn when a variable is used to initialise itself:
# int a = a;
flags="$flags -Winit-self"
fi
if [ $cc_version -ge 400 ]; then
if [ $cc_version -ge 40 ]; then
# GCC 4.0+ complains about that we break strict-aliasing.
# On most places we don't see how to fix it, and it doesn't
# break anything. So disable strict-aliasing to make the
@@ -1376,7 +1369,7 @@ make_compiler_cflags() {
flags="$flags -Wcast-qual"
fi
if [ $cc_version -ge 402 ]; then
if [ $cc_version -ge 42 ]; then
# GCC 4.2+ automatically assumes that signed overflows do
# not occur in signed arithmetics, whereas we are not
# sure that they will not happen. It furthermore complains
@@ -1387,42 +1380,33 @@ make_compiler_cflags() {
flags="$flags -Wnon-virtual-dtor"
fi
if [ $cc_version -ge 403 ] && [ $cc_version -lt 600 ]; then
if [ $cc_version -ge 43 ]; then
# Use gnu++0x mode so static_assert() is available.
# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
cxxflags="$cxxflags -std=gnu++0x"
fi
if [ $cc_version -eq 405 ]; then
if [ $cc_version -eq 45 ]; then
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680
flags="$flags -fno-tree-vrp"
fi
if [ $cc_version -eq 407 ]; then
if [ $cc_version -ge 47 ]; then
# Disable -Wnarrowing which gives many warnings, such as:
# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
# They are valid according to the C++ standard, but useless.
cxxflags="$cxxflags -Wno-narrowing"
fi
if [ $cc_version -ge 407 ]; then
# Disable bogus 'attempt to free a non-heap object' warning
flags="$flags -Wno-free-nonheap-object"
fi
if [ $cc_version -ge 600 ]; then
# -flifetime-dse=2 (default since GCC 6) doesn't play
# well with our custom pool item allocator
cxxflags="$cxxflags -flifetime-dse=1 -std=gnu++14"
fi
if [ "$enable_lto" != "0" ]; then
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
has_lto=`$1 -dumpspecs | grep '\%{flto'`
if [ -n "$has_lto" ]; then
# Use LTO only if we see LTO exists and is requested
if [ $cc_version -lt 406 ]; then
if [ $cc_version -lt 46 ]; then
flags="$flags -flto"
else
flags="$flags -flto=jobserver"
@@ -1506,7 +1490,7 @@ make_cflags_and_ldflags() {
fi
if [ $enable_debug -le 2 ]; then
cc_host_is_gcc=`basename "$cc_host" | grep "gcc" 2>/dev/null`
cc_host_is_gcc=`basename "$cc_host" | grep "gcc" &>/dev/null`
if [ -n "$cc_host_is_gcc" ]; then
# Define only when compiling with GCC. Some GLIBC versions use GNU
# extensions in a way that breaks build with at least ICC.
@@ -1514,14 +1498,14 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
fi
cc_build_is_gcc=`basename "$cc_build" | grep "gcc" 2>/dev/null`
cc_build_is_gcc=`basename "$cc_build" | grep "gcc" &>/dev/null`
if [ -n "$cc_build_is_gcc" ]; then
# Just add -O1 to the tools needed for building.
CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
fi
fi
if [ "$os" = "OSX" ] && [ $cc_version -eq 400 ]; then
if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
# Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization,
# wrongly optimizing ^= in loops. This disables the failing optimisation.
CFLAGS="$CFLAGS -fno-expensive-optimizations"
@@ -1545,7 +1529,7 @@ make_cflags_and_ldflags() {
LDFLAGS="$LDFLAGS -mwin32"
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
if [ $cc_version -lt 406 ]; then
if [ $cc_version -lt 46 ]; then
flags="$flags -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
fi
@@ -1558,10 +1542,10 @@ make_cflags_and_ldflags() {
LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 -limm32"
if [ $cc_version -ge 404 ]; then
if [ $cc_version -ge 44 ]; then
LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
fi
if [ $cc_version -ge 407 ]; then
if [ $cc_version -ge 47 ]; then
CFLAGS="$CFLAGS -mno-ms-bitfields"
fi
fi
@@ -1611,6 +1595,23 @@ make_cflags_and_ldflags() {
CFLAGS="$OSX_SYSROOT $CFLAGS"
LDFLAGS="$OSX_LD_SYSROOT $LDFLAGS"
fi
if [ "$enable_universal" = "0" ] && [ $cc_version -gt 40 ]; then
# Only set the min version when not doing an universal build.
# Universal builds set the version elsewhere.
if [ "$cpu_type" = "64" ]; then
CFLAGS="$CFLAGS -mmacosx-version-min=10.5"
else
gcc_cpu=`$cc_host -dumpmachine`
if [ "`echo $gcc_cpu | cut -c 1-3`" = "ppc" -o "`echo $gcc_cpu | cut -c 1-7`" = "powerpc" ]; then
# PowerPC build can run on 10.3
CFLAGS="$CFLAGS -mmacosx-version-min=10.3"
else
# Intel is only available starting from 10.4
CFLAGS="$CFLAGS -mmacosx-version-min=10.4"
fi
fi
fi
fi
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ]; then
@@ -1773,7 +1774,7 @@ make_cflags_and_ldflags() {
# GCC 4.0+ doesn't like the DirectX includes (gives tons of
# warnings on it we won't be able to fix). For now just
# suppress those warnings.
if [ $cc_version -ge 400 ]; then
if [ $cc_version -ge 40 ]; then
CFLAGS="$CFLAGS -Wno-non-virtual-dtor"
fi
fi

2
configure vendored
View File

@@ -149,7 +149,7 @@ AWKCOMMAND='
# Read the source.list and process it
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`"
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/ { gsub(\".c$\", \".o\", $0); print $0; }'`"
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`"

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2017-12-11
Release version: 1.7.2-RC1
Last updated: 2016-04-01
Release version: 1.6.0
------------------------------------------------------------------------

View File

@@ -11,21 +11,21 @@ palette = DOS
!! description STR_BASEGRAPHICS_DOS_DESCRIPTION
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
ORIG_EXTRA.GRF =
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

View File

@@ -11,21 +11,21 @@ palette = DOS
!! description STR_BASEGRAPHICS_DOS_DE_DESCRIPTION
[files]
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = ORIG_EXTRA.GRF
base = TRG1.GRF
logos = TRGI.GRF
arctic = TRGC.GRF
tropical = TRGH.GRF
toyland = TRGT.GRF
extra = OPENTTD.GRF
[md5s]
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
ORIG_EXTRA.GRF =
TRG1.GRF = 9311676280e5b14077a8ee41c1b42192
TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

View File

@@ -11,21 +11,21 @@ palette = Windows
!! description STR_BASEGRAPHICS_WIN_DESCRIPTION
[files]
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = ORIG_EXTRA.GRF
base = TRG1R.GRF
logos = TRGIR.GRF
arctic = TRGCR.GRF
tropical = TRGHR.GRF
toyland = TRGTR.GRF
extra = OPENTTD.GRF
[md5s]
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
ORIG_EXTRA.GRF =
TRG1R.GRF = b04ce593d8c5016e07473a743d7d3358
TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF =
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
ORIG_EXTRA.GRF = This file was part of your OpenTTD installation.
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
OPENTTD.GRF = This file was part of your OpenTTD installation.

View File

@@ -6,7 +6,7 @@
// 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/>.
//
-1 * 0 0C "Canal graphics by George"
-1 * 0 0C "Canal graphics by George / PaulC"
-1 * 3 05 08 41
// Canal slopes
-1 sprites/canal_locks.png 8bpp 66 8 64 23 -31 0 normal
@@ -77,3 +77,95 @@
-1 sprites/canals.png 8bpp 446 10 24 16 -11 -6 normal
// Canal icon
-1 sprites/canal_locks.png 8bpp 50 232 20 20 0 0 normal
// Differentiation for the climates starts here
// Canal edges (arctic snowy)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 40 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 40 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 40 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 40 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 40 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 40 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 40 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 40 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 40 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 40 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 40 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 40 24 16 -11 -6 normal
-1 * 7 02 05 10 01 00 00 00
// Canal edges (arctic normal)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 70 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 70 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 70 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 70 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 70 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 70 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 70 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 70 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 70 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 70 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 70 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 70 24 16 -11 -6 normal
-1 * 7 02 05 11 01 00 00 00
// Choose the right arctic canal edges
-1 * 14 02 05 12 81 81 00 FF 01 10 00 04 04 11 00
-1 * 6 07 83 01 \7! 01 01
-1 * 7 03 05 01 02 00 12 00
// Canal edges (tropic desert)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 100 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 100 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 100 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 100 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 100 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 100 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 100 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 100 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 100 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 100 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 100 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 100 24 16 -11 -6 normal
-1 * 7 02 05 13 01 00 00 00
// Canal edges (tropic rainforest)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 130 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 130 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 130 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 130 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 130 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 130 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 130 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 130 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 130 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 130 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 130 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 130 24 16 -11 -6 normal
-1 * 7 02 05 14 01 00 00 00
// Choose the right tropic canal edges
-1 * 14 02 05 15 81 81 00 FF 01 13 00 01 01 14 00
-1 * 6 07 83 01 \7! 02 01
-1 * 7 03 05 01 02 00 15 00
// Canal edges (toyland)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 160 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 160 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 160 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 160 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 160 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 160 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 160 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 160 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 160 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 160 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 160 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 160 24 16 -11 -6 normal
-1 * 7 02 05 16 01 00 00 00
-1 * 6 07 83 01 \7! 03 01
-1 * 7 03 05 01 02 00 16 00

View File

@@ -1,101 +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/>.
//
-1 * 0 0C "Extra canal graphics by PaulC"
// Differentiation for the climates starts here
// Canal edges (arctic snowy)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 40 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 40 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 40 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 40 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 40 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 40 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 40 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 40 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 40 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 40 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 40 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 40 24 16 -11 -6 normal
-1 * 7 02 05 10 01 00 00 00
// Canal edges (arctic normal)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 70 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 70 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 70 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 70 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 70 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 70 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 70 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 70 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 70 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 70 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 70 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 70 24 16 -11 -6 normal
-1 * 7 02 05 11 01 00 00 00
// Choose the right arctic canal edges
-1 * 14 02 05 12 81 81 00 FF 01 10 00 04 04 11 00
-1 * 6 07 83 01 \7! 01 01
-1 * 7 03 05 01 02 00 12 00
// Canal edges (tropic desert)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 100 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 100 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 100 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 100 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 100 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 100 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 100 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 100 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 100 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 100 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 100 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 100 24 16 -11 -6 normal
-1 * 7 02 05 13 01 00 00 00
// Canal edges (tropic rainforest)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 130 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 130 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 130 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 130 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 130 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 130 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 130 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 130 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 130 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 130 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 130 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 130 24 16 -11 -6 normal
-1 * 7 02 05 14 01 00 00 00
// Choose the right tropic canal edges
-1 * 14 02 05 15 81 81 00 FF 01 13 00 01 01 14 00
-1 * 6 07 83 01 \7! 02 01
-1 * 7 03 05 01 02 00 15 00
// Canal edges (toyland)
-1 * 4 01 05 01 \b12
-1 sprites/canals.png 8bpp 30 160 45 22 -11 -1 normal
-1 sprites/canals.png 8bpp 94 160 41 21 -8 10 normal
-1 sprites/canals.png 8bpp 142 160 42 21 -31 10 normal
-1 sprites/canals.png 8bpp 190 160 43 22 -31 -1 normal
-1 sprites/canals.png 8bpp 238 160 22 22 11 4 normal
-1 sprites/canals.png 8bpp 270 160 24 16 -11 15 normal
-1 sprites/canals.png 8bpp 302 160 23 23 -31 4 normal
-1 sprites/canals.png 8bpp 334 160 24 18 -11 -1 normal
-1 sprites/canals.png 8bpp 366 160 12 11 21 10 normal
-1 sprites/canals.png 8bpp 398 160 19 10 -8 21 normal
-1 sprites/canals.png 8bpp 430 160 11 10 -31 10 normal
-1 sprites/canals.png 8bpp 446 160 24 16 -11 -6 normal
-1 * 7 02 05 16 01 00 00 00
-1 * 6 07 83 01 \7! 03 01
-1 * 7 03 05 01 02 00 16 00

View File

@@ -8,7 +8,245 @@
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
// Note: Characters in range U+0020..U+00FF may only be defined in chars_orig_extra.nfo.
// Replace original characters
-1 * 5 0A 01 02 41 00
-1 sprites/chars.png 8bpp 10 10 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 10 4 12 0 -1 normal
-1 * 5 0A 01 02 86 00
-1 sprites/chars.png 8bpp 50 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 10 9 12 0 -1 normal
-1 * 5 0A 01 01 8A 00
-1 sprites/chars.png 8bpp 120 10 6 12 0 -1 normal
-1 * 5 0A 01 01 A0 00
-1 sprites/chars.png 8bpp 230 10 10 12 0 -1 normal
-1 * 5 0A 01 04 A2 00
-1 sprites/chars.png 8bpp 260 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 290 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 350 10 8 12 0 -1 normal
-1 * 5 0A 01 06 A7 00
-1 sprites/chars.png 8bpp 410 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 440 10 12 12 0 -1 normal
-1 sprites/chars.png 8bpp 470 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 480 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 500 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 520 10 7 12 0 -1 normal
-1 * 5 0A 01 03 AE 00
-1 sprites/chars.png 8bpp 560 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 570 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 580 10 5 12 0 -1 normal
-1 * 5 0A 01 05 B3 00
-1 sprites/chars.png 8bpp 620 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 640 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 660 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 680 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 700 10 9 12 0 -1 normal
-1 * 5 0A 01 03 BB 00
-1 sprites/chars.png 8bpp 770 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 70 8 12 0 -1 normal
-1 * 5 0A 01 01 BF 00
-1 sprites/chars.png 8bpp 70 70 9 12 0 -1 normal
-1 * 5 0A 01 05 C1 00
-1 sprites/chars.png 8bpp 450 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 120 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 140 70 6 12 0 -1 normal
-1 * 5 0A 01 01 C7 00
-1 sprites/chars.png 8bpp 160 70 6 12 0 -1 normal
-1 * 5 0A 01 03 CA 00
-1 sprites/chars.png 8bpp 200 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 70 6 12 0 -1 normal
-1 * 5 0A 01 04 CE 00
-1 sprites/chars.png 8bpp 230 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 240 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 70 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 260 70 5 12 0 -1 normal
-1 * 5 0A 01 05 D3 00
-1 sprites/chars.png 8bpp 290 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 310 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 330 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 340 70 6 12 0 -1 normal
-1 * 5 0A 01 03 DB 00
-1 sprites/chars.png 8bpp 390 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 400 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 410 70 6 12 0 -1 normal
-1 * 5 0A 01 02 DF 00
-1 sprites/chars.png 8bpp 420 70 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 430 70 6 12 0 -1 normal
-1 * 5 0A 01 01 22 01
-1 sprites/chars.png 8bpp 20 30 2 7 0 0 normal
-1 * 5 0A 01 01 7D 01
-1 sprites/chars.png 8bpp 220 30 4 7 0 0 normal
-1 * 5 0A 01 02 80 01
-1 sprites/chars.png 8bpp 230 30 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 30 3 7 0 0 normal
-1 * 5 0A 01 01 89 01
-1 sprites/chars.png 8bpp 470 30 3 7 0 0 normal
-1 * 5 0A 01 01 9F 01
-1 sprites/chars.png 8bpp 70 90 3 7 0 0 normal
-1 * 5 0A 01 01 A9 01
-1 sprites/chars.png 8bpp 190 90 3 7 0 0 normal
-1 * 5 0A 01 02 BF 01
-1 sprites/chars.png 8bpp 420 90 3 7 0 0 normal
-1 sprites/chars.png 8bpp 430 90 3 7 0 0 normal
-1 * 5 0A 01 01 02 02
-1 sprites/chars.png 8bpp 20 40 4 21 0 -2 normal
-1 * 5 0A 01 01 41 02
-1 sprites/chars.png 8bpp 30 40 14 21 0 -2 normal
-1 * 5 0A 01 06 46 02
-1 sprites/chars.png 8bpp 50 40 10 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 40 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 100 40 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 120 40 7 21 0 -2 normal
-1 sprites/chars.png 8bpp 130 40 16 21 0 -2 normal
-1 * 5 0A 01 01 50 02
-1 sprites/chars.png 8bpp 150 40 16 21 0 -2 normal
-1 * 5 0A 01 04 52 02
-1 sprites/chars.png 8bpp 170 40 8 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 190 40 6 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 40 6 21 0 -2 normal
-1 * 5 0A 01 01 5C 02
-1 sprites/chars.png 8bpp 210 40 7 21 0 -2 normal
-1 * 5 0A 01 01 60 02
-1 sprites/chars.png 8bpp 230 40 16 21 0 -2 normal
-1 * 5 0A 01 07 62 02
-1 sprites/chars.png 8bpp 260 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 320 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 350 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 380 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 410 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 440 40 24 21 0 -2 normal
-1 * 5 0A 01 18 6A 02
-1 sprites/chars.png 8bpp 480 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 500 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 520 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 540 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 560 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 570 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 580 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 590 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 600 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 620 40 18 21 0 -2 normal
-1 sprites/chars.png 8bpp 640 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 660 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 680 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 700 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 720 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 740 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 750 40 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 770 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 10 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 450 100 14 21 0 -2 normal
-1 * 5 0A 01 01 85 02
-1 sprites/chars.png 8bpp 140 100 12 21 0 -2 normal
-1 * 5 0A 01 01 88 02
-1 sprites/chars.png 8bpp 170 100 19 21 0 -2 normal
-1 * 5 0A 01 02 92 02
-1 sprites/chars.png 8bpp 270 100 11 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 100 15 21 0 -2 normal
-1 * 5 0A 01 01 97 02
-1 sprites/chars.png 8bpp 340 100 11 21 0 -2 normal
-1 * 5 0A 01 02 99 02
-1 sprites/chars.png 8bpp 360 100 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 370 100 11 21 0 -2 normal
-1 * 5 0A 01 01 A0 02
-1 sprites/chars.png 8bpp 430 100 14 21 0 -2 normal
// New characters, all fonts except monospaced
// U+007B: Left Curly Bracket
// U+007C: Vertical Line
// U+007D: Right Curly Bracket
// U+007E: Tilde
-1 * 14 12 03 00 04 7B 00 01 04 7B 00 02 04 7B 00
-1 sprites/chars.png 8bpp 10 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 50 130 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 20 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 30 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 50 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 10 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 20 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 160 10 21 0 -2 normal
// U+007F: No-Break Space
-1 * 14 12 03 00 01 7F 00 01 01 7F 00 02 01 7F 00
-1 sprites/chars.png 8bpp 70 130 2 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 70 160 5 21 0 -2 normal
// U+00AA: Feminine Ordinal Indicator
-1 * 14 12 03 00 01 AA 00 01 01 AA 00 02 01 AA 00
-1 sprites/chars.png 8bpp 80 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 80 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 80 160 7 21 0 -2 normal
// U+00AC: Not Sign
// U+00AD: Soft Hyphen
-1 * 14 12 03 00 02 AC 00 01 02 AC 00 02 02 AC 00
-1 sprites/chars.png 8bpp 90 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 90 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 110 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 90 160 12 21 0 -2 normal
-1 sprites/chars.png 8bpp 110 160 9 21 0 -2 normal
// U+00AF: Macron
-1 * 14 12 03 00 01 AF 00 01 01 AF 00 02 01 AF 00
-1 sprites/chars.png 8bpp 130 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 130 160 12 21 0 -2 normal
// U+00B4: Acute Accent
// U+00B5: Micro Sign
// U+00B6: Pilcrow Sign
// U+00B7: Middle Dot
// U+00B8: Cedilla
// U+00B9: Superscript One
-1 * 14 12 03 00 06 B4 00 01 06 B4 00 02 06 B4 00
-1 sprites/chars.png 8bpp 150 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 160 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 180 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 200 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 150 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 160 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 180 150 6 7 0 0 normal
-1 sprites/chars.png 8bpp 200 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 210 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 220 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 150 160 4 21 0 -2 normal
-1 sprites/chars.png 8bpp 160 160 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 160 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 210 160 5 21 0 -2 normal
-1 sprites/chars.png 8bpp 220 160 6 21 0 -2 normal
// U+00BC: Vulgar Fraction One Quarter
// U+00BD: Vulgar Fraction One Half
-1 * 14 12 03 00 02 BC 00 01 02 BC 00 02 02 BC 00
-1 sprites/chars.png 8bpp 230 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 230 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 230 160 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 250 160 16 21 0 -2 normal
// New characters, all fonts

View File

@@ -1,249 +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/>.
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
// Replace original characters
-1 * 5 0A 01 02 41 00
-1 sprites/chars.png 8bpp 10 10 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 10 4 12 0 -1 normal
-1 * 5 0A 01 02 86 00
-1 sprites/chars.png 8bpp 50 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 10 9 12 0 -1 normal
-1 * 5 0A 01 01 8A 00
-1 sprites/chars.png 8bpp 120 10 6 12 0 -1 normal
-1 * 5 0A 01 01 A0 00
-1 sprites/chars.png 8bpp 230 10 10 12 0 -1 normal
-1 * 5 0A 01 04 A2 00
-1 sprites/chars.png 8bpp 260 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 290 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 350 10 8 12 0 -1 normal
-1 * 5 0A 01 06 A7 00
-1 sprites/chars.png 8bpp 410 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 440 10 12 12 0 -1 normal
-1 sprites/chars.png 8bpp 470 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 480 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 500 10 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 520 10 7 12 0 -1 normal
-1 * 5 0A 01 03 AE 00
-1 sprites/chars.png 8bpp 560 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 570 10 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 580 10 5 12 0 -1 normal
-1 * 5 0A 01 05 B3 00
-1 sprites/chars.png 8bpp 620 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 640 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 660 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 680 10 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 700 10 9 12 0 -1 normal
-1 * 5 0A 01 03 BB 00
-1 sprites/chars.png 8bpp 770 10 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 70 8 12 0 -1 normal
-1 * 5 0A 01 01 BF 00
-1 sprites/chars.png 8bpp 70 70 9 12 0 -1 normal
-1 * 5 0A 01 05 C1 00
-1 sprites/chars.png 8bpp 450 70 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 120 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 140 70 6 12 0 -1 normal
-1 * 5 0A 01 01 C7 00
-1 sprites/chars.png 8bpp 160 70 6 12 0 -1 normal
-1 * 5 0A 01 03 CA 00
-1 sprites/chars.png 8bpp 200 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 70 6 12 0 -1 normal
-1 * 5 0A 01 04 CE 00
-1 sprites/chars.png 8bpp 230 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 240 70 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 70 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 260 70 5 12 0 -1 normal
-1 * 5 0A 01 05 D3 00
-1 sprites/chars.png 8bpp 290 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 310 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 320 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 330 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 340 70 6 12 0 -1 normal
-1 * 5 0A 01 03 DB 00
-1 sprites/chars.png 8bpp 390 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 400 70 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 410 70 6 12 0 -1 normal
-1 * 5 0A 01 02 DF 00
-1 sprites/chars.png 8bpp 420 70 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 430 70 6 12 0 -1 normal
-1 * 5 0A 01 01 22 01
-1 sprites/chars.png 8bpp 20 30 2 7 0 0 normal
-1 * 5 0A 01 01 7D 01
-1 sprites/chars.png 8bpp 220 30 4 7 0 0 normal
-1 * 5 0A 01 02 80 01
-1 sprites/chars.png 8bpp 230 30 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 30 3 7 0 0 normal
-1 * 5 0A 01 01 89 01
-1 sprites/chars.png 8bpp 470 30 3 7 0 0 normal
-1 * 5 0A 01 01 9F 01
-1 sprites/chars.png 8bpp 70 90 3 7 0 0 normal
-1 * 5 0A 01 01 A9 01
-1 sprites/chars.png 8bpp 190 90 3 7 0 0 normal
-1 * 5 0A 01 02 BF 01
-1 sprites/chars.png 8bpp 420 90 3 7 0 0 normal
-1 sprites/chars.png 8bpp 430 90 3 7 0 0 normal
-1 * 5 0A 01 01 02 02
-1 sprites/chars.png 8bpp 20 40 4 21 0 -2 normal
-1 * 5 0A 01 01 41 02
-1 sprites/chars.png 8bpp 30 40 14 21 0 -2 normal
-1 * 5 0A 01 06 46 02
-1 sprites/chars.png 8bpp 50 40 10 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 40 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 100 40 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 120 40 7 21 0 -2 normal
-1 sprites/chars.png 8bpp 130 40 16 21 0 -2 normal
-1 * 5 0A 01 01 50 02
-1 sprites/chars.png 8bpp 150 40 16 21 0 -2 normal
-1 * 5 0A 01 04 52 02
-1 sprites/chars.png 8bpp 170 40 8 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 190 40 6 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 40 6 21 0 -2 normal
-1 * 5 0A 01 01 5C 02
-1 sprites/chars.png 8bpp 210 40 7 21 0 -2 normal
-1 * 5 0A 01 01 60 02
-1 sprites/chars.png 8bpp 230 40 16 21 0 -2 normal
-1 * 5 0A 01 07 62 02
-1 sprites/chars.png 8bpp 260 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 320 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 350 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 380 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 410 40 20 21 0 -2 normal
-1 sprites/chars.png 8bpp 440 40 24 21 0 -2 normal
-1 * 5 0A 01 18 6A 02
-1 sprites/chars.png 8bpp 480 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 500 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 520 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 540 40 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 560 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 570 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 580 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 590 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 600 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 620 40 18 21 0 -2 normal
-1 sprites/chars.png 8bpp 640 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 660 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 680 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 700 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 720 40 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 740 40 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 750 40 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 770 40 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 10 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 100 17 21 0 -2 normal
-1 sprites/chars.png 8bpp 70 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 90 100 14 21 0 -2 normal
-1 sprites/chars.png 8bpp 450 100 14 21 0 -2 normal
-1 * 5 0A 01 01 85 02
-1 sprites/chars.png 8bpp 140 100 12 21 0 -2 normal
-1 * 5 0A 01 01 88 02
-1 sprites/chars.png 8bpp 170 100 19 21 0 -2 normal
-1 * 5 0A 01 02 92 02
-1 sprites/chars.png 8bpp 270 100 11 21 0 -2 normal
-1 sprites/chars.png 8bpp 290 100 15 21 0 -2 normal
-1 * 5 0A 01 01 97 02
-1 sprites/chars.png 8bpp 340 100 11 21 0 -2 normal
-1 * 5 0A 01 02 99 02
-1 sprites/chars.png 8bpp 360 100 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 370 100 11 21 0 -2 normal
-1 * 5 0A 01 01 A0 02
-1 sprites/chars.png 8bpp 430 100 14 21 0 -2 normal
// New characters, all fonts except monospaced
// U+007B: Left Curly Bracket
// U+007C: Vertical Line
// U+007D: Right Curly Bracket
// U+007E: Tilde
-1 * 14 12 03 00 04 7B 00 01 04 7B 00 02 04 7B 00
-1 sprites/chars.png 8bpp 10 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 20 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 30 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 50 130 7 12 0 -1 normal
-1 sprites/chars.png 8bpp 10 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 20 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 30 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 50 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 10 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 20 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 30 160 9 21 0 -2 normal
-1 sprites/chars.png 8bpp 50 160 10 21 0 -2 normal
// U+007F: No-Break Space
-1 * 14 12 03 00 01 7F 00 01 01 7F 00 02 01 7F 00
-1 sprites/chars.png 8bpp 70 130 2 12 0 -1 normal
-1 sprites/chars.png 8bpp 70 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 70 160 5 21 0 -2 normal
// U+00AA: Feminine Ordinal Indicator
-1 * 14 12 03 00 01 AA 00 01 01 AA 00 02 01 AA 00
-1 sprites/chars.png 8bpp 80 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 80 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 80 160 7 21 0 -2 normal
// U+00AC: Not Sign
// U+00AD: Soft Hyphen
-1 * 14 12 03 00 02 AC 00 01 02 AC 00 02 02 AC 00
-1 sprites/chars.png 8bpp 90 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 110 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 90 150 4 7 0 0 normal
-1 sprites/chars.png 8bpp 110 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 90 160 12 21 0 -2 normal
-1 sprites/chars.png 8bpp 110 160 9 21 0 -2 normal
// U+00AF: Macron
-1 * 14 12 03 00 01 AF 00 01 01 AF 00 02 01 AF 00
-1 sprites/chars.png 8bpp 130 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 130 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 130 160 12 21 0 -2 normal
// U+00B4: Acute Accent
// U+00B5: Micro Sign
// U+00B6: Pilcrow Sign
// U+00B7: Middle Dot
// U+00B8: Cedilla
// U+00B9: Superscript One
-1 * 14 12 03 00 06 B4 00 01 06 B4 00 02 06 B4 00
-1 sprites/chars.png 8bpp 150 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 160 130 6 12 0 -1 normal
-1 sprites/chars.png 8bpp 180 130 8 12 0 -1 normal
-1 sprites/chars.png 8bpp 200 130 3 12 0 -1 normal
-1 sprites/chars.png 8bpp 210 130 4 12 0 -1 normal
-1 sprites/chars.png 8bpp 220 130 5 12 0 -1 normal
-1 sprites/chars.png 8bpp 150 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 160 150 3 7 0 0 normal
-1 sprites/chars.png 8bpp 180 150 6 7 0 0 normal
-1 sprites/chars.png 8bpp 200 150 1 7 0 0 normal
-1 sprites/chars.png 8bpp 210 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 220 150 2 7 0 0 normal
-1 sprites/chars.png 8bpp 150 160 4 21 0 -2 normal
-1 sprites/chars.png 8bpp 160 160 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 180 160 13 21 0 -2 normal
-1 sprites/chars.png 8bpp 200 160 3 21 0 -2 normal
-1 sprites/chars.png 8bpp 210 160 5 21 0 -2 normal
-1 sprites/chars.png 8bpp 220 160 6 21 0 -2 normal
// U+00BC: Vulgar Fraction One Quarter
// U+00BD: Vulgar Fraction One Half
-1 * 14 12 03 00 02 BC 00 01 02 BC 00 02 02 BC 00
-1 sprites/chars.png 8bpp 230 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 250 130 10 12 0 -1 normal
-1 sprites/chars.png 8bpp 230 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 250 150 9 7 0 0 normal
-1 sprites/chars.png 8bpp 230 160 16 21 0 -2 normal
-1 sprites/chars.png 8bpp 250 160 16 21 0 -2 normal

View File

@@ -60,11 +60,10 @@
00
// GRF ID, must start with FF so it gets ignored
//@@WARNING DISABLE 101
-1 * 0 08 08 FF FF FF FE
-1 * 0 08 08 FF "OTT"
// Name of the GRF
"OpenTTD's default and fallback extra graphics" 00
"OpenTTD's base graphics " 00
// Description of the GRF.
"License: GNU General Public License version 2" 0D
@@ -87,6 +86,7 @@
#include "canals.nfo"
#include "oneway.nfo"
#include "tramtracks.nfo"
#include "shore.nfo"
#include "sloped_tracks.nfo"
#include "airports.nfo"
#include "roadstops.nfo"
@@ -97,5 +97,11 @@
#include "airport_preview.nfo"
#include "chars.nfo"
#include "mono.nfo"
#include "fix_graphics.nfo"
#include "rivers/rapids.nfo"
#include "rivers/temperate.nfo"
#include "rivers/arctic.nfo"
#include "rivers/tropic.nfo"
#include "rivers/toyland.nfo"
#include "tunnel_portals.nfo"
#include "palette.nfo"

View File

@@ -1,86 +0,0 @@
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 32)
// Format: spritenum imagefile depth xpos ypos xsize ysize xrel yrel zoom flags
//
// $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/>.
//
// Sources for extra graphics to complement the original graphics.
// Checks whether the correct version of OpenTTD is used before
// allowing it to be used.
//
//
// Number of sprites, it is wrong, but GRFcodec automagically gets it right.
//
0 * 4 00 00 00 00
//
// Check whether we are running OTTD or not.
//
-1 * 0 07 9D 04 \7= 01 00 00 00 01
-1 * 0 0B 03 7F FF 80 " is not for TTDPatch. Use ttdpatch(w).grf." 00
//
// Check for OTTD's version number
//
// First step... Variable A1 might not exist. If that's the case it always
// skips. As we do not want to skip out of the whole testing, we skip over
// the real version check.
-1 * 0 07 A1 04 \7= FF FF FF FF 02
// Real version check.
-1 * 0 07 A1 04 \7> \w20304 01 01 03
// If the version check is supported, the string is translateable via OpenTTD
// itself. Use it!.
-1 * 0 0B 03 7F 06 "1.1 (or trunk r20304)" 00
// Some OTTD versions before r11130 did support Action B, so use the English
// phrase there
-1 * 0 0B 03 7F FF "Requires OpenTTD version 1.1 (or trunk r20304) or better." 00
// Final fallback. No Action B support, just skip to the end of the file.
-1 * 0 07 A1 04 \7= FF FF FF FF 00
// We are a DOS paletted NewGRF, so tell OpenTTD that. Then it can actually
// do the right thing. Yay for that feature as that means no duplicate NewGRF!
-1 * 0 14
"C" "INFO"
"B" "PALS" \w1 "D"
00
00
// GRF ID, must start with FF so it gets ignored
//@@WARNING DISABLE 101
-1 * 0 08 08 FF "OTT"
// Name of the GRF
"Original baseset extra graphics" 00
// Description of the GRF.
"License: GNU General Public License version 2" 0D
"Andrew Parkhouse: rivers" 0D
"Addi and PaulC: original graphics fixes" 0D
"OpenTTD developers: other graphics" 00
//
// The real data of the GRF is acquired from several subfiles.
//
#include "chars_orig_extra.nfo"
#include "shore.nfo"
#include "fix_graphics.nfo"
#include "canals_extra.nfo"
#include "rivers/rapids.nfo"
#include "rivers/temperate.nfo"
#include "rivers/arctic.nfo"
#include "rivers/tropic.nfo"
#include "rivers/toyland.nfo"

View File

@@ -1,45 +1,3 @@
openttd (1.7.2~RC1-0) unstable; urgency=low
* New upstream release 1.7.2-RC1
-- OpenTTD <info@openttd.org> Mon, 11 Dec 2017 21:30:00 +0100
openttd (1.7.1-0) unstable; urgency=low
* New upstream release 1.7.1
-- OpenTTD <info@openttd.org> Tue, 13 Jun 2017 21:00:00 +0200
openttd (1.7.1~RC1-0) unstable; urgency=low
* New upstream release 1.7.1-RC1
-- OpenTTD <info@openttd.org> Thu, 04 Mai 2017 21:00:00 +0200
openttd (1.7.0-0) unstable; urgency=low
* New upstream release 1.7.0
-- OpenTTD <info@openttd.org> Sat, 01 Apr 2017 19:00:00 +0200
openttd (1.7.0~RC1-0) unstable; urgency=low
* New upstream release 1.7.0-RC1
-- OpenTTD <info@openttd.org> Sat, 11 Mar 2017 22:30:00 +0100
openttd (1.6.1-0) unstable; urgency=low
* New upstream release 1.6.1
-- OpenTTD <info@openttd.org> Fri, 01 Jul 2016 00:00:00 +0200
openttd (1.6.1~RC1-0) unstable; urgency=low
* New upstream release 1.6.1-RC1
-- OpenTTD <info@openttd.org> Wed, 01 Jun 2016 21:00:00 +0200
openttd (1.6.0-0) unstable; urgency=low
* New upstream release 1.6.0

View File

@@ -5,7 +5,7 @@ Source: http://www.openttd.org
Files: *
Copyright: © 2004-2017 Ludvig Strigeous and others.
Copyright: © 2004-2012 Ludvig Strigeous and others.
License: GPL-2.0
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.0 as

View File

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

View File

@@ -2,7 +2,7 @@
# spec file for package openttd
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007-2017 The OpenTTD developers
# Copyright (c) 2007-2012 The OpenTTD developers
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.7.beta1
Version: 1.6.beta1
Release: 0
%define srcver 1.7.0-beta1
%define srcver 1.6.0-beta1
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0
Group: Amusements/Games/Strategy/Other

View File

@@ -1,9 +1,9 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 7
!define APPV_MAINT 2
!define APPV_BUILD 0
!define APPV_EXTRA "-RC1"
!define APPV_MINOR 6
!define APPV_MAINT 0
!define APPV_BUILD 1
!define APPV_EXTRA ""
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
@@ -408,7 +408,6 @@ Section "Uninstall"
; Baseset files
Delete "$INSTDIR\baseset\opntitle.dat"
Delete "$INSTDIR\baseset\openttd.grf"
Delete "$INSTDIR\baseset\orig_extra.grf"
Delete "$INSTDIR\baseset\orig_win.obg"
Delete "$INSTDIR\baseset\orig_dos.obg"
Delete "$INSTDIR\baseset\orig_dos_de.obg"

View File

@@ -1,7 +0,0 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" >
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>True/PM</dpiAware>
</windowsSettings>
</application>
</assembly>

View File

@@ -317,12 +317,6 @@
<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_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX 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_MX.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>

View File

@@ -142,9 +142,6 @@
<CustomBuild Include="..\src\lang\slovenian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Filter>Translations</Filter>
</CustomBuild>

View File

@@ -317,12 +317,6 @@
<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_MX.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating spanish_MX 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_MX.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>

View File

@@ -142,9 +142,6 @@
<CustomBuild Include="..\src\lang\slovenian.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish_MX.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\spanish.txt">
<Filter>Translations</Filter>
</CustomBuild>

View File

@@ -738,21 +738,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\spanish_MX.txt"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating spanish_MX language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;&#x0D;&#x0A;exit 0&#x0D;&#x0A;"
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
Outputs="..\bin\lang\spanish_MX.lng"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\spanish.txt"
>

View File

@@ -739,21 +739,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\spanish_MX.txt"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating spanish_MX language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;&#x0D;&#x0A;exit 0&#x0D;&#x0A;"
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
Outputs="..\bin\lang\spanish_MX.lng"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\spanish.txt"
>

View File

@@ -102,7 +102,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -145,9 +145,6 @@
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -159,7 +156,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -191,9 +188,6 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -210,7 +204,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -250,9 +244,6 @@
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -265,7 +256,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -298,9 +289,6 @@
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\airport.cpp" />

View File

@@ -102,7 +102,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -145,9 +145,6 @@
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -159,7 +156,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -191,9 +188,6 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -210,7 +204,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -250,9 +244,6 @@
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -265,7 +256,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -298,9 +289,6 @@
<StackCommitSize>1048576</StackCommitSize>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>dpi_aware.manifest</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!

View File

@@ -105,7 +105,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -151,9 +151,6 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -166,7 +163,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -201,9 +198,6 @@
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -220,7 +214,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -263,9 +257,6 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -279,7 +270,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -315,9 +306,6 @@
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\airport.cpp" />

View File

@@ -105,7 +105,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -151,9 +151,6 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
@@ -166,7 +163,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -201,9 +198,6 @@
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
@@ -220,7 +214,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>Sync</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -263,9 +257,6 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -279,7 +270,7 @@
<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_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<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>
@@ -315,9 +306,6 @@
<TargetMachine>MachineX64</TargetMachine>
<MinimumRequiredVersion>5.02</MinimumRequiredVersion>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
!!FILES!!

View File

@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -156,7 +156,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
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=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -257,7 +257,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
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=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -362,7 +362,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
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=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

View File

@@ -52,7 +52,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -156,7 +156,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
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=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -257,7 +257,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
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=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -362,7 +362,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
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=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

View File

@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -155,7 +155,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
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=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -255,7 +255,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
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=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -359,7 +359,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
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=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

View File

@@ -53,7 +53,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;WITH_ASSERT"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -155,7 +155,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;"
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=\&quot;OpenTTD\&quot;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
@@ -255,7 +255,7 @@
FavorSizeOrSpeed="2"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64;WITH_ASSERT"
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=\&quot;OpenTTD\&quot;;_SQ64"
StringPooling="true"
ExceptionHandling="1"
RuntimeLibrary="0"
@@ -359,7 +359,7 @@
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU_SORT;WITH_ICU_LAYOUT;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\&quot;OpenTTD\&quot;;_SQ64"
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=\&quot;OpenTTD\&quot;;_SQ64"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

View File

@@ -1,5 +1,5 @@
Last updated: 2017-12-11
Release version: 1.7.2-RC1
Last updated: 2016-04-01
Release version: 1.6.0
------------------------------------------------------------------------

View File

@@ -119,10 +119,10 @@ static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
const SQChar *sErr = 0;
if(sq_gettop(v)>=1) {
if(SQ_SUCCEEDED(sq_getstring(v,2,&sErr))) {
pf(v,"\nAN ERROR HAS OCCURRED [%s]\n",sErr);
pf(v,"\nAN ERROR HAS OCCURED [%s]\n",sErr);
}
else{
pf(v,"\nAN ERROR HAS OCCURRED [unknown]\n");
pf(v,"\nAN ERROR HAS OCCURED [unknown]\n");
}
sqstd_printcallstack(v);
}

View File

@@ -798,8 +798,7 @@ SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx)
switch(type) {
case OT_TABLE:
if(type(mt) == OT_TABLE) {
if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle");
v->Pop();}
if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle"); v->Pop();}
else if(type(mt)==OT_NULL) {
_table(self)->SetDelegate(NULL); v->Pop(); }
else return sq_aux_invalidtype(v,type);

View File

@@ -105,7 +105,7 @@ void SQVM::Raise_IdxError(const SQObject &o)
void SQVM::Raise_CompareError(const SQObject &o1, const SQObject &o2)
{
SQObjectPtr oval1 = PrintObjVal(o1), oval2 = PrintObjVal(o2);
Raise_Error("comparison between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2));
Raise_Error("comparsion between '%.50s' and '%.50s'", _stringval(oval1), _stringval(oval2));
}

View File

@@ -28,7 +28,6 @@
#include "../widgets/dropdown_type.h"
#include "../widgets/dropdown_func.h"
#include "../hotkeys.h"
#include "../core/geometry_func.hpp"
#include "ai.hpp"
#include "ai_gui.hpp"
@@ -306,6 +305,7 @@ struct AISettingsWindow : public Window {
timeout(0)
{
this->ai_config = GetConfig(slot);
this->RebuildVisibleSettings();
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_AIS_SCROLLBAR);
@@ -313,7 +313,7 @@ struct AISettingsWindow : public Window {
this->SetWidgetDisabledState(WID_AIS_RESET, _game_mode != GM_MENU && Company::IsValidID(this->slot));
this->RebuildVisibleSettings();
this->vscroll->SetCount((int)this->visible_settings.size());
}
virtual void SetStringParameters(int widget) const
@@ -341,8 +341,6 @@ struct AISettingsWindow : public Window {
visible_settings.push_back(&(*it));
}
}
this->vscroll->SetCount((int)this->visible_settings.size());
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
@@ -532,23 +530,21 @@ struct AISettingsWindow : public Window {
virtual void OnQueryTextFinished(char *str)
{
if (StrEmpty(str)) return;
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
for (int i = 0; i < this->clicked_row; i++) it++;
const ScriptConfigItem config_item = **it;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
int32 value = atoi(str);
this->ai_config->SetSetting(config_item.name, value);
this->ai_config->SetSetting((*it).name, value);
this->SetDirty();
}
virtual void OnDropdownSelect(int widget, int index)
{
assert(this->clicked_dropdown);
VisibleSettingsList::const_iterator it = this->visible_settings.begin();
ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
for (int i = 0; i < this->clicked_row; i++) it++;
const ScriptConfigItem config_item = **it;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return;
this->ai_config->SetSetting(config_item.name, index);
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
this->ai_config->SetSetting((*it).name, index);
this->SetDirty();
}
@@ -770,22 +766,6 @@ struct AIConfigWindow : public Window {
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
size->height = 8 * this->line_height;
break;
case WID_AIC_CHANGE: {
SetDParam(0, STR_AI_CONFIG_CHANGE_GAMESCRIPT);
Dimension dim = GetStringBoundingBox(STR_AI_CONFIG_CHANGE);
SetDParam(0, STR_AI_CONFIG_CHANGE_NONE);
dim = maxdim(dim, GetStringBoundingBox(STR_AI_CONFIG_CHANGE));
SetDParam(0, STR_AI_CONFIG_CHANGE_AI);
dim = maxdim(dim, GetStringBoundingBox(STR_AI_CONFIG_CHANGE));
dim.width += padding.width;
dim.height += padding.height;
*size = maxdim(*size, dim);
break;
}
}
}

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 ||
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.7") == 0;
strcmp(api_version, "1.5") == 0 || strcmp(api_version, "1.6") == 0;
}
#if defined(WIN32)

View File

@@ -93,7 +93,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
void UpdateDeltaXY(Direction direction);
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_AIRCRAFT_INC : EXPENSES_AIRCRAFT_RUN; }
bool IsPrimaryVehicle() const { return this->IsNormalAircraft(); }
void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
SpriteID GetImage(Direction direction, EngineImageType image_type) const;
int GetDisplaySpeed() const { return this->cur_speed; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
int GetSpeedOldUnits() const { return this->vcache.cached_max_speed * 10 / 128; }
@@ -141,7 +141,7 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
*/
#define FOR_ALL_AIRCRAFT(var) FOR_ALL_VEHICLES_OF_TYPE(Aircraft, var)
void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result);
SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type);
Station *GetTargetAirportIfValid(const Aircraft *v);

View File

@@ -152,69 +152,64 @@ static StationID FindNearestHangar(const Aircraft *v)
return index;
}
void Aircraft::GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const
SpriteID Aircraft::GetImage(Direction direction, EngineImageType image_type) const
{
uint8 spritenum = this->spritenum;
if (is_custom_sprite(spritenum)) {
GetCustomVehicleSprite(this, direction, image_type, result);
if (result->IsValid()) return;
SpriteID sprite = GetCustomVehicleSprite(this, direction, image_type);
if (sprite != 0) return sprite;
spritenum = this->GetEngine()->original_image_index;
}
assert(IsValidImageIndex<VEH_AIRCRAFT>(spritenum));
result->Set(direction + _aircraft_sprite[spritenum]);
return direction + _aircraft_sprite[spritenum];
}
void GetRotorImage(const Aircraft *v, EngineImageType image_type, VehicleSpriteSeq *result)
SpriteID GetRotorImage(const Aircraft *v, EngineImageType image_type)
{
assert(v->subtype == AIR_HELICOPTER);
const Aircraft *w = v->Next()->Next();
if (is_custom_sprite(v->spritenum)) {
GetCustomRotorSprite(v, false, image_type, result);
if (result->IsValid()) return;
SpriteID sprite = GetCustomRotorSprite(v, false, image_type);
if (sprite != 0) return sprite;
}
/* Return standard rotor sprites if there are no custom sprites for this helicopter */
result->Set(SPR_ROTOR_STOPPED + w->state);
return SPR_ROTOR_STOPPED + w->state;
}
static void GetAircraftIcon(EngineID engine, EngineImageType image_type, VehicleSpriteSeq *result)
static SpriteID GetAircraftIcon(EngineID engine, EngineImageType image_type)
{
const Engine *e = Engine::Get(engine);
uint8 spritenum = e->u.air.image_index;
if (is_custom_sprite(spritenum)) {
GetCustomVehicleIcon(engine, DIR_W, image_type, result);
if (result->IsValid()) return;
SpriteID sprite = GetCustomVehicleIcon(engine, DIR_W, image_type);
if (sprite != 0) return sprite;
spritenum = e->original_image_index;
}
assert(IsValidImageIndex<VEH_AIRCRAFT>(spritenum));
result->Set(DIR_W + _aircraft_sprite[spritenum]);
return DIR_W + _aircraft_sprite[spritenum];
}
void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type)
{
VehicleSpriteSeq seq;
GetAircraftIcon(engine, image_type, &seq);
Rect rect;
seq.GetBounds(&rect);
SpriteID sprite = GetAircraftIcon(engine, image_type);
const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
preferred_x = Clamp(preferred_x,
left - UnScaleGUI(rect.left),
right - UnScaleGUI(rect.right));
seq.Draw(preferred_x, y, pal, pal == PALETTE_CRASH);
left - UnScaleGUI(real_sprite->x_offs),
right - UnScaleGUI(real_sprite->width) - UnScaleGUI(real_sprite->x_offs));
DrawSprite(sprite, pal, preferred_x, y);
if (!(AircraftVehInfo(engine)->subtype & AIR_CTOL)) {
VehicleSpriteSeq rotor_seq;
GetCustomRotorIcon(engine, image_type, &rotor_seq);
if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
rotor_seq.Draw(preferred_x, y - ScaleGUITrad(5), PAL_NONE, false);
SpriteID rotor_sprite = GetCustomRotorIcon(engine, image_type);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
DrawSprite(rotor_sprite, PAL_NONE, preferred_x, y - ScaleGUITrad(5));
}
}
@@ -229,16 +224,12 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
*/
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type)
{
VehicleSpriteSeq seq;
GetAircraftIcon(engine, image_type, &seq);
const Sprite *spr = GetSprite(GetAircraftIcon(engine, image_type), ST_NORMAL);
Rect rect;
seq.GetBounds(&rect);
width = UnScaleGUI(rect.right - rect.left + 1);
height = UnScaleGUI(rect.bottom - rect.top + 1);
xoffs = UnScaleGUI(rect.left);
yoffs = UnScaleGUI(rect.top);
width = UnScaleGUI(spr->width);
height = UnScaleGUI(spr->height);
xoffs = UnScaleGUI(spr->x_offs);
yoffs = UnScaleGUI(spr->y_offs);
}
/**
@@ -326,8 +317,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->date_of_last_service = _date;
v->build_year = u->build_year = _cur_year;
v->sprite_seq.Set(SPR_IMG_QUERY);
u->sprite_seq.Set(SPR_IMG_QUERY);
v->cur_image = u->cur_image = SPR_IMG_QUERY;
v->random_bits = VehicleRandomBits();
u->random_bits = VehicleRandomBits();
@@ -359,7 +349,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
w->vehstatus = VS_HIDDEN | VS_UNCLICKABLE;
w->spritenum = 0xFF;
w->subtype = AIR_ROTOR;
w->sprite_seq.Set(SPR_ROTOR_STOPPED);
w->cur_image = SPR_ROTOR_STOPPED;
w->random_bits = VehicleRandomBits();
/* Use rotor's air.state to store the rotor animation frame */
w->state = HRS_ROTOR_STOPPED;
@@ -478,21 +468,21 @@ static void HelicopterTickHandler(Aircraft *v)
int tick = ++u->tick_counter;
int spd = u->cur_speed >> 4;
VehicleSpriteSeq seq;
SpriteID img;
if (spd == 0) {
u->state = HRS_ROTOR_STOPPED;
GetRotorImage(v, EIT_ON_MAP, &seq);
if (u->sprite_seq == seq) return;
img = GetRotorImage(v, EIT_ON_MAP);
if (u->cur_image == img) return;
} else if (tick >= spd) {
u->tick_counter = 0;
u->state++;
if (u->state > HRS_ROTOR_MOVING_3) u->state = HRS_ROTOR_MOVING_1;
GetRotorImage(v, EIT_ON_MAP, &seq);
img = GetRotorImage(v, EIT_ON_MAP);
} else {
return;
}
u->sprite_seq = seq;
u->cur_image = img;
u->UpdatePositionAndViewport();
}
@@ -512,9 +502,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
v->UpdatePosition();
v->UpdateViewport(true, false);
if (v->subtype == AIR_HELICOPTER) {
GetRotorImage(v, EIT_ON_MAP, &v->Next()->Next()->sprite_seq);
}
if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v, EIT_ON_MAP);
Aircraft *u = v->Next();
@@ -525,7 +513,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
u->sprite_seq.CopyWithoutPalette(v->sprite_seq); // the shadow is never coloured
u->cur_image = v->cur_image;
u->UpdatePositionAndViewport();
@@ -1249,9 +1237,7 @@ void Aircraft::MarkDirty()
{
this->colourmap = PAL_NONE;
this->UpdateViewport(true, false);
if (this->subtype == AIR_HELICOPTER) {
GetRotorImage(this, EIT_ON_MAP, &this->Next()->Next()->sprite_seq);
}
if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this, EIT_ON_MAP);
}

View File

@@ -83,14 +83,11 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
{
bool rtl = _current_text_dir == TD_RTL;
VehicleSpriteSeq seq;
v->GetImage(rtl ? DIR_E : DIR_W, image_type, &seq);
SpriteID sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type);
const Sprite *real_sprite = GetSprite(sprite, ST_NORMAL);
Rect rect;
seq.GetBounds(&rect);
int width = UnScaleGUI(rect.right - rect.left + 1);
int x_offs = UnScaleGUI(rect.left);
int width = UnScaleGUI(real_sprite->width);
int x_offs = UnScaleGUI(real_sprite->x_offs);
int x = rtl ? right - width - x_offs : left - x_offs;
bool helicopter = v->subtype == AIR_HELICOPTER;
@@ -98,18 +95,17 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s
int heli_offs = 0;
PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
seq.Draw(x, y + y_offs, pal, (v->vehstatus & VS_CRASHED) != 0);
DrawSprite(sprite, pal, x, y + y_offs);
if (helicopter) {
const Aircraft *a = Aircraft::From(v);
VehicleSpriteSeq rotor_seq;
GetCustomRotorSprite(a, true, image_type, &rotor_seq);
if (!rotor_seq.IsValid()) rotor_seq.Set(SPR_ROTOR_STOPPED);
SpriteID rotor_sprite = GetCustomRotorSprite(a, true, image_type);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
heli_offs = ScaleGUITrad(5);
rotor_seq.Draw(x, y + y_offs - heli_offs, PAL_NONE, false);
DrawSprite(rotor_sprite, PAL_NONE, x, y + y_offs - heli_offs);
}
if (v->index == selection) {
x += x_offs;
y += UnScaleGUI(rect.top) + y_offs - heli_offs;
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(rect.bottom - rect.top + 1) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
y += UnScaleGUI(real_sprite->y_offs) + y_offs - heli_offs;
DrawFrameRect(x - 1, y - 1, x + width + 1, y + UnScaleGUI(real_sprite->height) + heli_offs + 1, COLOUR_WHITE, FR_BORDERONLY);
}
}

View File

@@ -433,7 +433,6 @@ void AddArticulatedParts(Vehicle *first)
v->x_pos = first->x_pos;
v->y_pos = first->y_pos;
v->z_pos = first->z_pos;
v->date_of_last_service = first->date_of_last_service;
v->build_year = first->build_year;
v->vehstatus = first->vehstatus & ~VS_STOPPED;
@@ -441,7 +440,7 @@ void AddArticulatedParts(Vehicle *first)
v->max_age = 0;
v->engine_type = engine_type;
v->value = 0;
v->sprite_seq.Set(SPR_IMG_QUERY);
v->cur_image = SPR_IMG_QUERY;
v->random_bits = VehicleRandomBits();
if (flip_image) v->spritenum++;

View File

@@ -87,7 +87,7 @@ class ReplaceVehicleWindow : public Window {
byte sort_criteria; ///< Criteria of sorting vehicles.
bool descending_sort_order; ///< Order of sorting vehicles.
bool show_hidden_engines; ///< Whether to show the hidden engines.
RailType sel_railtype; ///< Type of rail tracks selected. #INVALID_RAILTYPE to show all.
RailType sel_railtype; ///< Type of rail tracks selected.
Scrollbar *vscroll[2];
/**
@@ -104,7 +104,7 @@ class ReplaceVehicleWindow : public Window {
/* Ensure that the wagon/engine selection fits the engine. */
if ((rvi->railveh_type == RAILVEH_WAGON) == show_engines) return false;
if (draw_left && this->sel_railtype != INVALID_RAILTYPE) {
if (draw_left && show_engines) {
/* Ensure that the railtype is specific to the selected one */
if (rvi->railtype != this->sel_railtype) return false;
}
@@ -211,7 +211,24 @@ class ReplaceVehicleWindow : public Window {
public:
ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
{
this->sel_railtype = INVALID_RAILTYPE;
if (vehicletype == VEH_TRAIN) {
/* For rail vehicles find the most used vehicle type, which is usually
* better than 'just' the first/previous vehicle type. */
uint type_count[RAILTYPE_END];
memset(type_count, 0, sizeof(type_count));
const Engine *e;
FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
if (e->u.rail.railveh_type == RAILVEH_WAGON) continue;
type_count[e->u.rail.railtype] += GetGroupNumEngines(_local_company, id_g, e->index);
}
this->sel_railtype = RAILTYPE_BEGIN;
for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) {
if (type_count[this->sel_railtype] < type_count[rt]) this->sel_railtype = rt;
}
}
this->replace_engines = true; // start with locomotives (all other vehicles will not read this bool)
this->engines[0].ForceRebuild();
this->engines[1].ForceRebuild();
@@ -271,9 +288,12 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
Dimension d = GetStringBoundingBox(STR_REPLACE_ENGINES);
d = maxdim(d, GetStringBoundingBox(STR_REPLACE_WAGONS));
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE: {
StringID str = this->GetWidget<NWidgetCore>(widget)->widget_data;
SetDParam(0, STR_REPLACE_ENGINES);
Dimension d = GetStringBoundingBox(str);
SetDParam(0, STR_REPLACE_WAGONS);
d = maxdim(d, GetStringBoundingBox(str));
d.width += padding.width;
d.height += padding.height;
*size = maxdim(*size, d);
@@ -347,7 +367,7 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN:
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
SetDParam(0, this->replace_engines ? STR_REPLACE_ENGINES : STR_REPLACE_WAGONS);
break;
}
@@ -412,8 +432,12 @@ public:
this->SetWidgetDisabledState(WID_RV_STOP_REPLACE, this->sel_engine[0] == INVALID_ENGINE || !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group));
if (this->window_number == VEH_TRAIN) {
/* sets the colour of that art thing */
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_FLUFF_LEFT)->colour = _company_colours[_local_company];
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_FLUFF_RIGHT)->colour = _company_colours[_local_company];
/* Show the selected railtype in the pulldown menu */
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = sel_railtype == INVALID_RAILTYPE ? STR_REPLACE_ALL_RAILTYPE : GetRailTypeInfo(sel_railtype)->strings.replace_text;
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = GetRailTypeInfo(sel_railtype)->strings.replace_text;
}
this->DrawWidgets();
@@ -459,16 +483,15 @@ public:
DisplayVehicleSortDropDown(this, static_cast<VehicleType>(this->window_number), this->sort_criteria, WID_RV_SORT_DROPDOWN);
break;
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
DropDownList *list = new DropDownList();
*list->Append() = new DropDownListStringItem(STR_REPLACE_ENGINES, 1, false);
*list->Append() = new DropDownListStringItem(STR_REPLACE_WAGONS, 0, false);
ShowDropDownList(this, list, this->replace_engines ? 1 : 0, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN);
case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
this->replace_engines = !(this->replace_engines);
this->engines[0].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
break;
}
case WID_RV_TRAIN_RAILTYPE_DROPDOWN: // Railtype selection dropdown menu
ShowDropDownList(this, GetRailTypeDropDownList(true, true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
ShowDropDownList(this, GetRailTypeDropDownList(true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
break;
case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
@@ -543,14 +566,6 @@ public:
break;
}
case WID_RV_TRAIN_ENGINEWAGON_DROPDOWN: {
this->replace_engines = index != 0;
this->engines[0].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
break;
}
case WID_RV_START_REPLACE:
this->ReplaceClick_StartReplace(index != 0);
break;
@@ -596,13 +611,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetFill(1, 0), SetResize(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN), SetDataTip(STR_BLACK_STRING, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
@@ -622,16 +631,20 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), SetFill(1, 0), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(150, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_TOGGLE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_ENGINE_WAGON_SELECT, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_LEFT), SetMinimalSize(15, 12), EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetResize(1, 0),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_RIGHT), SetMinimalSize(16, 12), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
};

View File

@@ -20,11 +20,6 @@
/** Instantiation of the 32bpp with animation blitter factory. */
static FBlitter_32bppAnim iFBlitter_32bppAnim;
Blitter_32bppAnim::~Blitter_32bppAnim()
{
free(this->anim_buf);
}
template <BlitterMode mode>
inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
{
@@ -39,14 +34,13 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
}
Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below.
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
const byte *remap = bp->remap; // store so we don't have to access it via bp everytime
for (int y = 0; y < bp->height; y++) {
Colour *dst_ln = dst + bp->pitch;
uint16 *anim_ln = anim + this->anim_buf_pitch;
uint16 *anim_ln = anim + this->anim_buf_width;
const Colour *src_px_ln = (const Colour *)((const byte *)src_px + *(const uint32 *)src_px);
src_px++;
@@ -280,8 +274,9 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
}
Colour *udst = (Colour *)dst;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'dst' into an 'anim_buf' offset below.
uint16 *anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
uint16 *anim;
anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
if (pal == PALETTE_TO_TRANSPARENT) {
do {
@@ -292,7 +287,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
@@ -305,7 +300,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
anim++;
}
udst = udst - width + _screen.pitch;
anim = anim - width + this->anim_buf_pitch;
anim = anim - width + this->anim_buf_width;
} while (--height);
return;
}
@@ -319,8 +314,7 @@ void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_pitch] = colour | (DEFAULT_BRIGHTNESS << 8);
this->anim_buf[((uint32 *)video - (uint32 *)_screen.dst_ptr) + x + y * this->anim_buf_width] = colour | (DEFAULT_BRIGHTNESS << 8);
}
void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
@@ -332,8 +326,9 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
}
Colour colour32 = LookupColourInPalette(colour);
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
uint16 *anim_line;
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
do {
Colour *dst = (Colour *)video;
@@ -347,7 +342,7 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
anim++;
}
video = (uint32 *)video + _screen.pitch;
anim_line += this->anim_buf_pitch;
anim_line += this->anim_buf_width;
} while (--height);
}
@@ -357,7 +352,6 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
Colour *dst = (Colour *)video;
const uint32 *usrc = (const uint32 *)src;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
@@ -371,7 +365,7 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
/* Copy back the anim-buffer */
memcpy(anim_line, usrc, width * sizeof(uint16));
usrc = (const uint32 *)((const uint16 *)usrc + width);
anim_line += this->anim_buf_pitch;
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
@@ -398,11 +392,11 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint32 *udst = (uint32 *)dst;
const uint32 *src = (const uint32 *)video;
const uint16 *anim_line;
if (this->anim_buf == NULL) return;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'video' into an 'anim_buf' offset below.
const uint16 *anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
anim_line = ((const uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
memcpy(udst, src, width * sizeof(uint32));
@@ -411,7 +405,7 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
/* Copy the anim-buffer */
memcpy(udst, anim_line, width * sizeof(uint16));
udst = (uint32 *)((uint16 *)udst + width);
anim_line += this->anim_buf_pitch;
anim_line += this->anim_buf_width;
}
}
@@ -423,8 +417,8 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
/* We need to scroll the anim-buffer too */
if (scroll_y > 0) {
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_pitch;
src = dst - scroll_y * this->anim_buf_pitch;
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Adjust left & width */
if (scroll_x >= 0) {
@@ -437,13 +431,13 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
uint th = height - scroll_y;
for (; th > 0; th--) {
memcpy(dst, src, tw * sizeof(uint16));
src -= this->anim_buf_pitch;
dst -= this->anim_buf_pitch;
src -= this->anim_buf_width;
dst -= this->anim_buf_width;
}
} else {
/* Calculate pointers */
dst = this->anim_buf + left + top * this->anim_buf_pitch;
src = dst - scroll_y * this->anim_buf_pitch;
dst = this->anim_buf + left + top * this->anim_buf_width;
src = dst - scroll_y * this->anim_buf_width;
/* Adjust left & width */
if (scroll_x >= 0) {
@@ -458,8 +452,8 @@ void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &widt
uint th = height + scroll_y;
for (; th > 0; th--) {
memmove(dst, src, tw * sizeof(uint16));
src += this->anim_buf_pitch;
dst += this->anim_buf_pitch;
src += this->anim_buf_width;
dst += this->anim_buf_width;
}
}
@@ -496,7 +490,6 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
anim++;
}
dst += _screen.pitch - this->anim_buf_width;
anim += this->anim_buf_pitch - this->anim_buf_width;
}
/* Make sure the backend redraws the whole screen */
@@ -510,13 +503,11 @@ Blitter::PaletteAnimation Blitter_32bppAnim::UsePaletteAnimation()
void Blitter_32bppAnim::PostResize()
{
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height ||
_screen.pitch != this->anim_buf_pitch) {
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<uint16>(_screen.width * _screen.height);
this->anim_buf_width = _screen.width;
this->anim_buf_height = _screen.height;
this->anim_buf_pitch = _screen.pitch;
this->anim_buf = CallocT<uint16>(this->anim_buf_height * this->anim_buf_pitch);
}
}

View File

@@ -20,20 +20,14 @@ protected:
uint16 *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.
int anim_buf_pitch; ///< The pitch of the animation buffer.
Palette palette; ///< The current palette.
public:
Blitter_32bppAnim() :
anim_buf(NULL),
anim_buf_width(0),
anim_buf_height(0),
anim_buf_pitch(0)
{
this->palette = _cur_palette;
}
~Blitter_32bppAnim();
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);

View File

@@ -35,8 +35,7 @@ inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomL
{
const byte * const remap = bp->remap;
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left;
assert(_screen.pitch == this->anim_buf_pitch); // precondition for translating 'bp->dst' into an 'anim_buf' offset below.
uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_pitch + bp->left;
uint16 *anim_line = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
int effective_width = bp->width;
/* Find where to start reading in the source sprite. */
@@ -354,7 +353,7 @@ next_line:
if (mode != BM_TRANSPARENT) src_mv_line += si->sprite_width;
src_rgba_line = (const Colour*) ((const byte*) src_rgba_line + si->sprite_line_size);
dst_line += bp->pitch;
anim_line += this->anim_buf_pitch;
anim_line += this->anim_buf_width;
}
}
IGNORE_UNINITIALIZED_WARNING_STOP

View File

@@ -48,7 +48,7 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
break;
case BM_BLACK_REMAP:
if (*src != 0) *dst = 0;
colour = 0;
break;
default:

View File

@@ -56,7 +56,7 @@ void DrawHillyLandTile(const TileInfo *ti)
if (ti->tileh != SLOPE_FLAT) {
DrawGroundSprite(SPR_FLAT_ROUGH_LAND + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
} else {
DrawGroundSprite(_landscape_clear_sprites_rough[GB(TileHash(ti->x, ti->y), 0, 3)], PAL_NONE);
DrawGroundSprite(_landscape_clear_sprites_rough[GB(ti->x ^ ti->y, 4, 3)], PAL_NONE);
}
}

View File

@@ -81,7 +81,7 @@ CommandCallback CcBuildBridge;
/* dock_gui.cpp */
CommandCallback CcBuildDocks;
CommandCallback CcPlaySound_SPLAT_WATER;
CommandCallback CcBuildCanal;
/* depot_gui.cpp */
CommandCallback CcCloneVehicle;
@@ -97,19 +97,19 @@ CommandCallback CcAddVehicleNewGroup;
CommandCallback CcBuildIndustry;
/* main_gui.cpp */
CommandCallback CcPlaySound_EXPLOSION;
CommandCallback CcPlaySound10;
CommandCallback CcPlaceSign;
CommandCallback CcTerraform;
CommandCallback CcGiveMoney;
/* rail_gui.cpp */
CommandCallback CcPlaySound_SPLAT_RAIL;
CommandCallback CcPlaySound1E;
CommandCallback CcRailDepot;
CommandCallback CcStation;
CommandCallback CcBuildRailTunnel;
/* road_gui.cpp */
CommandCallback CcPlaySound_SPLAT_OTHER;
CommandCallback CcPlaySound1D;
CommandCallback CcBuildRoadTunnel;
CommandCallback CcRoadDepot;
CommandCallback CcRoadStop;

View File

@@ -52,10 +52,10 @@ extern CompanyPool _company_pool;
/** Statically loadable part of Company pool item */
struct CompanyProperties {
uint32 name_2; ///< Parameter of #name_1.
StringID name_1; ///< Name of the company if the user did not change it.
uint16 name_1; ///< Name of the company if the user did not change it.
char *name; ///< Name of the company if the user changed it.
StringID president_name_1; ///< Name of the president if the user did not change it.
uint16 president_name_1; ///< Name of the president if the user did not change it.
uint32 president_name_2; ///< Parameter of #president_name_1
char *president_name; ///< Name of the president if the user changed it.

View File

@@ -434,10 +434,7 @@ void IConsoleCmdExec(const char *cmdstr)
* enclosed in "" are taken as one token. We can only go as far as the amount
* of characters in our stream or the max amount of tokens we can handle */
for (cmdptr = cmdstr, t_index = 0, tstream_i = 0; *cmdptr != '\0'; cmdptr++) {
if (tstream_i >= lengthof(tokenstream)) {
IConsoleError("command line too long");
return;
}
if (t_index >= lengthof(tokens) || tstream_i >= lengthof(tokenstream)) break;
switch (*cmdptr) {
case ' ': // Token separator
@@ -455,10 +452,6 @@ void IConsoleCmdExec(const char *cmdstr)
case '"': // Tokens enclosed in "" are one token
longtoken = !longtoken;
if (!foundtoken) {
if (t_index >= lengthof(tokens)) {
IConsoleError("command line too long");
return;
}
tokens[t_index++] = &tokenstream[tstream_i];
foundtoken = true;
}
@@ -473,10 +466,6 @@ void IConsoleCmdExec(const char *cmdstr)
tokenstream[tstream_i++] = *cmdptr;
if (!foundtoken) {
if (t_index >= lengthof(tokens)) {
IConsoleError("command line too long");
return;
}
tokens[t_index++] = &tokenstream[tstream_i - 1];
foundtoken = true;
}
@@ -484,7 +473,7 @@ void IConsoleCmdExec(const char *cmdstr)
}
}
for (uint i = 0; i < lengthof(tokens) && tokens[i] != NULL; i++) {
for (uint i = 0; tokens[i] != NULL; i++) {
DEBUG(console, 8, "Token %d is: '%s'", i, tokens[i]);
}

View File

@@ -45,38 +45,6 @@
/* scriptfile handling */
static bool _script_running; ///< Script is running (used to abort execution when #ConReturn is encountered).
/** File list storage for the console, for caching the last 'ls' command. */
class ConsoleFileList : public FileList {
public:
ConsoleFileList() : FileList()
{
this->file_list_valid = false;
}
/** Declare the file storage cache as being invalid, also clears all stored files. */
void InvalidateFileList()
{
this->Clear();
this->file_list_valid = false;
}
/**
* (Re-)validate the file storage cache. Only makes a change if the storage was invalid, or if \a force_reload.
* @param Always reload the file storage cache.
*/
void ValidateFileList(bool force_reload = false)
{
if (force_reload || !this->file_list_valid) {
this->BuildFileList(FT_SAVEGAME, SLO_LOAD);
this->file_list_valid = true;
}
}
bool file_list_valid; ///< If set, the file list is valid.
};
static ConsoleFileList _console_file_list; ///< File storage cache for the console.
/* console command defines */
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[])
#define DEF_CONSOLE_HOOK(function) static ConsoleHookResult function(bool echo)
@@ -318,7 +286,7 @@ DEF_CONSOLE_CMD(ConSave)
char *filename = str_fmt("%s.sav", argv[1]);
IConsolePrint(CC_DEFAULT, "Saving map...");
if (SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, SAVE_DIR) != SL_OK) {
if (SaveOrLoad(filename, SL_SAVE, SAVE_DIR) != SL_OK) {
IConsolePrint(CC_ERROR, "Saving map failed");
} else {
IConsolePrintF(CC_DEFAULT, "Map successfully saved to %s", filename);
@@ -347,6 +315,42 @@ DEF_CONSOLE_CMD(ConSaveConfig)
return true;
}
/**
* Get savegame file informations.
* @param file The savegame filename to return information about. Can be the actual name
* or a numbered entry into the filename list.
* @return FiosItem The information on the file.
*/
static const FiosItem *GetFiosItem(const char *file)
{
_saveload_mode = SLD_LOAD_GAME;
BuildFileList();
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
if (strcmp(file, item->name) == 0) return item;
if (strcmp(file, item->title) == 0) return item;
}
/* If no name matches, try to parse it as number */
char *endptr;
int i = strtol(file, &endptr, 10);
if (file == endptr || *endptr != '\0') i = -1;
if (IsInsideMM(i, 0, _fios_items.Length())) return _fios_items.Get(i);
/* As a last effort assume it is an OpenTTD savegame and
* that the ".sav" part was not given. */
char long_file[MAX_PATH];
seprintf(long_file, lastof(long_file), "%s.sav", file);
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
if (strcmp(long_file, item->name) == 0) return item;
if (strcmp(long_file, item->title) == 0) return item;
}
return NULL;
}
DEF_CONSOLE_CMD(ConLoad)
{
if (argc == 0) {
@@ -357,21 +361,24 @@ DEF_CONSOLE_CMD(ConLoad)
if (argc != 2) return false;
const char *file = argv[1];
_console_file_list.ValidateFileList();
const FiosItem *item = _console_file_list.FindItem(file);
const FiosItem *item = GetFiosItem(file);
if (item != NULL) {
if (GetAbstractFileType(item->type) == FT_SAVEGAME) {
_switch_mode = SM_LOAD_GAME;
_file_to_saveload.SetMode(item->type);
_file_to_saveload.SetName(FiosBrowseTo(item));
_file_to_saveload.SetTitle(item->title);
} else {
IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
switch (item->type) {
case FIOS_TYPE_FILE: case FIOS_TYPE_OLDFILE: {
_switch_mode = SM_LOAD_GAME;
SetFiosType(item->type);
strecpy(_file_to_saveload.name, FiosBrowseTo(item), lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, item->title, lastof(_file_to_saveload.title));
break;
}
default: IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
}
} else {
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
FiosFreeSavegameList();
return true;
}
@@ -386,8 +393,7 @@ DEF_CONSOLE_CMD(ConRemove)
if (argc != 2) return false;
const char *file = argv[1];
_console_file_list.ValidateFileList();
const FiosItem *item = _console_file_list.FindItem(file);
const FiosItem *item = GetFiosItem(file);
if (item != NULL) {
if (!FiosDelete(item->name)) {
IConsolePrintF(CC_ERROR, "%s: Failed to delete file", file);
@@ -396,7 +402,7 @@ DEF_CONSOLE_CMD(ConRemove)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
_console_file_list.InvalidateFileList();
FiosFreeSavegameList();
return true;
}
@@ -409,11 +415,13 @@ DEF_CONSOLE_CMD(ConListFiles)
return true;
}
_console_file_list.ValidateFileList(true);
for (uint i = 0; i < _console_file_list.Length(); i++) {
IConsolePrintF(CC_DEFAULT, "%d) %s", i, _console_file_list[i].title);
BuildFileList();
for (uint i = 0; i < _fios_items.Length(); i++) {
IConsolePrintF(CC_DEFAULT, "%d) %s", i, _fios_items[i].title);
}
FiosFreeSavegameList();
return true;
}
@@ -428,8 +436,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
if (argc != 2) return false;
const char *file = argv[1];
_console_file_list.ValidateFileList(true);
const FiosItem *item = _console_file_list.FindItem(file);
const FiosItem *item = GetFiosItem(file);
if (item != NULL) {
switch (item->type) {
case FIOS_TYPE_DIR: case FIOS_TYPE_DRIVE: case FIOS_TYPE_PARENT:
@@ -441,7 +448,7 @@ DEF_CONSOLE_CMD(ConChangeDirectory)
IConsolePrintF(CC_ERROR, "%s: No such file or directory.", file);
}
_console_file_list.InvalidateFileList();
FiosFreeSavegameList();
return true;
}
@@ -455,8 +462,8 @@ DEF_CONSOLE_CMD(ConPrintWorkingDirectory)
}
/* XXX - Workaround for broken file handling */
_console_file_list.ValidateFileList(true);
_console_file_list.InvalidateFileList();
FiosGetSavegameList(SLD_LOAD_GAME);
FiosFreeSavegameList();
FiosGetDescText(&path, NULL);
IConsolePrint(CC_DEFAULT, path);
@@ -553,36 +560,29 @@ DEF_CONSOLE_CMD(ConBan)
DEF_CONSOLE_CMD(ConUnBan)
{
if (argc == 0) {
IConsoleHelp("Unban a client from a network game. Usage: 'unban <ip | banlist-index>'");
IConsoleHelp("Unban a client from a network game. Usage: 'unban <ip | client-id>'");
IConsoleHelp("For a list of banned IP's, see the command 'banlist'");
return true;
}
if (argc != 2) return false;
/* Try by IP. */
uint index;
for (index = 0; index < _network_ban_list.Length(); index++) {
if (strcmp(_network_ban_list[index], argv[1]) == 0) break;
}
/* Try by index. */
if (index >= _network_ban_list.Length()) {
index = atoi(argv[1]) - 1U; // let it wrap
}
if (index < _network_ban_list.Length()) {
char msg[64];
seprintf(msg, lastof(msg), "Unbanned %s", _network_ban_list[index]);
IConsolePrint(CC_DEFAULT, msg);
free(_network_ban_list[index]);
_network_ban_list.Erase(_network_ban_list.Get(index));
} else {
IConsolePrint(CC_DEFAULT, "Invalid list index or IP not in ban-list.");
IConsolePrint(CC_DEFAULT, "For a list of banned IP's, see the command 'banlist'");
uint index = (strchr(argv[1], '.') == NULL) ? atoi(argv[1]) : 0;
index--;
uint i = 0;
for (char **iter = _network_ban_list.Begin(); iter != _network_ban_list.End(); iter++, i++) {
if (strcmp(_network_ban_list[i], argv[1]) == 0 || index == i) {
free(_network_ban_list[i]);
_network_ban_list.Erase(iter);
IConsolePrint(CC_DEFAULT, "IP unbanned.");
return true;
}
}
IConsolePrint(CC_DEFAULT, "IP not in ban-list.");
return true;
}

View File

@@ -256,8 +256,6 @@ public:
/**
* Get the number of items in the list.
*
* @return The number of items in the list.
*/
inline uint Length() const
{

View File

@@ -36,38 +36,6 @@
#include <time.h>
#ifdef WITH_ALLEGRO
# include <allegro.h>
#endif /* WITH_ALLEGRO */
#ifdef WITH_FONTCONFIG
# include <fontconfig/fontconfig.h>
#endif /* WITH_FONTCONFIG */
#ifdef WITH_PNG
/* pngconf.h, included by png.h doesn't like something in the
* freetype headers. As such it's not alphabetically sorted. */
# include <png.h>
#endif /* WITH_PNG */
#ifdef WITH_FREETYPE
# include <ft2build.h>
# include FT_FREETYPE_H
#endif /* WITH_FREETYPE */
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
# include <unicode/uversion.h>
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
# include <lzma.h>
#endif
#ifdef WITH_LZO
#include <lzo/lzo1x.h>
#endif
#ifdef WITH_SDL
# include "sdl.h"
# include <SDL.h>
#endif /* WITH_SDL */
#ifdef WITH_ZLIB
# include <zlib.h>
#endif
#include "safeguards.h"
/* static */ const char *CrashLog::message = NULL;
@@ -212,6 +180,39 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
return buffer;
}
/* Include these here so it's close to where it's actually used. */
#ifdef WITH_ALLEGRO
# include <allegro.h>
#endif /* WITH_ALLEGRO */
#ifdef WITH_FONTCONFIG
# include <fontconfig/fontconfig.h>
#endif /* WITH_FONTCONFIG */
#ifdef WITH_PNG
/* pngconf.h, included by png.h doesn't like something in the
* freetype headers. As such it's not alphabetically sorted. */
# include <png.h>
#endif /* WITH_PNG */
#ifdef WITH_FREETYPE
# include <ft2build.h>
# include FT_FREETYPE_H
#endif /* WITH_FREETYPE */
#if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT)
# include <unicode/uversion.h>
#endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */
#ifdef WITH_LZMA
# include <lzma.h>
#endif
#ifdef WITH_LZO
#include <lzo/lzo1x.h>
#endif
#ifdef WITH_SDL
# include "sdl.h"
# include <SDL.h>
#endif /* WITH_SDL */
#ifdef WITH_ZLIB
# include <zlib.h>
#endif
/**
* Writes information (versions) of the used libraries.
* @param buffer The begin where to write at.
@@ -388,7 +389,7 @@ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const
seprintf(filename, filename_last, "%scrash.sav", _personal_dir);
/* Don't do a threaded saveload. */
return SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, NO_DIRECTORY, false) == SL_OK;
return SaveOrLoad(filename, SL_SAVE, NO_DIRECTORY, false) == SL_OK;
} catch (...) {
return false;
}

View File

@@ -505,12 +505,15 @@ struct DepotWindow : Window {
this->sel = INVALID_VEHICLE;
TrainDepotMoveVehicle(v, sel, gdvp.head);
} else if (v != NULL) {
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
SetMouseCursorVehicle(v, EIT_IN_DEPOT);
_cursor.vehchain = _ctrl_pressed;
bool rtl = _current_text_dir == TD_RTL;
int image = v->GetImage(rtl ? DIR_E : DIR_W, EIT_IN_DEPOT);
SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
this->sel = v->index;
this->SetDirty();
_cursor.short_vehicle_offset = v->IsGroundVehicle() ? (16 - v->GetGroundVehicleCache()->cached_veh_length * 2) * (rtl ? -1 : 1) : 0;
_cursor.vehchain = _ctrl_pressed;
}
break;
}
@@ -660,8 +663,7 @@ struct DepotWindow : Window {
DepotSortList(&this->vehicle_list);
uint new_unitnumber_digits = GetUnitNumberDigits(this->vehicle_list);
/* Only increase the size; do not decrease to prevent constant changes */
if (this->unitnumber_digits < new_unitnumber_digits) {
if (this->unitnumber_digits != new_unitnumber_digits) {
this->unitnumber_digits = new_unitnumber_digits;
this->ReInit();
}
@@ -679,8 +681,7 @@ struct DepotWindow : Window {
}
/* Always have 1 empty row, so people can change the setting of the train */
this->vscroll->SetCount(this->vehicle_list.Length() + this->wagon_list.Length() + 1);
/* Always make it longer than the longest train, so you can attach vehicles at the end */
this->hscroll->SetCount(max_width + ScaleGUITrad(2 * VEHICLEINFO_FULL_VEHICLE_WIDTH + 1));
this->hscroll->SetCount(max_width);
} else {
this->vscroll->SetCount(CeilDiv(this->vehicle_list.Length(), this->num_columns));
}

View File

@@ -112,7 +112,7 @@ void DisasterVehicle::UpdateImage()
{
SpriteID img = this->image_override;
if (img == 0) img = _disaster_images[this->subtype][this->direction];
this->sprite_seq.Set(img);
this->cur_image = img;
}
/**
@@ -499,8 +499,7 @@ static bool DisasterTick_Helicopter_Rotors(DisasterVehicle *v)
v->tick_counter++;
if (HasBit(v->tick_counter, 0)) return true;
SpriteID &cur_image = v->sprite_seq.seq[0].sprite;
if (++cur_image > SPR_ROTOR_MOVING_3) cur_image = SPR_ROTOR_MOVING_1;
if (++v->cur_image > SPR_ROTOR_MOVING_3) v->cur_image = SPR_ROTOR_MOVING_1;
v->UpdatePositionAndViewport();

View File

@@ -48,7 +48,7 @@ void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
void CcPlaySound_SPLAT_WATER(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
}
@@ -235,10 +235,10 @@ struct BuildDocksToolbarWindow : Window {
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
break;
case DDSP_CREATE_WATER:
DoCommandP(end_tile, start_tile, (_game_mode == GM_EDITOR && _ctrl_pressed) ? WATER_CLASS_SEA : WATER_CLASS_CANAL, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_BUILD_CANALS), CcPlaySound_SPLAT_WATER);
DoCommandP(end_tile, start_tile, (_game_mode == GM_EDITOR && _ctrl_pressed) ? WATER_CLASS_SEA : WATER_CLASS_CANAL, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_BUILD_CANALS), CcBuildCanal);
break;
case DDSP_CREATE_RIVER:
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcPlaySound_SPLAT_WATER);
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcBuildCanal);
break;
default: break;
@@ -433,7 +433,7 @@ public:
* Never make the window smaller to avoid oscillating if the size change affects the acceptance.
* (This is the case, if making the window bigger moves the mouse into the window.) */
if (top > bottom) {
ResizeWindow(this, 0, top - bottom, false);
ResizeWindow(this, 0, top - bottom);
}
}

View File

@@ -1317,8 +1317,7 @@ static uint GetLoadAmount(Vehicle *v)
/* Scale load amount the same as capacity */
if (HasBit(e->info.misc_flags, EF_NO_DEFAULT_CARGO_MULTIPLIER) && !air_mail) load_amount = CeilDiv(load_amount * CargoSpec::Get(v->cargo_type)->multiplier, 0x100);
/* Zero load amount breaks a lot of things. */
return max(1u, load_amount);
return load_amount;
}
/**
@@ -1643,14 +1642,15 @@ static void LoadUnloadVehicle(Vehicle *front)
if (v->cargo_cap == 0) continue;
artic_part++;
uint load_amount = GetLoadAmount(v);
GoodsEntry *ge = &st->goods[v->cargo_type];
if (HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) && (front->current_order.GetUnloadType() & OUFB_NO_UNLOAD) == 0) {
uint cargo_count = v->cargo.UnloadCount();
uint amount_unloaded = _settings_game.order.gradual_loading ? min(cargo_count, GetLoadAmount(v)) : 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?
assert(payment != NULL);
payment->SetCargo(v->cargo_type);
if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
@@ -1752,8 +1752,8 @@ static void LoadUnloadVehicle(Vehicle *front)
* has capacity for it, load it on the vehicle. */
uint cap_left = v->cargo_cap - v->cargo.StoredCount();
if (cap_left > 0 && (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0 || ge->cargo.AvailableCount() > 0)) {
if (_settings_game.order.gradual_loading) cap_left = min(cap_left, load_amount);
if (v->cargo.StoredCount() == 0) TriggerVehicle(v, VEHICLE_TRIGGER_NEW_CARGO);
if (_settings_game.order.gradual_loading) cap_left = min(cap_left, GetLoadAmount(v));
uint loaded = ge->cargo.Load(cap_left, &v->cargo, st->xy, next_station);
if (v->cargo.ActionCount(VehicleCargoList::MTA_LOAD) > 0) {

View File

@@ -22,26 +22,10 @@
#include "safeguards.h"
/**
* Increment the sprite unless it has reached the end of the animation.
* @param v Vehicle to increment sprite of.
* @param last Last sprite of animation.
* @return true if the sprite was incremented, false if the end was reached.
*/
static bool IncrementSprite(EffectVehicle *v, SpriteID last)
{
if (v->sprite_seq.seq[0].sprite != last) {
v->sprite_seq.seq[0].sprite++;
return true;
} else {
return false;
}
}
static void ChimneySmokeInit(EffectVehicle *v)
{
uint32 r = Random();
v->sprite_seq.Set(SPR_CHIMNEY_SMOKE_0 + GB(r, 0, 3));
v->cur_image = SPR_CHIMNEY_SMOKE_0 + GB(r, 0, 3);
v->progress = GB(r, 16, 3);
}
@@ -56,8 +40,10 @@ static bool ChimneySmokeTick(EffectVehicle *v)
return false;
}
if (!IncrementSprite(v, SPR_CHIMNEY_SMOKE_7)) {
v->sprite_seq.Set(SPR_CHIMNEY_SMOKE_0);
if (v->cur_image != SPR_CHIMNEY_SMOKE_7) {
v->cur_image++;
} else {
v->cur_image = SPR_CHIMNEY_SMOKE_0;
}
v->progress = 7;
v->UpdatePositionAndViewport();
@@ -68,7 +54,7 @@ static bool ChimneySmokeTick(EffectVehicle *v)
static void SteamSmokeInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_STEAM_SMOKE_0);
v->cur_image = SPR_STEAM_SMOKE_0;
v->progress = 12;
}
@@ -84,7 +70,9 @@ static bool SteamSmokeTick(EffectVehicle *v)
}
if ((v->progress & 0xF) == 4) {
if (!IncrementSprite(v, SPR_STEAM_SMOKE_4)) {
if (v->cur_image != SPR_STEAM_SMOKE_4) {
v->cur_image++;
} else {
delete v;
return false;
}
@@ -98,7 +86,7 @@ static bool SteamSmokeTick(EffectVehicle *v)
static void DieselSmokeInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_DIESEL_SMOKE_0);
v->cur_image = SPR_DIESEL_SMOKE_0;
v->progress = 0;
}
@@ -110,11 +98,13 @@ static bool DieselSmokeTick(EffectVehicle *v)
v->z_pos++;
v->UpdatePositionAndViewport();
} else if ((v->progress & 7) == 1) {
if (!IncrementSprite(v, SPR_DIESEL_SMOKE_5)) {
if (v->cur_image != SPR_DIESEL_SMOKE_5) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -122,7 +112,7 @@ static bool DieselSmokeTick(EffectVehicle *v)
static void ElectricSparkInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_ELECTRIC_SPARK_0);
v->cur_image = SPR_ELECTRIC_SPARK_0;
v->progress = 1;
}
@@ -132,12 +122,13 @@ static bool ElectricSparkTick(EffectVehicle *v)
v->progress++;
} else {
v->progress = 0;
if (!IncrementSprite(v, SPR_ELECTRIC_SPARK_5)) {
if (v->cur_image != SPR_ELECTRIC_SPARK_5) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -145,7 +136,7 @@ static bool ElectricSparkTick(EffectVehicle *v)
static void SmokeInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_SMOKE_0);
v->cur_image = SPR_SMOKE_0;
v->progress = 12;
}
@@ -161,7 +152,9 @@ static bool SmokeTick(EffectVehicle *v)
}
if ((v->progress & 0xF) == 4) {
if (!IncrementSprite(v, SPR_SMOKE_4)) {
if (v->cur_image != SPR_SMOKE_4) {
v->cur_image++;
} else {
delete v;
return false;
}
@@ -175,7 +168,7 @@ static bool SmokeTick(EffectVehicle *v)
static void ExplosionLargeInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_EXPLOSION_LARGE_0);
v->cur_image = SPR_EXPLOSION_LARGE_0;
v->progress = 0;
}
@@ -183,11 +176,13 @@ static bool ExplosionLargeTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 3) == 0) {
if (!IncrementSprite(v, SPR_EXPLOSION_LARGE_F)) {
if (v->cur_image != SPR_EXPLOSION_LARGE_F) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -195,7 +190,7 @@ static bool ExplosionLargeTick(EffectVehicle *v)
static void BreakdownSmokeInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_BREAKDOWN_SMOKE_0);
v->cur_image = SPR_BREAKDOWN_SMOKE_0;
v->progress = 0;
}
@@ -203,8 +198,10 @@ static bool BreakdownSmokeTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 7) == 0) {
if (!IncrementSprite(v, SPR_BREAKDOWN_SMOKE_3)) {
v->sprite_seq.Set(SPR_BREAKDOWN_SMOKE_0);
if (v->cur_image != SPR_BREAKDOWN_SMOKE_3) {
v->cur_image++;
} else {
v->cur_image = SPR_BREAKDOWN_SMOKE_0;
}
v->UpdatePositionAndViewport();
}
@@ -220,7 +217,7 @@ static bool BreakdownSmokeTick(EffectVehicle *v)
static void ExplosionSmallInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_EXPLOSION_SMALL_0);
v->cur_image = SPR_EXPLOSION_SMALL_0;
v->progress = 0;
}
@@ -228,11 +225,13 @@ static bool ExplosionSmallTick(EffectVehicle *v)
{
v->progress++;
if ((v->progress & 3) == 0) {
if (!IncrementSprite(v, SPR_EXPLOSION_SMALL_B)) {
if (v->cur_image != SPR_EXPLOSION_SMALL_B) {
v->cur_image++;
v->UpdatePositionAndViewport();
} else {
delete v;
return false;
}
v->UpdatePositionAndViewport();
}
return true;
@@ -240,7 +239,7 @@ static bool ExplosionSmallTick(EffectVehicle *v)
static void BulldozerInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_BULLDOZER_NE);
v->cur_image = SPR_BULLDOZER_NE;
v->progress = 0;
v->animation_state = 0;
v->animation_substate = 0;
@@ -291,7 +290,7 @@ static bool BulldozerTick(EffectVehicle *v)
if ((v->progress & 7) == 0) {
const BulldozerMovement *b = &_bulldozer_movement[v->animation_state];
v->sprite_seq.Set(SPR_BULLDOZER_NE + b->image);
v->cur_image = SPR_BULLDOZER_NE + b->image;
v->x_pos += _inc_by_dir[b->direction].x;
v->y_pos += _inc_by_dir[b->direction].y;
@@ -313,7 +312,7 @@ static bool BulldozerTick(EffectVehicle *v)
static void BubbleInit(EffectVehicle *v)
{
v->sprite_seq.Set(SPR_BUBBLE_GENERATE_0);
v->cur_image = SPR_BUBBLE_GENERATE_0;
v->spritenum = 0;
v->progress = 0;
}
@@ -476,8 +475,8 @@ static bool BubbleTick(EffectVehicle *v)
if ((v->progress & 3) != 0) return true;
if (v->spritenum == 0) {
v->sprite_seq.seq[0].sprite++;
if (v->sprite_seq.seq[0].sprite < SPR_BUBBLE_GENERATE_3) {
v->cur_image++;
if (v->cur_image < SPR_BUBBLE_GENERATE_3) {
v->UpdatePositionAndViewport();
return true;
}
@@ -522,7 +521,7 @@ static bool BubbleTick(EffectVehicle *v)
v->x_pos += b->x;
v->y_pos += b->y;
v->z_pos += b->z;
v->sprite_seq.Set(SPR_BUBBLE_0 + b->image);
v->cur_image = SPR_BUBBLE_0 + b->image;
v->UpdatePositionAndViewport();

View File

@@ -89,7 +89,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
{
switch (GetTileType(t)) {
case MP_RAILWAY:
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
switch (GetRailTileType(t)) {
case RAIL_TILE_NORMAL: case RAIL_TILE_SIGNALS:
return GetTrackBits(t);
@@ -99,7 +99,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
break;
case MP_TUNNELBRIDGE:
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (override != NULL && (IsTunnel(t) || GetTunnelBridgeLength(t, GetOtherBridgeEnd(t)) > 0)) {
*override = 1 << GetTunnelBridgeDirection(t);
}
@@ -107,12 +107,12 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
case MP_ROAD:
if (!IsLevelCrossing(t)) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
return GetCrossingRailBits(t);
case MP_STATION:
if (!HasStationRail(t)) return TRACK_BIT_NONE;
if (!HasRailCatenary(GetRailType(t))) return TRACK_BIT_NONE;
if (!HasCatenary(GetRailType(t))) return TRACK_BIT_NONE;
return TrackToTrackBits(GetRailStationTrack(t));
default:
@@ -135,7 +135,7 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
* axis that still display wires to preserve visual continuity. */
TileIndex next_tile = TileAddByDiagDir(t, d);
RailType rt = GetTileRailType(next_tile);
if (rt == INVALID_RAILTYPE || !HasRailCatenary(rt) ||
if (rt == INVALID_RAILTYPE || !HasCatenary(rt) ||
((TrackStatusToTrackBits(GetTileTrackStatus(next_tile, TRANSPORT_RAIL, 0)) & DiagdirReachesTracks(d)) == TRACK_BIT_NONE &&
(!HasStationTileRail(next_tile) || GetRailStationAxis(next_tile) != DiagDirToAxis(d) || !CanStationTileHaveWires(next_tile)))) {
neighbour_tdb |= DiagdirReachesTrackdirs(ReverseDiagDir(d));
@@ -241,7 +241,7 @@ static int GetPCPElevation(TileIndex tile, DiagDirection PCPpos)
*
* @param ti The Tileinfo to draw the tile for
*/
void DrawRailCatenaryOnTunnel(const TileInfo *ti)
void DrawCatenaryOnTunnel(const TileInfo *ti)
{
/* xmin, ymin, xmax + 1, ymax + 1 of BB */
static const int _tunnel_wire_BB[4][4] = {
@@ -255,7 +255,7 @@ void DrawRailCatenaryOnTunnel(const TileInfo *ti)
SpriteID wire_base = GetWireBase(ti->tile);
const SortableSpriteStruct *sss = &RailCatenarySpriteData_Tunnel[dir];
const SortableSpriteStruct *sss = &CatenarySpriteData_Tunnel[dir];
const int *BB_data = _tunnel_wire_BB[dir];
AddSortableSpriteToDraw(
wire_base + sss->image_offset, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
@@ -270,7 +270,7 @@ void DrawRailCatenaryOnTunnel(const TileInfo *ti)
* Draws wires and, if required, pylons on a given tile
* @param ti The Tileinfo to draw the tile for
*/
static void DrawRailCatenaryRailway(const TileInfo *ti)
static void DrawCatenaryRailway(const TileInfo *ti)
{
/* Pylons are placed on a tile edge, so we need to take into account
* the track configuration of 2 adjacent tiles. trackconfig[0] stores the
@@ -379,7 +379,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
if (IsTileType(neighbour, MP_STATION) || IsTileType(neighbour, MP_ROAD)) tileh[TS_NEIGHBOUR] = SLOPE_FLAT;
/* Read the foundations if they are present, and adjust the tileh */
if (trackconfig[TS_NEIGHBOUR] != TRACK_BIT_NONE && IsTileType(neighbour, MP_RAILWAY) && HasRailCatenary(GetRailType(neighbour))) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
if (trackconfig[TS_NEIGHBOUR] != TRACK_BIT_NONE && IsTileType(neighbour, MP_RAILWAY) && HasCatenary(GetRailType(neighbour))) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
if (IsBridgeTile(neighbour)) {
foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetTunnelBridgeDirection(neighbour)));
}
@@ -442,7 +442,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
}
}
/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawRailCatenaryOnTunnel()) */
/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawCatenaryOnTunnel()) */
if (IsTunnelTile(ti->tile)) return;
/* Don't draw a wire under a low bridge */
@@ -478,7 +478,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
assert(PCPconfig != 0); // We have a pylon on neither end of the wire, that doesn't work (since we have no sprites for that)
assert(!IsSteepSlope(tileh[TS_HOME]));
sss = &RailCatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
/*
* The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
@@ -498,7 +498,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
*
* @param ti The Tileinfo to draw the tile for
*/
void DrawRailCatenaryOnBridge(const TileInfo *ti)
void DrawCatenaryOnBridge(const TileInfo *ti)
{
TileIndex end = GetSouthernBridgeEnd(ti->tile);
TileIndex start = GetOtherBridgeEnd(end);
@@ -511,15 +511,15 @@ void DrawRailCatenaryOnBridge(const TileInfo *ti)
Axis axis = GetBridgeAxis(ti->tile);
TLG tlg = GetTLG(ti->tile);
RailCatenarySprite offset = (RailCatenarySprite)(axis == AXIS_X ? 0 : WIRE_Y_FLAT_BOTH - WIRE_X_FLAT_BOTH);
CatenarySprite offset = (CatenarySprite)(axis == AXIS_X ? 0 : WIRE_Y_FLAT_BOTH - WIRE_X_FLAT_BOTH);
if ((length % 2) && num == length) {
/* Draw the "short" wire on the southern end of the bridge
* only needed if the length of the bridge is odd */
sss = &RailCatenarySpriteData[WIRE_X_FLAT_BOTH + offset];
sss = &CatenarySpriteData[WIRE_X_FLAT_BOTH + offset];
} else {
/* Draw "long" wires on all other tiles of the bridge (one pylon every two tiles) */
sss = &RailCatenarySpriteData[WIRE_X_FLAT_SW + (num % 2) + offset];
sss = &CatenarySpriteData[WIRE_X_FLAT_SW + (num % 2) + offset];
}
height = GetBridgePixelHeight(end);
@@ -558,14 +558,14 @@ void DrawRailCatenaryOnBridge(const TileInfo *ti)
/**
* Draws overhead wires and pylons for electric railways.
* @param ti The TileInfo struct of the tile being drawn
* @see DrawRailCatenaryRailway
* @see DrawCatenaryRailway
*/
void DrawRailCatenary(const TileInfo *ti)
void DrawCatenary(const TileInfo *ti)
{
switch (GetTileType(ti->tile)) {
case MP_RAILWAY:
if (IsRailDepot(ti->tile)) {
const SortableSpriteStruct *sss = &RailCatenarySpriteData_Depot[GetRailDepotDirection(ti->tile)];
const SortableSpriteStruct *sss = &CatenarySpriteData_Depot[GetRailDepotDirection(ti->tile)];
SpriteID wire_base = GetWireBase(ti->tile);
@@ -587,7 +587,7 @@ void DrawRailCatenary(const TileInfo *ti)
default: return;
}
DrawRailCatenaryRailway(ti);
DrawCatenaryRailway(ti);
}
bool SettingsDisableElrail(int32 p1)

View File

@@ -20,7 +20,7 @@
* Test if a rail type has catenary
* @param rt Rail type to test
*/
static inline bool HasRailCatenary(RailType rt)
static inline bool HasCatenary(RailType rt)
{
return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
}
@@ -29,14 +29,14 @@ static inline bool HasRailCatenary(RailType rt)
* Test if we should draw rail catenary
* @param rt Rail type to test
*/
static inline bool HasRailCatenaryDrawn(RailType rt)
static inline bool HasCatenaryDrawn(RailType rt)
{
return HasRailCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
return HasCatenary(rt) && !IsInvisibilitySet(TO_CATENARY) && !_settings_game.vehicle.disable_elrails;
}
void DrawRailCatenary(const TileInfo *ti);
void DrawRailCatenaryOnTunnel(const TileInfo *ti);
void DrawRailCatenaryOnBridge(const TileInfo *ti);
void DrawCatenary(const TileInfo *ti);
void DrawCatenaryOnTunnel(const TileInfo *ti);
void DrawCatenaryOnBridge(const TileInfo *ti);
bool SettingsDisableElrail(int32 p1); ///< _settings_game.disable_elrail callback

View File

@@ -48,6 +48,11 @@ EngineOverrideManager _engine_mngr;
*/
static Year _year_engine_aging_stops;
/**
* The railtypes that have been or never will be introduced, or
* an inverse bitmap of rail types that have to be introduced. */
static uint16 _introduced_railtypes;
/** Number of engines of each vehicle type in original engine data */
const uint8 _engine_counts[4] = {
lengthof(_orig_rail_vehicle_info),
@@ -80,7 +85,6 @@ Engine::Engine(VehicleType type, EngineID base)
this->type = type;
this->grf_prop.local_id = base;
this->list_position = base;
this->preview_company = INVALID_COMPANY;
/* Check if this base engine is within the original engine data range */
if (base >= _engine_counts[type]) {
@@ -538,6 +542,29 @@ void SetupEngines()
const Engine *e = new Engine(eid->type, eid->internal_id);
assert(e->index == index);
}
_introduced_railtypes = 0;
}
/**
* Check whether the railtypes should be introduced.
*/
static void CheckRailIntroduction()
{
/* All railtypes have been introduced. */
if (_introduced_railtypes == UINT16_MAX || Company::GetPoolSize() == 0) return;
/* We need to find the railtypes that are known to all companies. */
RailTypes rts = (RailTypes)UINT16_MAX;
/* We are at, or past the introduction date of the rail. */
Company *c;
FOR_ALL_COMPANIES(c) {
c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, _date);
rts &= c->avail_railtypes;
}
_introduced_railtypes |= rts;
}
void ShowEnginePreviewWindow(EngineID engine);
@@ -683,6 +710,19 @@ void StartupEngines()
c->avail_roadtypes = GetCompanyRoadtypes(c->index);
}
/* Rail types that are invalid or never introduced are marked as
* being introduced upon start. That way we can easily check whether
* there is any date related introduction that is still going to
* happen somewhere in the future. */
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
const RailtypeInfo *rti = GetRailTypeInfo(rt);
if (rti->label != 0 && IsInsideMM(rti->introduction_date, 0, MAX_DAY)) continue;
SetBit(_introduced_railtypes, rt);
}
CheckRailIntroduction();
/* Invalidate any open purchase lists */
InvalidateWindowClassesData(WC_BUILD_VEHICLE);
}
@@ -779,10 +819,7 @@ static bool IsVehicleTypeDisabled(VehicleType type, bool ai)
/** Daily check to offer an exclusive engine preview to the companies. */
void EnginesDailyLoop()
{
Company *c;
FOR_ALL_COMPANIES(c) {
c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes, _date);
}
CheckRailIntroduction();
if (_cur_year >= _year_engine_aging_stops) return;
@@ -842,7 +879,7 @@ CommandCost CmdSetVehicleVisibility(TileIndex tile, DoCommandFlag flags, uint32
{
Engine *e = Engine::GetIfValid(GB(p2, 0, 31));
if (e == NULL || _current_company >= MAX_COMPANIES) return CMD_ERROR;
if (!IsEngineBuildable(e->index, e->type, _current_company)) return CMD_ERROR;
if ((e->flags & ENGINE_AVAILABLE) == 0 || !HasBit(e->company_avail, _current_company)) return CMD_ERROR;
if ((flags & DC_EXEC) != 0) {
SB(e->company_hidden, _current_company, 1, GB(p2, 31, 1));
@@ -865,7 +902,7 @@ CommandCost CmdSetVehicleVisibility(TileIndex tile, DoCommandFlag flags, uint32
CommandCost CmdWantEnginePreview(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
Engine *e = Engine::GetIfValid(p1);
if (e == NULL || !(e->flags & ENGINE_EXCLUSIVE_PREVIEW) || e->preview_company != _current_company) return CMD_ERROR;
if (e == NULL || e->preview_company != _current_company) return CMD_ERROR;
if (flags & DC_EXEC) AcceptEnginePreview(p1, _current_company);

View File

@@ -158,7 +158,6 @@ enum EngineMiscFlags {
EF_AUTO_REFIT = 4, ///< Automatic refitting is allowed
EF_NO_DEFAULT_CARGO_MULTIPLIER = 5, ///< Use the new capacity algorithm. The default cargotype of the vehicle does not affect capacity multipliers. CB 15 is also called in purchase list.
EF_NO_BREAKDOWN_SMOKE = 6, ///< Do not show black smoke during a breakdown.
EF_SPRITE_STACK = 7, ///< Draw vehicle by stacking multiple sprites.
};
/**

View File

@@ -14,96 +14,6 @@
#include "core/enum_type.hpp"
/** The different abstract types of files that the system knows about. */
enum AbstractFileType {
FT_NONE, ///< nothing to do
FT_SAVEGAME, ///< old or new savegame
FT_SCENARIO, ///< old or new scenario
FT_HEIGHTMAP, ///< heightmap file
FT_INVALID = 7, ///< Invalid or unknown file type.
FT_NUMBITS = 3, ///< Number of bits required for storing a #AbstractFileType value.
FT_MASK = (1 << FT_NUMBITS) - 1, ///< Bitmask for extracting an abstract file type.
};
/** Kinds of files in each #AbstractFileType. */
enum DetailedFileType {
/* Save game and scenario files. */
DFT_OLD_GAME_FILE, ///< Old save game or scenario file.
DFT_GAME_FILE, ///< Save game or scenario file.
/* Heightmap files. */
DFT_HEIGHTMAP_BMP, ///< BMP file.
DFT_HEIGHTMAP_PNG, ///< PNG file.
/* fios 'files' */
DFT_FIOS_DRIVE, ///< A drive (letter) entry.
DFT_FIOS_PARENT, ///< A parent directory entry.
DFT_FIOS_DIR, ///< A directory entry.
DFT_FIOS_DIRECT, ///< Direct filename.
DFT_INVALID = 255, ///< Unknown or invalid file.
};
/** Operation performed on the file. */
enum SaveLoadOperation {
SLO_CHECK, ///< Load file for checking and/or preview.
SLO_LOAD, ///< File is being loaded.
SLO_SAVE, ///< File is being saved.
SLO_INVALID, ///< Unknown file operation.
};
/**
* Construct an enum value for #FiosType as a combination of an abstract and a detailed file type.
* @param abstract Abstract file type (one of #AbstractFileType).
* @param detailed Detailed file type (one of #DetailedFileType).
*/
#define MAKE_FIOS_TYPE(abstract, detailed) ((abstract) | ((detailed) << FT_NUMBITS))
/**
* Elements of a file system that are recognized.
* Values are a combination of #AbstractFileType and #DetailedFileType.
* @see GetAbstractFileType GetDetailedFileType
*/
enum FiosType {
FIOS_TYPE_DRIVE = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DRIVE),
FIOS_TYPE_PARENT = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_PARENT),
FIOS_TYPE_DIR = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DIR),
FIOS_TYPE_DIRECT = MAKE_FIOS_TYPE(FT_NONE, DFT_FIOS_DIRECT),
FIOS_TYPE_FILE = MAKE_FIOS_TYPE(FT_SAVEGAME, DFT_GAME_FILE),
FIOS_TYPE_OLDFILE = MAKE_FIOS_TYPE(FT_SAVEGAME, DFT_OLD_GAME_FILE),
FIOS_TYPE_SCENARIO = MAKE_FIOS_TYPE(FT_SCENARIO, DFT_GAME_FILE),
FIOS_TYPE_OLD_SCENARIO = MAKE_FIOS_TYPE(FT_SCENARIO, DFT_OLD_GAME_FILE),
FIOS_TYPE_PNG = MAKE_FIOS_TYPE(FT_HEIGHTMAP, DFT_HEIGHTMAP_PNG),
FIOS_TYPE_BMP = MAKE_FIOS_TYPE(FT_HEIGHTMAP, DFT_HEIGHTMAP_BMP),
FIOS_TYPE_INVALID = MAKE_FIOS_TYPE(FT_INVALID, DFT_INVALID),
};
#undef MAKE_FIOS_TYPE
/**
* Extract the abstract file type from a #FiosType.
* @param fios_type Type to query.
* @return The Abstract file type of the \a fios_type.
*/
inline AbstractFileType GetAbstractFileType(FiosType fios_type)
{
return static_cast<AbstractFileType>(fios_type & FT_MASK);
}
/**
* Extract the detailed file type from a #FiosType.
* @param fios_type Type to query.
* @return The Detailed file type of the \a fios_type.
*/
inline DetailedFileType GetDetailedFileType(FiosType fios_type)
{
return static_cast<DetailedFileType>(fios_type >> FT_NUMBITS);
}
/**
* The different kinds of subdirectories OpenTTD uses
*/

View File

@@ -29,15 +29,17 @@
#include "safeguards.h"
/* Variables to display file lists */
SmallVector<FiosItem, 32> _fios_items;
static char *_fios_path;
static const char *_fios_path_last;
SmallFiosItem _file_to_saveload;
SortingBits _savegame_sort_order = SORT_BY_DATE | SORT_DESCENDING;
/* OS-specific functions are taken from their respective files (win32/unix/os2 .c) */
extern bool FiosIsRoot(const char *path);
extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb);
extern bool FiosIsHiddenFile(const struct dirent *ent);
extern void FiosGetDrives(FileList &file_list);
extern void FiosGetDrives();
extern bool FiosGetDiskFreeSpace(const char *path, uint64 *tot);
/* get the name of an oldstyle savegame */
@@ -63,72 +65,11 @@ int CDECL CompareFiosItems(const FiosItem *da, const FiosItem *db)
return r;
}
FileList::~FileList()
/** Free the list of savegames. */
void FiosFreeSavegameList()
{
this->Clear();
}
/**
* Construct a file list with the given kind of files, for the stated purpose.
* @param abstract_filetype Kind of files to collect.
* @param fop Purpose of the collection, either #SLO_LOAD or #SLO_SAVE.
*/
void FileList::BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop)
{
this->Clear();
assert(fop == SLO_LOAD || SLO_SAVE);
switch (abstract_filetype) {
case FT_NONE:
break;
case FT_SAVEGAME:
FiosGetSavegameList(fop, *this);
break;
case FT_SCENARIO:
FiosGetScenarioList(fop, *this);
break;
case FT_HEIGHTMAP:
FiosGetHeightmapList(fop, *this);
break;
default:
NOT_REACHED();
}
}
/**
* Find file information of a file by its name from the file list.
* @param file The filename to return information about. Can be the actual name
* or a numbered entry into the filename list.
* @return The information on the file, or \c NULL if the file is not available.
*/
const FiosItem *FileList::FindItem(const char *file)
{
for (const FiosItem *item = this->Begin(); item != this->End(); item++) {
if (strcmp(file, item->name) == 0) return item;
if (strcmp(file, item->title) == 0) return item;
}
/* If no name matches, try to parse it as number */
char *endptr;
int i = strtol(file, &endptr, 10);
if (file == endptr || *endptr != '\0') i = -1;
if (IsInsideMM(i, 0, this->Length())) return this->Get(i);
/* As a last effort assume it is an OpenTTD savegame and
* that the ".sav" part was not given. */
char long_file[MAX_PATH];
seprintf(long_file, lastof(long_file), "%s.sav", file);
for (const FiosItem *item = this->Begin(); item != this->End(); item++) {
if (strcmp(long_file, item->name) == 0) return item;
if (strcmp(long_file, item->title) == 0) return item;
}
return NULL;
_fios_items.Clear();
_fios_items.Compact();
}
/**
@@ -274,24 +215,23 @@ bool FiosDelete(const char *name)
return unlink(filename) == 0;
}
typedef FiosType fios_getlist_callback_proc(SaveLoadOperation fop, const char *filename, const char *ext, char *title, const char *last);
typedef FiosType fios_getlist_callback_proc(SaveLoadDialogMode mode, const char *filename, const char *ext, char *title, const char *last);
/**
* Scanner to scan for a particular type of FIOS file.
*/
class FiosFileScanner : public FileScanner {
SaveLoadOperation fop; ///< The kind of file we are looking for.
SaveLoadDialogMode mode; ///< The mode we want to search for
fios_getlist_callback_proc *callback_proc; ///< Callback to check whether the file may be added
FileList &file_list; ///< Destination of the found files.
public:
/**
* Create the scanner
* @param fop Purpose of collecting the list.
* @param callback_proc The function that is called where you need to do the filtering.
* @param file_list Destination of the found files.
* @param mode The mode we are in. Some modes don't allow 'parent'.
* @param callback_proc The function that is called where you need to do the filtering.
*/
FiosFileScanner(SaveLoadOperation fop, fios_getlist_callback_proc *callback_proc, FileList &file_list) :
fop(fop), callback_proc(callback_proc), file_list(file_list)
FiosFileScanner(SaveLoadDialogMode mode, fios_getlist_callback_proc *callback_proc) :
mode(mode),
callback_proc(callback_proc)
{}
/* virtual */ bool AddFile(const char *filename, size_t basepath_length, const char *tar_filename);
@@ -311,14 +251,14 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
char fios_title[64];
fios_title[0] = '\0'; // reset the title;
FiosType type = this->callback_proc(this->fop, filename, ext, fios_title, lastof(fios_title));
FiosType type = this->callback_proc(this->mode, filename, ext, fios_title, lastof(fios_title));
if (type == FIOS_TYPE_INVALID) return false;
for (const FiosItem *fios = file_list.Begin(); fios != file_list.End(); fios++) {
for (const FiosItem *fios = _fios_items.Begin(); fios != _fios_items.End(); fios++) {
if (strcmp(fios->name, filename) == 0) return false;
}
FiosItem *fios = file_list.Append();
FiosItem *fios = _fios_items.Append();
#ifdef WIN32
struct _stat sb;
if (_tstat(OTTD2FS(filename), &sb) == 0) {
@@ -349,12 +289,11 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
/**
* Fill the list of the files in a directory, according to some arbitrary rule.
* @param fop Purpose of collecting the list.
* @param callback_proc The function that is called where you need to do the filtering.
* @param subdir The directory from where to start (global) searching.
* @param file_list Destination of the found files.
* @param mode The mode we are in. Some modes don't allow 'parent'.
* @param callback_proc The function that is called where you need to do the filtering.
* @param subdir The directory from where to start (global) searching.
*/
static void FiosGetFileList(SaveLoadOperation fop, fios_getlist_callback_proc *callback_proc, Subdirectory subdir, FileList &file_list)
static void FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_proc *callback_proc, Subdirectory subdir)
{
struct stat sb;
struct dirent *dirent;
@@ -363,11 +302,11 @@ static void FiosGetFileList(SaveLoadOperation fop, fios_getlist_callback_proc *c
int sort_start;
char d_name[sizeof(fios->name)];
file_list.Clear();
_fios_items.Clear();
/* A parent directory link exists if we are not in the root directory */
if (!FiosIsRoot(_fios_path)) {
fios = file_list.Append();
fios = _fios_items.Append();
fios->type = FIOS_TYPE_PARENT;
fios->mtime = 0;
strecpy(fios->name, "..", lastof(fios->name));
@@ -383,7 +322,7 @@ static void FiosGetFileList(SaveLoadOperation fop, fios_getlist_callback_proc *c
if (FiosIsValidFile(_fios_path, dirent, &sb) && S_ISDIR(sb.st_mode) &&
(!FiosIsHiddenFile(dirent) || strncasecmp(d_name, PERSONAL_DIR, strlen(d_name)) == 0) &&
strcmp(d_name, ".") != 0 && strcmp(d_name, "..") != 0) {
fios = file_list.Append();
fios = _fios_items.Append();
fios->type = FIOS_TYPE_DIR;
fios->mtime = 0;
strecpy(fios->name, d_name, lastof(fios->name));
@@ -398,27 +337,27 @@ static void FiosGetFileList(SaveLoadOperation fop, fios_getlist_callback_proc *c
{
SortingBits order = _savegame_sort_order;
_savegame_sort_order = SORT_BY_NAME | SORT_ASCENDING;
QSortT(file_list.files.Begin(), file_list.files.Length(), CompareFiosItems);
QSortT(_fios_items.Begin(), _fios_items.Length(), CompareFiosItems);
_savegame_sort_order = order;
}
/* This is where to start sorting for the filenames */
sort_start = file_list.Length();
sort_start = _fios_items.Length();
/* Show files */
FiosFileScanner scanner(fop, callback_proc, file_list);
FiosFileScanner scanner(mode, callback_proc);
if (subdir == NO_DIRECTORY) {
scanner.Scan(NULL, _fios_path, false);
} else {
scanner.Scan(NULL, subdir, true, true);
}
QSortT(file_list.Get(sort_start), file_list.Length() - sort_start, CompareFiosItems);
QSortT(_fios_items.Get(sort_start), _fios_items.Length() - sort_start, CompareFiosItems);
/* Show drives */
FiosGetDrives(file_list);
FiosGetDrives();
file_list.Compact();
_fios_items.Compact();
}
/**
@@ -447,7 +386,7 @@ static void GetFileTitle(const char *file, char *title, const char *last, Subdir
/**
* Callback for FiosGetFileList. It tells if a file is a savegame or not.
* @param fop Purpose of collecting the list.
* @param mode Save/load mode.
* @param file Name of the file to check.
* @param ext A pointer to the extension identifier inside file
* @param title Buffer if a callback wants to lookup the title of the file; NULL to skip the lookup
@@ -456,7 +395,7 @@ static void GetFileTitle(const char *file, char *title, const char *last, Subdir
* @see FiosGetFileList
* @see FiosGetSavegameList
*/
FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
{
/* Show savegame files
* .SAV OpenTTD saved game
@@ -472,7 +411,7 @@ FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, co
return FIOS_TYPE_FILE;
}
if (fop == SLO_LOAD) {
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (strcasecmp(ext, ".ss1") == 0 || strcasecmp(ext, ".sv1") == 0 ||
strcasecmp(ext, ".sv2") == 0) {
if (title != NULL) GetOldSaveGameName(file, title, last);
@@ -485,11 +424,10 @@ FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, co
/**
* Get a list of savegames.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
* @param mode Save/load mode.
* @see FiosGetFileList
*/
void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
void FiosGetSavegameList(SaveLoadDialogMode mode)
{
static char *fios_save_path = NULL;
static char *fios_save_path_last = NULL;
@@ -503,12 +441,12 @@ void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
_fios_path = fios_save_path;
_fios_path_last = fios_save_path_last;
FiosGetFileList(fop, &FiosGetSavegameListCallback, NO_DIRECTORY, file_list);
FiosGetFileList(mode, &FiosGetSavegameListCallback, NO_DIRECTORY);
}
/**
* Callback for FiosGetFileList. It tells if a file is a scenario or not.
* @param fop Purpose of collecting the list.
* @param mode Save/load mode.
* @param file Name of the file to check.
* @param ext A pointer to the extension identifier inside file
* @param title Buffer if a callback wants to lookup the title of the file
@@ -517,7 +455,7 @@ void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list)
* @see FiosGetFileList
* @see FiosGetScenarioList
*/
static FiosType FiosGetScenarioListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
static FiosType FiosGetScenarioListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
{
/* Show scenario files
* .SCN OpenTTD style scenario file
@@ -528,7 +466,7 @@ static FiosType FiosGetScenarioListCallback(SaveLoadOperation fop, const char *f
return FIOS_TYPE_SCENARIO;
}
if (fop == SLO_LOAD) {
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (strcasecmp(ext, ".sv0") == 0 || strcasecmp(ext, ".ss0") == 0 ) {
GetOldSaveGameName(file, title, last);
return FIOS_TYPE_OLD_SCENARIO;
@@ -540,11 +478,10 @@ static FiosType FiosGetScenarioListCallback(SaveLoadOperation fop, const char *f
/**
* Get a list of scenarios.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
* @param mode Save/load mode.
* @see FiosGetFileList
*/
void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list)
void FiosGetScenarioList(SaveLoadDialogMode mode)
{
static char *fios_scn_path = NULL;
static char *fios_scn_path_last = NULL;
@@ -562,11 +499,10 @@ void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list)
char base_path[MAX_PATH];
FioGetDirectory(base_path, lastof(base_path), SCENARIO_DIR);
Subdirectory subdir = (fop == SLO_LOAD && strcmp(base_path, _fios_path) == 0) ? SCENARIO_DIR : NO_DIRECTORY;
FiosGetFileList(fop, &FiosGetScenarioListCallback, subdir, file_list);
FiosGetFileList(mode, &FiosGetScenarioListCallback, (mode == SLD_LOAD_SCENARIO && strcmp(base_path, _fios_path) == 0) ? SCENARIO_DIR : NO_DIRECTORY);
}
static FiosType FiosGetHeightmapListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last)
static FiosType FiosGetHeightmapListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last)
{
/* Show heightmap files
* .PNG PNG Based heightmap files
@@ -612,10 +548,9 @@ static FiosType FiosGetHeightmapListCallback(SaveLoadOperation fop, const char *
/**
* Get a list of heightmaps.
* @param fop Purpose of collecting the list.
* @param file_list Destination of the found files.
* @param mode Save/load mode.
*/
void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list)
void FiosGetHeightmapList(SaveLoadDialogMode mode)
{
static char *fios_hmap_path = NULL;
static char *fios_hmap_path_last = NULL;
@@ -632,8 +567,7 @@ void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list)
char base_path[MAX_PATH];
FioGetDirectory(base_path, lastof(base_path), HEIGHTMAP_DIR);
Subdirectory subdir = strcmp(base_path, _fios_path) == 0 ? HEIGHTMAP_DIR : NO_DIRECTORY;
FiosGetFileList(fop, &FiosGetHeightmapListCallback, subdir, file_list);
FiosGetFileList(mode, &FiosGetHeightmapListCallback, strcmp(base_path, _fios_path) == 0 ? HEIGHTMAP_DIR : NO_DIRECTORY);
}
/**

View File

@@ -81,17 +81,52 @@ extern LoadCheckData _load_check_data;
enum FileSlots {
/**
* Slot used for the GRF scanning and such.
* This slot is used for all temporary accesses to files when scanning/testing files,
* and thus cannot be used for files, which are continuously accessed during a game.
* Slot used for the GRF scanning and such. This slot cannot be reused
* as it will otherwise cause issues when pressing "rescan directories".
* It can furthermore not be larger than LAST_GRF_SLOT as that complicates
* the testing for "too much NewGRFs".
*/
CONFIG_SLOT = 0,
/** Slot for the sound. */
SOUND_SLOT = 1,
/** First slot usable for (New)GRFs used during the game. */
FIRST_GRF_SLOT = 2,
/** Last slot usable for (New)GRFs used during the game. */
LAST_GRF_SLOT = 63,
/** Maximum number of slots. */
MAX_FILE_SLOTS = 128,
MAX_FILE_SLOTS = 64
};
/** Mode of the file dialogue window. */
enum SaveLoadDialogMode {
SLD_LOAD_GAME, ///< Load a game.
SLD_LOAD_SCENARIO, ///< Load a scenario.
SLD_SAVE_GAME, ///< Save a game.
SLD_SAVE_SCENARIO, ///< Save a scenario.
SLD_LOAD_HEIGHTMAP, ///< Load a heightmap.
SLD_SAVE_HEIGHTMAP, ///< Save a heightmap.
};
/** The different types of files that the system knows about. */
enum FileType {
FT_NONE, ///< nothing to do
FT_SAVEGAME, ///< old or new savegame
FT_SCENARIO, ///< old or new scenario
FT_HEIGHTMAP, ///< heightmap file
};
enum FiosType {
FIOS_TYPE_DRIVE,
FIOS_TYPE_PARENT,
FIOS_TYPE_DIR,
FIOS_TYPE_FILE,
FIOS_TYPE_OLDFILE,
FIOS_TYPE_SCENARIO,
FIOS_TYPE_OLD_SCENARIO,
FIOS_TYPE_DIRECT,
FIOS_TYPE_PNG,
FIOS_TYPE_BMP,
FIOS_TYPE_INVALID = 255,
};
/** Deals with finding savegames */
@@ -102,95 +137,12 @@ struct FiosItem {
char name[MAX_PATH];
};
/** List of file information. */
class FileList {
public:
~FileList();
/**
* Construct a new entry in the file list.
* @return Pointer to the new items to be initialized.
*/
inline FiosItem *Append()
{
return this->files.Append();
}
/**
* Get the number of files in the list.
* @return The number of files stored in the list.
*/
inline uint Length() const
{
return this->files.Length();
}
/**
* Get a pointer to the first file information.
* @return Address of the first file information.
*/
inline const FiosItem *Begin() const
{
return this->files.Begin();
}
/**
* Get a pointer behind the last file information.
* @return Address behind the last file information.
*/
inline const FiosItem *End() const
{
return this->files.End();
}
/**
* Get a pointer to the indicated file information. File information must exist.
* @return Address of the indicated existing file information.
*/
inline const FiosItem *Get(uint index) const
{
return this->files.Get(index);
}
/**
* Get a pointer to the indicated file information. File information must exist.
* @return Address of the indicated existing file information.
*/
inline FiosItem *Get(uint index)
{
return this->files.Get(index);
}
inline const FiosItem &operator[](uint index) const
{
return this->files[index];
}
/**
* Get a reference to the indicated file information. File information must exist.
* @return The requested file information.
*/
inline FiosItem &operator[](uint index)
{
return this->files[index];
}
/** Remove all items from the list. */
inline void Clear()
{
this->files.Clear();
}
/** Compact the list down to the smallest block size boundary. */
inline void Compact()
{
this->files.Compact();
}
void BuildFileList(AbstractFileType abstract_filetype, SaveLoadOperation fop);
const FiosItem *FindItem(const char *file);
SmallVector<FiosItem, 32> files; ///< The list of files.
/** Deals with the type of the savegame, independent of extension */
struct SmallFiosItem {
int mode; ///< savegame/scenario type (old, new)
FileType filetype; ///< what type of file are we dealing with
char name[MAX_PATH]; ///< name
char title[255]; ///< internal name of the game
};
enum SortingBits {
@@ -202,14 +154,18 @@ enum SortingBits {
DECLARE_ENUM_AS_BIT_SET(SortingBits)
/* Variables to display file lists */
extern SmallVector<FiosItem, 32> _fios_items;
extern SmallFiosItem _file_to_saveload;
extern SaveLoadDialogMode _saveload_mode;
extern SortingBits _savegame_sort_order;
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop);
void ShowSaveLoadDialog(SaveLoadDialogMode mode);
void FiosGetSavegameList(SaveLoadOperation fop, FileList &file_list);
void FiosGetScenarioList(SaveLoadOperation fop, FileList &file_list);
void FiosGetHeightmapList(SaveLoadOperation fop, FileList &file_list);
void FiosGetSavegameList(SaveLoadDialogMode mode);
void FiosGetScenarioList(SaveLoadDialogMode mode);
void FiosGetHeightmapList(SaveLoadDialogMode mode);
void FiosFreeSavegameList();
const char *FiosBrowseTo(const FiosItem *item);
StringID FiosGetDescText(const char **path, uint64 *total_free);
@@ -217,8 +173,13 @@ bool FiosDelete(const char *name);
void FiosMakeHeightmapName(char *buf, const char *name, const char *last);
void FiosMakeSavegameName(char *buf, const char *name, const char *last);
FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const char *file, const char *ext, char *title, const char *last);
FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title, const char *last);
int CDECL CompareFiosItems(const FiosItem *a, const FiosItem *b);
extern const TextColour _fios_colours[];
void BuildFileList();
void SetFiosType(const byte fiostype);
#endif /* FIOS_H */

View File

@@ -36,6 +36,7 @@
#include "safeguards.h"
SaveLoadDialogMode _saveload_mode;
LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK.
static bool _fios_path_changed;
@@ -186,24 +187,33 @@ static const NWidgetPart _nested_save_dialog_widgets[] = {
EndContainer(),
};
/** Text colours of #DetailedFileType fios entries in the window. */
static const TextColour _fios_colours[] = {
TC_LIGHT_BROWN, // DFT_OLD_GAME_FILE
TC_ORANGE, // DFT_GAME_FILE
TC_YELLOW, // DFT_HEIGHTMAP_BMP
TC_ORANGE, // DFT_HEIGHTMAP_PNG
TC_LIGHT_BLUE, // DFT_FIOS_DRIVE
TC_DARK_GREEN, // DFT_FIOS_PARENT
TC_DARK_GREEN, // DFT_FIOS_DIR
TC_ORANGE, // DFT_FIOS_DIRECT
/** Colours for fios types, indexed by #FiosType. */
const TextColour _fios_colours[] = {
TC_LIGHT_BLUE, TC_DARK_GREEN, TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN,
TC_ORANGE, TC_LIGHT_BROWN, TC_ORANGE, TC_ORANGE, TC_YELLOW
};
void BuildFileList()
{
_fios_path_changed = true;
FiosFreeSavegameList();
/**
* Sort the collected list save games prior to displaying it in the save/load gui.
* @param [inout] file_list List of save game files found in the directory.
*/
static void SortSaveGameList(FileList &file_list)
switch (_saveload_mode) {
case SLD_LOAD_SCENARIO:
case SLD_SAVE_SCENARIO:
FiosGetScenarioList(_saveload_mode); break;
case SLD_SAVE_HEIGHTMAP:
case SLD_LOAD_HEIGHTMAP:
FiosGetHeightmapList(_saveload_mode); break;
default: FiosGetSavegameList(_saveload_mode); break;
}
/* Invalidate saveload window */
InvalidateWindowData(WC_SAVELOAD, 0, 2, true);
}
static void MakeSortedSaveGameList()
{
uint sort_start = 0;
uint sort_end = 0;
@@ -212,7 +222,7 @@ static void SortSaveGameList(FileList &file_list)
* Drives (A:\ (windows only) are always under the files (FIOS_TYPE_DRIVE)
* Only sort savegames/scenarios, not directories
*/
for (const FiosItem *item = file_list.Begin(); item != file_list.End(); item++) {
for (const FiosItem *item = _fios_items.Begin(); item != _fios_items.End(); item++) {
switch (item->type) {
case FIOS_TYPE_DIR: sort_start++; break;
case FIOS_TYPE_PARENT: sort_start++; break;
@@ -221,18 +231,15 @@ static void SortSaveGameList(FileList &file_list)
}
}
uint s_amount = file_list.Length() - sort_start - sort_end;
QSortT(file_list.Get(sort_start), s_amount, CompareFiosItems);
uint s_amount = _fios_items.Length() - sort_start - sort_end;
QSortT(_fios_items.Get(sort_start), s_amount, CompareFiosItems);
}
struct SaveLoadWindow : public Window {
private:
QueryString filename_editbox; ///< Filename editbox.
AbstractFileType abstract_filetype; /// Type of file to select.
SaveLoadOperation fop; ///< File operation to perform.
FileList fios_items; ///< Save game list.
FiosItem o_dir;
const FiosItem *selected; ///< Selected game in #fios_items, or \c NULL.
const FiosItem *selected;
Scrollbar *vscroll;
public:
@@ -243,56 +250,35 @@ public:
this->filename_editbox.text.UpdateSize();
}
SaveLoadWindow(WindowDesc *desc, AbstractFileType abstract_filetype, SaveLoadOperation fop)
: Window(desc), filename_editbox(64), abstract_filetype(abstract_filetype), fop(fop)
SaveLoadWindow(WindowDesc *desc, SaveLoadDialogMode mode) : Window(desc), filename_editbox(64)
{
assert(this->fop == SLO_SAVE || this->fop == SLO_LOAD);
static const StringID saveload_captions[] = {
STR_SAVELOAD_LOAD_CAPTION,
STR_SAVELOAD_LOAD_SCENARIO,
STR_SAVELOAD_SAVE_CAPTION,
STR_SAVELOAD_SAVE_SCENARIO,
STR_SAVELOAD_LOAD_HEIGHTMAP,
STR_SAVELOAD_SAVE_HEIGHTMAP,
};
assert((uint)mode < lengthof(saveload_captions));
/* For saving, construct an initial file name. */
if (this->fop == SLO_SAVE) {
switch (this->abstract_filetype) {
case FT_SAVEGAME:
this->GenerateFileName();
break;
case FT_SCENARIO:
case FT_HEIGHTMAP:
this->filename_editbox.text.Assign("UNNAMED");
break;
default:
NOT_REACHED();
}
/* Use an array to define what will be the current file type being handled
* by current file mode */
switch (mode) {
case SLD_SAVE_GAME: this->GenerateFileName(); break;
case SLD_SAVE_HEIGHTMAP:
case SLD_SAVE_SCENARIO: this->filename_editbox.text.Assign("UNNAMED"); break;
default: break;
}
this->querystrings[WID_SL_SAVE_OSK_TITLE] = &this->filename_editbox;
this->filename_editbox.ok_button = WID_SL_SAVE_GAME;
this->CreateNestedTree(true);
if (this->fop == SLO_LOAD && this->abstract_filetype == FT_SAVEGAME) {
this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
}
/* Select caption string of the window. */
StringID caption_string;
switch (this->abstract_filetype) {
case FT_SAVEGAME:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_CAPTION : STR_SAVELOAD_LOAD_CAPTION;
break;
case FT_SCENARIO:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_SCENARIO : STR_SAVELOAD_LOAD_SCENARIO;
break;
case FT_HEIGHTMAP:
caption_string = (this->fop == SLO_SAVE) ? STR_SAVELOAD_SAVE_HEIGHTMAP : STR_SAVELOAD_LOAD_HEIGHTMAP;
break;
default:
NOT_REACHED();
}
this->GetWidget<NWidgetCore>(WID_SL_CAPTION)->widget_data = caption_string;
if (mode == SLD_LOAD_GAME) this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
this->GetWidget<NWidgetCore>(WID_SL_CAPTION)->widget_data = saveload_captions[mode];
this->vscroll = this->GetScrollbar(WID_SL_SCROLLBAR);
this->FinishInitNested(0);
this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST);
@@ -308,18 +294,20 @@ public:
ResetObjectToPlace();
/* Select the initial directory. */
o_dir.type = FIOS_TYPE_DIRECT;
switch (this->abstract_filetype) {
case FT_SAVEGAME:
switch (_saveload_mode) {
case SLD_SAVE_GAME:
case SLD_LOAD_GAME:
FioGetDirectory(o_dir.name, lastof(o_dir.name), SAVE_DIR);
break;
case FT_SCENARIO:
case SLD_SAVE_SCENARIO:
case SLD_LOAD_SCENARIO:
FioGetDirectory(o_dir.name, lastof(o_dir.name), SCENARIO_DIR);
break;
case FT_HEIGHTMAP:
case SLD_SAVE_HEIGHTMAP:
case SLD_LOAD_HEIGHTMAP:
FioGetDirectory(o_dir.name, lastof(o_dir.name), HEIGHTMAP_DIR);
break;
@@ -328,7 +316,9 @@ public:
}
/* Focus the edit box by default in the save windows */
if (this->fop == SLO_SAVE) this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE);
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP) {
this->SetFocusedWidget(WID_SL_SAVE_OSK_TITLE);
}
}
virtual ~SaveLoadWindow()
@@ -337,6 +327,7 @@ public:
if (!_networking && _game_mode != GM_EDITOR && _game_mode != GM_MENU) {
DoCommandP(0, PM_PAUSED_SAVELOAD, 0, CMD_PAUSE);
}
FiosFreeSavegameList();
}
virtual void DrawWidget(const Rect &r, int widget) const
@@ -369,13 +360,13 @@ public:
GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, PC_BLACK);
uint y = r.top + WD_FRAMERECT_TOP;
for (uint pos = this->vscroll->GetPosition(); pos < this->fios_items.Length(); pos++) {
const FiosItem *item = this->fios_items.Get(pos);
for (uint pos = this->vscroll->GetPosition(); pos < _fios_items.Length(); pos++) {
const FiosItem *item = _fios_items.Get(pos);
if (item == this->selected) {
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, y, item->title, _fios_colours[GetDetailedFileType(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;
if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
}
@@ -430,7 +421,7 @@ public:
if (y > y_max) break;
/* Hide current date for scenarios */
if (this->abstract_filetype != FT_SCENARIO) {
if (_saveload_mode != SLD_LOAD_SCENARIO && _saveload_mode != SLD_SAVE_SCENARIO) {
/* Current date */
SetDParam(0, _load_check_data.current_date);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_NETWORK_SERVER_LIST_CURRENT_DATE);
@@ -438,7 +429,7 @@ public:
}
/* Hide the NewGRF stuff when saving. We also hide the button. */
if (this->fop == SLO_LOAD && (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO)) {
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
y += WD_PAR_VSEP_NORMAL;
if (y > y_max) break;
@@ -451,7 +442,7 @@ public:
if (y > y_max) break;
/* Hide the company stuff for scenarios */
if (this->abstract_filetype != FT_SCENARIO) {
if (_saveload_mode != SLD_LOAD_SCENARIO && _saveload_mode != SLD_SAVE_SCENARIO) {
y += FONT_HEIGHT_NORMAL;
if (y > y_max) break;
@@ -504,10 +495,10 @@ public:
{
if (_savegame_sort_dirty) {
_savegame_sort_dirty = false;
SortSaveGameList(this->fios_items);
MakeSortedSaveGameList();
}
this->vscroll->SetCount(this->fios_items.Length());
this->vscroll->SetCount(_fios_items.Length());
this->DrawWidgets();
}
@@ -536,14 +527,14 @@ public:
case WID_SL_LOAD_BUTTON:
if (this->selected != NULL && !_load_check_data.HasErrors()) {
const char *name = FiosBrowseTo(this->selected);
_file_to_saveload.SetMode(this->selected->type);
_file_to_saveload.SetName(name);
_file_to_saveload.SetTitle(this->selected->title);
SetFiosType(this->selected->type);
if (this->abstract_filetype == FT_HEIGHTMAP) {
strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, this->selected->title, lastof(_file_to_saveload.title));
if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
delete this;
ShowHeightmapLoad();
} else 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;
ClearErrorMessages();
@@ -572,7 +563,7 @@ public:
int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_SL_DRIVES_DIRECTORIES_LIST, WD_FRAMERECT_TOP);
if (y == INT_MAX) return;
const FiosItem *file = this->fios_items.Get(y);
const FiosItem *file = _fios_items.Get(y);
const char *name = FiosBrowseTo(file);
if (name != NULL) {
@@ -581,32 +572,28 @@ public:
this->selected = file;
_load_check_data.Clear();
if (GetDetailedFileType(file->type) == DFT_GAME_FILE) {
/* Other detailed file types cannot be checked before. */
SaveOrLoad(name, SLO_CHECK, DFT_GAME_FILE, NO_DIRECTORY, false);
if (file->type == FIOS_TYPE_FILE || file->type == FIOS_TYPE_SCENARIO) {
SaveOrLoad(name, SL_LOAD_CHECK, NO_DIRECTORY, false);
}
this->InvalidateData(1);
}
if (this->fop == SLO_SAVE) {
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP) {
/* Copy clicked name to editbox */
this->filename_editbox.text.Assign(file->title);
this->SetWidgetDirty(WID_SL_SAVE_OSK_TITLE);
}
} else if (!_load_check_data.HasErrors()) {
this->selected = file;
if (this->fop == SLO_LOAD) {
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
this->OnClick(pt, WID_SL_LOAD_BUTTON, 1);
} else {
assert(this->abstract_filetype == FT_HEIGHTMAP);
_file_to_saveload.SetMode(file->type);
_file_to_saveload.SetName(name);
_file_to_saveload.SetTitle(file->title);
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
this->OnClick(pt, WID_SL_LOAD_BUTTON, 1);
} else if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
SetFiosType(file->type);
strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name));
strecpy(_file_to_saveload.title, file->title, lastof(_file_to_saveload.title));
delete this;
ShowHeightmapLoad();
}
delete this;
ShowHeightmapLoad();
}
}
} else {
@@ -621,11 +608,10 @@ public:
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
#if defined(ENABLE_NETWORK)
assert(this->fop == SLO_LOAD);
switch (this->abstract_filetype) {
switch (_saveload_mode) {
default: NOT_REACHED();
case FT_SCENARIO: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_SCENARIO); break;
case FT_HEIGHTMAP: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_HEIGHTMAP); break;
case SLD_LOAD_SCENARIO: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_SCENARIO); break;
case SLD_LOAD_HEIGHTMAP: ShowNetworkContentListWindow(NULL, CONTENT_TYPE_HEIGHTMAP); break;
}
#endif
}
@@ -653,8 +639,9 @@ public:
virtual void OnTimeout()
{
/* Widgets WID_SL_DELETE_SELECTION and WID_SL_SAVE_GAME only exist when saving to a file. */
if (this->fop != SLO_SAVE) return;
/* This test protects against using widgets 11 and 12 which are only available
* in those saveload modes. */
if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO || _saveload_mode == SLD_SAVE_HEIGHTMAP)) return;
if (this->IsWidgetLowered(WID_SL_DELETE_SELECTION)) { // Delete button clicked
if (!FiosDelete(this->filename_editbox.text.buf)) {
@@ -662,10 +649,10 @@ public:
} else {
this->InvalidateData();
/* Reset file name to current date on successful delete */
if (this->abstract_filetype == FT_SAVEGAME) GenerateFileName();
if (_saveload_mode == SLD_SAVE_GAME) GenerateFileName();
}
} else if (this->IsWidgetLowered(WID_SL_SAVE_GAME)) { // Save button clicked
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
if (_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO) {
_switch_mode = SM_SAVE_GAME;
FiosMakeSavegameName(_file_to_saveload.name, this->filename_editbox.text.buf, lastof(_file_to_saveload.name));
} else {
@@ -696,40 +683,28 @@ public:
this->selected = NULL;
_load_check_data.Clear();
if (!gui_scope) break;
_fios_path_changed = true;
this->fios_items.BuildFileList(this->abstract_filetype, this->fop);
this->vscroll->SetCount(this->fios_items.Length());
this->selected = NULL;
_load_check_data.Clear();
BuildFileList();
/* FALL THROUGH */
case 1:
/* Selection changes */
if (!gui_scope) break;
if (this->fop != SLO_LOAD) break;
switch (this->abstract_filetype) {
case FT_HEIGHTMAP:
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors());
break;
case FT_SAVEGAME:
case FT_SCENARIO: {
bool disabled = this->selected == NULL || _load_check_data.HasErrors();
if (!_settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
disabled |= _load_check_data.HasNewGrfs() && _load_check_data.grf_compatibility == GLC_NOT_FOUND;
}
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, disabled);
this->SetWidgetDisabledState(WID_SL_NEWGRF_INFO, !_load_check_data.HasNewGrfs());
this->SetWidgetDisabledState(WID_SL_MISSING_NEWGRFS,
!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility == GLC_ALL_GOOD);
break;
}
default:
NOT_REACHED();
if (_saveload_mode == SLD_LOAD_HEIGHTMAP) {
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors());
}
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON,
this->selected == NULL || _load_check_data.HasErrors() || !(!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
this->SetWidgetDisabledState(WID_SL_NEWGRF_INFO,
!_load_check_data.HasNewGrfs());
this->SetWidgetDisabledState(WID_SL_MISSING_NEWGRFS,
!_load_check_data.HasNewGrfs() || _load_check_data.grf_compatibility == GLC_ALL_GOOD);
}
break;
case 2:
/* _fios_items changed */
this->vscroll->SetCount(_fios_items.Length());
this->selected = NULL;
_load_check_data.Clear();
break;
}
}
@@ -760,23 +735,69 @@ static WindowDesc _save_dialog_desc(
);
/**
* Launch save/load dialog in the given mode.
* @param abstract_filetype Kind of file to handle.
* @param fop File operation to perform (load or save).
* These values are used to convert the file/operations mode into a corresponding file type.
* So each entry, as expressed by the related comment, is based on the enum
*/
void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fop)
static const FileType _file_modetotype[] = {
FT_SAVEGAME, // used for SLD_LOAD_GAME
FT_SCENARIO, // used for SLD_LOAD_SCENARIO
FT_SAVEGAME, // used for SLD_SAVE_GAME
FT_SCENARIO, // used for SLD_SAVE_SCENARIO
FT_HEIGHTMAP, // used for SLD_LOAD_HEIGHTMAP
FT_HEIGHTMAP, // used for SLD_SAVE_HEIGHTMAP
};
/**
* Launch save/load dialog in the given mode.
* @param mode Save/load mode.
*/
void ShowSaveLoadDialog(SaveLoadDialogMode mode)
{
DeleteWindowById(WC_SAVELOAD, 0);
WindowDesc *sld;
if (fop == SLO_SAVE) {
sld = &_save_dialog_desc;
} else {
/* Dialogue for loading a file. */
sld = (abstract_filetype == FT_HEIGHTMAP) ? &_load_heightmap_dialog_desc : &_load_dialog_desc;
switch (mode) {
case SLD_SAVE_GAME:
case SLD_SAVE_SCENARIO:
case SLD_SAVE_HEIGHTMAP:
sld = &_save_dialog_desc; break;
case SLD_LOAD_HEIGHTMAP:
sld = &_load_heightmap_dialog_desc; break;
default:
sld = &_load_dialog_desc; break;
}
_file_to_saveload.abstract_ftype = abstract_filetype;
_saveload_mode = mode;
_file_to_saveload.filetype = _file_modetotype[mode];
new SaveLoadWindow(sld, abstract_filetype, fop);
new SaveLoadWindow(sld, mode);
}
void SetFiosType(const byte fiostype)
{
switch (fiostype) {
case FIOS_TYPE_FILE:
case FIOS_TYPE_SCENARIO:
_file_to_saveload.mode = SL_LOAD;
break;
case FIOS_TYPE_OLDFILE:
case FIOS_TYPE_OLD_SCENARIO:
_file_to_saveload.mode = SL_OLD_LOAD;
break;
#ifdef WITH_PNG
case FIOS_TYPE_PNG:
_file_to_saveload.mode = SL_PNG;
break;
#endif /* WITH_PNG */
case FIOS_TYPE_BMP:
_file_to_saveload.mode = SL_BMP;
break;
default:
_file_to_saveload.mode = SL_INVALID;
break;
}
}

View File

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

View File

@@ -14,6 +14,9 @@
#include "../core/smallvec_type.hpp"
/** The tab we place our strings in. */
static const uint GAME_TEXT_TAB = 18;
const char *GetGameStringPtr(uint id);
void RegisterGameTranslation(class Squirrel *engine);
void ReconsiderGameScriptLanguage();

View File

@@ -77,7 +77,7 @@ static void CleanupGeneration()
{
_generating_world = false;
SetMouseCursorBusy(false);
if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
/* Show all vital windows again, because we have hidden them */
if (_gw.threaded && _game_mode != GM_MENU) ShowVitalWindows();
SetModalProgress(false);
@@ -204,7 +204,7 @@ static void _GenerateWorld(void *)
if (_debug_desync_level > 0) {
char name[MAX_PATH];
seprintf(name, lastof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
SaveOrLoad(name, SLO_SAVE, DFT_GAME_FILE, AUTOSAVE_DIR, false);
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR, false);
}
} catch (...) {
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP, true);
@@ -331,7 +331,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
_gw.thread = NULL;
}
if (!VideoDriver::GetInstance()->HasGUI() || !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread, "ottd:genworld")) {
if (!VideoDriver::GetInstance()->HasGUI() || !ThreadObject::New(&_GenerateWorld, NULL, &_gw.thread)) {
DEBUG(misc, 1, "Cannot create genworld thread, reverting to single-threaded mode");
_gw.threaded = false;
_modal_progress_work_mutex->EndCritical();

View File

@@ -26,7 +26,6 @@
#include "town.h"
#include "core/geometry_func.hpp"
#include "core/random_func.hpp"
#include "saveload/saveload.h"
#include "progress.h"
#include "error.h"
@@ -833,7 +832,7 @@ static void _ShowGenerateLandscape(GenerateLandscapeWindowMode mode)
if (mode == GLWM_HEIGHTMAP) {
/* If the function returns negative, it means there was a problem loading the heightmap */
if (!GetHeightmapDimensions(_file_to_saveload.detail_ftype, _file_to_saveload.name, &x, &y)) return;
if (!GetHeightmapDimensions(_file_to_saveload.name, &x, &y)) return;
}
WindowDesc *desc = (mode == GLWM_HEIGHTMAP) ? &_heightmap_load_desc : &_generate_landscape_desc;
@@ -1191,7 +1190,7 @@ struct GenerateProgressWindow : public Window {
{
switch (widget) {
case WID_GP_ABORT:
SetMouseCursorBusy(false);
if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
ShowQuery(
STR_GENERATION_ABORT_CAPTION,
STR_GENERATION_ABORT_MESSAGE,

View File

@@ -1223,6 +1223,10 @@ void DrawMouseCursor()
if (_screen.dst_ptr == NULL) return;
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
int x;
int y;
int w;
int h;
/* Redraw mouse cursor but only when it's inside the window */
if (!_cursor.in_window) return;
@@ -1233,44 +1237,36 @@ void DrawMouseCursor()
UndrawMouseCursor();
}
/* Determine visible area */
int left = _cursor.pos.x + _cursor.total_offs.x;
int width = _cursor.total_size.x;
if (left < 0) {
width += left;
left = 0;
w = _cursor.size.x;
x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset;
if (x < 0) {
w += x;
x = 0;
}
if (left + width > _screen.width) {
width = _screen.width - left;
}
if (width <= 0) return;
if (w > _screen.width - x) w = _screen.width - x;
if (w <= 0) return;
_cursor.draw_pos.x = x;
_cursor.draw_size.x = w;
int top = _cursor.pos.y + _cursor.total_offs.y;
int height = _cursor.total_size.y;
if (top < 0) {
height += top;
top = 0;
h = _cursor.size.y;
y = _cursor.pos.y + _cursor.offs.y;
if (y < 0) {
h += y;
y = 0;
}
if (top + height > _screen.height) {
height = _screen.height - top;
}
if (height <= 0) return;
if (h > _screen.height - y) h = _screen.height - y;
if (h <= 0) return;
_cursor.draw_pos.y = y;
_cursor.draw_size.y = h;
_cursor.draw_pos.x = left;
_cursor.draw_pos.y = top;
_cursor.draw_size.x = width;
_cursor.draw_size.y = height;
uint8 *buffer = _cursor_backup.Allocate(blitter->BufferSize(_cursor.draw_size.x, _cursor.draw_size.y));
uint8 *buffer = _cursor_backup.Allocate(blitter->BufferSize(w, h));
/* Make backup of stuff below cursor */
blitter->CopyToBuffer(blitter->MoveTo(_screen.dst_ptr, _cursor.draw_pos.x, _cursor.draw_pos.y), buffer, _cursor.draw_size.x, _cursor.draw_size.y);
/* Draw cursor on screen */
_cur_dpi = &_screen;
for (uint i = 0; i < _cursor.sprite_count; ++i) {
DrawSprite(_cursor.sprite_seq[i].sprite, _cursor.sprite_seq[i].pal, _cursor.pos.x + _cursor.sprite_pos[i].x, _cursor.pos.y + _cursor.sprite_pos[i].y);
}
DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y);
VideoDriver::GetInstance()->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
@@ -1529,33 +1525,15 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
*/
void UpdateCursorSize()
{
/* Ignore setting any cursor before the sprites are loaded. */
if (GetMaxSpriteID() == 0) return;
CursorVars *cv = &_cursor;
const Sprite *p = GetSprite(GB(cv->sprite, 0, SPRITE_WIDTH), ST_NORMAL);
assert_compile(lengthof(_cursor.sprite_seq) == lengthof(_cursor.sprite_pos));
assert(_cursor.sprite_count <= lengthof(_cursor.sprite_seq));
for (uint i = 0; i < _cursor.sprite_count; ++i) {
const Sprite *p = GetSprite(GB(_cursor.sprite_seq[i].sprite, 0, SPRITE_WIDTH), ST_NORMAL);
Point offs, size;
offs.x = UnScaleGUI(p->x_offs) + _cursor.sprite_pos[i].x;
offs.y = UnScaleGUI(p->y_offs) + _cursor.sprite_pos[i].y;
size.x = UnScaleGUI(p->width);
size.y = UnScaleGUI(p->height);
cv->size.y = UnScaleGUI(p->height);
cv->size.x = UnScaleGUI(p->width);
cv->offs.x = UnScaleGUI(p->x_offs);
cv->offs.y = UnScaleGUI(p->y_offs);
if (i == 0) {
_cursor.total_offs = offs;
_cursor.total_size = size;
} else {
int right = max(_cursor.total_offs.x + _cursor.total_size.x, offs.x + size.x);
int bottom = max(_cursor.total_offs.y + _cursor.total_size.y, offs.y + size.y);
if (offs.x < _cursor.total_offs.x) _cursor.total_offs.x = offs.x;
if (offs.y < _cursor.total_offs.y) _cursor.total_offs.y = offs.y;
_cursor.total_size.x = right - _cursor.total_offs.x;
_cursor.total_size.y = bottom - _cursor.total_offs.y;
}
}
_cursor.dirty = true;
cv->dirty = true;
}
/**
@@ -1565,15 +1543,14 @@ void UpdateCursorSize()
*/
static void SetCursorSprite(CursorID cursor, PaletteID pal)
{
if (_cursor.sprite_count == 1 && _cursor.sprite_seq[0].sprite == cursor && _cursor.sprite_seq[0].pal == pal) return;
_cursor.sprite_count = 1;
_cursor.sprite_seq[0].sprite = cursor;
_cursor.sprite_seq[0].pal = pal;
_cursor.sprite_pos[0].x = 0;
_cursor.sprite_pos[0].y = 0;
CursorVars *cv = &_cursor;
if (cv->sprite == cursor) return;
cv->sprite = cursor;
cv->pal = pal;
UpdateCursorSize();
cv->short_vehicle_offset = 0;
}
static void SwitchAnimatedCursor()
@@ -1582,7 +1559,7 @@ static void SwitchAnimatedCursor()
if (cur == NULL || cur->sprite == AnimCursor::LAST) cur = _cursor.animate_list;
SetCursorSprite(cur->sprite, _cursor.sprite_seq[0].pal);
SetCursorSprite(cur->sprite, _cursor.pal);
_cursor.animate_timeout = cur->display_time;
_cursor.animate_cur = cur + 1;
@@ -1595,19 +1572,6 @@ void CursorTick()
}
}
/**
* Set or unset the ZZZ cursor.
* @param busy Whether to show the ZZZ cursor.
*/
void SetMouseCursorBusy(bool busy)
{
if (busy) {
if (_cursor.sprite_seq[0].sprite == SPR_CURSOR_MOUSE) SetMouseCursor(SPR_CURSOR_ZZZ, PAL_NONE);
} else {
if (_cursor.sprite_seq[0].sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
}
}
/**
* Assign a single non-animated sprite to the cursor.
* @param sprite Sprite to draw for the cursor.
@@ -1631,7 +1595,7 @@ void SetAnimatedMouseCursor(const AnimCursor *table)
{
_cursor.animate_list = table;
_cursor.animate_cur = NULL;
_cursor.sprite_seq[0].pal = PAL_NONE;
_cursor.pal = PAL_NONE;
SwitchAnimatedCursor();
}

View File

@@ -145,7 +145,6 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh
/* window.cpp */
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
void SetMouseCursorBusy(bool busy);
void SetMouseCursor(CursorID cursor, PaletteID pal);
void SetAnimatedMouseCursor(const AnimCursor *table);
void CursorTick();
@@ -161,16 +160,16 @@ void GetBroadestDigit(uint *front, uint *next, FontSize size = FS_NORMAL);
int GetCharacterHeight(FontSize size);
/** Height of characters in the small (#FS_SMALL) font. @note Some characters may be oversized. */
/** Height of characters in the small (#FS_SMALL) font. */
#define FONT_HEIGHT_SMALL (GetCharacterHeight(FS_SMALL))
/** Height of characters in the normal (#FS_NORMAL) font. @note Some characters may be oversized. */
/** Height of characters in the normal (#FS_NORMAL) font. */
#define FONT_HEIGHT_NORMAL (GetCharacterHeight(FS_NORMAL))
/** Height of characters in the large (#FS_LARGE) font. @note Some characters may be oversized. */
/** Height of characters in the large (#FS_LARGE) font. */
#define FONT_HEIGHT_LARGE (GetCharacterHeight(FS_LARGE))
/** Height of characters in the large (#FS_MONO) font. @note Some characters may be oversized. */
/** Height of characters in the large (#FS_MONO) font. */
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
extern DrawPixelInfo *_cur_dpi;

View File

@@ -115,35 +115,29 @@ struct AnimCursor {
/** Collection of variables for cursor-display and -animation */
struct CursorVars {
/* Logical mouse position */
Point pos; ///< logical mouse position
Point delta; ///< relative mouse movement in this tick
int wheel; ///< mouse wheel movement
bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling)
Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
int short_vehicle_offset; ///< offset of the X for short vehicles
CursorID sprite; ///< current image of cursor
PaletteID pal;
int wheel; ///< mouse wheel movement
/* We need two different vars to keep track of how far the scrollwheel moved.
* OSX uses this for scrolling around the map. */
int v_wheel;
int h_wheel;
/* Mouse appearance */
PalSpriteID sprite_seq[16]; ///< current image of cursor
Point sprite_pos[16]; ///< relative position of individual sprites
uint sprite_count; ///< number of sprites to draw
Point total_offs, total_size; ///< union of sprite properties
Point draw_pos, draw_size; ///< position and size bounding-box for drawing
const AnimCursor *animate_list; ///< in case of animated cursor, list of frames
const AnimCursor *animate_cur; ///< in case of animated cursor, current frame
uint animate_timeout; ///< in case of animated cursor, number of ticks to show the current cursor
bool visible; ///< cursor is visible
bool dirty; ///< the rect occupied by the mouse is dirty (redraw)
bool in_window; ///< mouse inside this window, determines drawing logic
bool visible; ///< cursor is visible
bool dirty; ///< the rect occupied by the mouse is dirty (redraw)
bool fix_at; ///< mouse is moving, but cursor is not (used for scrolling)
bool in_window; ///< mouse inside this window, determines drawing logic
/* Drag data */
bool vehchain; ///< vehicle chain is dragged
bool vehchain; ///< vehicle chain is dragged
bool UpdateCursorPosition(int x, int y, bool queued_warp);

View File

@@ -197,49 +197,31 @@ static void LoadSpriteTables()
InitializeUnicodeGlyphMap();
/*
* Load the base and extra NewGRF with OTTD required graphics as first NewGRF.
* Load the base NewGRF with OTTD required graphics as first NewGRF.
* However, we do not want it to show up in the list of used NewGRFs,
* so we have to manually add it, and then remove it later.
*/
GRFConfig *top = _grfconfig;
/* Default extra graphics */
GRFConfig *master = new GRFConfig("OPENTTD.GRF");
master->palette |= GRFP_GRF_DOS;
FillGRFDetails(master, false, BASESET_DIR);
ClrBit(master->flags, GCF_INIT_ONLY);
/* Baseset extra graphics */
GRFConfig *extra = new GRFConfig(used_set->files[GFT_EXTRA].filename);
GRFConfig *master = new GRFConfig(used_set->files[GFT_EXTRA].filename);
/* We know the palette of the base set, so if the base NewGRF is not
* setting one, use the palette of the base set and not the global
* one which might be the wrong palette for this base NewGRF.
* The value set here might be overridden via action14 later. */
switch (used_set->palette) {
case PAL_DOS: extra->palette |= GRFP_GRF_DOS; break;
case PAL_WINDOWS: extra->palette |= GRFP_GRF_WINDOWS; break;
case PAL_DOS: master->palette |= GRFP_GRF_DOS; break;
case PAL_WINDOWS: master->palette |= GRFP_GRF_WINDOWS; break;
default: break;
}
FillGRFDetails(extra, false, BASESET_DIR);
ClrBit(extra->flags, GCF_INIT_ONLY);
FillGRFDetails(master, false, BASESET_DIR);
extra->next = top;
master->next = extra;
ClrBit(master->flags, GCF_INIT_ONLY);
master->next = top;
_grfconfig = master;
LoadNewGRF(SPR_NEWGRFS_BASE, i, 2);
uint total_extra_graphics = SPR_NEWGRFS_BASE - SPR_OPENTTD_BASE;
_missing_extra_graphics = GetSpriteCountForSlot(i, SPR_OPENTTD_BASE, SPR_NEWGRFS_BASE);
DEBUG(sprite, 1, "%u extra sprites, %u from baseset, %u from fallback", total_extra_graphics, total_extra_graphics - _missing_extra_graphics, _missing_extra_graphics);
/* The original baseset extra graphics intentionally make use of the fallback graphics.
* Let's say everything which provides less than 500 sprites misses the rest intentionally. */
if (500 + _missing_extra_graphics > total_extra_graphics) _missing_extra_graphics = 0;
LoadNewGRF(SPR_NEWGRFS_BASE, i);
/* Free and remove the top element. */
delete extra;
delete master;
_grfconfig = top;
}
@@ -290,8 +272,6 @@ static bool SwitchNewGRFBlitter()
const bool animation_wanted = HasBit(_display_opt, DO_FULL_ANIMATION);
const char *cur_blitter = BlitterFactory::GetCurrentBlitter()->GetName();
VideoDriver::GetInstance()->AcquireBlitterLock();
for (uint i = 0; i < lengthof(replacement_blitters); i++) {
if (animation_wanted && (replacement_blitters[i].animation == 0)) continue;
if (!animation_wanted && (replacement_blitters[i].animation == 1)) continue;
@@ -300,10 +280,7 @@ static bool SwitchNewGRFBlitter()
if (!IsInsideMM(depth_wanted_by_grf, replacement_blitters[i].min_grf_depth, replacement_blitters[i].max_grf_depth + 1)) continue;
const char *repl_blitter = replacement_blitters[i].name;
if (strcmp(repl_blitter, cur_blitter) == 0) {
VideoDriver::GetInstance()->ReleaseBlitterLock();
return false;
}
if (strcmp(repl_blitter, cur_blitter) == 0) return false;
if (BlitterFactory::GetBlitterFactory(repl_blitter) == NULL) continue;
DEBUG(misc, 1, "Switching blitter from '%s' to '%s'... ", cur_blitter, repl_blitter);
@@ -318,8 +295,6 @@ static bool SwitchNewGRFBlitter()
if (BlitterFactory::SelectBlitter(cur_blitter) == NULL || !VideoDriver::GetInstance()->AfterBlitterChange()) usererror("Failed to reinitialize video driver. Specify a fixed blitter in the config");
}
VideoDriver::GetInstance()->ReleaseBlitterLock();
return true;
}

View File

@@ -627,8 +627,8 @@ public:
this->vehicle_sel = v->index;
SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
SetMouseCursorVehicle(v, EIT_IN_LIST);
int image = v->GetImage(_current_text_dir == TD_RTL ? DIR_E : DIR_W, EIT_IN_LIST);
SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
_cursor.vehchain = true;
this->SetDirty();

View File

@@ -102,7 +102,7 @@ static void ReadHeightmapPNGImageData(byte *map, png_structp png_ptr, png_infop
* If map == NULL only the size of the PNG is read, otherwise a map
* with grayscale pixels is allocated and assigned to *map.
*/
static bool ReadHeightmapPNG(const char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map)
{
FILE *fp;
png_structp png_ptr = NULL;
@@ -232,7 +232,7 @@ static void ReadHeightmapBMPImageData(byte *map, BmpInfo *info, BmpData *data)
* If map == NULL only the size of the BMP is read, otherwise a map
* with grayscale pixels is allocated and assigned to *map.
*/
static bool ReadHeightmapBMP(const char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map)
{
FILE *f;
BmpInfo info;
@@ -444,56 +444,45 @@ void FixSlopes()
}
/**
* Reads the heightmap with the correct file reader.
* @param dft Type of image file.
* @param filename Name of the file to load.
* @param [out] x Length of the image.
* @param [out] y Height of the image.
* @param [inout] map If not \c NULL, destination to store the loaded block of image data.
* @return Whether loading was successful.
* Reads the heightmap with the correct file reader
*/
static bool ReadHeightMap(DetailedFileType dft, const char *filename, uint *x, uint *y, byte **map)
static bool ReadHeightMap(char *filename, uint *x, uint *y, byte **map)
{
switch (dft) {
default:
NOT_REACHED();
switch (_file_to_saveload.mode) {
default: NOT_REACHED();
#ifdef WITH_PNG
case DFT_HEIGHTMAP_PNG:
case SL_PNG:
return ReadHeightmapPNG(filename, x, y, map);
#endif /* WITH_PNG */
case DFT_HEIGHTMAP_BMP:
case SL_BMP:
return ReadHeightmapBMP(filename, x, y, map);
}
}
/**
* Get the dimensions of a heightmap.
* @param dft Type of image file.
* @param filename to query
* @param x dimension x
* @param y dimension y
* @return Returns false if loading of the image failed.
*/
bool GetHeightmapDimensions(DetailedFileType dft, const char *filename, uint *x, uint *y)
bool GetHeightmapDimensions(char *filename, uint *x, uint *y)
{
return ReadHeightMap(dft, filename, x, y, NULL);
return ReadHeightMap(filename, x, y, NULL);
}
/**
* Load a heightmap from file and change the map in his current dimensions
* to a landscape representing the heightmap.
* It converts pixels to height. The brighter, the higher.
* @param dft Type of image file.
* @param filename of the heightmap file to be imported
*/
void LoadHeightmap(DetailedFileType dft, const char *filename)
void LoadHeightmap(char *filename)
{
uint x, y;
byte *map = NULL;
if (!ReadHeightMap(dft, filename, &x, &y, &map)) {
if (!ReadHeightMap(filename, &x, &y, &map)) {
free(map);
return;
}

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