mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-09-14 20:39:28 +00:00
Compare commits
1
Commits
1.4.1
..
1.4.0-beta1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f322ab97ed |
+1
-13
@@ -229,22 +229,10 @@ $(OBJS_C): %.o: $(SRC_DIR)/%.c $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.c=%.c)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(filter-out %sse2.o, $(filter-out %ssse3.o, $(filter-out %sse4.o, $(OBJS_CPP)))): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(OBJS_CPP): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(filter %sse2.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse2 -o $@ $<
|
||||
|
||||
$(filter %ssse3.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -mssse3 -o $@ $<
|
||||
|
||||
$(filter %sse4.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
|
||||
$(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse4.1 -o $@ $<
|
||||
|
||||
$(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP)
|
||||
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)'
|
||||
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
@@ -10,7 +10,7 @@ fallback = true
|
||||
description = A music pack without actual music.
|
||||
description.af_ZA = 'n Musiek stel sonder enige musiek.
|
||||
description.ar_EG = مجموعة موسيقى بدون موسيقى
|
||||
description.be_BY = "Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі.
|
||||
description.be_BY = "Пусты" набор музычнага афармлення, не змяшчаючы ніякай музыкі.
|
||||
description.bg_BG = Празен музикален пакет.
|
||||
description.ca_ES = Un joc de música sense cap música.
|
||||
description.cs_CZ = Prázná hudební sada.
|
||||
|
||||
@@ -10,7 +10,7 @@ fallback = true
|
||||
description = A sound pack without any sounds.
|
||||
description.af_ZA = 'n Klank stel sonder enige klanke.
|
||||
description.ar_EG = مجموعة صوت بدوت اصوات مضافة
|
||||
description.be_BY = "Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў.
|
||||
description.be_BY = "Пусты" набор гукавога афармленьня, не змяшчаючы ніякіх гукаў.
|
||||
description.bg_BG = Празен звуков пакет.
|
||||
description.ca_ES = Un joc de sons sense cap so.
|
||||
description.cs_CZ = Prázdná sada zvuků.
|
||||
@@ -22,7 +22,6 @@ 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.et_EE = Helikogu ilma helideta.
|
||||
description.eu_ES = Soinurik gabeko soinu pakete bat
|
||||
description.fi_FI = Äänipaketti, jossa ei ole ääniä.
|
||||
description.fr_FR = Un pack de sons sans sons.
|
||||
description.gd_GB = Pacaid fhuaimean anns nach eil fuaim sam bith.
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ palette = DOS
|
||||
description = Original Transport Tycoon Deluxe DOS edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة الدوس
|
||||
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS.
|
||||
description.be_BY = Арыгінальная графіка з Transport Tycoon Deluxe для DOS.
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS.
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS.
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro DOS).
|
||||
|
||||
@@ -10,7 +10,7 @@ version = 0
|
||||
description = Original Transport Tycoon Deluxe DOS edition sounds.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS uitgawe klanke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة الدوس
|
||||
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
|
||||
description.be_BY = Арыгінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
|
||||
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за DOS.
|
||||
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a DOS.
|
||||
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro DOS).
|
||||
|
||||
@@ -11,7 +11,7 @@ palette = DOS
|
||||
description = Original Transport Tycoon Deluxe DOS (German) edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe DOS (German) uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الالمانية نسخة الدوس
|
||||
description.be_BY = Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS.
|
||||
description.be_BY = Арыгінальная графіка з нямецкай версіі Transport Tycoon Deluxe для DOS.
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за DOS (немски) .
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a DOS (Alemany).
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (německá verze pro DOS).
|
||||
|
||||
@@ -11,7 +11,7 @@ palette = Windows
|
||||
description = Original Transport Tycoon Deluxe Windows edition graphics.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe grafieke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الرسومية نسخة وندوز
|
||||
description.be_BY = Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows.
|
||||
description.be_BY = Арыгінальная графіка з Transport Tycoon Deluxe для Windows.
|
||||
description.bg_BG = Оригинални графики на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Gràfics originals de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní sada grafik Transport Tycoon Deluxe (verze pro Windows).
|
||||
@@ -33,7 +33,7 @@ description.id_ID = Grafik orisinil Transport Tycoon Deluxe versi Windows.
|
||||
description.is_IS = Upprunalega grafíkin úr Transport Tycoon Deluxe Windows útgáfunni.
|
||||
description.it_IT = Grafica originale di Transport Tycoon Deluxe, edizione Windows.
|
||||
description.ja_JP = Transport Tycoon Deluxe オリジナル版 グラフィック (Windows)
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 그래픽입니다.
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도우 에디션의 그래픽입니다.
|
||||
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Grafik.
|
||||
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo grafika.
|
||||
description.nb_NO = Original grafikk fra Transport Tycoon Deluxe for Windows.
|
||||
|
||||
@@ -10,7 +10,7 @@ version = 1
|
||||
description = Original Transport Tycoon Deluxe Windows edition music.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe musiek.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الموسيقية نسخة وندوز
|
||||
description.be_BY = Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
description.be_BY = Арыгінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
description.bg_BG = Оригинална музика на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Música Original de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní hudba Transport Tycoon Deluxe (verze pro Windows).
|
||||
@@ -32,7 +32,7 @@ description.id_ID = Musik pengiring orisinil Transport Tycoon Deluxe versi Windo
|
||||
description.is_IS = Upprunalega tónlistin úr Transport Tycoon Deluxe Windows útgáfunni.
|
||||
description.it_IT = Musica originale di Transport Tycoon Deluxe, edizione Windows.
|
||||
description.ja_JP = Transport Tycoon Deluxe オリジナル版 音楽 (Windows)
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 음악입니다.
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도우 에디션의 음악입니다.
|
||||
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Music.
|
||||
description.lt_LT = Originali Transport Tycoon Deluxe Windows leidimo muzika.
|
||||
description.lv_LV = Oriģinālā Transport Tycoon Deluxe Windows izdevuma mūzika.
|
||||
|
||||
@@ -10,7 +10,7 @@ version = 0
|
||||
description = Original Transport Tycoon Deluxe Windows edition sounds.
|
||||
description.af_ZA = Oorspronklike Transport Tycoon Deluxe Windows uitgawe klanke.
|
||||
description.ar_EG = النسخة الاصلية من ترانسبورت تايكون ديلوكس الصوتية نسخة وندوز
|
||||
description.be_BY = Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
description.be_BY = Арыгінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
description.bg_BG = Оригинални звуци на Transport Tycoon Deluxe за Windows.
|
||||
description.ca_ES = Sons originals de Transport Tycoon Deluxe per a Windows.
|
||||
description.cs_CZ = Původní sada zvuků Transport Tycoon Deluxe (verze pro Windows).
|
||||
@@ -32,7 +32,7 @@ description.id_ID = Efek suara orisinil Transport Tycoon Deluxe versi Windows.
|
||||
description.is_IS = Upprunalega hljóðið úr Transport Tycoon Deluxe Windows útgáfunni.
|
||||
description.it_IT = Suoni originali di Transport Tycoon Deluxe, edizione Windows.
|
||||
description.ja_JP = Transport Tycoon Deluxe オリジナル版 効果音 (Windows)
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도 에디션의 효과음입니다.
|
||||
description.ko_KR = 오리지널 트랜스포트 타이쿤 디럭스 윈도우 에디션의 효과음입니다.
|
||||
description.lb_LU = Original Transport Tycoon Deluxe Windows Editioun Sound.
|
||||
description.lt_LT = Originalūs Transport Tycoon Deluxe Windows leidimo garsai.
|
||||
description.nb_NO = Originale lyder fra Transport Tycoon Deluxe for Windows.
|
||||
|
||||
+210
-337
File diff suppressed because it is too large
Load Diff
+118
-91
@@ -57,8 +57,8 @@ set_default() {
|
||||
enable_translator="0"
|
||||
enable_unicode="1"
|
||||
enable_console="1";
|
||||
enable_assert="0"
|
||||
enable_strip="1"
|
||||
enable_assert="1"
|
||||
enable_strip="0"
|
||||
enable_universal="0"
|
||||
enable_osx_g5="0"
|
||||
enable_cocoa_quartz="1"
|
||||
@@ -92,7 +92,6 @@ set_default() {
|
||||
with_ccache="1"
|
||||
with_nforenum="1"
|
||||
with_grfcodec="1"
|
||||
with_sse="1"
|
||||
|
||||
save_params_array="
|
||||
build
|
||||
@@ -167,7 +166,6 @@ set_default() {
|
||||
with_ccache
|
||||
with_grfcodec
|
||||
with_nforenum
|
||||
with_sse
|
||||
CC CXX CFLAGS CXXFLAGS LDFLAGS CFLAGS_BUILD CXXFLAGS_BUILD LDFLAGS_BUILD"
|
||||
}
|
||||
|
||||
@@ -449,10 +447,6 @@ detect_params() {
|
||||
--with-threads) with_threads="1";;
|
||||
--with-threads=*) with_threads="$optarg";;
|
||||
|
||||
--without-sse) with_sse="0";;
|
||||
--with-sse) with_sse="1";;
|
||||
--with-sse=*) with_sse="$optarg";;
|
||||
|
||||
CC=* | --CC=*) CC="$optarg";;
|
||||
CXX=* | --CXX=*) CXX="$optarg";;
|
||||
CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";;
|
||||
@@ -593,7 +587,6 @@ check_params() {
|
||||
|
||||
check_makedepend
|
||||
detect_cputype
|
||||
detect_sse_capable_architecture
|
||||
|
||||
if [ "$enable_static" = "1" ]; then
|
||||
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "DOS" ]; then
|
||||
@@ -1501,9 +1494,6 @@ make_cflags_and_ldflags() {
|
||||
if [ "$with_threads" = "0" ]; then
|
||||
CFLAGS="$CFLAGS -DNO_THREADS"
|
||||
fi
|
||||
if [ "$with_sse" = "1" ]; then
|
||||
CFLAGS="$CFLAGS -DWITH_SSE"
|
||||
fi
|
||||
|
||||
if [ "`echo $1 | cut -c 1-3`" != "icc" ]; then
|
||||
if [ "$os" = "CYGWIN" ]; then
|
||||
@@ -1700,18 +1690,17 @@ make_cflags_and_ldflags() {
|
||||
|
||||
if [ -n "$png_config" ]; then
|
||||
CFLAGS="$CFLAGS -DWITH_PNG"
|
||||
CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`"
|
||||
CFLAGS="$CFLAGS `$png_config --cppflags --I_opts | tr '\n\r' ' '`"
|
||||
|
||||
# The extra flags are unneeded for latest libpng-config, but some versions are so broken...
|
||||
if [ "$enable_static" != "0" ]; then
|
||||
if [ "$os" = "OSX" ]; then
|
||||
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
|
||||
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
|
||||
LIBS="$LIBS `$png_config --variable=prefix`/lib/libpng.a `$png_config --libs --static | sed s@-lpng[0-9]*@@`"
|
||||
LIBS="$LIBS `$png_config --prefix`/lib/libpng.a"
|
||||
else
|
||||
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
|
||||
LIBS="$LIBS `$png_config --static --ldflags | tr '\n\r' ' '`"
|
||||
fi
|
||||
else
|
||||
LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`"
|
||||
LIBS="$LIBS `$png_config --ldflags | tr '\n\r' ' '`"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -2716,64 +2705,80 @@ detect_libtimidity() {
|
||||
detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h"
|
||||
}
|
||||
|
||||
detect_pkg_config() {
|
||||
# $1 - config-param ($with_lzma value)
|
||||
# $2 - package name ('liblzma')
|
||||
# $3 - config name ('lzma_config', sets $lzma_config)
|
||||
# $4 - minimum module version ('2.3')
|
||||
|
||||
detect_lzma() {
|
||||
# 0 means no, 1 is auto-detect, 2 is force
|
||||
if [ "$1" = "0" ]; then
|
||||
log 1 "checking $2... disabled"
|
||||
if [ "$with_lzma" = "0" ]; then
|
||||
log 1 "checking liblzma... disabled"
|
||||
|
||||
eval "$3=\"\""
|
||||
lzma_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
log 2 "detecting $2"
|
||||
|
||||
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
|
||||
pkg_config_call="pkg-config $2"
|
||||
if [ "$with_lzma" = "1" ] || [ "$with_lzma" = "" ] || [ "$with_lzma" = "2" ]; then
|
||||
lzma_config="pkg-config liblzma"
|
||||
else
|
||||
pkg_config_call="$1"
|
||||
lzma_config="$with_lzma"
|
||||
fi
|
||||
|
||||
version=`$pkg_config_call --modversion 2>/dev/null`
|
||||
version=`$lzma_config --modversion 2>/dev/null`
|
||||
ret=$?
|
||||
check_version "$4" "$version"
|
||||
version_ok=$?
|
||||
log 2 "executing $pkg_config_call --modversion"
|
||||
log 2 "executing $lzma_config --modversion"
|
||||
log 2 " returned $version"
|
||||
log 2 " exit code $ret"
|
||||
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
|
||||
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
|
||||
log 1 "checking $2... needs at least version $4, $2 NOT enabled"
|
||||
else
|
||||
log 1 "checking $2... not found"
|
||||
fi
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ]; then
|
||||
log 1 "checking liblzma... not found"
|
||||
|
||||
# It was forced, so it should be found.
|
||||
if [ "$1" != "1" ]; then
|
||||
log 1 "configure: error: pkg-config $2 couldn't be found"
|
||||
log 1 "configure: error: you supplied '$1', but it seems invalid"
|
||||
if [ "$with_lzma" != "1" ]; then
|
||||
log 1 "configure: error: pkg-config liblzma couldn't be found"
|
||||
log 1 "configure: error: you supplied '$with_lzma', but it seems invalid"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
eval "$3=\"\""
|
||||
lzma_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
eval "$3=\"$pkg_config_call\""
|
||||
log 1 "checking $2... found"
|
||||
}
|
||||
|
||||
detect_lzma() {
|
||||
detect_pkg_config "$with_lzma" "liblzma" "lzma_config" "5.0"
|
||||
log 1 "checking liblzma... found"
|
||||
}
|
||||
|
||||
detect_xdg_basedir() {
|
||||
detect_pkg_config "$with_xdg_basedir" "libxdg-basedir" "xdg_basedir_config" "1.2"
|
||||
# 0 means no, 1 is auto-detect, 2 is force
|
||||
if [ "$with_xdg_basedir" = "0" ]; then
|
||||
log 1 "checking libxdg_basedir... disabled"
|
||||
|
||||
xdg_basedir_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "$with_xdg_basedir" = "1" ] || [ "$with_xdg_basedir" = "" ] || [ "$with_xdg_basedir" = "2" ]; then
|
||||
xdg_basedir_config="pkg-config libxdg-basedir"
|
||||
else
|
||||
xdg_basedir_config="$with_xdg_basedir"
|
||||
fi
|
||||
|
||||
version=`$xdg_basedir_config --modversion 2>/dev/null`
|
||||
ret=$?
|
||||
log 2 "executing $xdg_basedir_config --modversion"
|
||||
log 2 " returned $version"
|
||||
log 2 " exit code $ret"
|
||||
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ]; then
|
||||
log 1 "checking libxdg_basedir... not found"
|
||||
|
||||
# It was forced, so it should be found.
|
||||
if [ "$with_xdg_basedir" != "1" ]; then
|
||||
log 1 "configure: error: pkg-config libxdg_basedir couldn't be found"
|
||||
log 1 "configure: error: you supplied '$with_xdg_basedir', but it seems invalid"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
xdg_basedir_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
log 1 "checking libxdg_basedir... found"
|
||||
}
|
||||
|
||||
detect_png() {
|
||||
@@ -2800,7 +2805,33 @@ detect_png() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
|
||||
if [ "$with_png" = "1" ] || [ "$with_png" = "" ] || [ "$with_png" = "2" ]; then
|
||||
png_config="libpng-config"
|
||||
else
|
||||
png_config="$with_png"
|
||||
fi
|
||||
|
||||
version=`$png_config --version 2>/dev/null`
|
||||
ret=$?
|
||||
log 2 "executing $png_config --version"
|
||||
log 2 " returned $version"
|
||||
log 2 " exit code $ret"
|
||||
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ]; then
|
||||
log 1 "checking libpng... not found"
|
||||
|
||||
# It was forced, so it should be found.
|
||||
if [ "$with_png" != "1" ]; then
|
||||
log 1 "configure: error: libpng-config couldn't be found"
|
||||
log 1 "configure: error: you supplied '$with_png', but it seems invalid"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
png_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
log 1 "checking libpng... found"
|
||||
}
|
||||
|
||||
detect_freetype() {
|
||||
@@ -2895,7 +2926,39 @@ detect_fontconfig() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3"
|
||||
if [ "$with_fontconfig" = "1" ] || [ "$with_fontconfig" = "" ] || [ "$with_fontconfig" = "2" ]; then
|
||||
fontconfig_config="pkg-config fontconfig"
|
||||
else
|
||||
fontconfig_config="$with_fontconfig"
|
||||
fi
|
||||
|
||||
version=`$fontconfig_config --modversion 2>/dev/null`
|
||||
ret=$?
|
||||
check_version '2.3' "$version"
|
||||
version_ok=$?
|
||||
log 2 "executing $fontconfig_config --modversion"
|
||||
log 2 " returned $version"
|
||||
log 2 " exit code $ret"
|
||||
|
||||
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
|
||||
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
|
||||
log 1 "checking libfontconfig... needs at least version 2.3.0, fontconfig NOT enabled"
|
||||
else
|
||||
log 1 "checking libfontconfig... not found"
|
||||
fi
|
||||
|
||||
# It was forced, so it should be found.
|
||||
if [ "$with_fontconfig" != "1" ]; then
|
||||
log 1 "configure: error: fontconfig-config couldn't be found"
|
||||
log 1 "configure: error: you supplied '$with_fontconfig', but it seems invalid"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fontconfig_config=""
|
||||
return 0
|
||||
fi
|
||||
|
||||
log 1 "checking libfontconfig... found"
|
||||
}
|
||||
|
||||
detect_icu() {
|
||||
@@ -3261,40 +3324,6 @@ detect_cputype() {
|
||||
rm -f tmp.64bit tmp.64bit.cpp
|
||||
}
|
||||
|
||||
detect_sse_capable_architecture() {
|
||||
# 0 means no, 1 is auto-detect, 2 is force
|
||||
if [ "$with_sse" = "0" ]; then
|
||||
log 1 "checking SSE... disabled"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "#define _SQ64 1" > tmp.sse.cpp
|
||||
echo "#include <xmmintrin.h>" >> tmp.sse.cpp
|
||||
echo "#include <smmintrin.h>" >> tmp.sse.cpp
|
||||
echo "#include <tmmintrin.h>" >> tmp.sse.cpp
|
||||
echo "int main() { return 0; }" >> tmp.sse.cpp
|
||||
execute="$cxx_host -msse4.1 $CFLAGS tmp.sse.cpp -o tmp.sse 2>&1"
|
||||
sse="`eval $execute 2>/dev/null`"
|
||||
ret=$?
|
||||
log 2 "executing $execute"
|
||||
log 2 " returned $sse"
|
||||
log 2 " exit code $ret"
|
||||
if [ "$ret" = "0" ]; then
|
||||
log 1 "detecting SSE... found"
|
||||
else
|
||||
# It was forced, so it should be found.
|
||||
if [ "$with_sse" != "1" ]; then
|
||||
log 1 "configure: error: SSE couln't be found"
|
||||
log 1 "configure: error: you force enabled SSE, but it seems unavailable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log 1 "detecting SSE... not found"
|
||||
with_sse="0"
|
||||
fi
|
||||
rm -f tmp.sse tmp.exe tmp.sse.cpp
|
||||
}
|
||||
|
||||
make_sed() {
|
||||
T_CFLAGS="$CFLAGS"
|
||||
T_CXXFLAGS="$CXXFLAGS"
|
||||
@@ -3685,8 +3714,6 @@ showhelp() {
|
||||
echo " --with-ccache enables ccache support"
|
||||
echo " --with-distcc enables distcc support"
|
||||
echo " --without-grfcodec disable usage of grfcodec and re-generation of base sets"
|
||||
echo " --without-threads disable threading support"
|
||||
echo " --without-sse disable SSE support (x86/x86_64 only)"
|
||||
echo ""
|
||||
echo "Some influential environment variables:"
|
||||
echo " CC C compiler command"
|
||||
|
||||
@@ -129,7 +129,6 @@ AWKCOMMAND='
|
||||
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
|
||||
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
|
||||
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
|
||||
if ($0 == "SSE" && "'$with_sse'" != "1") { next; }
|
||||
|
||||
skip += 1;
|
||||
|
||||
|
||||
-262
@@ -1,262 +0,0 @@
|
||||
Some explanations about Desyncs
|
||||
Last updated: 2014-02-23
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Table of contents
|
||||
-----------------
|
||||
1.0) Desync theory
|
||||
* 1.1) OpenTTD multiplayer architecture
|
||||
* 1.2) What is a Desync and how is it detected
|
||||
* 1.3) Typical causes of Desyncs
|
||||
2.0) What to do in case of a Desync
|
||||
* 2.1) Cache debugging
|
||||
* 2.2) Desync recording
|
||||
3.0) Evaluating the Desync records
|
||||
* 3.1) Replaying
|
||||
* 3.2) Evaluation the replay
|
||||
* 3.3) Comparing savegames
|
||||
|
||||
|
||||
1.1) OpenTTD multiplayer architecture
|
||||
---- --------------------------------
|
||||
OpenTTD has a huge gamestate, which changes all of the time.
|
||||
The savegame contains the complete gamestate at a specific point
|
||||
in time. But this state changes completely each tick: Vehicles move
|
||||
and trees grow.
|
||||
|
||||
However, most of these changes in the gamestate are deterministic:
|
||||
Without a player interfering a vehicle follows its orders always
|
||||
in the same way, and trees always grow the same.
|
||||
|
||||
In OpenTTD multiplayer synchronisation works by creating a savegame
|
||||
when clients join, and then transfering that savegame to the client,
|
||||
so it has the complete gamestate at a fixed point in time.
|
||||
|
||||
Afterwards clients only receive 'commands', that is: Stuff which is
|
||||
not predictable, like
|
||||
- player actions
|
||||
- AI actions
|
||||
- GameScript actions
|
||||
- Admin Port command
|
||||
- rcon commands
|
||||
- ...
|
||||
|
||||
These commands contain the information on how to execute the command,
|
||||
and when to execute it. Time is measured in 'network frames'.
|
||||
Mind that network frames to not match ingame time. Network frames
|
||||
also run while the game is paused, to give a defined behaviour to
|
||||
stuff that is executing while the game is paused.
|
||||
|
||||
The deterministic part of the gamestate is run by the clients on
|
||||
their own. All they get from the server is the instruction to
|
||||
run the gamestate up to a certain network time, which basically
|
||||
says that there are no commands scheduled in that time.
|
||||
|
||||
When a client (which includes the server itself) wants to execute
|
||||
a command (i.e. a non-predictable action), it does this by
|
||||
- calling DoCommandP resp. DoCommandPInternal
|
||||
- These functions first do a local test-run of the command to
|
||||
check simple preconditions. (Just to give the client an
|
||||
immediate response without bothering the server and waiting for
|
||||
the response.) The test-run may not actually change the
|
||||
gamestate, all changes must be discarded.
|
||||
- If the local test-run succeeds the command is sent to the server.
|
||||
- The server inserts the command into the command queue, which
|
||||
assigns a network frame to the commands, i.e. when it shall be
|
||||
executed on all clients.
|
||||
- Enhanced with this specific timestamp, the command is send to all
|
||||
clients, which execute the command simultaneously in the same
|
||||
network frame in the same order.
|
||||
|
||||
1.2) What is a Desync and how is it detected
|
||||
---- ---------------------------------------
|
||||
In the ideal case all clients have the same gamestate as the server
|
||||
and run in sync. That is, vehicle movement is the same on all
|
||||
clients, and commands are executed the same everywhere and
|
||||
have the same results.
|
||||
|
||||
When a Desync happens, it means that the gamestates on the clients
|
||||
(including the server) are no longer the same. Just imagine
|
||||
that a vehicle picks the left line instead of the right line at
|
||||
a junction on one client.
|
||||
|
||||
The important thing here is, that noone notices when a Desync
|
||||
occurs. The desync client will continue to simulate the gamestate
|
||||
and execute commands from the server. Once the gamestate differs
|
||||
it will increasingly spiral out of control: If a vehicle picks a
|
||||
different route, it will arrive at a different time at a station,
|
||||
which will load different cargo, which causes other vehicles to
|
||||
load other stuff, which causes industries to notice different
|
||||
servicing, which causes industries to change production, ...
|
||||
the client could run all day in a different universe.
|
||||
|
||||
To limit how long a Desync can remain unnoticed, the server
|
||||
transfers some checksums every now and then for the gamestate.
|
||||
Currently this checksum is the state of the random number
|
||||
generator of the game logic. A lot of things in OpenTTD depend
|
||||
on the RNG, and if the gamestate differs, it is likely that the
|
||||
RNG is called at different times, and the state differs when
|
||||
checked.
|
||||
|
||||
The clients compare this 'checksum' with the checksum of their
|
||||
own gamestate at the specific network frame. If they differ,
|
||||
the client disconnects with a Desync error.
|
||||
|
||||
The important thing here is: The detection of the Desync is
|
||||
only an ultimate failure detection. It does not give any
|
||||
indication on when the Desync happened. The Desync may after
|
||||
all have occured long ago, and just did not affect the checksum
|
||||
up to now. The checksum may have matched 10 times or more
|
||||
since the Desync happend, and only now the Desync has spiraled
|
||||
enough to finally affect the checksum. (There was once a desync
|
||||
which was only noticed by the checksum after 20 game years.)
|
||||
|
||||
1.3) Typical causes of Desyncs
|
||||
---- -------------------------
|
||||
Desyncs can be caused by the following scenarios:
|
||||
- The savegame does not describe the complete gamestate.
|
||||
- Some information which affects the progression of the
|
||||
gamestate is not saved in the savegame.
|
||||
- Some information which affects the progression of the
|
||||
gamestate is not loaded from the savegame.
|
||||
This includes the case that something is not completely
|
||||
reset before loading the savegame, so data from the
|
||||
previous game is carried over to the new one.
|
||||
- The gamestate does not behave deterministic.
|
||||
- Cache mismatch: The game logic depends on some cached
|
||||
values, which are not invalidated properly. This is
|
||||
the usual case for NewGRF-specific Desyncs.
|
||||
- Undefined behaviour: The game logic performs multiple
|
||||
things in an undefined order or with an undefined
|
||||
result. E.g. when sorting something with a key while
|
||||
some keys are equal. Or some computation that depends
|
||||
on the CPU architecture (32/64 bit, little/big endian).
|
||||
- The gamestate is modified when it shall not be modified.
|
||||
- The test-run of a command alters the gamestate.
|
||||
- The gamestate is altered by a player or script without
|
||||
using commands.
|
||||
|
||||
|
||||
2.1) Cache debugging
|
||||
---- ---------------
|
||||
Desyncs which are caused by inproper cache validation can
|
||||
often be found by enabling cache validation:
|
||||
- Start OpenTTD with '-d desync=2'.
|
||||
- This will enable validation of caches every tick.
|
||||
That is, cached values are recomputed every tick and compared
|
||||
to the cached value.
|
||||
- Differences are logged to 'commands-out.log' in the autosave
|
||||
folder.
|
||||
|
||||
Mind that this type of debugging can also be done in singleplayer.
|
||||
|
||||
2.2) Desync recording
|
||||
---- ----------------
|
||||
If you have a server, which happens to encounter Desyncs often,
|
||||
you can enable recording of the gamestate alterations. This
|
||||
will later allow the replay the gamestate and locate the Desync
|
||||
cause.
|
||||
|
||||
There are two levels of Desync recording, which are enabled
|
||||
via '-d desync=2' resp. '-d desync=3'. Both will record all
|
||||
commands to a file 'commands-out.log' in the autosave folder.
|
||||
|
||||
If you have the savegame from the start of the server, and
|
||||
this command log you can replay the whole game. (see Section 3.1)
|
||||
|
||||
If you do not start the server from a savegame, there will
|
||||
also be a savegame created just after a map has been generated.
|
||||
The savegame will be named 'dmp_cmds_*.sav' and be put into
|
||||
the autosave folder.
|
||||
|
||||
In addition to that '-d desync=3' also creates regular savegames
|
||||
at defined spots in network time. (more defined than regular
|
||||
autosaves). These will be created in the autosave folder
|
||||
and will also be named 'dmp_cmds_*.sav'.
|
||||
|
||||
These saves allow comparing the gamestate with the original
|
||||
gamestate during replaying, and thus greatly help debugging.
|
||||
However, they also take a lot of disk space.
|
||||
|
||||
|
||||
3.1) Replaying
|
||||
---- ---------
|
||||
To replay a Desync recording, you need these files:
|
||||
- The savegame from when the server was started, resp.
|
||||
the automatically created savegame from when the map
|
||||
was generated.
|
||||
- The 'commands-out.log' file.
|
||||
- Optionally the 'dmp_cmds_*.sav'.
|
||||
Put these files into a safe spot. (Not your autosave folder!)
|
||||
|
||||
Next, prepare your OpenTTD for replaying:
|
||||
- Get the same version of OpenTTD as the original server was running.
|
||||
- Uncomment/enable the define 'DEBUG_DUMP_COMMANDS' in
|
||||
'src/network/network_func.h'.
|
||||
- Put the 'commands-out.log' into the root save folder, and rename
|
||||
it to 'commands.log'.
|
||||
- Run 'openttd -D -d desync=3 -g startsavegame.sav'.
|
||||
This replays the server log and creates new 'commands-out.log'
|
||||
and 'dmp_cmds_*.sav' in your autosave folder.
|
||||
|
||||
3.2) Evaluation the replay
|
||||
---- ---------------------
|
||||
The replaying will also compare the checksums which are part of
|
||||
the 'commands-out.log' with the replayed gamestate.
|
||||
If they differ, it will trigger a 'NOT_REACHED'.
|
||||
|
||||
If the replay succeeds without mismatch, that is the replay reproduces
|
||||
the original server state:
|
||||
- Repeat the replay starting from incrementally later 'dmp_cmds_*.sav'
|
||||
while truncating the 'commands.log' at the beginning appropriately.
|
||||
The 'dmp_cmds_*.sav' can be your own ones from the first reply, or
|
||||
the ones from the original server (if you have them).
|
||||
(This simulates the view of joining clients during the game.)
|
||||
- If one of those replays fails, you have located the Desync between
|
||||
the last dmp_cmds that reproduces the replay and the first one
|
||||
that fails.
|
||||
|
||||
If you have the original 'dmp_cmds_*.sav', you can also compare those
|
||||
savegames with your own ones from the replay. You can also comment/disable
|
||||
the 'NOT_REACHED' mentioned above, to get another 'dmp_cmds_*.sav' from
|
||||
the replay after the mismatch has already been detected.
|
||||
See Section 3.2 on how to compare savegames.
|
||||
If the saves differ you have located the Desync between the last dmp_cmds
|
||||
that match and the first one that does not. The difference of the saves
|
||||
may point you in the direction of what causes it.
|
||||
|
||||
If the replay succeeds without mismatch, and you do not have any
|
||||
'dmp_cmd_*.sav' from the original server, it is a lost case.
|
||||
Enable creation of the 'dmp_cmd_*.sav' on the server, and wait for the
|
||||
next Desync.
|
||||
|
||||
Finally, you can also compare the 'commands-out.log' from the original
|
||||
server with the one from the replay. They will differ in stuff like
|
||||
dates, and the original log will contain the chat, but otherwise they
|
||||
should match.
|
||||
|
||||
3.2) Comparing savegames
|
||||
---- -------------------
|
||||
The binary form of the savegames from the original server and from
|
||||
your replay will always differ:
|
||||
- The savegame contains paths to used NewGRF files.
|
||||
- The gamelog will log your loading of the savegame.
|
||||
- The savegame data of AIs and the Gamescript will differ.
|
||||
Scripts are not run during the replay, only their recorded commands
|
||||
are replayed. Their internal state will thus not change in the
|
||||
replay and will differ.
|
||||
|
||||
To compare savegame more semantically, there exist some ugly hackish
|
||||
tools at:
|
||||
http://devs.openttd.org/~frosch/texts/zpipe.c
|
||||
http://devs.openttd.org/~frosch/texts/printhunk.c
|
||||
|
||||
The first one decompresses OpenTTD savegames. The second one creates
|
||||
a textual representation of an uncompressed savegame, by parsing hunks
|
||||
and arrays and such. With both tools you need to be a bit careful
|
||||
since they work on stdin and stdout, which may not deal well with
|
||||
binary data.
|
||||
|
||||
If you have the textual representation of the savegames, you can
|
||||
compare them with regular diff tools.
|
||||
+8
-17
@@ -1,6 +1,6 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2014-06-02
|
||||
Release version: 1.4.1
|
||||
Last updated: 2013-12-24
|
||||
Release version: 1.4.0-beta1
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -33,13 +33,12 @@ No suitable AI can be found
|
||||
If you have no AIs and an AI is started the so-called 'dummy' AI will
|
||||
be loaded. This AI does nothing but writing a message on the AI debug
|
||||
window and showing a red warning. There are basically two solutions
|
||||
for this problem: Either you set the number of AI players to 0 so that
|
||||
no AI is started. You find that setting at the top of the window in the
|
||||
"AI / Game Scripts Settings" window.
|
||||
The other solution is acquiring (downloading) some AI. The easiest way
|
||||
to do this is via the "Check Online Content" button in the main (intro)
|
||||
menu or directly in the "AI / Game Scripts Settings" dialogue via the
|
||||
"Check Online Content" button.
|
||||
for this problem: you must change the settings so no AI is started,
|
||||
this is done in the difficulty settings window. The other solution is
|
||||
acquiring (downloading) some AI. The easiest way to do this is via
|
||||
the "Check Online Content" button in the main (intro) menu or via
|
||||
"AI Settings" -> "Select AI" -> "Check Online Content" which is also
|
||||
accessed via the main menu.
|
||||
|
||||
After a while of playing, colours get corrupted
|
||||
In Windows 7 the background slideshow corrupts the colour mapping of
|
||||
@@ -445,11 +444,3 @@ Trains might not stop at platforms that are currently being changed [FS#5553]:
|
||||
just anywhere in the station because then it would never leave the station
|
||||
if you have the same station in the order list multiple times in a row or
|
||||
if there is only one station in the order list (see FS#5684).
|
||||
|
||||
Some houses and industries are not affected by transparency [FS#5817]:
|
||||
Some of the default houses and industries (f.e. the iron ore mine) are
|
||||
not affected by the transparency options. This is because the graphics do
|
||||
not (completely) separate the ground from the building.
|
||||
This is a bug of the original graphics, and unfortunately cannot be
|
||||
fixed with OpenGFX for the sake of maintaining compatibility with the
|
||||
original graphics.
|
||||
|
||||
+2
-56
@@ -1,62 +1,8 @@
|
||||
openttd (1.4.1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.1
|
||||
|
||||
-- OpenTTD <info@openttd.org> Mon, 02 Jun 2014 21:00:00 +0200
|
||||
|
||||
openttd (1.4.1~RC2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.1-RC2
|
||||
|
||||
-- OpenTTD <info@openttd.org> Sun, 18 May 2014 21:00:00 +0200
|
||||
|
||||
openttd (1.4.1~RC1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.1-RC1
|
||||
|
||||
-- OpenTTD <info@openttd.org> Sun, 04 May 2014 21:00:00 +0200
|
||||
|
||||
openttd (1.4.0-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 01 Apr 2014 21:00:00 +0200
|
||||
|
||||
openttd (1.4.0~RC1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-RC1
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 17 Mar 2014 21:00:00 +0100
|
||||
|
||||
openttd (1.4.0~beta5-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-beta5
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 25 Feb 2014 10:15:00 +0100
|
||||
|
||||
openttd (1.4.0~beta4-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-beta4
|
||||
|
||||
-- OpenTTD <info@openttd.org> Thu, 06 Feb 2014 21:00:00 +0100
|
||||
|
||||
openttd (1.4.0~beta3-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-beta3
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 21 Jan 2014 21:00:00 +0100
|
||||
|
||||
openttd (1.4.0~beta2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-beta2
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 07 Jan 2014 21:00:00 +0100
|
||||
|
||||
openttd (1.4.0~beta1-0) unstable; urgency=low
|
||||
openttd (1.4.0~beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.4.0-beta1
|
||||
|
||||
-- OpenTTD <info@openttd.org> Tue, 24 Dec 2013 00:00:00 +0100
|
||||
-- OpenTTD <info@openttd.org> Tue, 24 Dec 2012 00:00:00 +0100
|
||||
|
||||
openttd (1.3.3-0) unstable; urgency=low
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ Section: games
|
||||
Priority: optional
|
||||
Maintainer: Matthijs Kooijman <matthijs@stdin.nl>
|
||||
Uploaders: Jordi Mallach <jordi@debian.org>
|
||||
Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzma-dev, liblzo2-dev
|
||||
Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, libicu-dev, liblzma-dev, liblzo2-dev, libxdg-basedir-dev
|
||||
Standards-Version: 3.8.4
|
||||
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/openttd.git
|
||||
Vcs-Git: git://anonscm.debian.org/collab-maint/openttd.git
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ include /usr/share/dpkg/buildflags.mk
|
||||
# to be explicit about the dependencies, in case we're not running in a
|
||||
# clean build root.
|
||||
override_dh_auto_configure:
|
||||
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 --with-lzma --without-xdg-basedir --without-iconv --disable-strip CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
|
||||
./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-sdl --with-png --with-freetype --with-fontconfig --with-icu --with-liblzo2 --with-lzma --with-xdg-basedir --without-iconv --disable-strip CFLAGS="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CFLAGS_BUILD="$(CFLAGS) $(CPPFLAGS)" CXXFLAGS_BUILD="$(CXXFLAGS) $(CPPFLAGS)" LDFLAGS_BUILD="$(LDFLAGS)"
|
||||
|
||||
# Do some extra installation
|
||||
override_dh_auto_install:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Version numbers to update
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 4
|
||||
!define APPV_MAINT 1
|
||||
!define APPV_BUILD 2
|
||||
!define APPV_EXTRA ""
|
||||
!define APPV_MAINT 0
|
||||
!define APPV_BUILD 0
|
||||
!define APPV_EXTRA "-beta1"
|
||||
|
||||
!define APPNAME "OpenTTD" ; Define application name
|
||||
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
|
||||
|
||||
@@ -173,7 +173,6 @@ Function load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files)
|
||||
line = "MSVC" Or _
|
||||
line = "DIRECTMUSIC" Or _
|
||||
line = "AI" Or _
|
||||
line = "SSE" Or _
|
||||
line = "HAVE_THREAD" _
|
||||
) Then skip = skip + 1
|
||||
deep = deep + 1
|
||||
|
||||
@@ -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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -156,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;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>
|
||||
@@ -204,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -256,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;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>
|
||||
@@ -304,7 +304,6 @@
|
||||
<ClCompile Include="..\src\command.cpp" />
|
||||
<ClCompile Include="..\src\console.cpp" />
|
||||
<ClCompile Include="..\src\console_cmds.cpp" />
|
||||
<ClCompile Include="..\src\cpu.cpp" />
|
||||
<ClCompile Include="..\src\crashlog.cpp" />
|
||||
<ClCompile Include="..\src\currency.cpp" />
|
||||
<ClCompile Include="..\src\date.cpp" />
|
||||
@@ -355,6 +354,7 @@
|
||||
<ClCompile Include="..\src\network\network_udp.cpp" />
|
||||
<ClCompile Include="..\src\openttd.cpp" />
|
||||
<ClCompile Include="..\src\order_backup.cpp" />
|
||||
<ClCompile Include="..\src\os_timer.cpp" />
|
||||
<ClCompile Include="..\src\pbs.cpp" />
|
||||
<ClCompile Include="..\src\progress.cpp" />
|
||||
<ClCompile Include="..\src\rail.cpp" />
|
||||
@@ -385,7 +385,6 @@
|
||||
<ClCompile Include="..\src\vehicle.cpp" />
|
||||
<ClCompile Include="..\src\vehiclelist.cpp" />
|
||||
<ClCompile Include="..\src\viewport.cpp" />
|
||||
<ClCompile Include="..\src\viewport_sprite_sorter_sse4.cpp" />
|
||||
<ClCompile Include="..\src\waypoint.cpp" />
|
||||
<ClCompile Include="..\src\widget.cpp" />
|
||||
<ClCompile Include="..\src\window.cpp" />
|
||||
@@ -423,7 +422,6 @@
|
||||
<ClInclude Include="..\src\console_gui.h" />
|
||||
<ClInclude Include="..\src\console_internal.h" />
|
||||
<ClInclude Include="..\src\console_type.h" />
|
||||
<ClInclude Include="..\src\cpu.h" />
|
||||
<ClInclude Include="..\src\crashlog.h" />
|
||||
<ClInclude Include="..\src\currency.h" />
|
||||
<ClInclude Include="..\src\date_func.h" />
|
||||
@@ -642,7 +640,6 @@
|
||||
<ClInclude Include="..\src\vehicle_type.h" />
|
||||
<ClInclude Include="..\src\vehiclelist.h" />
|
||||
<ClInclude Include="..\src\viewport_func.h" />
|
||||
<ClInclude Include="..\src\viewport_sprite_sorter.h" />
|
||||
<ClInclude Include="..\src\viewport_type.h" />
|
||||
<ClInclude Include="..\src\water.h" />
|
||||
<ClInclude Include="..\src\waypoint_base.h" />
|
||||
@@ -1036,8 +1033,6 @@
|
||||
<ClInclude Include="..\src\script\api\script_station.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_stationlist.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_story_page.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_storypagelist.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_storypageelementlist.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_subsidy.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_subsidylist.hpp" />
|
||||
<ClInclude Include="..\src\script\api\script_testmode.hpp" />
|
||||
@@ -1100,8 +1095,6 @@
|
||||
<ClCompile Include="..\src\script\api\script_station.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_stationlist.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_story_page.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_storypagelist.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_storypageelementlist.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_subsidy.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_subsidylist.cpp" />
|
||||
<ClCompile Include="..\src\script\api\script_testmode.cpp" />
|
||||
@@ -1119,22 +1112,12 @@
|
||||
<ClCompile Include="..\src\script\api\script_window.cpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_anim.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_anim.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_base.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_base.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_optimized.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_optimized.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_simple.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_simple.hpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse_func.hpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse_type.h" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_sse2.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse2.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_sse4.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse4.hpp" />
|
||||
<ClCompile Include="..\src\blitter\32bpp_ssse3.cpp" />
|
||||
<ClInclude Include="..\src\blitter\32bpp_ssse3.hpp" />
|
||||
<ClCompile Include="..\src\blitter\8bpp_base.cpp" />
|
||||
<ClInclude Include="..\src\blitter\8bpp_base.hpp" />
|
||||
<ClCompile Include="..\src\blitter\8bpp_optimized.cpp" />
|
||||
|
||||
@@ -141,9 +141,6 @@
|
||||
<ClCompile Include="..\src\console_cmds.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\cpu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\crashlog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -294,6 +291,9 @@
|
||||
<ClCompile Include="..\src\order_backup.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\os_timer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\pbs.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -384,9 +384,6 @@
|
||||
<ClCompile Include="..\src\viewport.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\viewport_sprite_sorter_sse4.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\waypoint.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -498,9 +495,6 @@
|
||||
<ClInclude Include="..\src\console_type.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\cpu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\crashlog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -1155,9 +1149,6 @@
|
||||
<ClInclude Include="..\src\viewport_func.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\viewport_sprite_sorter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\viewport_type.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -2337,12 +2328,6 @@
|
||||
<ClInclude Include="..\src\script\api\script_story_page.hpp">
|
||||
<Filter>Script API</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\script\api\script_storypagelist.hpp">
|
||||
<Filter>Script API</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\script\api\script_storypageelementlist.hpp">
|
||||
<Filter>Script API</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\script\api\script_subsidy.hpp">
|
||||
<Filter>Script API</Filter>
|
||||
</ClInclude>
|
||||
@@ -2529,12 +2514,6 @@
|
||||
<ClCompile Include="..\src\script\api\script_story_page.cpp">
|
||||
<Filter>Script API Implementation</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\script\api\script_storypagelist.cpp">
|
||||
<Filter>Script API Implementation</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\script\api\script_storypageelementlist.cpp">
|
||||
<Filter>Script API Implementation</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\script\api\script_subsidy.cpp">
|
||||
<Filter>Script API Implementation</Filter>
|
||||
</ClCompile>
|
||||
@@ -2586,12 +2565,6 @@
|
||||
<ClInclude Include="..\src\blitter\32bpp_anim.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\32bpp_anim_sse4.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\blitter\32bpp_anim_sse4.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\32bpp_base.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
@@ -2610,30 +2583,6 @@
|
||||
<ClInclude Include="..\src\blitter\32bpp_simple.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse_func.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse_type.h">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\32bpp_sse2.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse2.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\32bpp_sse4.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\blitter\32bpp_sse4.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\32bpp_ssse3.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\src\blitter\32bpp_ssse3.hpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\blitter\8bpp_base.cpp">
|
||||
<Filter>Blitters</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -156,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;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>
|
||||
@@ -204,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;WITH_ASSERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -256,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;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR="OpenTTD";_SQ64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;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>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -156,7 +156,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_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\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -257,7 +257,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -362,7 +362,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_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"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -486,10 +486,6 @@
|
||||
RelativePath=".\..\src\console_cmds.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cpu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\crashlog.cpp"
|
||||
>
|
||||
@@ -690,6 +686,10 @@
|
||||
RelativePath=".\..\src\order_backup.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\os_timer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pbs.cpp"
|
||||
>
|
||||
@@ -810,10 +810,6 @@
|
||||
RelativePath=".\..\src\viewport.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_sprite_sorter_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\waypoint.cpp"
|
||||
>
|
||||
@@ -966,10 +962,6 @@
|
||||
RelativePath=".\..\src\console_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cpu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\crashlog.h"
|
||||
>
|
||||
@@ -1842,10 +1834,6 @@
|
||||
RelativePath=".\..\src\viewport_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_sprite_sorter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_type.h"
|
||||
>
|
||||
@@ -3478,14 +3466,6 @@
|
||||
RelativePath=".\..\src\script\api\script_story_page.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypagelist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypageelementlist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_subsidy.hpp"
|
||||
>
|
||||
@@ -3738,14 +3718,6 @@
|
||||
RelativePath=".\..\src\script\api\script_story_page.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypagelist.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypageelementlist.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_subsidy.cpp"
|
||||
>
|
||||
@@ -3818,14 +3790,6 @@
|
||||
RelativePath=".\..\src\blitter\32bpp_anim.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_anim_sse4.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_base.cpp"
|
||||
>
|
||||
@@ -3850,38 +3814,6 @@
|
||||
RelativePath=".\..\src\blitter\32bpp_simple.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse_func.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse2.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse4.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_ssse3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_ssse3.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\8bpp_base.cpp"
|
||||
>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -156,7 +156,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_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\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -257,7 +257,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -362,7 +362,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_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"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -155,7 +155,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_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\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -255,7 +255,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -359,7 +359,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_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"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -483,10 +483,6 @@
|
||||
RelativePath=".\..\src\console_cmds.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cpu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\crashlog.cpp"
|
||||
>
|
||||
@@ -687,6 +683,10 @@
|
||||
RelativePath=".\..\src\order_backup.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\os_timer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pbs.cpp"
|
||||
>
|
||||
@@ -807,10 +807,6 @@
|
||||
RelativePath=".\..\src\viewport.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_sprite_sorter_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\waypoint.cpp"
|
||||
>
|
||||
@@ -963,10 +959,6 @@
|
||||
RelativePath=".\..\src\console_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\cpu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\crashlog.h"
|
||||
>
|
||||
@@ -1839,10 +1831,6 @@
|
||||
RelativePath=".\..\src\viewport_func.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_sprite_sorter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\viewport_type.h"
|
||||
>
|
||||
@@ -3475,14 +3463,6 @@
|
||||
RelativePath=".\..\src\script\api\script_story_page.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypagelist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypageelementlist.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_subsidy.hpp"
|
||||
>
|
||||
@@ -3735,14 +3715,6 @@
|
||||
RelativePath=".\..\src\script\api\script_story_page.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypagelist.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_storypageelementlist.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\script\api\script_subsidy.cpp"
|
||||
>
|
||||
@@ -3815,14 +3787,6 @@
|
||||
RelativePath=".\..\src\blitter\32bpp_anim.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_anim_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_anim_sse4.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_base.cpp"
|
||||
>
|
||||
@@ -3847,38 +3811,6 @@
|
||||
RelativePath=".\..\src\blitter\32bpp_simple.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse_func.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse_type.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse2.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse4.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_sse4.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_ssse3.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\32bpp_ssse3.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\blitter\8bpp_base.cpp"
|
||||
>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -155,7 +155,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WIN32_ENABLE_DIRECTMUSIC_SUPPORT;WITH_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\""
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
@@ -255,7 +255,7 @@
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64;WITH_ASSERT"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="1"
|
||||
RuntimeLibrary="0"
|
||||
@@ -359,7 +359,7 @@
|
||||
AdditionalOptions="/MP"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\objs\langs;..\objs\settings;..\src\3rdparty\squirrel\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_SSE;WITH_ZLIB;WITH_LZO;WITH_LZMA;LZMA_API_STATIC;WITH_PNG;WITH_FREETYPE;WITH_ICU;U_STATIC_IMPLEMENTATION;ENABLE_NETWORK;WITH_PERSONAL_DIR;PERSONAL_DIR=\"OpenTTD\";_SQ64"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WITH_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"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
|
||||
+2
-3
@@ -1,5 +1,5 @@
|
||||
Last updated: 2014-06-02
|
||||
Release version: 1.4.1
|
||||
Last updated: 2013-12-24
|
||||
Release version: 1.4.0-beta1
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -722,7 +722,6 @@ Thanks to:
|
||||
George - Canal graphics
|
||||
Andrew Parkhouse (andythenorth) - River graphics
|
||||
David Dallaston (Pikka) - Tram tracks
|
||||
Fleashosio - Titlegame
|
||||
All Translators - For their support to make OpenTTD a truly international game
|
||||
Bug Reporters - Thanks for all bug reports
|
||||
Chris Sawyer - For an amazing game!
|
||||
|
||||
+1
-24
@@ -12,7 +12,6 @@ cheat.cpp
|
||||
command.cpp
|
||||
console.cpp
|
||||
console_cmds.cpp
|
||||
cpu.cpp
|
||||
crashlog.cpp
|
||||
currency.cpp
|
||||
date.cpp
|
||||
@@ -63,6 +62,7 @@ network/network_server.cpp
|
||||
network/network_udp.cpp
|
||||
openttd.cpp
|
||||
order_backup.cpp
|
||||
os_timer.cpp
|
||||
pbs.cpp
|
||||
progress.cpp
|
||||
rail.cpp
|
||||
@@ -111,9 +111,6 @@ townname.cpp
|
||||
vehicle.cpp
|
||||
vehiclelist.cpp
|
||||
viewport.cpp
|
||||
#if SSE
|
||||
viewport_sprite_sorter_sse4.cpp
|
||||
#end
|
||||
waypoint.cpp
|
||||
widget.cpp
|
||||
window.cpp
|
||||
@@ -158,7 +155,6 @@ console_func.h
|
||||
console_gui.h
|
||||
console_internal.h
|
||||
console_type.h
|
||||
cpu.h
|
||||
crashlog.h
|
||||
currency.h
|
||||
date_func.h
|
||||
@@ -377,7 +373,6 @@ vehicle_gui_base.h
|
||||
vehicle_type.h
|
||||
vehiclelist.h
|
||||
viewport_func.h
|
||||
viewport_sprite_sorter.h
|
||||
viewport_type.h
|
||||
water.h
|
||||
waypoint_base.h
|
||||
@@ -816,8 +811,6 @@ script/api/script_signlist.hpp
|
||||
script/api/script_station.hpp
|
||||
script/api/script_stationlist.hpp
|
||||
script/api/script_story_page.hpp
|
||||
script/api/script_storypagelist.hpp
|
||||
script/api/script_storypageelementlist.hpp
|
||||
script/api/script_subsidy.hpp
|
||||
script/api/script_subsidylist.hpp
|
||||
script/api/script_testmode.hpp
|
||||
@@ -882,8 +875,6 @@ script/api/script_signlist.cpp
|
||||
script/api/script_station.cpp
|
||||
script/api/script_stationlist.cpp
|
||||
script/api/script_story_page.cpp
|
||||
script/api/script_storypagelist.cpp
|
||||
script/api/script_storypageelementlist.cpp
|
||||
script/api/script_subsidy.cpp
|
||||
script/api/script_subsidylist.cpp
|
||||
script/api/script_testmode.cpp
|
||||
@@ -905,26 +896,12 @@ script/api/script_window.cpp
|
||||
#else
|
||||
blitter/32bpp_anim.cpp
|
||||
blitter/32bpp_anim.hpp
|
||||
#if SSE
|
||||
blitter/32bpp_anim_sse4.cpp
|
||||
blitter/32bpp_anim_sse4.hpp
|
||||
#end
|
||||
blitter/32bpp_base.cpp
|
||||
blitter/32bpp_base.hpp
|
||||
blitter/32bpp_optimized.cpp
|
||||
blitter/32bpp_optimized.hpp
|
||||
blitter/32bpp_simple.cpp
|
||||
blitter/32bpp_simple.hpp
|
||||
#if SSE
|
||||
blitter/32bpp_sse_func.hpp
|
||||
blitter/32bpp_sse_type.h
|
||||
blitter/32bpp_sse2.cpp
|
||||
blitter/32bpp_sse2.hpp
|
||||
blitter/32bpp_sse4.cpp
|
||||
blitter/32bpp_sse4.hpp
|
||||
blitter/32bpp_ssse3.cpp
|
||||
blitter/32bpp_ssse3.hpp
|
||||
#end
|
||||
blitter/8bpp_base.cpp
|
||||
blitter/8bpp_base.hpp
|
||||
blitter/8bpp_optimized.cpp
|
||||
|
||||
+1
-1
@@ -853,7 +853,7 @@ struct AIConfigWindow : public Window {
|
||||
case WID_AIC_GAMELIST: {
|
||||
this->selected_slot = OWNER_DEITY;
|
||||
this->InvalidateData();
|
||||
if (click_count > 1 && this->selected_slot != INVALID_COMPANY && _game_mode != GM_NORMAL) ShowAIListWindow((CompanyID)this->selected_slot);
|
||||
if (click_count > 1 && this->selected_slot != INVALID_COMPANY) ShowAIListWindow((CompanyID)this->selected_slot);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT_OTHER, tile);
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ static void TransferCargo(Vehicle *old_veh, Vehicle *new_head, bool part_of_chai
|
||||
}
|
||||
|
||||
/* Update train weight etc., the old vehicle will be sold anyway */
|
||||
if (part_of_chain && new_head->type == VEH_TRAIN) Train::From(new_head)->ConsistChanged(CCF_LOADUNLOAD);
|
||||
if (part_of_chain && new_head->type == VEH_TRAIN) Train::From(new_head)->ConsistChanged(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -133,46 +133,6 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
if (src_px->a == 255) {
|
||||
do {
|
||||
uint m = *src_n;
|
||||
if (m == 0) {
|
||||
uint8 g = MakeDark(src_px->r, src_px->g, src_px->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src_px->a, *dst);
|
||||
*anim = 0;
|
||||
} else {
|
||||
uint r = remap[GB(m, 0, 8)];
|
||||
*anim = r | (m & 0xFF00);
|
||||
if (r != 0) *dst = this->AdjustBrightness(this->LookupColourInPalette(r), GB(m, 8, 8));
|
||||
}
|
||||
anim++;
|
||||
dst++;
|
||||
src_px++;
|
||||
src_n++;
|
||||
} while (--n != 0);
|
||||
} else {
|
||||
do {
|
||||
uint m = *src_n;
|
||||
if (m == 0) {
|
||||
if (src_px->a != 0) {
|
||||
uint8 g = MakeDark(src_px->r, src_px->g, src_px->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src_px->a, *dst);
|
||||
*anim = 0;
|
||||
}
|
||||
} else {
|
||||
uint r = remap[GB(m, 0, 8)];
|
||||
*anim = 0;
|
||||
if (r != 0) *dst = ComposeColourPANoCheck(this->AdjustBrightness(this->LookupColourInPalette(r), GB(m, 8, 8)), src_px->a, *dst);
|
||||
}
|
||||
anim++;
|
||||
dst++;
|
||||
src_px++;
|
||||
src_n++;
|
||||
} while (--n != 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
|
||||
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
|
||||
@@ -248,7 +208,6 @@ void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL
|
||||
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
|
||||
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +439,7 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
|
||||
}
|
||||
|
||||
/* Make sure the backend redraws the whole screen */
|
||||
VideoDriver::GetInstance()->MakeDirty(0, 0, _screen.width, _screen.height);
|
||||
_video_driver->MakeDirty(0, 0, _screen.width, _screen.height);
|
||||
}
|
||||
|
||||
Blitter::PaletteAnimation Blitter_32bppAnim::UsePaletteAnimation()
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "32bpp_optimized.hpp"
|
||||
|
||||
/** The optimised 32 bpp blitter with palette animation. */
|
||||
class Blitter_32bppAnim : public Blitter_32bppOptimized {
|
||||
protected:
|
||||
class Blitter_32bppAnim FINAL : public Blitter_32bppOptimized {
|
||||
private:
|
||||
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.
|
||||
@@ -56,9 +56,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the 32bpp blitter with animation. */
|
||||
class FBlitter_32bppAnim : public BlitterFactory {
|
||||
class FBlitter_32bppAnim : public BlitterFactory<FBlitter_32bppAnim> {
|
||||
public:
|
||||
FBlitter_32bppAnim() : BlitterFactory("32bpp-anim", "32bpp Animation Blitter (palette animation)") {}
|
||||
/* virtual */ const char *GetName() { return "32bpp-anim"; }
|
||||
/* virtual */ const char *GetDescription() { return "32bpp Animation Blitter (palette animation)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppAnim(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,399 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse4_anim.cpp Implementation of the SSE4 32 bpp blitter with animation support. */
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../video/video_driver.hpp"
|
||||
#include "../table/sprites.h"
|
||||
#include "32bpp_anim_sse4.hpp"
|
||||
#include "32bpp_sse_func.hpp"
|
||||
|
||||
/** Instantiation of the SSE4 32bpp blitter factory. */
|
||||
static FBlitter_32bppSSE4_Anim iFBlitter_32bppSSE4_Anim;
|
||||
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. It is templated to allow faster operation.
|
||||
*
|
||||
* @tparam mode blitter mode
|
||||
* @param bp further blitting parameters
|
||||
* @param zoom zoom level at which we are drawing
|
||||
*/
|
||||
IGNORE_UNINITIALIZED_WARNING_START
|
||||
template <BlitterMode mode, Blitter_32bppSSE2::ReadMode read_mode, Blitter_32bppSSE2::BlockType bt_last, bool translucent, bool animated>
|
||||
inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
{
|
||||
const byte * const remap = bp->remap;
|
||||
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->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. */
|
||||
const Blitter_32bppSSE_Base::SpriteData * const sd = (const Blitter_32bppSSE_Base::SpriteData *) bp->sprite;
|
||||
const SpriteInfo * const si = &sd->infos[zoom];
|
||||
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
||||
const Colour *src_rgba_line = (const Colour *) ((const byte *) &sd->data[si->sprite_offset] + bp->skip_top * si->sprite_line_size);
|
||||
|
||||
if (read_mode != RM_WITH_MARGIN) {
|
||||
src_rgba_line += bp->skip_left;
|
||||
src_mv_line += bp->skip_left;
|
||||
}
|
||||
const MapValue *src_mv = src_mv_line;
|
||||
|
||||
/* Load these variables into register before loop. */
|
||||
const __m128i a_cm = ALPHA_CONTROL_MASK;
|
||||
const __m128i pack_low_cm = PACK_LOW_CONTROL_MASK;
|
||||
const __m128i tr_nom_base = TRANSPARENT_NOM_BASE;
|
||||
|
||||
for (int y = bp->height; y != 0; y--) {
|
||||
Colour *dst = dst_line;
|
||||
const Colour *src = src_rgba_line + META_LENGTH;
|
||||
if (mode != BM_TRANSPARENT) src_mv = src_mv_line;
|
||||
uint16 *anim = anim_line;
|
||||
|
||||
if (read_mode == RM_WITH_MARGIN) {
|
||||
assert(bt_last == BT_NONE); // or you must ensure block type is preserved
|
||||
anim += src_rgba_line[0].data;
|
||||
src += src_rgba_line[0].data;
|
||||
dst += src_rgba_line[0].data;
|
||||
if (mode != BM_TRANSPARENT) src_mv += src_rgba_line[0].data;
|
||||
const int width_diff = si->sprite_width - bp->width;
|
||||
effective_width = bp->width - (int) src_rgba_line[0].data;
|
||||
const int delta_diff = (int) src_rgba_line[1].data - width_diff;
|
||||
const int new_width = effective_width - delta_diff;
|
||||
effective_width = delta_diff > 0 ? new_width : effective_width;
|
||||
if (effective_width <= 0) goto next_line;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
default:
|
||||
if (!translucent) {
|
||||
for (uint x = (uint) effective_width; x > 0; x--) {
|
||||
if (src->a) {
|
||||
if (animated) {
|
||||
*anim = *(const uint16*) src_mv;
|
||||
*dst = (src_mv->m >= PALETTE_ANIM_START) ? AdjustBrightneSSE(this->LookupColourInPalette(src_mv->m), src_mv->v) : src->data;
|
||||
} else {
|
||||
*anim = 0;
|
||||
*dst = *src;
|
||||
}
|
||||
}
|
||||
if (animated) src_mv++;
|
||||
anim++;
|
||||
src++;
|
||||
dst++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (uint x = (uint) effective_width/2; x != 0; x--) {
|
||||
uint32 mvX2 = *((uint32 *) const_cast<MapValue *>(src_mv));
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
|
||||
if (animated) {
|
||||
/* Remap colours. */
|
||||
const byte m0 = mvX2;
|
||||
if (m0 >= PALETTE_ANIM_START) {
|
||||
const Colour c0 = (this->LookupColourInPalette(m0).data & 0x00FFFFFF) | (src[0].data & 0xFF000000);
|
||||
InsertFirstUint32(AdjustBrightneSSE(c0, (byte) (mvX2 >> 8)).data, srcABCD);
|
||||
}
|
||||
const byte m1 = mvX2 >> 16;
|
||||
if (m1 >= PALETTE_ANIM_START) {
|
||||
const Colour c1 = (this->LookupColourInPalette(m1).data & 0x00FFFFFF) | (src[1].data & 0xFF000000);
|
||||
InsertSecondUint32(AdjustBrightneSSE(c1, (byte) (mvX2 >> 24)).data, srcABCD);
|
||||
}
|
||||
|
||||
/* Update anim buffer. */
|
||||
const byte a0 = src[0].a;
|
||||
const byte a1 = src[1].a;
|
||||
uint32 anim01 = 0;
|
||||
if (a0 == 255) {
|
||||
if (a1 == 255) {
|
||||
*(uint32*) anim = mvX2;
|
||||
goto bmno_full_opacity;
|
||||
}
|
||||
anim01 = (uint16) mvX2;
|
||||
} else if (a0 == 0) {
|
||||
if (a1 == 0) {
|
||||
goto bmno_full_transparency;
|
||||
} else {
|
||||
if (a1 == 255) anim[1] = (uint16) (mvX2 >> 16);
|
||||
goto bmno_alpha_blend;
|
||||
}
|
||||
}
|
||||
if (a1 > 0) {
|
||||
if (a1 == 255) anim01 |= mvX2 & 0xFFFF0000;
|
||||
*(uint32*) anim = anim01;
|
||||
} else {
|
||||
anim[0] = (uint16) anim01;
|
||||
}
|
||||
} else {
|
||||
if (src[0].a) anim[0] = 0;
|
||||
if (src[1].a) anim[1] = 0;
|
||||
}
|
||||
|
||||
/* Blend colours. */
|
||||
bmno_alpha_blend:
|
||||
srcABCD = AlphaBlendTwoPixels(srcABCD, dstABCD, a_cm, pack_low_cm);
|
||||
bmno_full_opacity:
|
||||
_mm_storel_epi64((__m128i *) dst, srcABCD);
|
||||
bmno_full_transparency:
|
||||
src_mv += 2;
|
||||
src += 2;
|
||||
anim += 2;
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
if (src->a == 0) {
|
||||
} else if (src->a == 255) {
|
||||
*anim = *(const uint16*) src_mv;
|
||||
*dst = (src_mv->m >= PALETTE_ANIM_START) ? AdjustBrightneSSE(LookupColourInPalette(src_mv->m), src_mv->v) : *src;
|
||||
} else {
|
||||
*anim = 0;
|
||||
__m128i srcABCD;
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
if (src_mv->m >= PALETTE_ANIM_START) {
|
||||
Colour colour = AdjustBrightneSSE(LookupColourInPalette(src_mv->m), src_mv->v);
|
||||
colour.a = src->a;
|
||||
srcABCD = _mm_cvtsi32_si128(colour.data);
|
||||
} else {
|
||||
srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
}
|
||||
dst->data = _mm_cvtsi128_si32(AlphaBlendTwoPixels(srcABCD, dstABCD, a_cm, pack_low_cm));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_COLOUR_REMAP:
|
||||
for (uint x = (uint) effective_width / 2; x != 0; x--) {
|
||||
uint32 mvX2 = *((uint32 *) const_cast<MapValue *>(src_mv));
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
|
||||
/* Remap colours. */
|
||||
const uint m0 = (byte) mvX2;
|
||||
const uint r0 = remap[m0];
|
||||
const uint m1 = (byte) (mvX2 >> 16);
|
||||
const uint r1 = remap[m1];
|
||||
if (mvX2 & 0x00FF00FF) {
|
||||
#define CMOV_REMAP(m_colour, m_colour_init, m_src, m_m) \
|
||||
/* Written so the compiler uses CMOV. */ \
|
||||
Colour m_colour = m_colour_init; \
|
||||
{ \
|
||||
const Colour srcm = (Colour) (m_src); \
|
||||
const uint m = (byte) (m_m); \
|
||||
const uint r = remap[m]; \
|
||||
const Colour cmap = (this->LookupColourInPalette(r).data & 0x00FFFFFF) | (srcm.data & 0xFF000000); \
|
||||
m_colour = r == 0 ? m_colour : cmap; \
|
||||
m_colour = m != 0 ? m_colour : srcm; \
|
||||
}
|
||||
#ifdef _SQ64
|
||||
uint64 srcs = _mm_cvtsi128_si64(srcABCD);
|
||||
uint64 dsts;
|
||||
if (animated) dsts = _mm_cvtsi128_si64(dstABCD);
|
||||
uint64 remapped_src = 0;
|
||||
CMOV_REMAP(c0, animated ? dsts : 0, srcs, mvX2);
|
||||
remapped_src = c0.data;
|
||||
CMOV_REMAP(c1, animated ? dsts >> 32 : 0, srcs >> 32, mvX2 >> 16);
|
||||
remapped_src |= (uint64) c1.data << 32;
|
||||
srcABCD = _mm_cvtsi64_si128(remapped_src);
|
||||
#else
|
||||
Colour remapped_src[2];
|
||||
CMOV_REMAP(c0, animated ? _mm_cvtsi128_si32(dstABCD) : 0, _mm_cvtsi128_si32(srcABCD), mvX2);
|
||||
remapped_src[0] = c0.data;
|
||||
CMOV_REMAP(c1, animated ? dst[1] : 0, src[1], mvX2 >> 16);
|
||||
remapped_src[1] = c1.data;
|
||||
srcABCD = _mm_loadl_epi64((__m128i*) &remapped_src);
|
||||
#endif
|
||||
|
||||
if ((mvX2 & 0xFF00FF00) != 0x80008000) srcABCD = AdjustBrightnessOfTwoPixels(srcABCD, mvX2);
|
||||
}
|
||||
|
||||
/* Update anim buffer. */
|
||||
if (animated) {
|
||||
const byte a0 = src[0].a;
|
||||
const byte a1 = src[1].a;
|
||||
uint32 anim01 = mvX2 & 0xFF00FF00;
|
||||
if (a0 == 255) {
|
||||
anim01 |= r0;
|
||||
if (a1 == 255) {
|
||||
*(uint32*) anim = anim01 | (r1 << 16);
|
||||
goto bmcr_full_opacity;
|
||||
}
|
||||
} else if (a0 == 0) {
|
||||
if (a1 == 0) {
|
||||
goto bmcr_full_transparency;
|
||||
} else {
|
||||
if (a1 == 255) {
|
||||
anim[1] = r1 | (anim01 >> 16);
|
||||
}
|
||||
goto bmcr_alpha_blend;
|
||||
}
|
||||
}
|
||||
if (a1 > 0) {
|
||||
if (a1 == 255) anim01 |= r1 << 16;
|
||||
*(uint32*) anim = anim01;
|
||||
} else {
|
||||
anim[0] = (uint16) anim01;
|
||||
}
|
||||
} else {
|
||||
if (src[0].a) anim[0] = 0;
|
||||
if (src[1].a) anim[1] = 0;
|
||||
}
|
||||
|
||||
/* Blend colours. */
|
||||
bmcr_alpha_blend:
|
||||
srcABCD = AlphaBlendTwoPixels(srcABCD, dstABCD, a_cm, pack_low_cm);
|
||||
bmcr_full_opacity:
|
||||
_mm_storel_epi64((__m128i *) dst, srcABCD);
|
||||
bmcr_full_transparency:
|
||||
src_mv += 2;
|
||||
dst += 2;
|
||||
src += 2;
|
||||
anim += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
/* In case the m-channel is zero, do not remap this pixel in any way. */
|
||||
__m128i srcABCD;
|
||||
if (src->a == 0) break;
|
||||
if (src_mv->m) {
|
||||
const uint r = remap[src_mv->m];
|
||||
*anim = (animated && src->a == 255) ? r | ((uint16) src_mv->v << 8 ) : 0;
|
||||
if (r != 0) {
|
||||
Colour remapped_colour = AdjustBrightneSSE(this->LookupColourInPalette(r), src_mv->v);
|
||||
if (src->a == 255) {
|
||||
*dst = remapped_colour;
|
||||
} else {
|
||||
remapped_colour.a = src->a;
|
||||
srcABCD = _mm_cvtsi32_si128(remapped_colour.data);
|
||||
goto bmcr_alpha_blend_single;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
*anim = 0;
|
||||
srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
if (src->a < 255) {
|
||||
bmcr_alpha_blend_single:
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
srcABCD = AlphaBlendTwoPixels(srcABCD, dstABCD, a_cm, pack_low_cm);
|
||||
}
|
||||
dst->data = _mm_cvtsi128_si32(srcABCD);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* Make the current colour a bit more black, so it looks like this image is transparent. */
|
||||
for (uint x = (uint) bp->width / 2; x > 0; x--) {
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
_mm_storel_epi64((__m128i *) dst, DarkenTwoPixels(srcABCD, dstABCD, a_cm, tr_nom_base));
|
||||
src += 2;
|
||||
dst += 2;
|
||||
anim += 2;
|
||||
if (src[-2].a) anim[-2] = 0;
|
||||
if (src[-1].a) anim[-1] = 0;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && bp->width & 1) || bt_last == BT_ODD) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(DarkenTwoPixels(srcABCD, dstABCD, a_cm, tr_nom_base));
|
||||
if (src[0].a) anim[0] = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
for (uint x = (uint) bp->width; x > 0; x--) {
|
||||
if (src_mv->m == 0) {
|
||||
if (src->a != 0) {
|
||||
uint8 g = MakeDark(src->r, src->g, src->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
|
||||
*anim = 0;
|
||||
}
|
||||
} else {
|
||||
uint r = remap[src_mv->m];
|
||||
if (r != 0) *dst = ComposeColourPANoCheck(this->AdjustBrightness(this->LookupColourInPalette(r), src_mv->v), src->a, *dst);
|
||||
}
|
||||
src_mv++;
|
||||
dst++;
|
||||
src++;
|
||||
anim++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
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_width;
|
||||
}
|
||||
}
|
||||
IGNORE_UNINITIALIZED_WARNING_STOP
|
||||
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. Calls adequate templated function.
|
||||
*
|
||||
* @param bp further blitting parameters
|
||||
* @param mode blitter mode
|
||||
* @param zoom zoom level at which we are drawing
|
||||
*/
|
||||
void Blitter_32bppSSE4_Anim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
{
|
||||
const Blitter_32bppSSE_Base::SpriteFlags sprite_flags = ((const Blitter_32bppSSE_Base::SpriteData *) bp->sprite)->flags;
|
||||
switch (mode) {
|
||||
default: {
|
||||
bm_normal:
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_NORMAL_THRESHOLD) {
|
||||
const BlockType bt_last = (BlockType) (bp->width & 1);
|
||||
if (bt_last == BT_EVEN) {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_NORMAL, RM_WITH_SKIP, BT_EVEN, true, false>(bp, zoom);
|
||||
else Draw<BM_NORMAL, RM_WITH_SKIP, BT_EVEN, true, true>(bp, zoom);
|
||||
} else {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_NORMAL, RM_WITH_SKIP, BT_ODD, true, false>(bp, zoom);
|
||||
else Draw<BM_NORMAL, RM_WITH_SKIP, BT_ODD, true, true>(bp, zoom);
|
||||
}
|
||||
} else {
|
||||
#ifdef _SQ64
|
||||
if (sprite_flags & SF_TRANSLUCENT) {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
} else {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, false, false>(bp, zoom);
|
||||
else Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, false, true>(bp, zoom);
|
||||
}
|
||||
#else
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
case BM_COLOUR_REMAP:
|
||||
if (sprite_flags & SF_NO_REMAP) goto bm_normal;
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_COLOUR_REMAP, RM_WITH_SKIP, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BM_COLOUR_REMAP, RM_WITH_SKIP, BT_NONE, true, true>(bp, zoom);
|
||||
} else {
|
||||
if (sprite_flags & SF_NO_ANIM) Draw<BM_COLOUR_REMAP, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BM_COLOUR_REMAP, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
}
|
||||
break;
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
@@ -1,53 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse4_anim.hpp A SSE4 32 bpp blitter with animation support. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSE4_ANIM_HPP
|
||||
#define BLITTER_32BPP_SSE4_ANIM_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#ifndef SSE_VERSION
|
||||
#define SSE_VERSION 4
|
||||
#endif
|
||||
|
||||
#ifndef FULL_ANIMATION
|
||||
#define FULL_ANIMATION 1
|
||||
#endif
|
||||
|
||||
#include "32bpp_anim.hpp"
|
||||
#include "32bpp_sse4.hpp"
|
||||
|
||||
#undef MARGIN_NORMAL_THRESHOLD
|
||||
#define MARGIN_NORMAL_THRESHOLD 4
|
||||
|
||||
/** The SSE4 32 bpp blitter with palette animation. */
|
||||
class Blitter_32bppSSE4_Anim FINAL : public Blitter_32bppAnim, public Blitter_32bppSSE_Base {
|
||||
private:
|
||||
|
||||
public:
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent, bool animated>
|
||||
/* virtual */ void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) {
|
||||
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
|
||||
}
|
||||
/* virtual */ const char *GetName() { return "32bpp-sse4-anim"; }
|
||||
};
|
||||
|
||||
/** Factory for the SSE4 32 bpp blitter (with palette animation). */
|
||||
class FBlitter_32bppSSE4_Anim: public BlitterFactory {
|
||||
public:
|
||||
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE4_Anim(); }
|
||||
};
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSE4_ANIM_HPP */
|
||||
@@ -112,19 +112,6 @@ public:
|
||||
return Colour(r * nom / denom, g * nom / denom, b * nom / denom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour dark grey, for specialized 32bpp remapping.
|
||||
* @param r red component
|
||||
* @param g green component
|
||||
* @param b blue component
|
||||
* @return the brightness value of the new colour, now dark grey.
|
||||
*/
|
||||
static inline uint8 MakeDark(uint8 r, uint8 g, uint8 b)
|
||||
{
|
||||
/* Magic-numbers are ~66% of those used in MakeGrey() */
|
||||
return ((r * 13063) + (g * 25647) + (b * 4981)) / 65536;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour grey - based.
|
||||
* @param colour the colour to make grey.
|
||||
|
||||
@@ -141,40 +141,6 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
if (src_px->a == 255) {
|
||||
do {
|
||||
uint m = *src_n;
|
||||
if (m == 0) {
|
||||
uint8 g = MakeDark(src_px->r, src_px->g, src_px->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src_px->a, *dst);
|
||||
} else {
|
||||
uint r = remap[GB(m, 0, 8)];
|
||||
if (r != 0) *dst = this->AdjustBrightness(this->LookupColourInPalette(r), GB(m, 8, 8));
|
||||
}
|
||||
dst++;
|
||||
src_px++;
|
||||
src_n++;
|
||||
} while (--n != 0);
|
||||
} else {
|
||||
do {
|
||||
uint m = *src_n;
|
||||
if (m == 0) {
|
||||
if (src_px->a != 0) {
|
||||
uint8 g = MakeDark(src_px->r, src_px->g, src_px->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src_px->a, *dst);
|
||||
}
|
||||
} else {
|
||||
uint r = remap[GB(m, 0, 8)];
|
||||
if (r != 0) *dst = ComposeColourPANoCheck(this->AdjustBrightness(this->LookupColourInPalette(r), GB(m, 8, 8)), src_px->a, *dst);
|
||||
}
|
||||
dst++;
|
||||
src_px++;
|
||||
src_n++;
|
||||
} while (--n != 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
|
||||
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
|
||||
@@ -238,7 +204,6 @@ void Blitter_32bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode,
|
||||
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
|
||||
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the optimised 32 bpp blitter (without palette animation). */
|
||||
class FBlitter_32bppOptimized : public BlitterFactory {
|
||||
class FBlitter_32bppOptimized : public BlitterFactory<FBlitter_32bppOptimized> {
|
||||
public:
|
||||
FBlitter_32bppOptimized() : BlitterFactory("32bpp-optimized", "32bpp Optimized Blitter (no palette animation)") {}
|
||||
/* virtual */ const char *GetName() { return "32bpp-optimized"; }
|
||||
/* virtual */ const char *GetDescription() { return "32bpp Optimized Blitter (no palette animation)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppOptimized(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -45,17 +45,6 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
if (src->m == 0) {
|
||||
if (src->a != 0) {
|
||||
uint8 g = MakeDark(src->r, src->g, src->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
|
||||
}
|
||||
} else {
|
||||
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(this->AdjustBrightness(this->LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
|
||||
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
|
||||
|
||||
@@ -34,9 +34,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the simple 32 bpp blitter. */
|
||||
class FBlitter_32bppSimple : public BlitterFactory {
|
||||
class FBlitter_32bppSimple : public BlitterFactory<FBlitter_32bppSimple> {
|
||||
public:
|
||||
FBlitter_32bppSimple() : BlitterFactory("32bpp-simple", "32bpp Simple Blitter (no palette animation)") {}
|
||||
/* virtual */ const char *GetName() { return "32bpp-simple"; }
|
||||
/* virtual */ const char *GetDescription() { return "32bpp Simple Blitter (no palette animation)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSimple(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse2.cpp Implementation of the SSE2 32 bpp blitter. */
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../settings_type.h"
|
||||
#include "32bpp_sse2.hpp"
|
||||
#include "32bpp_sse_func.hpp"
|
||||
|
||||
/** Instantiation of the SSE2 32bpp blitter factory. */
|
||||
static FBlitter_32bppSSE2 iFBlitter_32bppSSE2;
|
||||
|
||||
Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
/* First uint32 of a line = the number of transparent pixels from the left.
|
||||
* Second uint32 of a line = the number of transparent pixels from the right.
|
||||
* Then all RGBA then all MV.
|
||||
*/
|
||||
ZoomLevel zoom_min = ZOOM_LVL_NORMAL;
|
||||
ZoomLevel zoom_max = ZOOM_LVL_NORMAL;
|
||||
if (sprite->type != ST_FONT) {
|
||||
zoom_min = _settings_client.gui.zoom_min;
|
||||
zoom_max = _settings_client.gui.zoom_max;
|
||||
if (zoom_max == zoom_min) zoom_max = ZOOM_LVL_MAX;
|
||||
}
|
||||
|
||||
/* Calculate sizes and allocate. */
|
||||
SpriteData sd;
|
||||
memset(&sd, 0, sizeof(sd));
|
||||
uint all_sprites_size = 0;
|
||||
for (ZoomLevel z = zoom_min; z <= zoom_max; z++) {
|
||||
const SpriteLoader::Sprite *src_sprite = &sprite[z];
|
||||
sd.infos[z].sprite_width = src_sprite->width;
|
||||
sd.infos[z].sprite_offset = all_sprites_size;
|
||||
sd.infos[z].sprite_line_size = sizeof(Colour) * src_sprite->width + sizeof(uint32) * META_LENGTH;
|
||||
|
||||
const uint rgba_size = sd.infos[z].sprite_line_size * src_sprite->height;
|
||||
sd.infos[z].mv_offset = all_sprites_size + rgba_size;
|
||||
|
||||
const uint mv_size = sizeof(MapValue) * src_sprite->width * src_sprite->height;
|
||||
all_sprites_size += rgba_size + mv_size;
|
||||
}
|
||||
|
||||
Sprite *dst_sprite = (Sprite *) allocator(sizeof(Sprite) + sizeof(SpriteData) + all_sprites_size);
|
||||
dst_sprite->height = sprite->height;
|
||||
dst_sprite->width = sprite->width;
|
||||
dst_sprite->x_offs = sprite->x_offs;
|
||||
dst_sprite->y_offs = sprite->y_offs;
|
||||
memcpy(dst_sprite->data, &sd, sizeof(SpriteData));
|
||||
|
||||
/* Copy colours and determine flags. */
|
||||
bool has_remap = false;
|
||||
bool has_anim = false;
|
||||
bool has_translucency = false;
|
||||
for (ZoomLevel z = zoom_min; z <= zoom_max; z++) {
|
||||
const SpriteLoader::Sprite *src_sprite = &sprite[z];
|
||||
const SpriteLoader::CommonPixel *src = (const SpriteLoader::CommonPixel *) src_sprite->data;
|
||||
Colour *dst_rgba_line = (Colour *) &dst_sprite->data[sizeof(SpriteData) + sd.infos[z].sprite_offset];
|
||||
MapValue *dst_mv = (MapValue *) &dst_sprite->data[sizeof(SpriteData) + sd.infos[z].mv_offset];
|
||||
for (uint y = src_sprite->height; y != 0; y--) {
|
||||
Colour *dst_rgba = dst_rgba_line + META_LENGTH;
|
||||
for (uint x = src_sprite->width; x != 0; x--) {
|
||||
if (src->a != 0) {
|
||||
dst_rgba->a = src->a;
|
||||
if (src->a != 0 && src->a != 255) has_translucency = true;
|
||||
dst_mv->m = src->m;
|
||||
if (src->m != 0) {
|
||||
/* Do some accounting for flags. */
|
||||
has_remap = true;
|
||||
if (src->m >= PALETTE_ANIM_START) has_anim = true;
|
||||
|
||||
/* Get brightest value (or default brightness if it's a black pixel). */
|
||||
const uint8 rgb_max = max(src->r, max(src->g, src->b));
|
||||
dst_mv->v = (rgb_max == 0) ? Blitter_32bppBase::DEFAULT_BRIGHTNESS : rgb_max;
|
||||
|
||||
/* Pre-convert the mapping channel to a RGB value. */
|
||||
const Colour colour = AdjustBrightneSSE(Blitter_32bppBase::LookupColourInPalette(src->m), dst_mv->v);
|
||||
dst_rgba->r = colour.r;
|
||||
dst_rgba->g = colour.g;
|
||||
dst_rgba->b = colour.b;
|
||||
} else {
|
||||
dst_rgba->r = src->r;
|
||||
dst_rgba->g = src->g;
|
||||
dst_rgba->b = src->b;
|
||||
dst_mv->v = Blitter_32bppBase::DEFAULT_BRIGHTNESS;
|
||||
}
|
||||
} else {
|
||||
dst_rgba->data = 0;
|
||||
*(uint16*) dst_mv = 0;
|
||||
}
|
||||
dst_rgba++;
|
||||
dst_mv++;
|
||||
src++;
|
||||
}
|
||||
|
||||
/* Count the number of transparent pixels from the left. */
|
||||
dst_rgba = dst_rgba_line + META_LENGTH;
|
||||
uint32 nb_pix_transp = 0;
|
||||
for (uint x = src_sprite->width; x != 0; x--) {
|
||||
if (dst_rgba->a == 0) nb_pix_transp++;
|
||||
else break;
|
||||
dst_rgba++;
|
||||
}
|
||||
(*dst_rgba_line).data = nb_pix_transp;
|
||||
|
||||
Colour *nb_right = dst_rgba_line + 1;
|
||||
dst_rgba_line = (Colour*) ((byte*) dst_rgba_line + sd.infos[z].sprite_line_size);
|
||||
|
||||
/* Count the number of transparent pixels from the right. */
|
||||
dst_rgba = dst_rgba_line - 1;
|
||||
nb_pix_transp = 0;
|
||||
for (uint x = src_sprite->width; x != 0; x--) {
|
||||
if (dst_rgba->a == 0) nb_pix_transp++;
|
||||
else break;
|
||||
dst_rgba--;
|
||||
}
|
||||
(*nb_right).data = nb_pix_transp;
|
||||
}
|
||||
}
|
||||
|
||||
/* Store sprite flags. */
|
||||
sd.flags = SF_NONE;
|
||||
if (has_translucency) sd.flags |= SF_TRANSLUCENT;
|
||||
if (!has_remap) sd.flags |= SF_NO_REMAP;
|
||||
if (!has_anim) sd.flags |= SF_NO_ANIM;
|
||||
memcpy(dst_sprite->data, &sd, sizeof(SpriteData));
|
||||
|
||||
return dst_sprite;
|
||||
}
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
@@ -1,104 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse2.hpp SSE2 32 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSE2_HPP
|
||||
#define BLITTER_32BPP_SSE2_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#ifndef SSE_VERSION
|
||||
#define SSE_VERSION 2
|
||||
#endif
|
||||
|
||||
#ifndef FULL_ANIMATION
|
||||
#define FULL_ANIMATION 0
|
||||
#endif
|
||||
|
||||
#include "32bpp_sse_type.h"
|
||||
|
||||
/** Base methods for 32bpp SSE blitters. */
|
||||
class Blitter_32bppSSE_Base {
|
||||
public:
|
||||
virtual ~Blitter_32bppSSE_Base() {}
|
||||
|
||||
struct MapValue {
|
||||
uint8 m;
|
||||
uint8 v;
|
||||
};
|
||||
assert_compile(sizeof(MapValue) == 2);
|
||||
|
||||
/** Helper for creating specialised functions for specific optimisations. */
|
||||
enum ReadMode {
|
||||
RM_WITH_SKIP, ///< Use normal code for skipping empty pixels.
|
||||
RM_WITH_MARGIN, ///< Use cached number of empty pixels at begin and end of line to reduce work.
|
||||
RM_NONE, ///< No specialisation.
|
||||
};
|
||||
|
||||
/** Helper for creating specialised functions for the case where the sprite width is odd or even. */
|
||||
enum BlockType {
|
||||
BT_EVEN, ///< An even number of pixels in the width; no need for a special case for the last pixel.
|
||||
BT_ODD, ///< An odd number of pixels in the width; special case for the last pixel.
|
||||
BT_NONE, ///< No specialisation for either case.
|
||||
};
|
||||
|
||||
/** Helper for using specialised functions designed to prevent whenever it's possible things like:
|
||||
* - IO (reading video buffer),
|
||||
* - calculations (alpha blending),
|
||||
* - heavy branching (remap lookups and animation buffer handling).
|
||||
*/
|
||||
enum SpriteFlags {
|
||||
SF_NONE = 0,
|
||||
SF_TRANSLUCENT = 1 << 1, ///< The sprite has at least 1 translucent pixel.
|
||||
SF_NO_REMAP = 1 << 2, ///< The sprite has no remappable colour pixel.
|
||||
SF_NO_ANIM = 1 << 3, ///< The sprite has no palette animated pixel.
|
||||
};
|
||||
|
||||
/** Data stored about a (single) sprite. */
|
||||
struct SpriteInfo {
|
||||
uint32 sprite_offset; ///< The offset to the sprite data.
|
||||
uint32 mv_offset; ///< The offset to the map value data.
|
||||
uint16 sprite_line_size; ///< The size of a single line (pitch).
|
||||
uint16 sprite_width; ///< The width of the sprite.
|
||||
};
|
||||
struct SpriteData {
|
||||
SpriteFlags flags;
|
||||
SpriteInfo infos[ZOOM_LVL_COUNT];
|
||||
byte data[]; ///< Data, all zoomlevels.
|
||||
};
|
||||
|
||||
Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
};
|
||||
|
||||
DECLARE_ENUM_AS_BIT_SET(Blitter_32bppSSE_Base::SpriteFlags);
|
||||
|
||||
/** The SSE2 32 bpp blitter (without palette animation). */
|
||||
class Blitter_32bppSSE2 : public Blitter_32bppSimple, public Blitter_32bppSSE_Base {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
|
||||
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
|
||||
/* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) {
|
||||
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
|
||||
}
|
||||
|
||||
/* virtual */ const char *GetName() { return "32bpp-sse2"; }
|
||||
};
|
||||
|
||||
/** Factory for the SSE2 32 bpp blitter (without palette animation). */
|
||||
class FBlitter_32bppSSE2 : public BlitterFactory {
|
||||
public:
|
||||
FBlitter_32bppSSE2() : BlitterFactory("32bpp-sse2", "32bpp SSE2 Blitter (no palette animation)", HasCPUIDFlag(1, 3, 26)) {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE2(); }
|
||||
};
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSE2_HPP */
|
||||
@@ -1,23 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse4.cpp Implementation of the SSE4 32 bpp blitter. */
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../settings_type.h"
|
||||
#include "32bpp_sse4.hpp"
|
||||
#include "32bpp_sse_func.hpp"
|
||||
|
||||
/** Instantiation of the SSE4 32bpp blitter factory. */
|
||||
static FBlitter_32bppSSE4 iFBlitter_32bppSSE4;
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
@@ -1,44 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse4.hpp SSE4 32 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSE4_HPP
|
||||
#define BLITTER_32BPP_SSE4_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#ifndef SSE_VERSION
|
||||
#define SSE_VERSION 4
|
||||
#endif
|
||||
|
||||
#ifndef FULL_ANIMATION
|
||||
#define FULL_ANIMATION 0
|
||||
#endif
|
||||
|
||||
#include "32bpp_ssse3.hpp"
|
||||
|
||||
/** The SSE4 32 bpp blitter (without palette animation). */
|
||||
class Blitter_32bppSSE4 : public Blitter_32bppSSSE3 {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
|
||||
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
/* virtual */ const char *GetName() { return "32bpp-sse4"; }
|
||||
};
|
||||
|
||||
/** Factory for the SSE4 32 bpp blitter (without palette animation). */
|
||||
class FBlitter_32bppSSE4: public BlitterFactory {
|
||||
public:
|
||||
FBlitter_32bppSSE4() : BlitterFactory("32bpp-sse4", "32bpp SSE4 Blitter (no palette animation)", HasCPUIDFlag(1, 2, 19)) {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE4(); }
|
||||
};
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSE4_HPP */
|
||||
@@ -1,455 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse_func.hpp Functions related to SSE 32 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSE_FUNC_HPP
|
||||
#define BLITTER_32BPP_SSE_FUNC_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
static inline void InsertFirstUint32(const uint32 value, __m128i &into)
|
||||
{
|
||||
#if (SSE_VERSION >= 4)
|
||||
into = _mm_insert_epi32(into, value, 0);
|
||||
#else
|
||||
into = _mm_insert_epi16(into, value, 0);
|
||||
into = _mm_insert_epi16(into, value >> 16, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void InsertSecondUint32(const uint32 value, __m128i &into)
|
||||
{
|
||||
#if (SSE_VERSION >= 4)
|
||||
into = _mm_insert_epi32(into, value, 1);
|
||||
#else
|
||||
into = _mm_insert_epi16(into, value, 2);
|
||||
into = _mm_insert_epi16(into, value >> 16, 3);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void LoadUint64(const uint64 value, __m128i &into)
|
||||
{
|
||||
#ifdef _SQ64
|
||||
into = _mm_cvtsi64_si128(value);
|
||||
#else
|
||||
#if (SSE_VERSION >= 4)
|
||||
into = _mm_cvtsi32_si128(value);
|
||||
InsertSecondUint32(value >> 32, into);
|
||||
#else
|
||||
(*(um128i*) &into).m128i_u64[0] = value;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline __m128i PackUnsaturated(__m128i from, const __m128i &mask)
|
||||
{
|
||||
#if (SSE_VERSION == 2)
|
||||
from = _mm_and_si128(from, mask); // PAND, wipe high bytes to keep low bytes when packing
|
||||
return _mm_packus_epi16(from, from); // PACKUSWB, pack 2 colours (with saturation)
|
||||
#else
|
||||
return _mm_shuffle_epi8(from, mask);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline __m128i DistributeAlpha(const __m128i from, const __m128i &mask)
|
||||
{
|
||||
#if (SSE_VERSION == 2)
|
||||
__m128i alphaAB = _mm_shufflelo_epi16(from, 0x3F); // PSHUFLW, put alpha1 in front of each rgb1
|
||||
return _mm_shufflehi_epi16(alphaAB, 0x3F); // PSHUFHW, put alpha2 in front of each rgb2
|
||||
#else
|
||||
return _mm_shuffle_epi8(from, mask);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline __m128i AlphaBlendTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &pack_mask)
|
||||
{
|
||||
__m128i srcAB = _mm_unpacklo_epi8(src, _mm_setzero_si128()); // PUNPCKLBW, expand each uint8 into uint16
|
||||
__m128i dstAB = _mm_unpacklo_epi8(dst, _mm_setzero_si128());
|
||||
|
||||
__m128i alphaAB = _mm_cmpgt_epi16(srcAB, _mm_setzero_si128()); // PCMPGTW, if (alpha > 0) a++;
|
||||
alphaAB = _mm_srli_epi16(alphaAB, 15);
|
||||
alphaAB = _mm_add_epi16(alphaAB, srcAB);
|
||||
alphaAB = DistributeAlpha(alphaAB, distribution_mask);
|
||||
|
||||
srcAB = _mm_sub_epi16(srcAB, dstAB); // PSUBW, (r - Cr)
|
||||
srcAB = _mm_mullo_epi16(srcAB, alphaAB); // PMULLW, a*(r - Cr)
|
||||
srcAB = _mm_srli_epi16(srcAB, 8); // PSRLW, a*(r - Cr)/256
|
||||
srcAB = _mm_add_epi16(srcAB, dstAB); // PADDW, a*(r - Cr)/256 + Cr
|
||||
return PackUnsaturated(srcAB, pack_mask);
|
||||
}
|
||||
|
||||
/* Darken 2 pixels.
|
||||
* rgb = rgb * ((256/4) * 4 - (alpha/4)) / ((256/4) * 4)
|
||||
*/
|
||||
static inline __m128i DarkenTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &tr_nom_base)
|
||||
{
|
||||
__m128i srcAB = _mm_unpacklo_epi8(src, _mm_setzero_si128());
|
||||
__m128i dstAB = _mm_unpacklo_epi8(dst, _mm_setzero_si128());
|
||||
__m128i alphaAB = DistributeAlpha(srcAB, distribution_mask);
|
||||
alphaAB = _mm_srli_epi16(alphaAB, 2); // Reduce to 64 levels of shades so the max value fits in 16 bits.
|
||||
__m128i nom = _mm_sub_epi16(tr_nom_base, alphaAB);
|
||||
dstAB = _mm_mullo_epi16(dstAB, nom);
|
||||
dstAB = _mm_srli_epi16(dstAB, 8);
|
||||
return _mm_packus_epi16(dstAB, dstAB);
|
||||
}
|
||||
|
||||
IGNORE_UNINITIALIZED_WARNING_START
|
||||
static Colour ReallyAdjustBrightness(Colour colour, uint8 brightness)
|
||||
{
|
||||
uint64 c16 = colour.b | (uint64) colour.g << 16 | (uint64) colour.r << 32;
|
||||
c16 *= brightness;
|
||||
uint64 c16_ob = c16; // Helps out of order execution.
|
||||
c16 /= Blitter_32bppBase::DEFAULT_BRIGHTNESS;
|
||||
c16 &= 0x01FF01FF01FFULL;
|
||||
|
||||
/* Sum overbright (maximum for each rgb is 508, 9 bits, -255 is changed in -256 so we just have to take the 8 lower bits into account). */
|
||||
c16_ob = (((c16_ob >> (8 + 7)) & 0x0100010001ULL) * 0xFF) & c16;
|
||||
const uint ob = ((uint16) c16_ob + (uint16) (c16_ob >> 16) + (uint16) (c16_ob >> 32)) / 2;
|
||||
|
||||
const uint32 alpha32 = colour.data & 0xFF000000;
|
||||
__m128i ret;
|
||||
LoadUint64(c16, ret);
|
||||
if (ob != 0) {
|
||||
__m128i ob128 = _mm_cvtsi32_si128(ob);
|
||||
ob128 = _mm_shufflelo_epi16(ob128, 0xC0);
|
||||
__m128i white = OVERBRIGHT_VALUE_MASK;
|
||||
__m128i c128 = ret;
|
||||
ret = _mm_subs_epu16(white, c128); // PSUBUSW, (255 - rgb)
|
||||
ret = _mm_mullo_epi16(ret, ob128); // PMULLW, ob*(255 - rgb)
|
||||
ret = _mm_srli_epi16(ret, 8); // PSRLW, ob*(255 - rgb)/256
|
||||
ret = _mm_add_epi16(ret, c128); // PADDW, ob*(255 - rgb)/256 + rgb
|
||||
}
|
||||
|
||||
ret = _mm_packus_epi16(ret, ret); // PACKUSWB, saturate and pack.
|
||||
return alpha32 | _mm_cvtsi128_si32(ret);
|
||||
}
|
||||
IGNORE_UNINITIALIZED_WARNING_STOP
|
||||
|
||||
/** ReallyAdjustBrightness() is not called that often.
|
||||
* Inlining this function implies a far jump, which has a huge latency.
|
||||
*/
|
||||
static inline Colour AdjustBrightneSSE(Colour colour, uint8 brightness)
|
||||
{
|
||||
/* Shortcut for normal brightness. */
|
||||
if (brightness == Blitter_32bppBase::DEFAULT_BRIGHTNESS) return colour;
|
||||
|
||||
return ReallyAdjustBrightness(colour, brightness);
|
||||
}
|
||||
|
||||
static inline __m128i AdjustBrightnessOfTwoPixels(__m128i from, uint32 brightness)
|
||||
{
|
||||
#if (SSE_VERSION < 3)
|
||||
NOT_REACHED();
|
||||
#else
|
||||
/* The following dataflow differs from the one of AdjustBrightness() only for alpha.
|
||||
* In order to keep alpha in colAB, insert a 1 in a unused brightness byte (a*1->a).
|
||||
* OK, not a 1 but DEFAULT_BRIGHTNESS to compensate the div.
|
||||
*/
|
||||
brightness &= 0xFF00FF00;
|
||||
brightness += Blitter_32bppBase::DEFAULT_BRIGHTNESS;
|
||||
|
||||
__m128i colAB = _mm_unpacklo_epi8(from, _mm_setzero_si128());
|
||||
__m128i briAB = _mm_cvtsi32_si128(brightness);
|
||||
briAB = _mm_shuffle_epi8(briAB, BRIGHTNESS_LOW_CONTROL_MASK); // DEFAULT_BRIGHTNESS in 0, 0x00 in 2.
|
||||
colAB = _mm_mullo_epi16(colAB, briAB);
|
||||
__m128i colAB_ob = _mm_srli_epi16(colAB, 8+7);
|
||||
colAB = _mm_srli_epi16(colAB, 7);
|
||||
|
||||
/* Sum overbright.
|
||||
* Maximum for each rgb is 508 => 9 bits. The highest bit tells if there is overbright.
|
||||
* -255 is changed in -256 so we just have to take the 8 lower bits into account.
|
||||
*/
|
||||
colAB = _mm_and_si128(colAB, BRIGHTNESS_DIV_CLEANER);
|
||||
colAB_ob = _mm_and_si128(colAB_ob, OVERBRIGHT_PRESENCE_MASK);
|
||||
colAB_ob = _mm_mullo_epi16(colAB_ob, OVERBRIGHT_VALUE_MASK);
|
||||
colAB_ob = _mm_and_si128(colAB_ob, colAB);
|
||||
__m128i obAB = _mm_hadd_epi16(_mm_hadd_epi16(colAB_ob, _mm_setzero_si128()), _mm_setzero_si128());
|
||||
|
||||
obAB = _mm_srli_epi16(obAB, 1); // Reduce overbright strength.
|
||||
obAB = _mm_shuffle_epi8(obAB, OVERBRIGHT_CONTROL_MASK);
|
||||
__m128i retAB = OVERBRIGHT_VALUE_MASK; // ob_mask is equal to white.
|
||||
retAB = _mm_subs_epu16(retAB, colAB); // (255 - rgb)
|
||||
retAB = _mm_mullo_epi16(retAB, obAB); // ob*(255 - rgb)
|
||||
retAB = _mm_srli_epi16(retAB, 8); // ob*(255 - rgb)/256
|
||||
retAB = _mm_add_epi16(retAB, colAB); // ob*(255 - rgb)/256 + rgb
|
||||
|
||||
return _mm_packus_epi16(retAB, retAB);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if FULL_ANIMATION == 0
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. It is templated to allow faster operation.
|
||||
*
|
||||
* @tparam mode blitter mode
|
||||
* @param bp further blitting parameters
|
||||
* @param zoom zoom level at which we are drawing
|
||||
*/
|
||||
IGNORE_UNINITIALIZED_WARNING_START
|
||||
template <BlitterMode mode, Blitter_32bppSSE2::ReadMode read_mode, Blitter_32bppSSE2::BlockType bt_last, bool translucent>
|
||||
#if (SSE_VERSION == 2)
|
||||
inline void Blitter_32bppSSE2::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
#elif (SSE_VERSION == 3)
|
||||
inline void Blitter_32bppSSSE3::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
#elif (SSE_VERSION == 4)
|
||||
inline void Blitter_32bppSSE4::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
#endif
|
||||
{
|
||||
const byte * const remap = bp->remap;
|
||||
Colour *dst_line = (Colour *) bp->dst + bp->top * bp->pitch + bp->left;
|
||||
int effective_width = bp->width;
|
||||
|
||||
/* Find where to start reading in the source sprite. */
|
||||
const SpriteData * const sd = (const SpriteData *) bp->sprite;
|
||||
const SpriteInfo * const si = &sd->infos[zoom];
|
||||
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
||||
const Colour *src_rgba_line = (const Colour *) ((const byte *) &sd->data[si->sprite_offset] + bp->skip_top * si->sprite_line_size);
|
||||
|
||||
if (read_mode != RM_WITH_MARGIN) {
|
||||
src_rgba_line += bp->skip_left;
|
||||
src_mv_line += bp->skip_left;
|
||||
}
|
||||
const MapValue *src_mv = src_mv_line;
|
||||
|
||||
/* Load these variables into register before loop. */
|
||||
#if (SSE_VERSION == 2)
|
||||
const __m128i clear_hi = CLEAR_HIGH_BYTE_MASK;
|
||||
#define ALPHA_BLEND_PARAM_1 clear_hi
|
||||
#define ALPHA_BLEND_PARAM_2 clear_hi
|
||||
#define DARKEN_PARAM_1 tr_nom_base
|
||||
#define DARKEN_PARAM_2 tr_nom_base
|
||||
#else
|
||||
const __m128i a_cm = ALPHA_CONTROL_MASK;
|
||||
const __m128i pack_low_cm = PACK_LOW_CONTROL_MASK;
|
||||
#define ALPHA_BLEND_PARAM_1 a_cm
|
||||
#define ALPHA_BLEND_PARAM_2 pack_low_cm
|
||||
#define DARKEN_PARAM_1 a_cm
|
||||
#define DARKEN_PARAM_2 tr_nom_base
|
||||
#endif
|
||||
const __m128i tr_nom_base = TRANSPARENT_NOM_BASE;
|
||||
|
||||
for (int y = bp->height; y != 0; y--) {
|
||||
Colour *dst = dst_line;
|
||||
const Colour *src = src_rgba_line + META_LENGTH;
|
||||
if (mode == BM_COLOUR_REMAP || mode == BM_CRASH_REMAP) src_mv = src_mv_line;
|
||||
|
||||
if (read_mode == RM_WITH_MARGIN) {
|
||||
assert(bt_last == BT_NONE); // or you must ensure block type is preserved
|
||||
src += src_rgba_line[0].data;
|
||||
dst += src_rgba_line[0].data;
|
||||
if (mode == BM_COLOUR_REMAP || mode == BM_CRASH_REMAP) src_mv += src_rgba_line[0].data;
|
||||
const int width_diff = si->sprite_width - bp->width;
|
||||
effective_width = bp->width - (int) src_rgba_line[0].data;
|
||||
const int delta_diff = (int) src_rgba_line[1].data - width_diff;
|
||||
const int new_width = effective_width - delta_diff;
|
||||
effective_width = delta_diff > 0 ? new_width : effective_width;
|
||||
if (effective_width <= 0) goto next_line;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
default:
|
||||
if (!translucent) {
|
||||
for (uint x = (uint) effective_width; x > 0; x--) {
|
||||
if (src->a) *dst = *src;
|
||||
src++;
|
||||
dst++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (uint x = (uint) effective_width / 2; x > 0; x--) {
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
_mm_storel_epi64((__m128i*) dst, AlphaBlendTwoPixels(srcABCD, dstABCD, ALPHA_BLEND_PARAM_1, ALPHA_BLEND_PARAM_2));
|
||||
src += 2;
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(AlphaBlendTwoPixels(srcABCD, dstABCD, ALPHA_BLEND_PARAM_1, ALPHA_BLEND_PARAM_2));
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_COLOUR_REMAP:
|
||||
#if (SSE_VERSION >= 3)
|
||||
for (uint x = (uint) effective_width / 2; x > 0; x--) {
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
uint32 mvX2 = *((uint32 *) const_cast<MapValue *>(src_mv));
|
||||
|
||||
/* Remap colours. */
|
||||
if (mvX2 & 0x00FF00FF) {
|
||||
#define CMOV_REMAP(m_colour, m_colour_init, m_src, m_m) \
|
||||
/* Written so the compiler uses CMOV. */ \
|
||||
Colour m_colour = m_colour_init; \
|
||||
{ \
|
||||
const Colour srcm = (Colour) (m_src); \
|
||||
const uint m = (byte) (m_m); \
|
||||
const uint r = remap[m]; \
|
||||
const Colour cmap = (this->LookupColourInPalette(r).data & 0x00FFFFFF) | (srcm.data & 0xFF000000); \
|
||||
m_colour = r == 0 ? m_colour : cmap; \
|
||||
m_colour = m != 0 ? m_colour : srcm; \
|
||||
}
|
||||
#ifdef _SQ64
|
||||
uint64 srcs = _mm_cvtsi128_si64(srcABCD);
|
||||
uint64 remapped_src = 0;
|
||||
CMOV_REMAP(c0, 0, srcs, mvX2);
|
||||
remapped_src = c0.data;
|
||||
CMOV_REMAP(c1, 0, srcs >> 32, mvX2 >> 16);
|
||||
remapped_src |= (uint64) c1.data << 32;
|
||||
srcABCD = _mm_cvtsi64_si128(remapped_src);
|
||||
#else
|
||||
Colour remapped_src[2];
|
||||
CMOV_REMAP(c0, 0, _mm_cvtsi128_si32(srcABCD), mvX2);
|
||||
remapped_src[0] = c0.data;
|
||||
CMOV_REMAP(c1, 0, src[1], mvX2 >> 16);
|
||||
remapped_src[1] = c1.data;
|
||||
srcABCD = _mm_loadl_epi64((__m128i*) &remapped_src);
|
||||
#endif
|
||||
|
||||
if ((mvX2 & 0xFF00FF00) != 0x80008000) srcABCD = AdjustBrightnessOfTwoPixels(srcABCD, mvX2);
|
||||
}
|
||||
|
||||
/* Blend colours. */
|
||||
_mm_storel_epi64((__m128i *) dst, AlphaBlendTwoPixels(srcABCD, dstABCD, ALPHA_BLEND_PARAM_1, ALPHA_BLEND_PARAM_2));
|
||||
dst += 2;
|
||||
src += 2;
|
||||
src_mv += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
#else
|
||||
for (uint x = (uint) effective_width; x > 0; x--) {
|
||||
#endif
|
||||
/* In case the m-channel is zero, do not remap this pixel in any way. */
|
||||
__m128i srcABCD;
|
||||
if (src_mv->m) {
|
||||
const uint r = remap[src_mv->m];
|
||||
if (r != 0) {
|
||||
Colour remapped_colour = AdjustBrightneSSE(this->LookupColourInPalette(r), src_mv->v);
|
||||
if (src->a == 255) {
|
||||
*dst = remapped_colour;
|
||||
} else {
|
||||
remapped_colour.a = src->a;
|
||||
srcABCD = _mm_cvtsi32_si128(remapped_colour.data);
|
||||
goto bmcr_alpha_blend_single;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
if (src->a < 255) {
|
||||
bmcr_alpha_blend_single:
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
srcABCD = AlphaBlendTwoPixels(srcABCD, dstABCD, ALPHA_BLEND_PARAM_1, ALPHA_BLEND_PARAM_2);
|
||||
}
|
||||
dst->data = _mm_cvtsi128_si32(srcABCD);
|
||||
}
|
||||
#if (SSE_VERSION == 2)
|
||||
src_mv++;
|
||||
dst++;
|
||||
src++;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* Make the current colour a bit more black, so it looks like this image is transparent. */
|
||||
for (uint x = (uint) bp->width / 2; x > 0; x--) {
|
||||
__m128i srcABCD = _mm_loadl_epi64((const __m128i*) src);
|
||||
__m128i dstABCD = _mm_loadl_epi64((__m128i*) dst);
|
||||
_mm_storel_epi64((__m128i *) dst, DarkenTwoPixels(srcABCD, dstABCD, DARKEN_PARAM_1, DARKEN_PARAM_2));
|
||||
src += 2;
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && bp->width & 1) || bt_last == BT_ODD) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(DarkenTwoPixels(srcABCD, dstABCD, DARKEN_PARAM_1, DARKEN_PARAM_2));
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
for (uint x = (uint) bp->width; x > 0; x--) {
|
||||
if (src_mv->m == 0) {
|
||||
if (src->a != 0) {
|
||||
uint8 g = MakeDark(src->r, src->g, src->b);
|
||||
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
|
||||
}
|
||||
} else {
|
||||
uint r = remap[src_mv->m];
|
||||
if (r != 0) *dst = ComposeColourPANoCheck(this->AdjustBrightness(this->LookupColourInPalette(r), src_mv->v), src->a, *dst);
|
||||
}
|
||||
src_mv++;
|
||||
dst++;
|
||||
src++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
next_line:
|
||||
if (mode == BM_COLOUR_REMAP || mode == BM_CRASH_REMAP) src_mv_line += si->sprite_width;
|
||||
src_rgba_line = (const Colour*) ((const byte*) src_rgba_line + si->sprite_line_size);
|
||||
dst_line += bp->pitch;
|
||||
}
|
||||
}
|
||||
IGNORE_UNINITIALIZED_WARNING_STOP
|
||||
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. Calls adequate templated function.
|
||||
*
|
||||
* @param bp further blitting parameters
|
||||
* @param mode blitter mode
|
||||
* @param zoom zoom level at which we are drawing
|
||||
*/
|
||||
#if (SSE_VERSION == 2)
|
||||
void Blitter_32bppSSE2::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
#elif (SSE_VERSION == 3)
|
||||
void Blitter_32bppSSSE3::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
#elif (SSE_VERSION == 4)
|
||||
void Blitter_32bppSSE4::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
#endif
|
||||
{
|
||||
switch (mode) {
|
||||
default: {
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_NORMAL_THRESHOLD) {
|
||||
bm_normal:
|
||||
const BlockType bt_last = (BlockType) (bp->width & 1);
|
||||
switch (bt_last) {
|
||||
default: Draw<BM_NORMAL, RM_WITH_SKIP, BT_EVEN, true>(bp, zoom); return;
|
||||
case BT_ODD: Draw<BM_NORMAL, RM_WITH_SKIP, BT_ODD, true>(bp, zoom); return;
|
||||
}
|
||||
} else {
|
||||
if (((const Blitter_32bppSSE_Base::SpriteData *) bp->sprite)->flags & SF_TRANSLUCENT) {
|
||||
Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom);
|
||||
} else {
|
||||
Draw<BM_NORMAL, RM_WITH_MARGIN, BT_NONE, false>(bp, zoom);
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case BM_COLOUR_REMAP:
|
||||
if (((const Blitter_32bppSSE_Base::SpriteData *) bp->sprite)->flags & SF_NO_REMAP) goto bm_normal;
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) {
|
||||
Draw<BM_COLOUR_REMAP, RM_WITH_SKIP, BT_NONE, true>(bp, zoom); return;
|
||||
} else {
|
||||
Draw<BM_COLOUR_REMAP, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom); return;
|
||||
}
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
}
|
||||
}
|
||||
#endif /* FULL_ANIMATION */
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSE_FUNC_HPP */
|
||||
@@ -1,56 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_sse_type.hpp Types related to SSE 32 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSE_TYPE_HPP
|
||||
#define BLITTER_32BPP_SSE_TYPE_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#include "32bpp_simple.hpp"
|
||||
#if (SSE_VERSION == 2)
|
||||
#include <emmintrin.h>
|
||||
#elif (SSE_VERSION == 3)
|
||||
#include <tmmintrin.h>
|
||||
#elif (SSE_VERSION == 4)
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
|
||||
#define META_LENGTH 2 ///< Number of uint32 inserted before each line of pixels in a sprite.
|
||||
#define MARGIN_NORMAL_THRESHOLD (zoom == ZOOM_LVL_OUT_32X ? 8 : 4) ///< Minimum width to use margins with BM_NORMAL.
|
||||
#define MARGIN_REMAP_THRESHOLD 4 ///< Minimum width to use margins with BM_COLOUR_REMAP.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define ALIGN(n) __declspec(align(n))
|
||||
#else
|
||||
#define ALIGN(n) __attribute__ ((aligned (n)))
|
||||
#endif
|
||||
|
||||
typedef union ALIGN(16) um128i {
|
||||
__m128i m128i;
|
||||
uint8 m128i_u8[16];
|
||||
uint16 m128i_u16[8];
|
||||
uint32 m128i_u32[4];
|
||||
uint64 m128i_u64[2];
|
||||
} um128i;
|
||||
|
||||
#define CLEAR_HIGH_BYTE_MASK _mm_setr_epi8(-1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0)
|
||||
#define ALPHA_CONTROL_MASK _mm_setr_epi8( 6, 7, 6, 7, 6, 7, -1, -1, 14, 15, 14, 15, 14, 15, -1, -1)
|
||||
#define PACK_LOW_CONTROL_MASK _mm_setr_epi8( 0, 2, 4, -1, 8, 10, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1)
|
||||
#define PACK_HIGH_CONTROL_MASK _mm_setr_epi8(-1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 4, -1, 8, 10, 12, -1)
|
||||
#define BRIGHTNESS_LOW_CONTROL_MASK _mm_setr_epi8( 1, 2, 1, 2, 1, 2, 0, 2, 3, 2, 3, 2, 3, 2, 0, 2)
|
||||
#define BRIGHTNESS_DIV_CLEANER _mm_setr_epi8(-1, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1, -1, 0)
|
||||
#define OVERBRIGHT_PRESENCE_MASK _mm_setr_epi8( 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0)
|
||||
#define OVERBRIGHT_VALUE_MASK _mm_setr_epi8(-1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, 0, 0)
|
||||
#define OVERBRIGHT_CONTROL_MASK _mm_setr_epi8( 0, 1, 0, 1, 0, 1, 7, 7, 2, 3, 2, 3, 2, 3, 7, 7)
|
||||
#define TRANSPARENT_NOM_BASE _mm_setr_epi16(256, 256, 256, 256, 256, 256, 256, 256)
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSE_TYPE_HPP */
|
||||
@@ -1,23 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_ssse3.cpp Implementation of the SSSE3 32 bpp blitter. */
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../settings_type.h"
|
||||
#include "32bpp_ssse3.hpp"
|
||||
#include "32bpp_sse_func.hpp"
|
||||
|
||||
/** Instantiation of the SSSE3 32bpp blitter factory. */
|
||||
static FBlitter_32bppSSSE3 iFBlitter_32bppSSSE3;
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
@@ -1,44 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_ssse3.hpp SSSE3 32 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_32BPP_SSSE3_HPP
|
||||
#define BLITTER_32BPP_SSSE3_HPP
|
||||
|
||||
#ifdef WITH_SSE
|
||||
|
||||
#ifndef SSE_VERSION
|
||||
#define SSE_VERSION 3
|
||||
#endif
|
||||
|
||||
#ifndef FULL_ANIMATION
|
||||
#define FULL_ANIMATION 0
|
||||
#endif
|
||||
|
||||
#include "32bpp_sse2.hpp"
|
||||
|
||||
/** The SSSE3 32 bpp blitter (without palette animation). */
|
||||
class Blitter_32bppSSSE3 : public Blitter_32bppSSE2 {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
|
||||
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
/* virtual */ const char *GetName() { return "32bpp-ssse3"; }
|
||||
};
|
||||
|
||||
/** Factory for the SSSE3 32 bpp blitter (without palette animation). */
|
||||
class FBlitter_32bppSSSE3: public BlitterFactory {
|
||||
public:
|
||||
FBlitter_32bppSSSE3() : BlitterFactory("32bpp-ssse3", "32bpp SSSE3 Blitter (no palette animation)", HasCPUIDFlag(1, 2, 9)) {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSSE3(); }
|
||||
};
|
||||
|
||||
#endif /* WITH_SSE */
|
||||
#endif /* BLITTER_32BPP_SSSE3_HPP */
|
||||
@@ -83,8 +83,7 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
|
||||
width -= pixels;
|
||||
|
||||
switch (mode) {
|
||||
case BM_COLOUR_REMAP:
|
||||
case BM_CRASH_REMAP: {
|
||||
case BM_COLOUR_REMAP: {
|
||||
const uint8 *remap = bp->remap;
|
||||
do {
|
||||
uint m = remap[*src];
|
||||
|
||||
@@ -31,9 +31,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the 8bpp blitter optimised for speed. */
|
||||
class FBlitter_8bppOptimized : public BlitterFactory {
|
||||
class FBlitter_8bppOptimized : public BlitterFactory<FBlitter_8bppOptimized> {
|
||||
public:
|
||||
FBlitter_8bppOptimized() : BlitterFactory("8bpp-optimized", "8bpp Optimized Blitter (compression + all-ZoomLevel cache)") {}
|
||||
/* virtual */ const char *GetName() { return "8bpp-optimized"; }
|
||||
/* virtual */ const char *GetDescription() { return "8bpp Optimized Blitter (compression + all-ZoomLevel cache)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_8bppOptimized(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
|
||||
|
||||
switch (mode) {
|
||||
case BM_COLOUR_REMAP:
|
||||
case BM_CRASH_REMAP:
|
||||
colour = bp->remap[*src];
|
||||
break;
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the most trivial 8bpp blitter. */
|
||||
class FBlitter_8bppSimple : public BlitterFactory {
|
||||
class FBlitter_8bppSimple : public BlitterFactory<FBlitter_8bppSimple> {
|
||||
public:
|
||||
FBlitter_8bppSimple() : BlitterFactory("8bpp-simple", "8bpp Simple Blitter (relative slow, but never wrong)") {}
|
||||
/* virtual */ const char *GetName() { return "8bpp-simple"; }
|
||||
/* virtual */ const char *GetDescription() { return "8bpp Simple Blitter (relative slow, but never wrong)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_8bppSimple(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ enum BlitterMode {
|
||||
BM_NORMAL, ///< Perform the simple blitting.
|
||||
BM_COLOUR_REMAP, ///< Perform a colour remapping.
|
||||
BM_TRANSPARENT, ///< Perform transparency colour remapping.
|
||||
BM_CRASH_REMAP, ///< Perform a crash remapping.
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+43
-60
@@ -25,12 +25,11 @@ bool QZ_CanDisplay8bpp();
|
||||
/**
|
||||
* The base factory, keeping track of all blitters.
|
||||
*/
|
||||
class BlitterFactory {
|
||||
class BlitterFactoryBase {
|
||||
private:
|
||||
const char *name; ///< The name of the blitter factory.
|
||||
const char *description; ///< The description of the blitter.
|
||||
const char *name; ///< The name of the blitter factory.
|
||||
|
||||
typedef std::map<const char *, BlitterFactory *, StringCompare> Blitters; ///< Map of blitter factories.
|
||||
typedef std::map<const char *, BlitterFactoryBase *, StringCompare> Blitters; ///< Map of blitter factories.
|
||||
|
||||
/**
|
||||
* Get the map with currently known blitters.
|
||||
@@ -54,38 +53,32 @@ private:
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Construct the blitter, and register it.
|
||||
* @param name The name of the blitter.
|
||||
* @param description A longer description for the blitter.
|
||||
* @param usable Whether the blitter is usable (on the current computer). For example for disabling SSE blitters when the CPU can't handle them.
|
||||
* @pre name != NULL.
|
||||
* @pre description != NULL.
|
||||
* @pre There is no blitter registered with this name.
|
||||
* Register a blitter internally, based on his name.
|
||||
* @param name the name of the blitter.
|
||||
* @note an assert() will be trigger if 2 blitters with the same name try to register.
|
||||
*/
|
||||
BlitterFactory(const char *name, const char *description, bool usable = true) :
|
||||
name(strdup(name)), description(strdup(description))
|
||||
void RegisterBlitter(const char *name)
|
||||
{
|
||||
if (usable) {
|
||||
/*
|
||||
* Only add when the blitter is usable. Do not bail out or
|
||||
* do more special things since the blitters are always
|
||||
* instantiated upon start anyhow and freed upon shutdown.
|
||||
*/
|
||||
std::pair<Blitters::iterator, bool> P = GetBlitters().insert(Blitters::value_type(this->name, this));
|
||||
assert(P.second);
|
||||
} else {
|
||||
DEBUG(driver, 1, "Not registering blitter %s as it is not usable", name);
|
||||
}
|
||||
/* Don't register nameless Blitters */
|
||||
if (name == NULL) return;
|
||||
|
||||
this->name = strdup(name);
|
||||
|
||||
std::pair<Blitters::iterator, bool> P = GetBlitters().insert(Blitters::value_type(name, this));
|
||||
assert(P.second);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~BlitterFactory()
|
||||
BlitterFactoryBase() :
|
||||
name(NULL)
|
||||
{}
|
||||
|
||||
virtual ~BlitterFactoryBase()
|
||||
{
|
||||
if (this->name == NULL) return;
|
||||
GetBlitters().erase(this->name);
|
||||
if (GetBlitters().empty()) delete &GetBlitters();
|
||||
|
||||
free(this->name);
|
||||
free(this->description);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,24 +87,6 @@ public:
|
||||
* @post Sets the blitter so GetCurrentBlitter() returns it too.
|
||||
*/
|
||||
static Blitter *SelectBlitter(const char *name)
|
||||
{
|
||||
BlitterFactory *b = GetBlitterFactory(name);
|
||||
if (b == NULL) return NULL;
|
||||
|
||||
Blitter *newb = b->CreateInstance();
|
||||
delete *GetActiveBlitter();
|
||||
*GetActiveBlitter() = newb;
|
||||
|
||||
DEBUG(driver, 1, "Successfully %s blitter '%s'", StrEmpty(name) ? "probed" : "loaded", newb->GetName());
|
||||
return newb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blitter factory with the given name.
|
||||
* @param name the blitter factory to select.
|
||||
* @return The blitter factory, or NULL when there isn't one with the wanted name.
|
||||
*/
|
||||
static BlitterFactory *GetBlitterFactory(const char *name)
|
||||
{
|
||||
#if defined(DEDICATED)
|
||||
const char *default_blitter = "null";
|
||||
@@ -133,9 +108,14 @@ public:
|
||||
|
||||
Blitters::iterator it = GetBlitters().begin();
|
||||
for (; it != GetBlitters().end(); it++) {
|
||||
BlitterFactory *b = (*it).second;
|
||||
BlitterFactoryBase *b = (*it).second;
|
||||
if (strcasecmp(bname, b->name) == 0) {
|
||||
return b;
|
||||
Blitter *newb = b->CreateInstance();
|
||||
delete *GetActiveBlitter();
|
||||
*GetActiveBlitter() = newb;
|
||||
|
||||
DEBUG(driver, 1, "Successfully %s blitter '%s'", StrEmpty(name) ? "probed" : "loaded", bname);
|
||||
return newb;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
@@ -160,7 +140,7 @@ public:
|
||||
p += seprintf(p, last, "List of blitters:\n");
|
||||
Blitters::iterator it = GetBlitters().begin();
|
||||
for (; it != GetBlitters().end(); it++) {
|
||||
BlitterFactory *b = (*it).second;
|
||||
BlitterFactoryBase *b = (*it).second;
|
||||
p += seprintf(p, last, "%18s: %s\n", b->name, b->GetDescription());
|
||||
}
|
||||
p += seprintf(p, last, "\n");
|
||||
@@ -168,21 +148,10 @@ public:
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the long, human readable, name for the Blitter-class.
|
||||
*/
|
||||
const char *GetName() const
|
||||
{
|
||||
return this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a nice description of the blitter-class.
|
||||
*/
|
||||
const char *GetDescription() const
|
||||
{
|
||||
return this->description;
|
||||
}
|
||||
virtual const char *GetDescription() = 0;
|
||||
|
||||
/**
|
||||
* Create an instance of this Blitter-class.
|
||||
@@ -190,6 +159,20 @@ public:
|
||||
virtual Blitter *CreateInstance() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* A template factory, so ->GetName() works correctly. This because else some compiler will complain.
|
||||
*/
|
||||
template <class T>
|
||||
class BlitterFactory : public BlitterFactoryBase {
|
||||
public:
|
||||
BlitterFactory() { this->RegisterBlitter(((T *)this)->GetName()); }
|
||||
|
||||
/**
|
||||
* Get the long, human readable, name for the Blitter-class.
|
||||
*/
|
||||
const char *GetName();
|
||||
};
|
||||
|
||||
extern char *_ini_blitter;
|
||||
extern bool _blitter_autodetected;
|
||||
|
||||
|
||||
@@ -38,9 +38,10 @@ public:
|
||||
};
|
||||
|
||||
/** Factory for the blitter that does nothing. */
|
||||
class FBlitter_Null : public BlitterFactory {
|
||||
class FBlitter_Null : public BlitterFactory<FBlitter_Null> {
|
||||
public:
|
||||
FBlitter_Null() : BlitterFactory("null", "Null Blitter (does nothing)") {}
|
||||
/* virtual */ const char *GetName() { return "null"; }
|
||||
/* virtual */ const char *GetDescription() { return "Null Blitter (does nothing)"; }
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_Null(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ bool HandleBootstrap()
|
||||
if (BaseGraphics::GetUsedSet() != NULL) return true;
|
||||
|
||||
/* No user interface, bail out with an error. */
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() == 0) goto failure;
|
||||
if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0) goto failure;
|
||||
|
||||
/* If there is no network or no freetype, then there is nothing we can do. Go straight to failure. */
|
||||
#if defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) && (defined(WITH_FONTCONFIG) || defined(WIN32) || defined(__APPLE__))
|
||||
@@ -244,7 +244,7 @@ bool HandleBootstrap()
|
||||
new BootstrapAskForDownloadWindow();
|
||||
|
||||
/* Process the user events. */
|
||||
VideoDriver::GetInstance()->MainLoop();
|
||||
_video_driver->MainLoop();
|
||||
|
||||
/* _exit_game is used to get out of the video driver's main loop.
|
||||
* In case GM_BOOTSTRAP is still set we did not exit it via the
|
||||
|
||||
@@ -772,14 +772,13 @@ static uint ShowAdditionalText(int left, int right, int y, EngineID engine)
|
||||
{
|
||||
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ADDITIONAL_TEXT, 0, 0, engine, NULL);
|
||||
if (callback == CALLBACK_FAILED || callback == 0x400) return y;
|
||||
const GRFFile *grffile = Engine::Get(engine)->GetGRF();
|
||||
if (callback > 0x400) {
|
||||
ErrorUnknownCallbackResult(grffile->grfid, CBID_VEHICLE_ADDITIONAL_TEXT, callback);
|
||||
ErrorUnknownCallbackResult(Engine::Get(engine)->GetGRFID(), CBID_VEHICLE_ADDITIONAL_TEXT, callback);
|
||||
return y;
|
||||
}
|
||||
|
||||
StartTextRefStackUsage(grffile, 6);
|
||||
uint result = DrawStringMultiLine(left, right, y, INT32_MAX, GetGRFStringID(grffile->grfid, 0xD000 + callback), TC_BLACK);
|
||||
StartTextRefStackUsage(6);
|
||||
uint result = DrawStringMultiLine(left, right, y, INT32_MAX, GetGRFStringID(Engine::Get(engine)->GetGRFID(), 0xD000 + callback), TC_BLACK);
|
||||
StopTextRefStackUsage();
|
||||
return result;
|
||||
}
|
||||
|
||||
+2
-1
@@ -224,7 +224,8 @@ bool VehicleCargoReroute::operator()(CargoPacket *cp)
|
||||
}
|
||||
if (this->source != this->destination) {
|
||||
this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count());
|
||||
this->destination->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER);
|
||||
this->source->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER);
|
||||
this->destination->action_counts[VehicleCargoList::MTA_TRANSFER] += cp_new->Count();
|
||||
}
|
||||
|
||||
/* Legal, as front pushing doesn't invalidate iterators in std::list. */
|
||||
|
||||
+10
-48
@@ -544,54 +544,17 @@ void VehicleCargoList::InvalidateCache()
|
||||
|
||||
/**
|
||||
* Moves some cargo from one designation to another. You can only move
|
||||
* between adjacent designations. E.g. you can keep cargo that was previously
|
||||
* reserved (MTA_LOAD), but you can't reserve cargo that's marked as to be
|
||||
* delivered. Furthermore, as this method doesn't change the actual packets,
|
||||
* you cannot move cargo from or to MTA_TRANSFER. You need a specialized
|
||||
* template method for that.
|
||||
* @tparam from Previous designation of cargo.
|
||||
* @tparam to New designation of cargo.
|
||||
* @param max_move Maximum amount of cargo to reassign.
|
||||
* @return Amount of cargo actually reassigned.
|
||||
* between adjacent designations. E.g. you can keep cargo that was
|
||||
* previously reserved (MTA_LOAD) or you can mark cargo to be transferred
|
||||
* that was previously marked as to be delivered, but you can't reserve
|
||||
* cargo that's marked as to be delivered.
|
||||
*/
|
||||
template<VehicleCargoList::MoveToAction Tfrom, VehicleCargoList::MoveToAction Tto>
|
||||
uint VehicleCargoList::Reassign(uint max_move, TileOrStationID)
|
||||
uint VehicleCargoList::Reassign(uint max_move, MoveToAction from, MoveToAction to)
|
||||
{
|
||||
assert_tcompile(Tfrom != MTA_TRANSFER && Tto != MTA_TRANSFER);
|
||||
assert_tcompile(Tfrom - Tto == 1 || Tto - Tfrom == 1);
|
||||
max_move = min(this->action_counts[Tfrom], max_move);
|
||||
this->action_counts[Tfrom] -= max_move;
|
||||
this->action_counts[Tto] += max_move;
|
||||
return max_move;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassign cargo from MTA_DELIVER to MTA_TRANSFER and take care of the next
|
||||
* station the cargo wants to visit.
|
||||
* @param max_move Maximum amount of cargo to reassign.
|
||||
* @param next_station Station to record as next hop in the reassigned packets.
|
||||
* @return Amount of cargo actually reassigned.
|
||||
*/
|
||||
template<>
|
||||
uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER>(uint max_move, TileOrStationID next_station)
|
||||
{
|
||||
max_move = min(this->action_counts[MTA_DELIVER], max_move);
|
||||
|
||||
uint sum = 0;
|
||||
for (Iterator it(this->packets.begin()); sum < this->action_counts[MTA_TRANSFER] + max_move;) {
|
||||
CargoPacket *cp = *it++;
|
||||
sum += cp->Count();
|
||||
if (sum <= this->action_counts[MTA_TRANSFER]) continue;
|
||||
if (sum > this->action_counts[MTA_TRANSFER] + max_move) {
|
||||
CargoPacket *cp_split = cp->Split(sum - this->action_counts[MTA_TRANSFER] + max_move);
|
||||
sum -= cp_split->Count();
|
||||
this->packets.insert(it, cp_split);
|
||||
}
|
||||
cp->next_station = next_station;
|
||||
}
|
||||
|
||||
this->action_counts[MTA_DELIVER] -= max_move;
|
||||
this->action_counts[MTA_TRANSFER] += max_move;
|
||||
max_move = min(this->action_counts[from], max_move);
|
||||
assert(Delta((int)from, (int)to) == 1);
|
||||
this->action_counts[from] -= max_move;
|
||||
this->action_counts[to] += max_move;
|
||||
return max_move;
|
||||
}
|
||||
|
||||
@@ -843,7 +806,7 @@ uint StationCargoList::Load(uint max_move, VehicleCargoList *dest, TileIndex loa
|
||||
uint move = min(dest->ActionCount(VehicleCargoList::MTA_LOAD), max_move);
|
||||
if (move > 0) {
|
||||
this->reserved_count -= move;
|
||||
dest->Reassign<VehicleCargoList::MTA_LOAD, VehicleCargoList::MTA_KEEP>(move);
|
||||
dest->Reassign(move, VehicleCargoList::MTA_LOAD, VehicleCargoList::MTA_KEEP);
|
||||
return move;
|
||||
} else {
|
||||
return this->ShiftCargo(CargoLoad(this, dest, max_move, load_place), next_station, true);
|
||||
@@ -868,4 +831,3 @@ uint StationCargoList::Reroute(uint max_move, StationCargoList *dest, StationID
|
||||
*/
|
||||
template class CargoList<VehicleCargoList, CargoPacketList>;
|
||||
template class CargoList<StationCargoList, StationCargoPacketMap>;
|
||||
template uint VehicleCargoList::Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP>(uint, TileOrStationID);
|
||||
|
||||
+1
-2
@@ -429,8 +429,7 @@ public:
|
||||
* amount of cargo to be moved. Second parameter is destination (if
|
||||
* applicable), return value is amount of cargo actually moved. */
|
||||
|
||||
template<MoveToAction Tfrom, MoveToAction Tto>
|
||||
uint Reassign(uint max_move, TileOrStationID update = INVALID_TILE);
|
||||
uint Reassign(uint max_move, MoveToAction from, MoveToAction to);
|
||||
uint Return(uint max_move, StationCargoList *dest, StationID next_station);
|
||||
uint Unload(uint max_move, StationCargoList *dest, CargoPayment *payment);
|
||||
uint Shift(uint max_move, VehicleCargoList *dest);
|
||||
|
||||
+14
-22
@@ -160,10 +160,8 @@ CommandProc CmdCreateStoryPage;
|
||||
CommandProc CmdCreateStoryPageElement;
|
||||
CommandProc CmdUpdateStoryPageElement;
|
||||
CommandProc CmdSetStoryPageTitle;
|
||||
CommandProc CmdSetStoryPageDate;
|
||||
CommandProc CmdShowStoryPage;
|
||||
CommandProc CmdRemoveStoryPage;
|
||||
CommandProc CmdRemoveStoryPageElement;
|
||||
|
||||
CommandProc CmdLevelLand;
|
||||
|
||||
@@ -314,10 +312,8 @@ static const Command _command_proc_table[] = {
|
||||
DEF_CMD(CmdCreateStoryPageElement, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_CREATE_STORY_PAGE_ELEMENT
|
||||
DEF_CMD(CmdUpdateStoryPageElement, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_UPDATE_STORY_PAGE_ELEMENT
|
||||
DEF_CMD(CmdSetStoryPageTitle, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SET_STORY_PAGE_TITLE
|
||||
DEF_CMD(CmdSetStoryPageDate, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SET_STORY_PAGE_DATE
|
||||
DEF_CMD(CmdShowStoryPage, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_SHOW_STORY_PAGE
|
||||
DEF_CMD(CmdRemoveStoryPage, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_PAGE
|
||||
DEF_CMD(CmdRemoveStoryPageElement, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_ELEMENT_PAGE
|
||||
DEF_CMD(CmdRemoveStoryPage, CMD_STR_CTRL | CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_STORY_PAGE
|
||||
|
||||
DEF_CMD(CmdLevelLand, CMD_ALL_TILES | CMD_NO_TEST | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_LEVEL_LAND; test run might clear tiles multiple times, in execution that only happens once
|
||||
|
||||
@@ -575,7 +571,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
||||
/* Only show the error when it's for us. */
|
||||
StringID error_part1 = GB(cmd, 16, 16);
|
||||
if (estimate_only || (IsLocalCompany() && error_part1 != 0 && my_cmd)) {
|
||||
ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y, res.GetTextRefStackGRF(), res.GetTextRefStackSize(), res.GetTextRefStack());
|
||||
ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y, res.GetTextRefStackSize(), res.GetTextRefStack());
|
||||
}
|
||||
} else if (estimate_only) {
|
||||
ShowEstimatedCostOrIncome(res.GetCost(), x, y);
|
||||
@@ -601,7 +597,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
||||
* @param cmd the command cost to return.
|
||||
* @param clear whether to keep the storage changes or not.
|
||||
*/
|
||||
#define return_dcpi(cmd) { _docommand_recursive = 0; return cmd; }
|
||||
#define return_dcpi(cmd, clear) { _docommand_recursive = 0; ClearPersistentStorageChanges(clear); return cmd; }
|
||||
|
||||
/*!
|
||||
* Helper function for the toplevel network safe docommand function for the current company.
|
||||
@@ -645,7 +641,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
#endif
|
||||
|
||||
/* Do not even think about executing out-of-bounds tile-commands */
|
||||
if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (cmd_flags & CMD_ALL_TILES) == 0))) return_dcpi(CMD_ERROR);
|
||||
if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (cmd_flags & CMD_ALL_TILES) == 0))) return_dcpi(CMD_ERROR, false);
|
||||
|
||||
/* Always execute server and spectator commands as spectator */
|
||||
bool exec_as_spectator = (cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) != 0;
|
||||
@@ -654,7 +650,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
* The server will ditch any server commands a client sends to it, so effectively
|
||||
* this guards the server from executing functions for an invalid company. */
|
||||
if (_game_mode == GM_NORMAL && !exec_as_spectator && !Company::IsValidID(_current_company) && !(_current_company == OWNER_DEITY && (cmd_flags & CMD_DEITY) != 0)) {
|
||||
return_dcpi(CMD_ERROR);
|
||||
return_dcpi(CMD_ERROR, false);
|
||||
}
|
||||
|
||||
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
|
||||
@@ -665,9 +661,8 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
/* Test the command. */
|
||||
_cleared_object_areas.Clear();
|
||||
SetTownRatingTestMode(true);
|
||||
BasePersistentStorageArray::SwitchMode(PSM_ENTER_TESTMODE);
|
||||
ClearPersistentStorageChanges(false);
|
||||
CommandCost res = proc(tile, flags, p1, p2, text);
|
||||
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_TESTMODE);
|
||||
SetTownRatingTestMode(false);
|
||||
|
||||
/* Make sure we're not messing things up here. */
|
||||
@@ -686,7 +681,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
DEBUG(desync, 1, "cmdf: %08x; %02x; %02x; %06x; %08x; %08x; %08x; \"%s\" (%s)", _date, _date_fract, (int)_current_company, tile, p1, p2, cmd & ~CMD_NETWORK_COMMAND, text, GetCommandName(cmd));
|
||||
}
|
||||
cur_company.Restore();
|
||||
return_dcpi(res);
|
||||
return_dcpi(res, false);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NETWORK
|
||||
@@ -702,7 +697,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
* This way it's not handled by DoCommand and only the
|
||||
* actual execution of the command causes messages. Also
|
||||
* reset the storages as we've not executed the command. */
|
||||
return_dcpi(CommandCost());
|
||||
return_dcpi(CommandCost(), false);
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
DEBUG(desync, 1, "cmd: %08x; %02x; %02x; %06x; %08x; %08x; %08x; \"%s\" (%s)", _date, _date_fract, (int)_current_company, tile, p1, p2, cmd & ~CMD_NETWORK_COMMAND, text, GetCommandName(cmd));
|
||||
@@ -710,9 +705,8 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
/* Actually try and execute the command. If no cost-type is given
|
||||
* use the construction one */
|
||||
_cleared_object_areas.Clear();
|
||||
BasePersistentStorageArray::SwitchMode(PSM_ENTER_COMMAND);
|
||||
ClearPersistentStorageChanges(false);
|
||||
CommandCost res2 = proc(tile, flags | DC_EXEC, p1, p2, text);
|
||||
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_COMMAND);
|
||||
|
||||
if (cmd_id == CMD_COMPANY_CTRL) {
|
||||
cur_company.Trash();
|
||||
@@ -733,7 +727,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
if (!test_and_exec_can_differ) {
|
||||
assert(res.GetCost() == res2.GetCost() && res.Failed() == res2.Failed()); // sanity check
|
||||
} else if (res2.Failed()) {
|
||||
return_dcpi(res2);
|
||||
return_dcpi(res2, false);
|
||||
}
|
||||
|
||||
/* If we're needing more money and we haven't done
|
||||
@@ -743,7 +737,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
* So make sure the signal buffer is empty even in this case */
|
||||
UpdateSignalsInBuffer();
|
||||
SetDParam(0, _additional_cash_required);
|
||||
return_dcpi(CommandCost(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY));
|
||||
return_dcpi(CommandCost(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY), false);
|
||||
}
|
||||
|
||||
/* update last build coordinate of company. */
|
||||
@@ -757,7 +751,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
|
||||
/* update signals if needed */
|
||||
UpdateSignalsInBuffer();
|
||||
|
||||
return_dcpi(res2);
|
||||
return_dcpi(res2, true);
|
||||
}
|
||||
#undef return_dcpi
|
||||
|
||||
@@ -785,15 +779,13 @@ uint32 CommandCost::textref_stack[16];
|
||||
|
||||
/**
|
||||
* Activate usage of the NewGRF #TextRefStack for the error message.
|
||||
* @param grffile NewGRF that provides the #TextRefStack
|
||||
* @param num_registers number of entries to copy from the temporary NewGRF registers
|
||||
* @param number of entries to copy from the temporary NewGRF registers
|
||||
*/
|
||||
void CommandCost::UseTextRefStack(const GRFFile *grffile, uint num_registers)
|
||||
void CommandCost::UseTextRefStack(uint num_registers)
|
||||
{
|
||||
extern TemporaryStorageArray<int32, 0x110> _temp_store;
|
||||
|
||||
assert(num_registers < lengthof(textref_stack));
|
||||
this->textref_stack_grffile = grffile;
|
||||
this->textref_stack_size = num_registers;
|
||||
for (uint i = 0; i < num_registers; i++) {
|
||||
textref_stack[i] = _temp_store.GetValue(0x100 + i);
|
||||
|
||||
+5
-19
@@ -16,8 +16,6 @@
|
||||
#include "strings_type.h"
|
||||
#include "tile_type.h"
|
||||
|
||||
struct GRFFile;
|
||||
|
||||
/**
|
||||
* Common return value for all commands. Wraps the cost and
|
||||
* a possible error message/state together.
|
||||
@@ -27,7 +25,6 @@ class CommandCost {
|
||||
Money cost; ///< The cost of this action
|
||||
StringID message; ///< Warning message for when success is unset
|
||||
bool success; ///< Whether the comment went fine up to this moment
|
||||
const GRFFile *textref_stack_grffile; ///< NewGRF providing the #TextRefStack content.
|
||||
uint textref_stack_size; ///< Number of uint32 values to put on the #TextRefStack for the error message.
|
||||
|
||||
static uint32 textref_stack[16];
|
||||
@@ -36,25 +33,25 @@ public:
|
||||
/**
|
||||
* Creates a command cost return with no cost and no error
|
||||
*/
|
||||
CommandCost() : expense_type(INVALID_EXPENSES), cost(0), message(INVALID_STRING_ID), success(true), textref_stack_grffile(NULL), textref_stack_size(0) {}
|
||||
CommandCost() : expense_type(INVALID_EXPENSES), cost(0), message(INVALID_STRING_ID), success(true), textref_stack_size(0) {}
|
||||
|
||||
/**
|
||||
* Creates a command return value the is failed with the given message
|
||||
*/
|
||||
explicit CommandCost(StringID msg) : expense_type(INVALID_EXPENSES), cost(0), message(msg), success(false), textref_stack_grffile(NULL), textref_stack_size(0) {}
|
||||
explicit CommandCost(StringID msg) : expense_type(INVALID_EXPENSES), cost(0), message(msg), success(false), textref_stack_size(0) {}
|
||||
|
||||
/**
|
||||
* Creates a command cost with given expense type and start cost of 0
|
||||
* @param ex_t the expense type
|
||||
*/
|
||||
explicit CommandCost(ExpensesType ex_t) : expense_type(ex_t), cost(0), message(INVALID_STRING_ID), success(true), textref_stack_grffile(NULL), textref_stack_size(0) {}
|
||||
explicit CommandCost(ExpensesType ex_t) : expense_type(ex_t), cost(0), message(INVALID_STRING_ID), success(true), textref_stack_size(0) {}
|
||||
|
||||
/**
|
||||
* Creates a command return value with the given start cost and expense type
|
||||
* @param ex_t the expense type
|
||||
* @param cst the initial cost of this command
|
||||
*/
|
||||
CommandCost(ExpensesType ex_t, const Money &cst) : expense_type(ex_t), cost(cst), message(INVALID_STRING_ID), success(true), textref_stack_grffile(NULL), textref_stack_size(0) {}
|
||||
CommandCost(ExpensesType ex_t, const Money &cst) : expense_type(ex_t), cost(cst), message(INVALID_STRING_ID), success(true), textref_stack_size(0) {}
|
||||
|
||||
|
||||
/**
|
||||
@@ -106,16 +103,7 @@ public:
|
||||
this->message = message;
|
||||
}
|
||||
|
||||
void UseTextRefStack(const GRFFile *grffile, uint num_registers);
|
||||
|
||||
/**
|
||||
* Returns the NewGRF providing the #TextRefStack of the error message.
|
||||
* @return the NewGRF.
|
||||
*/
|
||||
const GRFFile *GetTextRefStackGRF() const
|
||||
{
|
||||
return this->textref_stack_grffile;
|
||||
}
|
||||
void UseTextRefStack(uint num_registers);
|
||||
|
||||
/**
|
||||
* Returns the number of uint32 values for the #TextRefStack of the error message.
|
||||
@@ -288,10 +276,8 @@ enum Commands {
|
||||
CMD_CREATE_STORY_PAGE_ELEMENT, ///< create a new story page element
|
||||
CMD_UPDATE_STORY_PAGE_ELEMENT, ///< update a story page element
|
||||
CMD_SET_STORY_PAGE_TITLE, ///< update title of a story page
|
||||
CMD_SET_STORY_PAGE_DATE, ///< update date of a story page
|
||||
CMD_SHOW_STORY_PAGE, ///< show a story page
|
||||
CMD_REMOVE_STORY_PAGE, ///< remove a story page
|
||||
CMD_REMOVE_STORY_PAGE_ELEMENT, ///< remove a story page element
|
||||
CMD_LEVEL_LAND, ///< level land
|
||||
|
||||
CMD_BUILD_LOCK, ///< build a lock
|
||||
|
||||
+45
-7
@@ -853,21 +853,59 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
NetworkServerNewCompany(c, ci);
|
||||
if (_network_server) {
|
||||
if (ci != NULL) {
|
||||
/* ci is only NULL when replaying.
|
||||
* When replaying no client is actually in need of an update. */
|
||||
ci->client_playas = c->index;
|
||||
NetworkUpdateClientInfo(ci->client_id);
|
||||
}
|
||||
|
||||
if (Company::IsValidID(c->index)) {
|
||||
_network_company_states[c->index].months_empty = 0;
|
||||
_network_company_states[c->index].password[0] = '\0';
|
||||
NetworkServerUpdateCompanyPassworded(c->index, false);
|
||||
|
||||
/* XXX - When a client joins, we automatically set its name to the
|
||||
* client's name (for some reason). As it stands now only the server
|
||||
* knows the client's name, so it needs to send out a "broadcast" to
|
||||
* do this. To achieve this we send a network command. However, it
|
||||
* uses _local_company to execute the command as. To prevent abuse
|
||||
* (eg. only yourself can change your name/company), we 'cheat' by
|
||||
* impersonation _local_company as the server. Not the best solution;
|
||||
* but it works.
|
||||
* TODO: Perhaps this could be improved by when the client is ready
|
||||
* with joining to let it send itself the command, and not the server?
|
||||
* For example in network_client.c:534? */
|
||||
if (ci != NULL) {
|
||||
/* ci is only NULL when replaying.
|
||||
* When replaying, the command to rename the president will
|
||||
* automatically be ran, so this is not even needed to get
|
||||
* the exact same state. */
|
||||
NetworkSendCommand(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, c->index);
|
||||
}
|
||||
}
|
||||
|
||||
/* Announce new company on network. */
|
||||
NetworkAdminCompanyInfo(c, true);
|
||||
|
||||
if (ci != NULL) {
|
||||
/* ci is only NULL when replaying.
|
||||
* When replaying, the message that someone started a new company
|
||||
* is not interesting at all. */
|
||||
NetworkServerSendChat(NETWORK_ACTION_COMPANY_NEW, DESTTYPE_BROADCAST, 0, "", ci->client_id, c->index + 1);
|
||||
}
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
break;
|
||||
}
|
||||
|
||||
case 1: { // Make a new AI company
|
||||
case 1: // Make a new AI company
|
||||
if (!(flags & DC_EXEC)) return CommandCost();
|
||||
|
||||
if (company_id != INVALID_COMPANY && (company_id >= MAX_COMPANIES || Company::IsValidID(company_id))) return CMD_ERROR;
|
||||
Company *c = DoStartupNewCompany(true, company_id);
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (c != NULL) NetworkServerNewCompany(c, NULL);
|
||||
#endif /* ENABLE_NETWORK */
|
||||
DoStartupNewCompany(true, company_id);
|
||||
break;
|
||||
}
|
||||
|
||||
case 2: { // Delete a company
|
||||
CompanyRemoveReason reason = (CompanyRemoveReason)GB(p2, 0, 2);
|
||||
|
||||
+1
-1
@@ -2013,7 +2013,7 @@ struct CompanyWindow : Window
|
||||
NWidgetStacked *wi = this->GetWidget<NWidgetStacked>(WID_C_SELECT_BUTTONS);
|
||||
if (plane != wi->shown_plane) {
|
||||
wi->SetDisplayedPlane(plane);
|
||||
this->InvalidateData();
|
||||
this->SetDirty();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -475,7 +475,7 @@ void IConsoleCmdExec(const char *cmdstr)
|
||||
DEBUG(console, 8, "Token %d is: '%s'", i, tokens[i]);
|
||||
}
|
||||
|
||||
if (StrEmpty(tokens[0])) return; // don't execute empty commands
|
||||
if (tokens[0] == '\0') return; // don't execute empty commands
|
||||
/* 2. Determine type of command (cmd or alias) and execute
|
||||
* First try commands, then aliases. Execute
|
||||
* the found action taking into account its hooking code
|
||||
|
||||
+2
-2
@@ -185,7 +185,7 @@ struct IConsoleWindow : Window
|
||||
~IConsoleWindow()
|
||||
{
|
||||
_iconsole_mode = ICONSOLE_CLOSED;
|
||||
VideoDriver::GetInstance()->EditBoxLostFocus();
|
||||
_video_driver->EditBoxLostFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,7 +374,7 @@ struct IConsoleWindow : Window
|
||||
|
||||
virtual void OnFocusLost()
|
||||
{
|
||||
VideoDriver::GetInstance()->EditBoxLostFocus();
|
||||
_video_driver->EditBoxLostFocus();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -81,9 +81,6 @@ private:
|
||||
*/
|
||||
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, PoolType Tpool_type = PT_NORMAL, bool Tcache = false, bool Tzero = true>
|
||||
struct Pool : PoolBase {
|
||||
/* Ensure Tmax_size is within the bounds of Tindex. */
|
||||
assert_compile((uint64)(Tmax_size - 1) >> 8 * sizeof(Tindex) == 0);
|
||||
|
||||
static const size_t MAX_SIZE = Tmax_size; ///< Make template parameter accessible from outside
|
||||
|
||||
const char * const name; ///< Name of this pool
|
||||
|
||||
+57
-142
@@ -12,90 +12,16 @@
|
||||
#ifndef SMALLSTACK_TYPE_HPP
|
||||
#define SMALLSTACK_TYPE_HPP
|
||||
|
||||
#include "smallvec_type.hpp"
|
||||
#include "../thread/thread.h"
|
||||
|
||||
/**
|
||||
* A simplified pool which stores values instead of pointers and doesn't
|
||||
* redefine operator new/delete. It also never zeroes memory and always reuses
|
||||
* it.
|
||||
*/
|
||||
template<typename Titem, typename Tindex, Tindex Tgrowth_step, Tindex Tmax_size>
|
||||
class SimplePool {
|
||||
public:
|
||||
inline SimplePool() : first_unused(0), first_free(0), mutex(ThreadMutex::New()) {}
|
||||
inline ~SimplePool() { delete this->mutex; }
|
||||
|
||||
/**
|
||||
* Get the mutex. We don't lock the mutex in the pool methods as the
|
||||
* SmallStack isn't necessarily in a consistent state after each method.
|
||||
* @return Mutex.
|
||||
*/
|
||||
inline ThreadMutex *GetMutex() { return this->mutex; }
|
||||
|
||||
/**
|
||||
* Get the item at position index.
|
||||
* @return Item at index.
|
||||
*/
|
||||
inline Titem &Get(Tindex index) { return this->data[index]; }
|
||||
|
||||
/**
|
||||
* Create a new item and return its index.
|
||||
* @return Index of new item.
|
||||
*/
|
||||
inline Tindex Create()
|
||||
{
|
||||
Tindex index = this->FindFirstFree();
|
||||
if (index < Tmax_size) {
|
||||
this->data[index].valid = true;
|
||||
this->first_free = index + 1;
|
||||
this->first_unused = max(this->first_unused, this->first_free);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy (or rather invalidate) the item at the given index.
|
||||
* @param index Index of item to be destroyed.
|
||||
*/
|
||||
inline void Destroy(Tindex index)
|
||||
{
|
||||
this->data[index].valid = false;
|
||||
this->first_free = min(this->first_free, index);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
inline Tindex FindFirstFree()
|
||||
{
|
||||
Tindex index = this->first_free;
|
||||
for (; index < this->first_unused; index++) {
|
||||
if (!this->data[index].valid) return index;
|
||||
}
|
||||
|
||||
if (index >= this->data.Length() && index < Tmax_size) {
|
||||
this->data.Resize(index + 1);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
struct SimplePoolPoolItem : public Titem {
|
||||
bool valid;
|
||||
};
|
||||
|
||||
Tindex first_unused;
|
||||
Tindex first_free;
|
||||
|
||||
ThreadMutex *mutex;
|
||||
SmallVector<SimplePoolPoolItem, Tgrowth_step> data;
|
||||
};
|
||||
#include "pool_type.hpp"
|
||||
#include "pool_func.hpp"
|
||||
|
||||
/**
|
||||
* Base class for SmallStack. We cannot add this into SmallStack itself as
|
||||
* certain compilers don't like it.
|
||||
*/
|
||||
template <typename Titem, typename Tindex>
|
||||
struct SmallStackItem {
|
||||
template <typename Tindex, typename Titem>
|
||||
class SmallStackItem {
|
||||
protected:
|
||||
Tindex next; ///< Pool index of next item.
|
||||
Titem value; ///< Value of current item.
|
||||
|
||||
@@ -124,30 +50,30 @@ struct SmallStackItem {
|
||||
* 5. You can choose your own index type, so that you can align it with your
|
||||
* value type. E.G. value types of 16 bits length like to be combined with
|
||||
* index types of the same length.
|
||||
* 6. All accesses to the underlying pool are guarded by a mutex and atomic in
|
||||
* the sense that the mutex stays locked until the pool has reacquired a
|
||||
* consistent state. This means that even though a common data structure is
|
||||
* used the SmallStack is still reentrant.
|
||||
* @tparam Titem Value type to be used.
|
||||
* @tparam Tindex Index type to use for the pool.
|
||||
* @tparam Tinvalid Invalid item to keep at the bottom of each stack.
|
||||
* @tparam Tgrowth_step Growth step for pool.
|
||||
* @tparam Tmax_size Maximum size for pool.
|
||||
*/
|
||||
template <typename Titem, typename Tindex, Titem Tinvalid, Tindex Tgrowth_step, Tindex Tmax_size>
|
||||
class SmallStack : public SmallStackItem<Titem, Tindex> {
|
||||
public:
|
||||
|
||||
typedef SmallStackItem<Titem, Tindex> Item;
|
||||
template <typename Titem, typename Tindex, Titem Tinvalid, size_t Tgrowth_step, size_t Tmax_size>
|
||||
class SmallStack : public SmallStackItem<Tindex, Titem> {
|
||||
protected:
|
||||
class PooledSmallStack;
|
||||
|
||||
/**
|
||||
* SmallStack item that can be kept in a pool.
|
||||
* Create a branch in the pool if necessary.
|
||||
*/
|
||||
struct PooledSmallStack : public Item {
|
||||
Tindex branch_count; ///< Number of branches in the tree structure this item is parent of
|
||||
};
|
||||
void Branch()
|
||||
{
|
||||
if (PooledSmallStack::IsValidID(this->next)) {
|
||||
PooledSmallStack::Get(this->next)->CreateBranch();
|
||||
}
|
||||
}
|
||||
|
||||
typedef SimplePool<PooledSmallStack, Tindex, Tgrowth_step, Tmax_size> SmallStackPool;
|
||||
public:
|
||||
typedef SmallStackItem<Tindex, Titem> Item;
|
||||
typedef Pool<PooledSmallStack, Tindex, Tgrowth_step, Tmax_size, PT_NORMAL, true, false> SmallStackPool;
|
||||
|
||||
/**
|
||||
* Constructor for a stack with one or two items in it.
|
||||
@@ -160,8 +86,14 @@ public:
|
||||
*/
|
||||
inline ~SmallStack()
|
||||
{
|
||||
/* Pop() locks the mutex and after each pop the pool is consistent.*/
|
||||
while (this->next != Tmax_size) this->Pop();
|
||||
if (PooledSmallStack::IsValidID(this->next)) {
|
||||
PooledSmallStack *item = PooledSmallStack::Get(this->next);
|
||||
if (item->NumBranches() == 0) {
|
||||
delete item;
|
||||
} else {
|
||||
item->DeleteBranch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,32 +110,23 @@ public:
|
||||
inline SmallStack &operator=(const SmallStack &other)
|
||||
{
|
||||
if (this == &other) return *this;
|
||||
while (this->next != Tmax_size) this->Pop();
|
||||
this->~SmallStack();
|
||||
this->next = other.next;
|
||||
this->value = other.value;
|
||||
/* Deleting and branching are independent operations, so it's fine to
|
||||
* acquire separate locks for them. */
|
||||
this->Branch();
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes a new item onto the stack if there is still space in the
|
||||
* underlying pool. Otherwise the topmost item's value gets overwritten.
|
||||
* Push a new item onto the stack.
|
||||
* @param item Item to be pushed.
|
||||
*/
|
||||
inline void Push(const Titem &item)
|
||||
{
|
||||
if (this->value != Tinvalid) {
|
||||
ThreadMutexLocker lock(_pool.GetMutex());
|
||||
Tindex new_item = _pool.Create();
|
||||
if (new_item != Tmax_size) {
|
||||
PooledSmallStack &pushed = _pool.Get(new_item);
|
||||
pushed.value = this->value;
|
||||
pushed.next = this->next;
|
||||
pushed.branch_count = 0;
|
||||
this->next = new_item;
|
||||
}
|
||||
assert(PooledSmallStack::CanAllocateItem());
|
||||
PooledSmallStack *next = new PooledSmallStack(this->value, this->next);
|
||||
this->next = next->index;
|
||||
}
|
||||
this->value = item;
|
||||
}
|
||||
@@ -215,26 +138,17 @@ public:
|
||||
inline Titem Pop()
|
||||
{
|
||||
Titem ret = this->value;
|
||||
if (this->next == Tmax_size) {
|
||||
if (!PooledSmallStack::IsValidID(this->next)) {
|
||||
this->value = Tinvalid;
|
||||
} else {
|
||||
ThreadMutexLocker lock(_pool.GetMutex());
|
||||
PooledSmallStack &popped = _pool.Get(this->next);
|
||||
this->value = popped.value;
|
||||
if (popped.branch_count == 0) {
|
||||
_pool.Destroy(this->next);
|
||||
PooledSmallStack *next = PooledSmallStack::Get(this->next);
|
||||
static_cast<Item &>(*this) = *next;
|
||||
if (next->NumBranches() == 0) {
|
||||
delete next;
|
||||
} else {
|
||||
--popped.branch_count;
|
||||
/* We can't use Branch() here as we already have the mutex.*/
|
||||
if (popped.next != Tmax_size) {
|
||||
++(_pool.Get(popped.next).branch_count);
|
||||
}
|
||||
next->DeleteBranch();
|
||||
this->Branch();
|
||||
}
|
||||
/* Accessing popped here is no problem as the pool will only set
|
||||
* the validity flag, not actually delete the item, on Destroy().
|
||||
* It's impossible for another thread to acquire the same item in
|
||||
* the mean time because of the mutex. */
|
||||
this->next = popped.next;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -245,7 +159,7 @@ public:
|
||||
*/
|
||||
inline bool IsEmpty() const
|
||||
{
|
||||
return this->value == Tinvalid && this->next == Tmax_size;
|
||||
return this->value == Tinvalid && !PooledSmallStack::IsValidID(this->next);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,14 +170,11 @@ public:
|
||||
inline bool Contains(const Titem &item) const
|
||||
{
|
||||
if (item == Tinvalid || item == this->value) return true;
|
||||
if (this->next != Tmax_size) {
|
||||
ThreadMutexLocker lock(_pool.GetMutex());
|
||||
const SmallStack *in_list = this;
|
||||
do {
|
||||
in_list = static_cast<const SmallStack *>(
|
||||
static_cast<const Item *>(&_pool.Get(in_list->next)));
|
||||
if (in_list->value == item) return true;
|
||||
} while (in_list->next != Tmax_size);
|
||||
const SmallStack *in_list = this;
|
||||
while (PooledSmallStack::IsValidID(in_list->next)) {
|
||||
in_list = static_cast<const SmallStack *>(
|
||||
static_cast<const Item *>(PooledSmallStack::Get(in_list->next)));
|
||||
if (in_list->value == item) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -272,15 +183,19 @@ protected:
|
||||
static SmallStackPool _pool;
|
||||
|
||||
/**
|
||||
* Create a branch in the pool if necessary.
|
||||
* SmallStack item that can be kept in a pool (by having an index).
|
||||
*/
|
||||
inline void Branch()
|
||||
{
|
||||
if (this->next != Tmax_size) {
|
||||
ThreadMutexLocker lock(_pool.GetMutex());
|
||||
++(_pool.Get(this->next).branch_count);
|
||||
}
|
||||
}
|
||||
class PooledSmallStack : public Item, public SmallStackPool::template PoolItem<&SmallStack::_pool> {
|
||||
private:
|
||||
Tindex branch_count; ///< Number of branches in the tree structure this item is parent of
|
||||
public:
|
||||
PooledSmallStack(Titem value, Tindex next) : Item(value, next), branch_count(0) {}
|
||||
|
||||
inline void CreateBranch() { ++this->branch_count; }
|
||||
inline void DeleteBranch() { --this->branch_count; }
|
||||
inline Tindex NumBranches() { return this->branch_count; }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file cpu.h Functions related to CPU specific instructions. */
|
||||
|
||||
#ifndef CPU_H
|
||||
#define CPU_H
|
||||
|
||||
/**
|
||||
* Get the tick counter from the CPU (high precision timing).
|
||||
* @return The count.
|
||||
*/
|
||||
uint64 ottd_rdtsc();
|
||||
|
||||
/**
|
||||
* Get the CPUID information from the CPU.
|
||||
* @param info The retrieved info. All zeros on architectures without CPUID.
|
||||
* @param type The information this instruction should retrieve.
|
||||
*/
|
||||
void ottd_cpuid(int info[4], int type);
|
||||
|
||||
/**
|
||||
* Check whether the current CPU has the given flag.
|
||||
* @param type The type to be passing to cpuid (usually 1).
|
||||
* @param index The index in the returned info array.
|
||||
* @param bit The bit index that needs to be set.
|
||||
* @return The value of the bit, or false when there is no CPUID or the type is not available.
|
||||
*/
|
||||
bool HasCPUIDFlag(uint type, uint index, uint bit);
|
||||
|
||||
#endif /* CPU_H */
|
||||
+7
-7
@@ -134,18 +134,18 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
|
||||
" Sound driver: %s\n"
|
||||
" Sound set: %s (%u)\n"
|
||||
" Video driver: %s\n\n",
|
||||
BlitterFactory::GetCurrentBlitter() == NULL ? "none" : BlitterFactory::GetCurrentBlitter()->GetName(),
|
||||
BlitterFactoryBase::GetCurrentBlitter() == NULL ? "none" : BlitterFactoryBase::GetCurrentBlitter()->GetName(),
|
||||
BaseGraphics::GetUsedSet() == NULL ? "none" : BaseGraphics::GetUsedSet()->name,
|
||||
BaseGraphics::GetUsedSet() == NULL ? UINT32_MAX : BaseGraphics::GetUsedSet()->version,
|
||||
_current_language == NULL ? "none" : _current_language->file,
|
||||
MusicDriver::GetInstance() == NULL ? "none" : MusicDriver::GetInstance()->GetName(),
|
||||
_music_driver == NULL ? "none" : _music_driver->GetName(),
|
||||
BaseMusic::GetUsedSet() == NULL ? "none" : BaseMusic::GetUsedSet()->name,
|
||||
BaseMusic::GetUsedSet() == NULL ? UINT32_MAX : BaseMusic::GetUsedSet()->version,
|
||||
_networking ? (_network_server ? "server" : "client") : "no",
|
||||
SoundDriver::GetInstance() == NULL ? "none" : SoundDriver::GetInstance()->GetName(),
|
||||
_sound_driver == NULL ? "none" : _sound_driver->GetName(),
|
||||
BaseSounds::GetUsedSet() == NULL ? "none" : BaseSounds::GetUsedSet()->name,
|
||||
BaseSounds::GetUsedSet() == NULL ? UINT32_MAX : BaseSounds::GetUsedSet()->version,
|
||||
VideoDriver::GetInstance() == NULL ? "none" : VideoDriver::GetInstance()->GetName()
|
||||
_video_driver == NULL ? "none" : _video_driver->GetName()
|
||||
);
|
||||
|
||||
buffer += seprintf(buffer, last,
|
||||
@@ -482,7 +482,7 @@ bool CrashLog::MakeCrashLog() const
|
||||
*/
|
||||
/* static */ void CrashLog::AfterCrashLogCleanup()
|
||||
{
|
||||
if (MusicDriver::GetInstance() != NULL) MusicDriver::GetInstance()->Stop();
|
||||
if (SoundDriver::GetInstance() != NULL) SoundDriver::GetInstance()->Stop();
|
||||
if (VideoDriver::GetInstance() != NULL) VideoDriver::GetInstance()->Stop();
|
||||
if (_music_driver != NULL) _music_driver->Stop();
|
||||
if (_sound_driver != NULL) _sound_driver->Stop();
|
||||
if (_video_driver != NULL) _video_driver->Stop();
|
||||
}
|
||||
|
||||
+5
-5
@@ -144,14 +144,14 @@ void CheckSwitchToEuro()
|
||||
* Will fill _currency_specs array with
|
||||
* default values from origin_currency_specs
|
||||
* Called only from newgrf.cpp and settings.cpp.
|
||||
* @param preserve_custom will not reset custom currency
|
||||
* @param preserve_custom will not reset custom currency (the latest one on the list)
|
||||
* if ever it is flagged to true. In which case, the total size of the memory to move
|
||||
* will be one currency spec less, thus preserving the custom currency from been
|
||||
* overwritten.
|
||||
*/
|
||||
void ResetCurrencies(bool preserve_custom)
|
||||
{
|
||||
for (uint i = 0; i < CURRENCY_END; i++) {
|
||||
if (preserve_custom && i == CURRENCY_CUSTOM) continue;
|
||||
_currency_specs[i] = origin_currency_specs[i];
|
||||
}
|
||||
memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs) - (preserve_custom ? sizeof(_custom_currency) : 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-2
@@ -12,8 +12,6 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
/* Debugging messages policy:
|
||||
* These should be the severities used for direct DEBUG() calls
|
||||
* maximum debugging level should be 10 if really deep, deep
|
||||
@@ -67,6 +65,12 @@ const char *GetDebugString();
|
||||
/* Shorter form for passing filename and linenumber */
|
||||
#define FILE_LINE __FILE__, __LINE__
|
||||
|
||||
/**
|
||||
* Get the tick counter from the CPU (high precision timing).
|
||||
* @return The count.
|
||||
*/
|
||||
uint64 ottd_rdtsc();
|
||||
|
||||
/* Used for profiling
|
||||
*
|
||||
* Usage:
|
||||
|
||||
+2
-2
@@ -41,13 +41,13 @@ void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
}
|
||||
|
||||
void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT_WATER, tile);
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+9
-25
@@ -16,14 +16,17 @@
|
||||
#include "video/video_driver.hpp"
|
||||
#include "string_func.h"
|
||||
|
||||
VideoDriver *_video_driver; ///< The currently active video driver.
|
||||
char *_ini_videodriver; ///< The video driver a stored in the configuration file.
|
||||
int _num_resolutions; ///< The number of resolutions.
|
||||
Dimension _resolutions[32]; ///< List of resolutions.
|
||||
Dimension _cur_resolution; ///< The current resolution.
|
||||
bool _rightclick_emulate; ///< Whether right clicking is emulated.
|
||||
|
||||
SoundDriver *_sound_driver; ///< The currently active sound driver.
|
||||
char *_ini_sounddriver; ///< The sound driver a stored in the configuration file.
|
||||
|
||||
MusicDriver *_music_driver; ///< The currently active music driver.
|
||||
char *_ini_musicdriver; ///< The music driver a stored in the configuration file.
|
||||
|
||||
char *_ini_blitter; ///< The blitter as stored in the configuration file.
|
||||
@@ -83,25 +86,9 @@ int GetDriverParamInt(const char * const *parm, const char *name, int def)
|
||||
* @param type the type of driver to select
|
||||
* @post Sets the driver so GetCurrentDriver() returns it too.
|
||||
*/
|
||||
void DriverFactoryBase::SelectDriver(const char *name, Driver::Type type)
|
||||
Driver *DriverFactoryBase::SelectDriver(const char *name, Driver::Type type)
|
||||
{
|
||||
if (!DriverFactoryBase::SelectDriverImpl(name, type)) {
|
||||
StrEmpty(name) ?
|
||||
usererror("Failed to autoprobe %s driver", GetDriverTypeName(type)) :
|
||||
usererror("Failed to select requested %s driver '%s'", GetDriverTypeName(type), name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the requested driver and return its class.
|
||||
* @param name the driver to select.
|
||||
* @param type the type of driver to select
|
||||
* @post Sets the driver so GetCurrentDriver() returns it too.
|
||||
* @return True upon success, otherwise false.
|
||||
*/
|
||||
bool DriverFactoryBase::SelectDriverImpl(const char *name, Driver::Type type)
|
||||
{
|
||||
if (GetDrivers().size() == 0) return false;
|
||||
if (GetDrivers().size() == 0) return NULL;
|
||||
|
||||
if (StrEmpty(name)) {
|
||||
/* Probe for this driver, but do not fall back to dedicated/null! */
|
||||
@@ -114,18 +101,15 @@ bool DriverFactoryBase::SelectDriverImpl(const char *name, Driver::Type type)
|
||||
if (d->type != type) continue;
|
||||
if (d->priority != priority) continue;
|
||||
|
||||
Driver *oldd = *GetActiveDriver(type);
|
||||
Driver *newd = d->CreateInstance();
|
||||
*GetActiveDriver(type) = newd;
|
||||
|
||||
const char *err = newd->Start(NULL);
|
||||
if (err == NULL) {
|
||||
DEBUG(driver, 1, "Successfully probed %s driver '%s'", GetDriverTypeName(type), d->name);
|
||||
delete oldd;
|
||||
return true;
|
||||
delete *GetActiveDriver(type);
|
||||
*GetActiveDriver(type) = newd;
|
||||
return newd;
|
||||
}
|
||||
|
||||
*GetActiveDriver(type) = oldd;
|
||||
DEBUG(driver, 1, "Probing %s driver '%s' failed with error: %s", GetDriverTypeName(type), d->name, err);
|
||||
delete newd;
|
||||
}
|
||||
@@ -174,7 +158,7 @@ bool DriverFactoryBase::SelectDriverImpl(const char *name, Driver::Type type)
|
||||
DEBUG(driver, 1, "Successfully loaded %s driver '%s'", GetDriverTypeName(type), d->name);
|
||||
delete *GetActiveDriver(type);
|
||||
*GetActiveDriver(type) = newd;
|
||||
return true;
|
||||
return newd;
|
||||
}
|
||||
usererror("No such %s driver: %s\n", GetDriverTypeName(type), buffer);
|
||||
}
|
||||
|
||||
+1
-7
@@ -59,10 +59,6 @@ DECLARE_POSTFIX_INCREMENT(Driver::Type)
|
||||
/** Base for all driver factories. */
|
||||
class DriverFactoryBase {
|
||||
private:
|
||||
friend class MusicDriver;
|
||||
friend class SoundDriver;
|
||||
friend class VideoDriver;
|
||||
|
||||
Driver::Type type; ///< The type of driver.
|
||||
int priority; ///< The priority of this factory.
|
||||
const char *name; ///< The name of the drivers of this factory.
|
||||
@@ -101,8 +97,6 @@ private:
|
||||
return driver_type_name[type];
|
||||
}
|
||||
|
||||
static bool SelectDriverImpl(const char *name, Driver::Type type);
|
||||
|
||||
protected:
|
||||
DriverFactoryBase(Driver::Type type, int priority, const char *name, const char *description);
|
||||
|
||||
@@ -120,7 +114,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void SelectDriver(const char *name, Driver::Type type);
|
||||
static Driver *SelectDriver(const char *name, Driver::Type type);
|
||||
static char *GetDriversInfo(char *p, const char *last);
|
||||
|
||||
/**
|
||||
|
||||
+78
-206
@@ -19,7 +19,6 @@
|
||||
#include "network/network_func.h"
|
||||
#include "ai/ai.hpp"
|
||||
#include "aircraft.h"
|
||||
#include "train.h"
|
||||
#include "newgrf_engine.h"
|
||||
#include "engine_base.h"
|
||||
#include "ground_vehicle.hpp"
|
||||
@@ -1067,9 +1066,9 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID dest, Ti
|
||||
|
||||
/* Update station statistics */
|
||||
if (accepted > 0) {
|
||||
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_EVER_ACCEPTED);
|
||||
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_CURRENT_MONTH);
|
||||
SetBit(st->goods[cargo_type].status, GoodsEntry::GES_ACCEPTED_BIGTICK);
|
||||
SetBit(st->goods[cargo_type].acceptance_pickup, GoodsEntry::GES_EVER_ACCEPTED);
|
||||
SetBit(st->goods[cargo_type].acceptance_pickup, GoodsEntry::GES_CURRENT_MONTH);
|
||||
SetBit(st->goods[cargo_type].acceptance_pickup, GoodsEntry::GES_ACCEPTED_BIGTICK);
|
||||
}
|
||||
|
||||
/* Update company statistics */
|
||||
@@ -1241,7 +1240,7 @@ void PrepareUnload(Vehicle *front_v)
|
||||
const GoodsEntry *ge = &st->goods[v->cargo_type];
|
||||
if (v->cargo_cap > 0 && v->cargo.TotalCount() > 0) {
|
||||
v->cargo.Stage(
|
||||
HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE),
|
||||
HasBit(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE),
|
||||
front_v->last_station_visited, next_station,
|
||||
front_v->current_order.GetUnloadType(), ge,
|
||||
front_v->cargo_payment);
|
||||
@@ -1339,192 +1338,21 @@ static void ReserveConsist(Station *st, Vehicle *u, CargoArray *consist_capleft,
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate the articulated parts of a vehicle, also considering the special cases of "normal"
|
||||
* aircraft and double headed trains. Apply an action to each vehicle and immediately return false
|
||||
* if that action does so. Otherwise return true.
|
||||
* @tparam Taction Class of action to be applied. Must implement bool operator()([const] Vehicle *).
|
||||
* @param v First articulated part.
|
||||
* @param action Instance of Taction.
|
||||
* @return false if any of the action invocations returned false, true otherwise.
|
||||
* Checks whether an articulated vehicle is empty.
|
||||
* @param v Vehicle
|
||||
* @return true if all parts are empty.
|
||||
*/
|
||||
template<class Taction>
|
||||
bool IterateVehicleParts(Vehicle *v, Taction action)
|
||||
static bool IsArticulatedVehicleEmpty(Vehicle *v)
|
||||
{
|
||||
for (Vehicle *w = v; w != NULL;
|
||||
w = w->HasArticulatedPart() ? w->GetNextArticulatedPart() : NULL) {
|
||||
if (!action(w)) return false;
|
||||
if (w->type == VEH_TRAIN) {
|
||||
Train *train = Train::From(w);
|
||||
if (train->IsMultiheaded() && !action(train->other_multiheaded_part)) return false;
|
||||
}
|
||||
v = v->GetFirstEnginePart();
|
||||
|
||||
for (; v != NULL; v = v->HasArticulatedPart() ? v->GetNextArticulatedPart() : NULL) {
|
||||
if (v->cargo.TotalCount() != 0) return false;
|
||||
}
|
||||
if (v->type == VEH_AIRCRAFT && Aircraft::From(v)->IsNormalAircraft()) return action(v->Next());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action to check if a vehicle has no stored cargo.
|
||||
*/
|
||||
struct IsEmptyAction
|
||||
{
|
||||
/**
|
||||
* Checks if the vehicle has stored cargo.
|
||||
* @param v Vehicle to be checked.
|
||||
* @return true if v is either empty or has only reserved cargo, false otherwise.
|
||||
*/
|
||||
bool operator()(const Vehicle *v)
|
||||
{
|
||||
return v->cargo.StoredCount() == 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Refit preparation action.
|
||||
*/
|
||||
struct PrepareRefitAction
|
||||
{
|
||||
CargoArray &consist_capleft; ///< Capacities left in the consist.
|
||||
uint32 &refit_mask; ///< Bitmask of possible refit cargoes.
|
||||
|
||||
/**
|
||||
* Create a refit preparation action.
|
||||
* @param consist_capleft Capacities left in consist, to be updated here.
|
||||
* @param refit_mask Refit mask to be constructed from refit information of vehicles.
|
||||
*/
|
||||
PrepareRefitAction(CargoArray &consist_capleft, uint32 &refit_mask) :
|
||||
consist_capleft(consist_capleft), refit_mask(refit_mask) {}
|
||||
|
||||
/**
|
||||
* Prepares for refitting of a vehicle, subtracting its free capacity from consist_capleft and
|
||||
* adding the cargoes it can refit to to the refit mask.
|
||||
* @param v The vehicle to be refitted.
|
||||
* @return true.
|
||||
*/
|
||||
bool operator()(const Vehicle *v)
|
||||
{
|
||||
this->consist_capleft[v->cargo_type] -= v->cargo_cap - v->cargo.ReservedCount();
|
||||
this->refit_mask |= EngInfo(v->engine_type)->refit_mask;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Action for returning reserved cargo.
|
||||
*/
|
||||
struct ReturnCargoAction
|
||||
{
|
||||
Station *st; ///< Station to give the returned cargo to.
|
||||
StationID next_hop; ///< Next hop the cargo should be assigned to.
|
||||
|
||||
/**
|
||||
* Construct a cargo return action.
|
||||
* @param st Station to give the returned cargo to.
|
||||
* @param next_one Next hop the cargo should be assigned to.
|
||||
*/
|
||||
ReturnCargoAction(Station *st, StationID next_one) : st(st), next_hop(next_one) {}
|
||||
|
||||
/**
|
||||
* Return all reserved cargo from a vehicle.
|
||||
* @param v Vehicle to return cargo from.
|
||||
* @return true.
|
||||
*/
|
||||
bool operator()(Vehicle *v)
|
||||
{
|
||||
v->cargo.Return(UINT_MAX, &this->st->goods[v->cargo_type].cargo, this->next_hop);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Action for finalizing a refit.
|
||||
*/
|
||||
struct FinalizeRefitAction
|
||||
{
|
||||
CargoArray &consist_capleft; ///< Capacities left in the consist.
|
||||
Station *st; ///< Station to reserve cargo from.
|
||||
StationIDStack &next_station; ///< Next hops to reserve cargo for.
|
||||
|
||||
/**
|
||||
* Create a finalizing action.
|
||||
* @param consist_capleft Capacities left in the consist.
|
||||
* @param st Station to reserve cargo from.
|
||||
* @param next_station Next hops to reserve cargo for.
|
||||
*/
|
||||
FinalizeRefitAction(CargoArray &consist_capleft, Station *st, StationIDStack &next_station) :
|
||||
consist_capleft(consist_capleft), st(st), next_station(next_station) {}
|
||||
|
||||
/**
|
||||
* Reserve cargo from the station and update the remaining consist capacities with the
|
||||
* vehicle's remaining free capacity.
|
||||
* @param v Vehicle to be finalized.
|
||||
* @return true.
|
||||
*/
|
||||
bool operator()(Vehicle *v)
|
||||
{
|
||||
this->st->goods[v->cargo_type].cargo.Reserve(v->cargo_cap - v->cargo.RemainingCount(),
|
||||
&v->cargo, st->xy, next_station);
|
||||
this->consist_capleft[v->cargo_type] += v->cargo_cap - v->cargo.RemainingCount();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Refit a vehicle in a station.
|
||||
* @param v Vehicle to be refitted.
|
||||
* @param consist_capleft Added cargo capacities in the consist.
|
||||
* @param st Station the vehicle is loading at.
|
||||
* @param next_station Possible next stations the vehicle can travel to.
|
||||
* @param new_cid Target cargo for refit.
|
||||
*/
|
||||
static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station *st, StationIDStack next_station, CargoID new_cid)
|
||||
{
|
||||
Vehicle *v_start = v->GetFirstEnginePart();
|
||||
if (!IterateVehicleParts(v_start, IsEmptyAction())) return;
|
||||
|
||||
Backup<CompanyByte> cur_company(_current_company, v->owner, FILE_LINE);
|
||||
|
||||
uint32 refit_mask = v->GetEngine()->info.refit_mask;
|
||||
|
||||
/* Remove old capacity from consist capacity and collect refit mask. */
|
||||
IterateVehicleParts(v_start, PrepareRefitAction(consist_capleft, refit_mask));
|
||||
|
||||
if (new_cid == CT_AUTO_REFIT) {
|
||||
/* Get a refittable cargo type with waiting cargo for next_station or INVALID_STATION. */
|
||||
CargoID cid;
|
||||
new_cid = v_start->cargo_type;
|
||||
FOR_EACH_SET_CARGO_ID(cid, refit_mask) {
|
||||
if (st->goods[cid].cargo.HasCargoFor(next_station)) {
|
||||
/* Try to find out if auto-refitting would succeed. In case the refit is allowed,
|
||||
* the returned refit capacity will be greater than zero. */
|
||||
DoCommand(v_start->tile, v_start->index, cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_QUERY_COST, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts.
|
||||
/* Try to balance different loadable cargoes between parts of the consist, so that
|
||||
* all of them can be loaded. Avoid a situation where all vehicles suddenly switch
|
||||
* to the first loadable cargo for which there is only one packet. If the capacities
|
||||
* are equal refit to the cargo of which most is available. This is important for
|
||||
* consists of only a single vehicle as those will generally have a consist_capleft
|
||||
* of 0 for all cargoes. */
|
||||
if (_returned_refit_capacity > 0 && (consist_capleft[cid] < consist_capleft[new_cid] ||
|
||||
(consist_capleft[cid] == consist_capleft[new_cid] &&
|
||||
st->goods[cid].cargo.AvailableCount() > st->goods[new_cid].cargo.AvailableCount()))) {
|
||||
new_cid = cid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Refit if given a valid cargo. */
|
||||
if (new_cid < NUM_CARGO && new_cid != v_start->cargo_type) {
|
||||
IterateVehicleParts(v_start, ReturnCargoAction(st, StationIDStack(next_station).Pop()));
|
||||
CommandCost cost = DoCommand(v_start->tile, v_start->index, new_cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_EXEC, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts.
|
||||
if (cost.Succeeded()) v->First()->profit_this_year -= cost.GetCost() << 8;
|
||||
}
|
||||
|
||||
/* Add new capacity to consist capacity and reserve cargo */
|
||||
IterateVehicleParts(v_start, FinalizeRefitAction(consist_capleft, st, next_station));
|
||||
|
||||
cur_company.Restore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads/unload the vehicle if possible.
|
||||
* @param front the vehicle to be (un)loaded
|
||||
@@ -1590,12 +1418,12 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
|
||||
payment->SetCargo(v->cargo_type);
|
||||
|
||||
if (!HasBit(ge->status, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
|
||||
if (!HasBit(ge->acceptance_pickup, GoodsEntry::GES_ACCEPTANCE) && v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER) > 0) {
|
||||
/* The station does not accept our goods anymore. */
|
||||
if (front->current_order.GetUnloadType() & (OUFB_TRANSFER | OUFB_UNLOAD)) {
|
||||
/* Transfer instead of delivering. */
|
||||
v->cargo.Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER>(
|
||||
v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER), INVALID_STATION);
|
||||
v->cargo.Reassign(v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER),
|
||||
VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_TRANSFER);
|
||||
} else {
|
||||
uint new_remaining = v->cargo.RemainingCount() + v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER);
|
||||
if (v->cargo_cap < new_remaining) {
|
||||
@@ -1604,8 +1432,8 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
}
|
||||
|
||||
/* Keep instead of delivering. This may lead to no cargo being unloaded, so ...*/
|
||||
v->cargo.Reassign<VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP>(
|
||||
v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER));
|
||||
v->cargo.Reassign(v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER),
|
||||
VehicleCargoList::MTA_DELIVER, VehicleCargoList::MTA_KEEP);
|
||||
|
||||
/* ... say we unloaded something, otherwise we'll think we didn't unload
|
||||
* something and we didn't load something, so we must be finished
|
||||
@@ -1615,18 +1443,8 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
}
|
||||
}
|
||||
|
||||
if (v->cargo.ActionCount(VehicleCargoList::MTA_TRANSFER) > 0) {
|
||||
/* Mark the station dirty if we transfer, but not if we only deliver. */
|
||||
dirty_station = true;
|
||||
|
||||
if (!ge->HasRating()) {
|
||||
/* Upon transfering cargo, make sure the station has a rating. Fake a pickup for the
|
||||
* first unload to prevent the cargo from quickly decaying after the initial drop. */
|
||||
ge->time_since_pickup = 0;
|
||||
SetBit(ge->status, GoodsEntry::GES_RATING);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mark the station dirty if we transfer, but not if we only deliver. */
|
||||
dirty_station = v->cargo.ActionCount(VehicleCargoList::MTA_TRANSFER) > 0;
|
||||
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
|
||||
remaining = v->cargo.UnloadCount() > 0;
|
||||
if (amount_unloaded > 0) {
|
||||
@@ -1652,9 +1470,64 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
if (front->current_order.GetLoadType() & OLFB_NO_LOAD || HasBit(front->vehicle_flags, VF_STOP_LOADING)) continue;
|
||||
|
||||
/* This order has a refit, if this is the first vehicle part carrying cargo and the whole vehicle is empty, try refitting. */
|
||||
if (front->current_order.IsRefit() && artic_part == 1) {
|
||||
HandleStationRefit(v, consist_capleft, st, next_station, front->current_order.GetRefitCargo());
|
||||
ge = &st->goods[v->cargo_type];
|
||||
if (front->current_order.IsRefit() && artic_part == 1 && IsArticulatedVehicleEmpty(v) &&
|
||||
(v->type != VEH_AIRCRAFT || (Aircraft::From(v)->IsNormalAircraft() && v->Next()->cargo.TotalCount() == 0))) {
|
||||
Vehicle *v_start = v->GetFirstEnginePart();
|
||||
CargoID new_cid = front->current_order.GetRefitCargo();
|
||||
|
||||
/* Remove old capacity from consist capacity */
|
||||
consist_capleft[v_start->cargo_type] -= v_start->cargo_cap;
|
||||
for (Vehicle *w = v_start; w->HasArticulatedPart(); ) {
|
||||
w = w->GetNextArticulatedPart();
|
||||
consist_capleft[w->cargo_type] -= w->cargo_cap;
|
||||
}
|
||||
|
||||
Backup<CompanyByte> cur_company(_current_company, front->owner, FILE_LINE);
|
||||
|
||||
/* Check if all articulated parts are empty and collect refit mask. */
|
||||
uint32 refit_mask = v->GetEngine()->info.refit_mask;
|
||||
Vehicle *w = v_start;
|
||||
while (w->HasArticulatedPart()) {
|
||||
w = w->GetNextArticulatedPart();
|
||||
if (w->cargo.TotalCount() > 0) new_cid = CT_NO_REFIT;
|
||||
refit_mask |= EngInfo(w->engine_type)->refit_mask;
|
||||
}
|
||||
|
||||
if (new_cid == CT_AUTO_REFIT) {
|
||||
/* Get a refittable cargo type with waiting cargo for next_station or INVALID_STATION. */
|
||||
CargoID cid;
|
||||
new_cid = v_start->cargo_type;
|
||||
FOR_EACH_SET_CARGO_ID(cid, refit_mask) {
|
||||
if (st->goods[cid].cargo.HasCargoFor(next_station)) {
|
||||
/* Try to find out if auto-refitting would succeed. In case the refit is allowed,
|
||||
* the returned refit capacity will be greater than zero. */
|
||||
DoCommand(v_start->tile, v_start->index, cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_QUERY_COST, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts.
|
||||
/* Try to balance different loadable cargoes between parts of the consist, so that
|
||||
* all of them can be loaded. Avoid a situation where all vehicles suddenly switch
|
||||
* to the first loadable cargo for which there is only one packet. */
|
||||
if (_returned_refit_capacity > 0 && consist_capleft[cid] < consist_capleft[new_cid]) {
|
||||
new_cid = cid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Refit if given a valid cargo. */
|
||||
if (new_cid < NUM_CARGO && new_cid != v_start->cargo_type) {
|
||||
CommandCost cost = DoCommand(v_start->tile, v_start->index, new_cid | 1U << 6 | 0xFF << 8 | 1U << 16, DC_EXEC, GetCmdRefitVeh(v_start)); // Auto-refit and only this vehicle including artic parts.
|
||||
if (cost.Succeeded()) front->profit_this_year -= cost.GetCost() << 8;
|
||||
ge = &st->goods[v->cargo_type];
|
||||
}
|
||||
|
||||
/* Add new capacity to consist capacity and reserve cargo */
|
||||
w = v_start;
|
||||
do {
|
||||
st->goods[w->cargo_type].cargo.Reserve(w->cargo_cap, &w->cargo, st->xy, next_station);
|
||||
consist_capleft[w->cargo_type] += w->cargo_cap - w->cargo.RemainingCount();
|
||||
w = w->HasArticulatedPart() ? w->GetNextArticulatedPart() : NULL;
|
||||
} while (w != NULL);
|
||||
|
||||
cur_company.Restore();
|
||||
}
|
||||
|
||||
/* As we're loading here the following link can carry the full capacity of the vehicle. */
|
||||
@@ -1835,7 +1708,6 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
if (dirty_station) {
|
||||
st->MarkTilesDirty(true);
|
||||
SetWindowDirty(WC_STATION_VIEW, last_visited);
|
||||
InvalidateWindowData(WC_STATION_LIST, last_visited);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -627,7 +627,7 @@ bool SettingsDisableElrail(int32 p1)
|
||||
FOR_ALL_TRAINS(t) {
|
||||
/* power and acceleration is cached only for front engines */
|
||||
if (t->IsFrontEngine()) {
|
||||
t->ConsistChanged(CCF_TRACK);
|
||||
t->ConsistChanged(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-5
@@ -16,8 +16,6 @@
|
||||
#include "company_type.h"
|
||||
#include "core/geometry_type.hpp"
|
||||
|
||||
struct GRFFile;
|
||||
|
||||
/** Message severity/type */
|
||||
enum WarningLevel {
|
||||
WL_INFO, ///< Used for DoCommand-like (and some non-fatal AI GUI) errors/information
|
||||
@@ -32,7 +30,6 @@ protected:
|
||||
uint duration; ///< Length of display of the message. 0 means forever,
|
||||
uint64 decode_params[20]; ///< Parameters of the message strings.
|
||||
const char *strings[20]; ///< Copies of raw strings that were used.
|
||||
const GRFFile *textref_stack_grffile; ///< NewGRF that filled the #TextRefStack for the error message.
|
||||
uint textref_stack_size; ///< Number of uint32 values to put on the #TextRefStack for the error message.
|
||||
uint32 textref_stack[16]; ///< Values to put on the #TextRefStack for the error message.
|
||||
StringID summary_msg; ///< General error message showed in first line. Must be valid.
|
||||
@@ -43,7 +40,7 @@ protected:
|
||||
public:
|
||||
ErrorMessageData(const ErrorMessageData &data);
|
||||
~ErrorMessageData();
|
||||
ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration = 0, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL);
|
||||
ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration = 0, int x = 0, int y = 0, uint textref_stack_size = 0, const uint32 *textref_stack = NULL);
|
||||
|
||||
/** Check whether error window shall display a company manager face */
|
||||
bool HasFace() const { return face != INVALID_COMPANY; }
|
||||
@@ -56,7 +53,7 @@ public:
|
||||
|
||||
void ScheduleErrorMessage(const ErrorMessageData &data);
|
||||
|
||||
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL);
|
||||
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, uint textref_stack_size = 0, const uint32 *textref_stack = NULL);
|
||||
void ClearErrorMessages();
|
||||
void ShowFirstError();
|
||||
void UnshowCriticalError();
|
||||
|
||||
+8
-11
@@ -94,13 +94,11 @@ ErrorMessageData::~ErrorMessageData()
|
||||
* @param duration The amount of time to show this error message.
|
||||
* @param x World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
|
||||
* @param y World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
|
||||
* @param textref_stack_grffile NewGRF that provides the #TextRefStack for the error message.
|
||||
* @param textref_stack_size Number of uint32 values to put on the #TextRefStack for the error message; 0 if the #TextRefStack shall not be used.
|
||||
* @param textref_stack Values to put on the #TextRefStack.
|
||||
*/
|
||||
ErrorMessageData::ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration, int x, int y, const GRFFile *textref_stack_grffile, uint textref_stack_size, const uint32 *textref_stack) :
|
||||
ErrorMessageData::ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration, int x, int y, uint textref_stack_size, const uint32 *textref_stack) :
|
||||
duration(duration),
|
||||
textref_stack_grffile(textref_stack_grffile),
|
||||
textref_stack_size(textref_stack_size),
|
||||
summary_msg(summary_msg),
|
||||
detailed_msg(detailed_msg),
|
||||
@@ -128,7 +126,7 @@ void ErrorMessageData::CopyOutDParams()
|
||||
memset(this->strings, 0, sizeof(this->strings));
|
||||
|
||||
/* Get parameters using type information */
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_size, this->textref_stack);
|
||||
CopyOutDParam(this->decode_params, this->strings, this->detailed_msg == INVALID_STRING_ID ? this->summary_msg : this->detailed_msg, lengthof(this->decode_params));
|
||||
if (this->textref_stack_size > 0) StopTextRefStackUsage();
|
||||
|
||||
@@ -183,7 +181,7 @@ public:
|
||||
if (widget != WID_EM_MESSAGE) return;
|
||||
|
||||
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_size, this->textref_stack);
|
||||
|
||||
int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
|
||||
this->height_summary = GetStringHeight(this->summary_msg, text_width);
|
||||
@@ -255,7 +253,7 @@ public:
|
||||
|
||||
case WID_EM_MESSAGE:
|
||||
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
|
||||
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_size, this->textref_stack);
|
||||
|
||||
if (this->detailed_msg == INVALID_STRING_ID) {
|
||||
DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM,
|
||||
@@ -360,20 +358,19 @@ void UnshowCriticalError()
|
||||
* @param wl Message severity.
|
||||
* @param x World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
|
||||
* @param y World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
|
||||
* @param textref_stack_grffile NewGRF providing the #TextRefStack for the error message.
|
||||
* @param textref_stack_size Number of uint32 values to put on the #TextRefStack for the error message; 0 if the #TextRefStack shall not be used.
|
||||
* @param textref_stack Values to put on the #TextRefStack.
|
||||
*/
|
||||
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x, int y, const GRFFile *textref_stack_grffile, uint textref_stack_size, const uint32 *textref_stack)
|
||||
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x, int y, uint textref_stack_size, const uint32 *textref_stack)
|
||||
{
|
||||
assert(textref_stack_size == 0 || (textref_stack_grffile != NULL && textref_stack != NULL));
|
||||
assert(textref_stack_size == 0 || textref_stack != NULL);
|
||||
if (summary_msg == STR_NULL) summary_msg = STR_EMPTY;
|
||||
|
||||
if (wl != WL_INFO) {
|
||||
/* Print message to console */
|
||||
char buf[DRAW_STRING_BUFFER];
|
||||
|
||||
if (textref_stack_size > 0) StartTextRefStackUsage(textref_stack_grffile, textref_stack_size, textref_stack);
|
||||
if (textref_stack_size > 0) StartTextRefStackUsage(textref_stack_size, textref_stack);
|
||||
|
||||
char *b = GetString(buf, summary_msg, lastof(buf));
|
||||
if (detailed_msg != INVALID_STRING_ID) {
|
||||
@@ -393,7 +390,7 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel
|
||||
|
||||
if (_settings_client.gui.errmsg_duration == 0 && !no_timeout) return;
|
||||
|
||||
ErrorMessageData data(summary_msg, detailed_msg, no_timeout ? 0 : _settings_client.gui.errmsg_duration, x, y, textref_stack_grffile, textref_stack_size, textref_stack);
|
||||
ErrorMessageData data(summary_msg, detailed_msg, no_timeout ? 0 : _settings_client.gui.errmsg_duration, x, y, textref_stack_size, textref_stack);
|
||||
data.CopyOutDParams();
|
||||
|
||||
ErrmsgWindow *w = (ErrmsgWindow*)FindWindowById(WC_ERRMSG, 0);
|
||||
|
||||
+20
-29
@@ -849,38 +849,29 @@ bool TarScanner::AddFile(const char *filename, size_t basepath_length, const cha
|
||||
|
||||
char *pos = link;
|
||||
while (*pos != '\0') {
|
||||
char *next = strchr(pos, PATHSEPCHAR);
|
||||
if (next == NULL) {
|
||||
next = pos + strlen(pos);
|
||||
} else {
|
||||
/* Terminate the substring up to the path separator character. */
|
||||
*next++= '\0';
|
||||
}
|
||||
char *next = strchr(link, PATHSEPCHAR);
|
||||
if (next == NULL) next = pos + strlen(pos);
|
||||
|
||||
if (strcmp(pos, ".") == 0) {
|
||||
/* Skip '.' (current dir) */
|
||||
} else if (strcmp(pos, "..") == 0) {
|
||||
/* level up */
|
||||
if (dest[0] == '\0') {
|
||||
DEBUG(misc, 1, "Ignoring link pointing outside of data directory: %s -> %s", name, link);
|
||||
break;
|
||||
/* Skip '.' (current dir) */
|
||||
if (next != pos + 1 || pos[0] != '.') {
|
||||
if (next == pos + 2 && pos[0] == '.' && pos[1] == '.') {
|
||||
/* level up */
|
||||
if (dest[0] == '\0') {
|
||||
DEBUG(misc, 1, "Ignoring link pointing outside of data directory: %s -> %s", name, link);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Truncate 'dest' after last PATHSEPCHAR.
|
||||
* This assumes that the truncated part is a real directory and not a link. */
|
||||
destpos = strrchr(dest, PATHSEPCHAR);
|
||||
if (destpos == NULL) destpos = dest;
|
||||
} else {
|
||||
/* Append at end of 'dest' */
|
||||
if (destpos != dest) *(destpos++) = PATHSEPCHAR;
|
||||
strncpy(destpos, pos, next - pos); // Safe as we do '\0'-termination ourselves
|
||||
destpos += next - pos;
|
||||
}
|
||||
|
||||
/* Truncate 'dest' after last PATHSEPCHAR.
|
||||
* This assumes that the truncated part is a real directory and not a link. */
|
||||
destpos = strrchr(dest, PATHSEPCHAR);
|
||||
if (destpos == NULL) destpos = dest;
|
||||
*destpos = '\0';
|
||||
} else {
|
||||
/* Append at end of 'dest' */
|
||||
if (destpos != dest) destpos = strecpy(destpos, PATHSEP, lastof(dest));
|
||||
destpos = strecpy(destpos, pos, lastof(dest));
|
||||
}
|
||||
|
||||
if (destpos >= lastof(dest)) {
|
||||
DEBUG(misc, 0, "The length of a link in tar-file '%s' is too large (malformed?)", filename);
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
pos = next;
|
||||
|
||||
@@ -400,10 +400,6 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
|
||||
* .SS1 Transport Tycoon Deluxe preset game
|
||||
* .SV1 Transport Tycoon Deluxe (Patch) saved game
|
||||
* .SV2 Transport Tycoon Deluxe (Patch) saved 2-player game */
|
||||
|
||||
/* Don't crash if we supply no extension */
|
||||
if (ext == NULL) return FIOS_TYPE_INVALID;
|
||||
|
||||
if (strcasecmp(ext, ".sav") == 0) {
|
||||
GetFileTitle(file, title, last, SAVE_DIR);
|
||||
return FIOS_TYPE_FILE;
|
||||
|
||||
+7
-17
@@ -133,11 +133,9 @@ static const NWidgetPart _nested_load_heightmap_dialog_widgets[] = {
|
||||
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0),
|
||||
SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetResize(1, 0), SetFill(1, 0),
|
||||
SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -523,21 +521,16 @@ public:
|
||||
break;
|
||||
|
||||
case WID_SL_LOAD_BUTTON:
|
||||
if (this->selected != NULL && !_load_check_data.HasErrors()) {
|
||||
if (this->selected != NULL && !_load_check_data.HasErrors() && (_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs())) {
|
||||
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
|
||||
|
||||
const char *name = FiosBrowseTo(this->selected);
|
||||
SetFiosType(this->selected->type);
|
||||
|
||||
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.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) {
|
||||
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME;
|
||||
ClearErrorMessages();
|
||||
delete this;
|
||||
}
|
||||
ClearErrorMessages();
|
||||
delete this;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -686,9 +679,6 @@ public:
|
||||
case 1:
|
||||
/* Selection changes */
|
||||
if (!gui_scope) break;
|
||||
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.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
|
||||
|
||||
+13
-25
@@ -274,35 +274,23 @@ FreeTypeFontCache::FreeTypeFontCache(FontSize fs, FT_Face face, int pixels) : Fo
|
||||
}
|
||||
|
||||
FT_Error err = FT_Set_Pixel_Sizes(this->face, 0, pixels);
|
||||
if (err != FT_Err_Ok) {
|
||||
if (err == FT_Err_Invalid_Pixel_Size) {
|
||||
|
||||
/* Find nearest size to that requested */
|
||||
FT_Bitmap_Size *bs = this->face->available_sizes;
|
||||
int i = this->face->num_fixed_sizes;
|
||||
if (i > 0) { // In pathetic cases one might get no fixed sizes at all.
|
||||
int n = bs->height;
|
||||
FT_Int chosen = 0;
|
||||
for (; --i; bs++) {
|
||||
if (abs(pixels - bs->height) >= abs(pixels - n)) continue;
|
||||
n = bs->height;
|
||||
chosen = this->face->num_fixed_sizes - i;
|
||||
}
|
||||
|
||||
/* Don't use FT_Set_Pixel_Sizes here - it might give us another
|
||||
* error, even though the size is available (FS#5885). */
|
||||
err = FT_Select_Size(this->face, chosen);
|
||||
int n = bs->height;
|
||||
for (; --i; bs++) {
|
||||
if (abs(pixels - bs->height) < abs(pixels - n)) n = bs->height;
|
||||
}
|
||||
|
||||
FT_Set_Pixel_Sizes(this->face, 0, n);
|
||||
}
|
||||
|
||||
if (err == FT_Err_Ok) {
|
||||
this->units_per_em = this->face->units_per_EM;
|
||||
this->ascender = this->face->size->metrics.ascender >> 6;
|
||||
this->descender = this->face->size->metrics.descender >> 6;
|
||||
this->height = this->ascender - this->descender;
|
||||
} else {
|
||||
/* Both FT_Set_Pixel_Sizes and FT_Select_Size failed. */
|
||||
DEBUG(freetype, 0, "Font size selection failed. Using FontCache defaults.");
|
||||
}
|
||||
this->units_per_em = this->face->units_per_EM;
|
||||
this->ascender = this->face->size->metrics.ascender >> 6;
|
||||
this->descender = this->face->size->metrics.descender >> 6;
|
||||
this->height = this->ascender - this->descender;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -451,7 +439,7 @@ static void *AllocateFont(size_t size)
|
||||
static bool GetFontAAState(FontSize size)
|
||||
{
|
||||
/* AA is only supported for 32 bpp */
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
|
||||
if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
|
||||
|
||||
switch (size) {
|
||||
default: NOT_REACHED();
|
||||
@@ -506,7 +494,7 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key)
|
||||
builtin_questionmark_data
|
||||
};
|
||||
|
||||
Sprite *spr = BlitterFactory::GetCurrentBlitter()->Encode(&builtin_questionmark, AllocateFont);
|
||||
Sprite *spr = BlitterFactoryBase::GetCurrentBlitter()->Encode(&builtin_questionmark, AllocateFont);
|
||||
assert(spr != NULL);
|
||||
new_glyph.sprite = spr;
|
||||
new_glyph.width = spr->width + (this->fs != FS_NORMAL);
|
||||
@@ -563,7 +551,7 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key)
|
||||
}
|
||||
}
|
||||
|
||||
new_glyph.sprite = BlitterFactory::GetCurrentBlitter()->Encode(&sprite, AllocateFont);
|
||||
new_glyph.sprite = BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, AllocateFont);
|
||||
new_glyph.width = slot->advance.x >> 6;
|
||||
|
||||
this->SetGlyphPtr(key, &new_glyph);
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
#include "../script/api/game/game_station.hpp.sq"
|
||||
#include "../script/api/game/game_stationlist.hpp.sq"
|
||||
#include "../script/api/game/game_story_page.hpp.sq"
|
||||
#include "../script/api/game/game_storypageelementlist.hpp.sq"
|
||||
#include "../script/api/game/game_storypagelist.hpp.sq"
|
||||
#include "../script/api/game/game_subsidy.hpp.sq"
|
||||
#include "../script/api/game/game_subsidylist.hpp.sq"
|
||||
#include "../script/api/game/game_testmode.hpp.sq"
|
||||
@@ -173,8 +171,6 @@ void GameInstance::RegisterAPI()
|
||||
SQGSStationList_Register(this->engine);
|
||||
SQGSStationList_Vehicle_Register(this->engine);
|
||||
SQGSStoryPage_Register(this->engine);
|
||||
SQGSStoryPageElementList_Register(this->engine);
|
||||
SQGSStoryPageList_Register(this->engine);
|
||||
SQGSSubsidy_Register(this->engine);
|
||||
SQGSSubsidyList_Register(this->engine);
|
||||
SQGSTestMode_Register(this->engine);
|
||||
|
||||
@@ -377,7 +377,7 @@ void ReconsiderGameScriptLanguage()
|
||||
if (_current_data == NULL) return;
|
||||
|
||||
char temp[MAX_PATH];
|
||||
strecpy(temp, _current_language->file, lastof(temp));
|
||||
strecpy(temp, _current_language->file, temp + sizeof(temp));
|
||||
|
||||
/* Remove the extension */
|
||||
char *l = strrchr(temp, '.');
|
||||
|
||||
+5
-8
@@ -98,15 +98,13 @@ static void _GenerateWorld(void *)
|
||||
try {
|
||||
_generating_world = true;
|
||||
_modal_progress_work_mutex->BeginCritical();
|
||||
if (_network_dedicated) DEBUG(net, 1, "Generating map, please wait...");
|
||||
if (_network_dedicated) DEBUG(net, 0, "Generating map, please wait...");
|
||||
/* Set the Random() seed to generation_seed so we produce the same map with the same seed */
|
||||
if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = _settings_newgame.game_creation.generation_seed = InteractiveRandom();
|
||||
_random.SetSeed(_settings_game.game_creation.generation_seed);
|
||||
SetGeneratingWorldProgress(GWP_MAP_INIT, 2);
|
||||
SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
|
||||
|
||||
BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP);
|
||||
|
||||
IncreaseGeneratingWorldProgress(GWP_MAP_INIT);
|
||||
/* Must start economy early because of the costs. */
|
||||
StartupEconomy();
|
||||
@@ -143,6 +141,8 @@ static void _GenerateWorld(void *)
|
||||
}
|
||||
}
|
||||
|
||||
ClearPersistentStorageChanges(true);
|
||||
|
||||
/* These are probably pointless when inside the scenario editor. */
|
||||
SetGeneratingWorldProgress(GWP_GAME_INIT, 3);
|
||||
StartupCompanies();
|
||||
@@ -179,8 +179,6 @@ static void _GenerateWorld(void *)
|
||||
}
|
||||
}
|
||||
|
||||
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP);
|
||||
|
||||
ResetObjectToPlace();
|
||||
_cur_company.Trash();
|
||||
_current_company = _local_company = _gw.lc;
|
||||
@@ -195,7 +193,7 @@ static void _GenerateWorld(void *)
|
||||
|
||||
ShowNewGRFError();
|
||||
|
||||
if (_network_dedicated) DEBUG(net, 1, "Map generated, starting game");
|
||||
if (_network_dedicated) DEBUG(net, 0, "Map generated, starting game");
|
||||
DEBUG(desync, 1, "new_map: %08x", _settings_game.game_creation.generation_seed);
|
||||
|
||||
if (_debug_desync_level > 0) {
|
||||
@@ -204,7 +202,6 @@ static void _GenerateWorld(void *)
|
||||
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR, false);
|
||||
}
|
||||
} catch (...) {
|
||||
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP, true);
|
||||
if (_cur_company.IsValid()) _cur_company.Restore();
|
||||
_generating_world = false;
|
||||
_modal_progress_work_mutex->EndCritical();
|
||||
@@ -328,7 +325,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)) {
|
||||
if (!_video_driver->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();
|
||||
|
||||
+149
-91
@@ -73,7 +73,7 @@ extern uint _dirty_block_colour;
|
||||
|
||||
void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
||||
{
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
|
||||
if (xo == 0 && yo == 0) return;
|
||||
|
||||
@@ -85,7 +85,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
||||
|
||||
blitter->ScrollBuffer(_screen.dst_ptr, left, top, width, height, xo, yo);
|
||||
/* This part of the screen is now dirty. */
|
||||
VideoDriver::GetInstance()->MakeDirty(left, top, width, height);
|
||||
_video_driver->MakeDirty(left, top, width, height);
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
|
||||
*/
|
||||
void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectMode mode)
|
||||
{
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
const DrawPixelInfo *dpi = _cur_dpi;
|
||||
void *dst;
|
||||
const int otop = top;
|
||||
@@ -166,7 +166,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectM
|
||||
*/
|
||||
static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash = 0)
|
||||
{
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
|
||||
assert(width > 0);
|
||||
|
||||
@@ -418,21 +418,19 @@ static int DrawLayoutLine(const ParagraphLayouter::Line *line, int y, int left,
|
||||
NOT_REACHED();
|
||||
}
|
||||
|
||||
TextColour colour = TC_BLACK;
|
||||
bool draw_shadow = false;
|
||||
for (int run_index = 0; run_index < line->CountRuns(); run_index++) {
|
||||
const ParagraphLayouter::VisualRun *run = line->GetVisualRun(run_index);
|
||||
const Font *f = (const Font*)run->GetFont();
|
||||
|
||||
FontCache *fc = f->fc;
|
||||
colour = f->colour;
|
||||
TextColour colour = f->colour;
|
||||
SetColourRemap(colour);
|
||||
|
||||
DrawPixelInfo *dpi = _cur_dpi;
|
||||
int dpi_left = dpi->left;
|
||||
int dpi_right = dpi->left + dpi->width - 1;
|
||||
|
||||
draw_shadow = fc->GetDrawGlyphShadow() && colour != TC_BLACK;
|
||||
bool draw_shadow = fc->GetDrawGlyphShadow() && colour != TC_BLACK;
|
||||
|
||||
for (int i = 0; i < run->GetGlyphCount(); i++) {
|
||||
GlyphID glyph = run->GetGlyphs()[i];
|
||||
@@ -463,11 +461,6 @@ static int DrawLayoutLine(const ParagraphLayouter::Line *line, int y, int left,
|
||||
if (truncation) {
|
||||
int x = (_current_text_dir == TD_RTL) ? left : (right - 3 * dot_width);
|
||||
for (int i = 0; i < 3; i++, x += dot_width) {
|
||||
if (draw_shadow) {
|
||||
SetColourRemap(TC_BLACK);
|
||||
GfxMainBlitter(dot_sprite, x + 1, y + 1, BM_COLOUR_REMAP);
|
||||
SetColourRemap(colour);
|
||||
}
|
||||
GfxMainBlitter(dot_sprite, x, y, BM_COLOUR_REMAP);
|
||||
}
|
||||
}
|
||||
@@ -795,7 +788,7 @@ void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSpri
|
||||
GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite);
|
||||
} else if (pal != PAL_NONE) {
|
||||
_colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
|
||||
GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, pal == PALETTE_CRASH ? BM_CRASH_REMAP : BM_COLOUR_REMAP, sub, real_sprite);
|
||||
GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_COLOUR_REMAP, sub, real_sprite);
|
||||
} else {
|
||||
GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite);
|
||||
}
|
||||
@@ -818,70 +811,43 @@ void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub,
|
||||
GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite, zoom);
|
||||
} else if (pal != PAL_NONE) {
|
||||
_colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
|
||||
GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, pal == PALETTE_CRASH ? BM_CRASH_REMAP : BM_COLOUR_REMAP, sub, real_sprite, zoom);
|
||||
GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_COLOUR_REMAP, sub, real_sprite, zoom);
|
||||
} else {
|
||||
GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The code for setting up the blitter mode and sprite information before finally drawing the sprite.
|
||||
* @param sprite The sprite to draw.
|
||||
* @param x The X location to draw.
|
||||
* @param y The Y location to draw.
|
||||
* @param mode The settings for the blitter to pass.
|
||||
* @param sub Whether to only draw a sub set of the sprite.
|
||||
* @param zoom The zoom level at which to draw the sprites.
|
||||
* @tparam ZOOM_BASE The factor required to get the sub sprite information into the right size.
|
||||
* @tparam SCALED_XY Whether the X and Y are scaled or unscaled.
|
||||
*/
|
||||
template <int ZOOM_BASE, bool SCALED_XY>
|
||||
static void GfxBlitter(const Sprite * const sprite, int x, int y, BlitterMode mode, const SubSprite * const sub, SpriteID sprite_id, ZoomLevel zoom)
|
||||
static void GfxMainBlitterViewport(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub, SpriteID sprite_id)
|
||||
{
|
||||
const DrawPixelInfo *dpi = _cur_dpi;
|
||||
Blitter::BlitterParams bp;
|
||||
|
||||
if (SCALED_XY) {
|
||||
/* Scale it */
|
||||
x = ScaleByZoom(x, zoom);
|
||||
y = ScaleByZoom(y, zoom);
|
||||
}
|
||||
/* Amount of pixels to clip from the source sprite */
|
||||
int clip_left = (sub != NULL ? max(0, -sprite->x_offs + sub->left * ZOOM_LVL_BASE ) : 0);
|
||||
int clip_top = (sub != NULL ? max(0, -sprite->y_offs + sub->top * ZOOM_LVL_BASE ) : 0);
|
||||
int clip_right = (sub != NULL ? max(0, sprite->width - (-sprite->x_offs + (sub->right + 1) * ZOOM_LVL_BASE)) : 0);
|
||||
int clip_bottom = (sub != NULL ? max(0, sprite->height - (-sprite->y_offs + (sub->bottom + 1) * ZOOM_LVL_BASE)) : 0);
|
||||
|
||||
if (clip_left + clip_right >= sprite->width) return;
|
||||
if (clip_top + clip_bottom >= sprite->height) return;
|
||||
|
||||
/* Move to the correct offset */
|
||||
x += sprite->x_offs;
|
||||
y += sprite->y_offs;
|
||||
|
||||
if (sub == NULL) {
|
||||
/* No clipping. */
|
||||
bp.skip_left = 0;
|
||||
bp.skip_top = 0;
|
||||
bp.width = UnScaleByZoom(sprite->width, zoom);
|
||||
bp.height = UnScaleByZoom(sprite->height, zoom);
|
||||
} else {
|
||||
/* Amount of pixels to clip from the source sprite */
|
||||
int clip_left = max(0, -sprite->x_offs + sub->left * ZOOM_BASE );
|
||||
int clip_top = max(0, -sprite->y_offs + sub->top * ZOOM_BASE );
|
||||
int clip_right = max(0, sprite->width - (-sprite->x_offs + (sub->right + 1) * ZOOM_BASE));
|
||||
int clip_bottom = max(0, sprite->height - (-sprite->y_offs + (sub->bottom + 1) * ZOOM_BASE));
|
||||
|
||||
if (clip_left + clip_right >= sprite->width) return;
|
||||
if (clip_top + clip_bottom >= sprite->height) return;
|
||||
|
||||
bp.skip_left = UnScaleByZoomLower(clip_left, zoom);
|
||||
bp.skip_top = UnScaleByZoomLower(clip_top, zoom);
|
||||
bp.width = UnScaleByZoom(sprite->width - clip_left - clip_right, zoom);
|
||||
bp.height = UnScaleByZoom(sprite->height - clip_top - clip_bottom, zoom);
|
||||
|
||||
x += ScaleByZoom(bp.skip_left, zoom);
|
||||
y += ScaleByZoom(bp.skip_top, zoom);
|
||||
}
|
||||
|
||||
/* Copy the main data directly from the sprite */
|
||||
bp.sprite = sprite->data;
|
||||
bp.sprite_width = sprite->width;
|
||||
bp.sprite_height = sprite->height;
|
||||
bp.width = UnScaleByZoom(sprite->width - clip_left - clip_right, dpi->zoom);
|
||||
bp.height = UnScaleByZoom(sprite->height - clip_top - clip_bottom, dpi->zoom);
|
||||
bp.top = 0;
|
||||
bp.left = 0;
|
||||
bp.skip_left = UnScaleByZoomLower(clip_left, dpi->zoom);
|
||||
bp.skip_top = UnScaleByZoomLower(clip_top, dpi->zoom);
|
||||
|
||||
x += ScaleByZoom(bp.skip_left, dpi->zoom);
|
||||
y += ScaleByZoom(bp.skip_top, dpi->zoom);
|
||||
|
||||
bp.dst = dpi->dst_ptr;
|
||||
bp.pitch = dpi->pitch;
|
||||
@@ -893,50 +859,48 @@ static void GfxBlitter(const Sprite * const sprite, int x, int y, BlitterMode mo
|
||||
if (bp.width <= 0) return;
|
||||
if (bp.height <= 0) return;
|
||||
|
||||
y -= SCALED_XY ? ScaleByZoom(dpi->top, zoom) : dpi->top;
|
||||
int y_unscaled = UnScaleByZoom(y, zoom);
|
||||
y -= dpi->top;
|
||||
/* Check for top overflow */
|
||||
if (y < 0) {
|
||||
bp.height -= -y_unscaled;
|
||||
bp.height -= -UnScaleByZoom(y, dpi->zoom);
|
||||
if (bp.height <= 0) return;
|
||||
bp.skip_top += -y_unscaled;
|
||||
bp.skip_top += -UnScaleByZoom(y, dpi->zoom);
|
||||
y = 0;
|
||||
} else {
|
||||
bp.top = y_unscaled;
|
||||
bp.top = UnScaleByZoom(y, dpi->zoom);
|
||||
}
|
||||
|
||||
/* Check for bottom overflow */
|
||||
y += SCALED_XY ? ScaleByZoom(bp.height - dpi->height, zoom) : ScaleByZoom(bp.height, zoom) - dpi->height;
|
||||
y += ScaleByZoom(bp.height, dpi->zoom) - dpi->height;
|
||||
if (y > 0) {
|
||||
bp.height -= UnScaleByZoom(y, zoom);
|
||||
bp.height -= UnScaleByZoom(y, dpi->zoom);
|
||||
if (bp.height <= 0) return;
|
||||
}
|
||||
|
||||
x -= SCALED_XY ? ScaleByZoom(dpi->left, zoom) : dpi->left;
|
||||
int x_unscaled = UnScaleByZoom(x, zoom);
|
||||
x -= dpi->left;
|
||||
/* Check for left overflow */
|
||||
if (x < 0) {
|
||||
bp.width -= -x_unscaled;
|
||||
bp.width -= -UnScaleByZoom(x, dpi->zoom);
|
||||
if (bp.width <= 0) return;
|
||||
bp.skip_left += -x_unscaled;
|
||||
bp.skip_left += -UnScaleByZoom(x, dpi->zoom);
|
||||
x = 0;
|
||||
} else {
|
||||
bp.left = x_unscaled;
|
||||
bp.left = UnScaleByZoom(x, dpi->zoom);
|
||||
}
|
||||
|
||||
/* Check for right overflow */
|
||||
x += SCALED_XY ? ScaleByZoom(bp.width - dpi->width, zoom) : ScaleByZoom(bp.width, zoom) - dpi->width;
|
||||
x += ScaleByZoom(bp.width, dpi->zoom) - dpi->width;
|
||||
if (x > 0) {
|
||||
bp.width -= UnScaleByZoom(x, zoom);
|
||||
bp.width -= UnScaleByZoom(x, dpi->zoom);
|
||||
if (bp.width <= 0) return;
|
||||
}
|
||||
|
||||
assert(bp.skip_left + bp.width <= UnScaleByZoom(sprite->width, zoom));
|
||||
assert(bp.skip_top + bp.height <= UnScaleByZoom(sprite->height, zoom));
|
||||
assert(bp.skip_left + bp.width <= UnScaleByZoom(sprite->width, dpi->zoom));
|
||||
assert(bp.skip_top + bp.height <= UnScaleByZoom(sprite->height, dpi->zoom));
|
||||
|
||||
/* We do not want to catch the mouse. However we also use that spritenumber for unknown (text) sprites. */
|
||||
if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW && sprite_id != SPR_CURSOR_MOUSE) {
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
void *topleft = blitter->MoveTo(bp.dst, bp.left, bp.top);
|
||||
void *bottomright = blitter->MoveTo(topleft, bp.width - 1, bp.height - 1);
|
||||
|
||||
@@ -950,17 +914,111 @@ static void GfxBlitter(const Sprite * const sprite, int x, int y, BlitterMode mo
|
||||
}
|
||||
}
|
||||
|
||||
BlitterFactory::GetCurrentBlitter()->Draw(&bp, mode, zoom);
|
||||
}
|
||||
|
||||
static void GfxMainBlitterViewport(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub, SpriteID sprite_id)
|
||||
{
|
||||
GfxBlitter<ZOOM_LVL_BASE, false>(sprite, x, y, mode, sub, sprite_id, _cur_dpi->zoom);
|
||||
BlitterFactoryBase::GetCurrentBlitter()->Draw(&bp, mode, dpi->zoom);
|
||||
}
|
||||
|
||||
static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub, SpriteID sprite_id, ZoomLevel zoom)
|
||||
{
|
||||
GfxBlitter<1, true>(sprite, x, y, mode, sub, sprite_id, zoom);
|
||||
const DrawPixelInfo *dpi = _cur_dpi;
|
||||
Blitter::BlitterParams bp;
|
||||
|
||||
/* Amount of pixels to clip from the source sprite */
|
||||
int clip_left = (sub != NULL ? max(0, -sprite->x_offs + sub->left ) : 0);
|
||||
int clip_top = (sub != NULL ? max(0, -sprite->y_offs + sub->top ) : 0);
|
||||
int clip_right = (sub != NULL ? max(0, sprite->width - (-sprite->x_offs + sub->right + 1)) : 0);
|
||||
int clip_bottom = (sub != NULL ? max(0, sprite->height - (-sprite->y_offs + sub->bottom + 1)) : 0);
|
||||
|
||||
if (clip_left + clip_right >= sprite->width) return;
|
||||
if (clip_top + clip_bottom >= sprite->height) return;
|
||||
|
||||
/* Scale it */
|
||||
x = ScaleByZoom(x, zoom);
|
||||
y = ScaleByZoom(y, zoom);
|
||||
|
||||
/* Move to the correct offset */
|
||||
x += sprite->x_offs;
|
||||
y += sprite->y_offs;
|
||||
|
||||
/* Copy the main data directly from the sprite */
|
||||
bp.sprite = sprite->data;
|
||||
bp.sprite_width = sprite->width;
|
||||
bp.sprite_height = sprite->height;
|
||||
bp.width = UnScaleByZoom(sprite->width - clip_left - clip_right, zoom);
|
||||
bp.height = UnScaleByZoom(sprite->height - clip_top - clip_bottom, zoom);
|
||||
bp.top = 0;
|
||||
bp.left = 0;
|
||||
bp.skip_left = UnScaleByZoomLower(clip_left, zoom);
|
||||
bp.skip_top = UnScaleByZoomLower(clip_top, zoom);
|
||||
|
||||
x += ScaleByZoom(bp.skip_left, zoom);
|
||||
y += ScaleByZoom(bp.skip_top, zoom);
|
||||
|
||||
bp.dst = dpi->dst_ptr;
|
||||
bp.pitch = dpi->pitch;
|
||||
bp.remap = _colour_remap_ptr;
|
||||
|
||||
assert(sprite->width > 0);
|
||||
assert(sprite->height > 0);
|
||||
|
||||
if (bp.width <= 0) return;
|
||||
if (bp.height <= 0) return;
|
||||
|
||||
y -= ScaleByZoom(dpi->top, zoom);
|
||||
/* Check for top overflow */
|
||||
if (y < 0) {
|
||||
bp.height -= -UnScaleByZoom(y, zoom);
|
||||
if (bp.height <= 0) return;
|
||||
bp.skip_top += -UnScaleByZoom(y, zoom);
|
||||
y = 0;
|
||||
} else {
|
||||
bp.top = UnScaleByZoom(y, zoom);
|
||||
}
|
||||
|
||||
/* Check for bottom overflow */
|
||||
y += ScaleByZoom(bp.height - dpi->height, zoom);
|
||||
if (y > 0) {
|
||||
bp.height -= UnScaleByZoom(y, zoom);
|
||||
if (bp.height <= 0) return;
|
||||
}
|
||||
|
||||
x -= ScaleByZoom(dpi->left, zoom);
|
||||
/* Check for left overflow */
|
||||
if (x < 0) {
|
||||
bp.width -= -UnScaleByZoom(x, zoom);
|
||||
if (bp.width <= 0) return;
|
||||
bp.skip_left += -UnScaleByZoom(x, zoom);
|
||||
x = 0;
|
||||
} else {
|
||||
bp.left = UnScaleByZoom(x, zoom);
|
||||
}
|
||||
|
||||
/* Check for right overflow */
|
||||
x += ScaleByZoom(bp.width - dpi->width, zoom);
|
||||
if (x > 0) {
|
||||
bp.width -= UnScaleByZoom(x, zoom);
|
||||
if (bp.width <= 0) return;
|
||||
}
|
||||
|
||||
assert(bp.skip_left + bp.width <= UnScaleByZoom(sprite->width, zoom));
|
||||
assert(bp.skip_top + bp.height <= UnScaleByZoom(sprite->height, zoom));
|
||||
|
||||
/* We do not want to catch the mouse. However we also use that spritenumber for unknown (text) sprites. */
|
||||
if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW && sprite_id != SPR_CURSOR_MOUSE) {
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
void *topleft = blitter->MoveTo(bp.dst, bp.left, bp.top);
|
||||
void *bottomright = blitter->MoveTo(topleft, bp.width - 1, bp.height - 1);
|
||||
|
||||
void *clicked = _newgrf_debug_sprite_picker.clicked_pixel;
|
||||
|
||||
if (topleft <= clicked && clicked <= bottomright) {
|
||||
uint offset = (((size_t)clicked - (size_t)topleft) / (blitter->GetScreenDepth() / 8)) % bp.pitch;
|
||||
if (offset < (uint)bp.width) {
|
||||
_newgrf_debug_sprite_picker.sprites.Include(sprite_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BlitterFactoryBase::GetCurrentBlitter()->Draw(&bp, mode, zoom);
|
||||
}
|
||||
|
||||
void DoPaletteAnimations();
|
||||
@@ -980,7 +1038,7 @@ void DoPaletteAnimations()
|
||||
static int palette_animation_counter = 0;
|
||||
palette_animation_counter += 8;
|
||||
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
const Colour *s;
|
||||
const ExtraPaletteValues *ev = &_extra_palette_values;
|
||||
Colour old_val[PALETTE_ANIM_SIZE];
|
||||
@@ -1180,10 +1238,10 @@ void UndrawMouseCursor()
|
||||
if (_screen.dst_ptr == NULL) return;
|
||||
|
||||
if (_cursor.visible) {
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
_cursor.visible = false;
|
||||
blitter->CopyFromBuffer(blitter->MoveTo(_screen.dst_ptr, _cursor.draw_pos.x, _cursor.draw_pos.y), _cursor_backup.GetBuffer(), _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
VideoDriver::GetInstance()->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
_video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1197,7 +1255,7 @@ void DrawMouseCursor()
|
||||
/* Don't draw the mouse cursor if the screen is not ready */
|
||||
if (_screen.dst_ptr == NULL) return;
|
||||
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
int x;
|
||||
int y;
|
||||
int w;
|
||||
@@ -1243,7 +1301,7 @@ void DrawMouseCursor()
|
||||
_cur_dpi = &_screen;
|
||||
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);
|
||||
_video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
|
||||
|
||||
_cursor.visible = true;
|
||||
_cursor.dirty = false;
|
||||
@@ -1267,7 +1325,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
|
||||
|
||||
DrawOverlappedWindowForAll(left, top, right, bottom);
|
||||
|
||||
VideoDriver::GetInstance()->MakeDirty(left, top, right - left, bottom - top);
|
||||
_video_driver->MakeDirty(left, top, right - left, bottom - top);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1450,7 +1508,7 @@ void MarkWholeScreenDirty()
|
||||
*/
|
||||
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height)
|
||||
{
|
||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||
Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
|
||||
const DrawPixelInfo *o = _cur_dpi;
|
||||
|
||||
n->zoom = ZOOM_LVL_NORMAL;
|
||||
@@ -1576,12 +1634,12 @@ void SetAnimatedMouseCursor(const AnimCursor *table)
|
||||
|
||||
bool ChangeResInGame(int width, int height)
|
||||
{
|
||||
return (_screen.width == width && _screen.height == height) || VideoDriver::GetInstance()->ChangeResolution(width, height);
|
||||
return (_screen.width == width && _screen.height == height) || _video_driver->ChangeResolution(width, height);
|
||||
}
|
||||
|
||||
bool ToggleFullScreen(bool fs)
|
||||
{
|
||||
bool result = VideoDriver::GetInstance()->ToggleFullscreen(fs);
|
||||
bool result = _video_driver->ToggleFullscreen(fs);
|
||||
if (_fullscreen != fs && _num_resolutions == 0) {
|
||||
DEBUG(driver, 0, "Could not find a suitable fullscreen resolution");
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ void SetDirtyBlocks(int left, int top, int right, int bottom);
|
||||
void MarkWholeScreenDirty();
|
||||
|
||||
void GfxInitPalettes();
|
||||
void CheckBlitter();
|
||||
|
||||
bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height);
|
||||
|
||||
|
||||
+15
-64
@@ -15,7 +15,6 @@
|
||||
#include "3rdparty/md5/md5.h"
|
||||
#include "fontcache.h"
|
||||
#include "gfx_func.h"
|
||||
#include "transparency.h"
|
||||
#include "blitter/factory.hpp"
|
||||
#include "video/video_driver.hpp"
|
||||
|
||||
@@ -226,77 +225,29 @@ static void LoadSpriteTables()
|
||||
|
||||
/**
|
||||
* Check blitter needed by NewGRF config and switch if needed.
|
||||
* @return False when nothing changed, true otherwise.
|
||||
*/
|
||||
static bool SwitchNewGRFBlitter()
|
||||
static void SwitchNewGRFBlitter()
|
||||
{
|
||||
/* Never switch if the blitter was specified by the user. */
|
||||
if (!_blitter_autodetected) return false;
|
||||
/* Get blitter of base set. */
|
||||
bool is_32bpp = BaseGraphics::GetUsedSet()->blitter == BLT_32BPP;
|
||||
|
||||
/* Null driver => dedicated server => do nothing. */
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() == 0) return false;
|
||||
|
||||
/* Get preferred depth. */
|
||||
uint depth_wanted_by_base = BaseGraphics::GetUsedSet()->blitter == BLT_32BPP ? 32 : 8;
|
||||
uint depth_wanted_by_grf = 8;
|
||||
/* Get combined blitter mode of all NewGRFs. */
|
||||
for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
|
||||
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND || HasBit(c->flags, GCF_INIT_ONLY)) continue;
|
||||
if (c->palette & GRFP_BLT_32BPP) depth_wanted_by_grf = 32;
|
||||
|
||||
if (c->palette & GRFP_BLT_32BPP) is_32bpp = true;
|
||||
}
|
||||
|
||||
/* Search the best blitter. */
|
||||
struct {
|
||||
const char *name;
|
||||
uint animation; ///< 0: no support, 1: do support, 2: both
|
||||
uint min_base_depth, max_base_depth, min_grf_depth, max_grf_depth;
|
||||
} replacement_blitters[] = {
|
||||
#ifdef WITH_SSE
|
||||
{ "32bpp-sse4", 0, 32, 32, 8, 32 },
|
||||
{ "32bpp-ssse3", 0, 32, 32, 8, 32 },
|
||||
{ "32bpp-sse2", 0, 32, 32, 8, 32 },
|
||||
{ "32bpp-sse4-anim", 1, 32, 32, 8, 32 },
|
||||
#endif
|
||||
{ "8bpp-optimized", 2, 8, 8, 8, 8 },
|
||||
{ "32bpp-optimized", 0, 8, 32, 8, 32 },
|
||||
{ "32bpp-anim", 1, 8, 32, 8, 32 },
|
||||
};
|
||||
|
||||
const bool animation_wanted = HasBit(_display_opt, DO_FULL_ANIMATION);
|
||||
const char *cur_blitter = BlitterFactory::GetCurrentBlitter()->GetName();
|
||||
|
||||
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;
|
||||
|
||||
if (!IsInsideMM(depth_wanted_by_base, replacement_blitters[i].min_base_depth, replacement_blitters[i].max_base_depth + 1)) continue;
|
||||
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) return false;
|
||||
if (BlitterFactory::GetBlitterFactory(repl_blitter) == NULL) continue;
|
||||
|
||||
DEBUG(misc, 1, "Switching blitter from '%s' to '%s'... ", cur_blitter, repl_blitter);
|
||||
Blitter *new_blitter = BlitterFactory::SelectBlitter(repl_blitter);
|
||||
if (new_blitter == NULL) NOT_REACHED();
|
||||
DEBUG(misc, 1, "Successfully switched to %s.", repl_blitter);
|
||||
break;
|
||||
/* A GRF would like a 32 bpp blitter, switch blitter if needed. Never switch if the blitter was specified by the user. */
|
||||
if (_blitter_autodetected && is_32bpp && BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() != 0 && BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() < 16) {
|
||||
const char *cur_blitter = BlitterFactoryBase::GetCurrentBlitter()->GetName();
|
||||
if (BlitterFactoryBase::SelectBlitter("32bpp-anim") != NULL) {
|
||||
if (!_video_driver->AfterBlitterChange()) {
|
||||
/* Failed to switch blitter, let's hope we can return to the old one. */
|
||||
if (BlitterFactoryBase::SelectBlitter(cur_blitter) == NULL || !_video_driver->AfterBlitterChange()) usererror("Failed to reinitialize video driver for 32 bpp blitter. Specify a fixed blitter in the config");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!VideoDriver::GetInstance()->AfterBlitterChange()) {
|
||||
/* Failed to switch blitter, let's hope we can return to the old one. */
|
||||
if (BlitterFactory::SelectBlitter(cur_blitter) == NULL || !VideoDriver::GetInstance()->AfterBlitterChange()) usererror("Failed to reinitialize video driver. Specify a fixed blitter in the config");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Check whether we still use the right blitter, or use another (better) one. */
|
||||
void CheckBlitter()
|
||||
{
|
||||
if (!SwitchNewGRFBlitter()) return;
|
||||
|
||||
ClearFontCache();
|
||||
GfxClearSpriteCache();
|
||||
}
|
||||
|
||||
/** Initialise and load all the sprites. */
|
||||
|
||||
+5
-26
@@ -92,11 +92,7 @@ CommandCost CmdCreateGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
g->progress = NULL;
|
||||
g->completed = false;
|
||||
|
||||
if (g->company == INVALID_COMPANY) {
|
||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||
} else {
|
||||
InvalidateWindowData(WC_GOALS_LIST, g->company);
|
||||
}
|
||||
InvalidateWindowData(WC_GOALS_LIST, 0);
|
||||
if (Goal::GetNumItems() == 1) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
||||
|
||||
_new_goal_id = g->index;
|
||||
@@ -121,14 +117,9 @@ CommandCost CmdRemoveGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
Goal *g = Goal::Get(p1);
|
||||
CompanyID c = g->company;
|
||||
delete g;
|
||||
|
||||
if (c == INVALID_COMPANY) {
|
||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||
} else {
|
||||
InvalidateWindowData(WC_GOALS_LIST, c);
|
||||
}
|
||||
InvalidateWindowData(WC_GOALS_LIST, 0);
|
||||
if (Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
||||
}
|
||||
|
||||
@@ -155,11 +146,7 @@ CommandCost CmdSetGoalText(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
free(g->text);
|
||||
g->text = strdup(text);
|
||||
|
||||
if (g->company == INVALID_COMPANY) {
|
||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||
} else {
|
||||
InvalidateWindowData(WC_GOALS_LIST, g->company);
|
||||
}
|
||||
InvalidateWindowData(WC_GOALS_LIST, 0);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -188,11 +175,7 @@ CommandCost CmdSetGoalProgress(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
g->progress = strdup(text);
|
||||
}
|
||||
|
||||
if (g->company == INVALID_COMPANY) {
|
||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||
} else {
|
||||
InvalidateWindowData(WC_GOALS_LIST, g->company);
|
||||
}
|
||||
InvalidateWindowData(WC_GOALS_LIST, 0);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -216,11 +199,7 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
Goal *g = Goal::Get(p1);
|
||||
g->completed = p2 == 1;
|
||||
|
||||
if (g->company == INVALID_COMPANY) {
|
||||
InvalidateWindowClassesData(WC_GOALS_LIST);
|
||||
} else {
|
||||
InvalidateWindowData(WC_GOALS_LIST, g->company);
|
||||
}
|
||||
InvalidateWindowData(WC_GOALS_LIST, 0);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
||||
@@ -273,8 +273,6 @@ struct GoalListWindow : public Window {
|
||||
{
|
||||
this->DrawWidgets();
|
||||
|
||||
if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
|
||||
|
||||
/* Calculate progress column width. */
|
||||
uint max_width = 0;
|
||||
Goal *s;
|
||||
|
||||
+2
-25
@@ -1563,30 +1563,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
|
||||
static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int type)
|
||||
{
|
||||
const IndustrySpec *indspec = GetIndustrySpec(type);
|
||||
const Industry *i = NULL;
|
||||
|
||||
/* On a large map with many industries, it may be faster to check an area. */
|
||||
static const int dmax = 14;
|
||||
if (Industry::GetNumItems() > (size_t) (dmax * dmax * 2)) {
|
||||
const int tx = TileX(tile);
|
||||
const int ty = TileY(tile);
|
||||
TileArea tile_area = TileArea(TileXY(max(0, tx - dmax), max(0, ty - dmax)), TileXY(min(MapMaxX(), tx + dmax), min(MapMaxY(), ty + dmax)));
|
||||
TILE_AREA_LOOP(atile, tile_area) {
|
||||
if (GetTileType(atile) == MP_INDUSTRY) {
|
||||
const Industry *i2 = Industry::GetByTile(atile);
|
||||
if (i == i2) continue;
|
||||
i = i2;
|
||||
if (DistanceMax(tile, i->location.tile) > (uint)dmax) continue;
|
||||
if (i->type == indspec->conflicting[0] ||
|
||||
i->type == indspec->conflicting[1] ||
|
||||
i->type == indspec->conflicting[2]) {
|
||||
return_cmd_error(STR_ERROR_INDUSTRY_TOO_CLOSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
const Industry *i;
|
||||
FOR_ALL_INDUSTRIES(i) {
|
||||
/* Within 14 tiles from another industry is considered close */
|
||||
if (DistanceMax(tile, i->location.tile) > 14) continue;
|
||||
@@ -2018,7 +1995,7 @@ static uint GetNumberOfIndustries()
|
||||
|
||||
assert(lengthof(numof_industry_table) == ID_END);
|
||||
uint difficulty = (_game_mode != GM_EDITOR) ? _settings_game.difficulty.industry_density : (uint)ID_VERY_LOW;
|
||||
return min(IndustryPool::MAX_SIZE, ScaleByMapSize(numof_industry_table[difficulty]));
|
||||
return ScaleByMapSize(numof_industry_table[difficulty]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,7 +79,7 @@ static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind,
|
||||
if (callback > 0x400) {
|
||||
ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_CARGO_SUFFIX, callback);
|
||||
} else if (indspec->grf_prop.grffile->grf_version >= 8 || GB(callback, 0, 8) != 0xFF) {
|
||||
StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
|
||||
StartTextRefStackUsage(6);
|
||||
GetString(suffix, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback), suffix_last);
|
||||
StopTextRefStackUsage();
|
||||
}
|
||||
@@ -471,7 +471,7 @@ public:
|
||||
} else {
|
||||
str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string
|
||||
if (str != STR_UNDEFINED) {
|
||||
StartTextRefStackUsage(indsp->grf_prop.grffile, 6);
|
||||
StartTextRefStackUsage(6);
|
||||
DrawStringMultiLine(left, right, y, bottom, str, TC_YELLOW);
|
||||
StopTextRefStackUsage();
|
||||
}
|
||||
@@ -800,7 +800,7 @@ public:
|
||||
if (message != STR_NULL && message != STR_UNDEFINED) {
|
||||
y += WD_PAR_VSEP_WIDE;
|
||||
|
||||
StartTextRefStackUsage(ind->grf_prop.grffile, 6);
|
||||
StartTextRefStackUsage(6);
|
||||
/* Use all the available space left from where we stand up to the
|
||||
* end of the window. We ALSO enlarge the window if needed, so we
|
||||
* can 'go' wild with the bottom of the window. */
|
||||
|
||||
@@ -26,8 +26,6 @@ IniItem::IniItem(IniGroup *parent, const char *name, size_t len) : next(NULL), v
|
||||
if (len == 0) len = strlen(name);
|
||||
|
||||
this->name = strndup(name, len);
|
||||
if (this->name != NULL) str_validate(this->name, this->name + len);
|
||||
|
||||
*parent->last_item = this;
|
||||
parent->last_item = &this->next;
|
||||
}
|
||||
@@ -63,9 +61,6 @@ IniGroup::IniGroup(IniLoadFile *parent, const char *name, size_t len) : next(NUL
|
||||
if (len == 0) len = strlen(name);
|
||||
|
||||
this->name = strndup(name, len);
|
||||
if (this->name == NULL) error("not enough memory to allocate group name");
|
||||
str_validate(this->name, this->name + len);
|
||||
|
||||
this->last_item = &this->item;
|
||||
*parent->last_group = this;
|
||||
parent->last_group = &this->next;
|
||||
@@ -310,7 +305,6 @@ void IniLoadFile::LoadFromDisk(const char *filename, Subdirectory subdir)
|
||||
|
||||
/* If the value was not quoted and empty, it must be NULL */
|
||||
item->value = (!quoted && e == t) ? NULL : strndup(t, e - t);
|
||||
if (item->value != NULL) str_validate(item->value, item->value + strlen(item->value));
|
||||
} else {
|
||||
/* it's an orphan item */
|
||||
this->ReportFileError("ini: '", buffer, "' outside of group");
|
||||
|
||||
+23
-24
@@ -32,7 +32,6 @@
|
||||
#include "company_func.h"
|
||||
#include "pathfinder/npf/aystar.h"
|
||||
#include <list>
|
||||
#include <set>
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
@@ -668,7 +667,8 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
const Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? NULL : Company::GetIfValid(_current_company);
|
||||
int limit = (c == NULL ? INT32_MAX : GB(c->clear_limit, 16, 16));
|
||||
|
||||
TileIterator *iter = HasBit(p2, 0) ? (TileIterator *)new DiagonalTileIterator(tile, p1) : new OrthogonalTileIterator(tile, p1);
|
||||
TileArea ta(tile, p1);
|
||||
TileIterator *iter = HasBit(p2, 0) ? (TileIterator *)new DiagonalTileIterator(tile, p1) : new OrthogonalTileIterator(ta);
|
||||
for (; *iter != INVALID_TILE; ++(*iter)) {
|
||||
TileIndex t = *iter;
|
||||
CommandCost ret = DoCommand(t, 0, 0, flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR);
|
||||
@@ -692,10 +692,11 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
/* draw explosion animation...
|
||||
* Disable explosions when game is paused. Looks silly and blocks the view. */
|
||||
if ((t == tile || t == p1) && _pause_mode == PM_UNPAUSED) {
|
||||
/* big explosion in two corners, or small explosion for single tiles */
|
||||
TileIndex off = t - ta.tile;
|
||||
if ((TileX(off) == 0 || TileX(off) == ta.w - 1U) && (TileY(off) == 0 || TileY(off) == ta.h - 1U) && _pause_mode == PM_UNPAUSED) {
|
||||
/* big explosion in each corner, or small explosion for single tiles */
|
||||
CreateEffectVehicleAbove(TileX(t) * TILE_SIZE + TILE_SIZE / 2, TileY(t) * TILE_SIZE + TILE_SIZE / 2, 2,
|
||||
TileX(tile) == TileX(p1) && TileY(tile) == TileY(p1) ? EV_EXPLOSION_SMALL : EV_EXPLOSION_LARGE
|
||||
ta.w == 1 && ta.h == 1 ? EV_EXPLOSION_SMALL : EV_EXPLOSION_LARGE
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@@ -721,13 +722,12 @@ void RunTileLoop()
|
||||
* shift register (LFSR). This allows a deterministic pseudorandom ordering, but
|
||||
* still with minimal state and fast iteration. */
|
||||
|
||||
/* Maximal length LFSR feedback terms, from 12-bit (for 64x64 maps) to 24-bit (for 4096x4096 maps).
|
||||
/* Maximal length LFSR feedback terms, from 12-bit (for 64x64 maps) to 22-bit (for 2048x2048 maps).
|
||||
* Extracted from http://www.ece.cmu.edu/~koopman/lfsr/ */
|
||||
static const uint32 feedbacks[] = {
|
||||
0xD8F, 0x1296, 0x2496, 0x4357, 0x8679, 0x1030E, 0x206CD, 0x403FE, 0x807B8, 0x1004B2, 0x2006A8, 0x4004B2, 0x800B87
|
||||
0xD8F, 0x1296, 0x2496, 0x4357, 0x8679, 0x1030E, 0x206CD, 0x403FE, 0x807B8, 0x1004B2, 0x2006A8
|
||||
};
|
||||
assert_compile(lengthof(feedbacks) == 2 * MAX_MAP_SIZE_BITS - 2 * MIN_MAP_SIZE_BITS + 1);
|
||||
const uint32 feedback = feedbacks[MapLogX() + MapLogY() - 2 * MIN_MAP_SIZE_BITS];
|
||||
const uint32 feedback = feedbacks[MapLogX() + MapLogY() - 12];
|
||||
|
||||
/* We update every tile every 256 ticks, so divide the map size by 2^8 = 256 */
|
||||
uint count = 1 << (MapLogX() + MapLogY() - 8);
|
||||
@@ -1097,20 +1097,18 @@ static void BuildRiver(TileIndex begin, TileIndex end)
|
||||
|
||||
/**
|
||||
* Try to flow the river down from a given begin.
|
||||
* @param marks Array for temporary of iterated tiles.
|
||||
* @param spring The springing point of the river.
|
||||
* @param begin The begin point we are looking from; somewhere down hill from the spring.
|
||||
* @return True iff a river could/has been built, otherwise false.
|
||||
*/
|
||||
static bool FlowRiver(TileIndex spring, TileIndex begin)
|
||||
static bool FlowRiver(bool *marks, TileIndex spring, TileIndex begin)
|
||||
{
|
||||
#define SET_MARK(x) marks.insert(x)
|
||||
#define IS_MARKED(x) (marks.find(x) != marks.end())
|
||||
|
||||
uint height = TileHeight(begin);
|
||||
if (IsWaterTile(begin)) return DistanceManhattan(spring, begin) > _settings_game.game_creation.min_river_length;
|
||||
|
||||
std::set<TileIndex> marks;
|
||||
SET_MARK(begin);
|
||||
MemSetT(marks, 0, MapSize());
|
||||
marks[begin] = true;
|
||||
|
||||
/* Breadth first search for the closest tile we can flow down to. */
|
||||
std::list<TileIndex> queue;
|
||||
@@ -1131,8 +1129,8 @@ static bool FlowRiver(TileIndex spring, TileIndex begin)
|
||||
|
||||
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
|
||||
TileIndex t2 = end + TileOffsByDiagDir(d);
|
||||
if (IsValidTile(t2) && !IS_MARKED(t2) && FlowsDown(end, t2)) {
|
||||
SET_MARK(t2);
|
||||
if (IsValidTile(t2) && !marks[t2] && FlowsDown(end, t2)) {
|
||||
marks[t2] = true;
|
||||
count++;
|
||||
queue.push_back(t2);
|
||||
}
|
||||
@@ -1141,14 +1139,13 @@ static bool FlowRiver(TileIndex spring, TileIndex begin)
|
||||
|
||||
if (found) {
|
||||
/* Flow further down hill. */
|
||||
found = FlowRiver(spring, end);
|
||||
found = FlowRiver(marks, spring, end);
|
||||
} else if (count > 32) {
|
||||
/* Maybe we can make a lake. Find the Nth of the considered tiles. */
|
||||
TileIndex lakeCenter = 0;
|
||||
int i = RandomRange(count - 1) + 1;
|
||||
std::set<TileIndex>::const_iterator cit = marks.begin();
|
||||
while (--i) cit++;
|
||||
lakeCenter = *cit;
|
||||
for (int i = RandomRange(count - 1); i != 0; lakeCenter++) {
|
||||
if (marks[lakeCenter]) i--;
|
||||
}
|
||||
|
||||
if (IsValidTile(lakeCenter) &&
|
||||
/* A river, or lake, can only be built on flat slopes. */
|
||||
@@ -1172,7 +1169,6 @@ static bool FlowRiver(TileIndex spring, TileIndex begin)
|
||||
}
|
||||
}
|
||||
|
||||
marks.clear();
|
||||
if (found) BuildRiver(begin, end);
|
||||
return found;
|
||||
}
|
||||
@@ -1187,16 +1183,19 @@ static void CreateRivers()
|
||||
|
||||
uint wells = ScaleByMapSize(4 << _settings_game.game_creation.amount_of_rivers);
|
||||
SetGeneratingWorldProgress(GWP_RIVER, wells + 256 / 64); // Include the tile loop calls below.
|
||||
bool *marks = CallocT<bool>(MapSize());
|
||||
|
||||
for (; wells != 0; wells--) {
|
||||
IncreaseGeneratingWorldProgress(GWP_RIVER);
|
||||
for (int tries = 0; tries < 128; tries++) {
|
||||
TileIndex t = RandomTile();
|
||||
if (!CircularTileSearch(&t, 8, FindSpring, NULL)) continue;
|
||||
if (FlowRiver(t, t)) break;
|
||||
if (FlowRiver(marks, t, t)) break;
|
||||
}
|
||||
}
|
||||
|
||||
free(marks);
|
||||
|
||||
/* Run tile loop to update the ground density. */
|
||||
for (uint i = 0; i != 256; i++) {
|
||||
if (i % 64 == 0) IncreaseGeneratingWorldProgress(GWP_RIVER);
|
||||
|
||||
+6
-11
@@ -811,11 +811,13 @@ STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE
|
||||
STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} wag in depot
|
||||
STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} wag in die vliegtuig hangar
|
||||
|
||||
# Order review system / warnings
|
||||
# Start of order review system
|
||||
# DON'T ADD OR REMOVE LINES HERE
|
||||
STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE} het te min bevele in skedule
|
||||
STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} het 'n leë bevel
|
||||
STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} het duplikaat bevele
|
||||
STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} het onwettige stasie in sy bevele
|
||||
# end of order system
|
||||
|
||||
STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} raak oud.
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} raak baie oud.
|
||||
@@ -1069,8 +1071,7 @@ STR_CONFIG_SETTING_TYPE_GAME_INGAME :Maatskappy inst
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Maatskappy instelling (word gestoor in Spaarspeletjies; raak net nuwe speletjies)
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Maatskappy instelling (word gestoor in spaarspeletjie; raak net die huidige maatskappy)
|
||||
|
||||
STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Kategorie:
|
||||
STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Tipe:
|
||||
STR_CONFIG_SETTING_RESTRICT_LABEL :{BLACK}Vertoon:
|
||||
STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Beperk die lys hier onder tot slegs veranderde verstellings
|
||||
STR_CONFIG_SETTING_RESTRICT_BASIC :Basiese verstellings
|
||||
STR_CONFIG_SETTING_RESTRICT_ADVANCED :Gevorderde verstellings
|
||||
@@ -1085,10 +1086,6 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_MENU :Spel instelling
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Spel instelling (word gestoor in spaarspeletjie; raak net die huidige speletjie)
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Maatskappy instelling (word gestoor in spaarspeletjies; raak slegs nuwe speletjies)
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Maatskappy instelling (word gestoor in spaarspeletjie; raak net die huidige maatskappy)
|
||||
STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Wys alle soekresultate deur oprigting{}{SILVER}Kategorie {BLACK}tot {WHITE}{STRING}
|
||||
STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Wys alle soekresultate deur oprigting{}{SILVER}Tik {BLACK}tot {WHITE}Alle opstel tipes
|
||||
STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Wys alle soekresultate deur oprigting{}{SILVER}Kategorie {BLACK}tot {WHITE}{STRING} {BLACK}en {SILVER}Tik {BLACK}tot {WHITE}Alle opstel tipes
|
||||
STR_CONFIG_SETTINGS_NONE :{WHITE}- Geen -
|
||||
|
||||
STR_CONFIG_SETTING_OFF :Af
|
||||
STR_CONFIG_SETTING_ON :Aan
|
||||
@@ -1807,7 +1804,6 @@ STR_LIVERY_FREIGHT_TRAM :Vrag Trem
|
||||
STR_FACE_CAPTION :{WHITE}Gesig Keuse
|
||||
STR_FACE_CANCEL_TOOLTIP :{BLACK}Kanselleer nuwe gesig keuse
|
||||
STR_FACE_OK_TOOLTIP :{BLACK}Aanvar nuwe gesig keuse
|
||||
STR_MAPGEN_RANDOM :{BLACK}Lukraake
|
||||
|
||||
STR_FACE_MALE_BUTTON :{BLACK}Manlik
|
||||
STR_FACE_MALE_TOOLTIP :{BLACK}Kies manlik gesigte
|
||||
@@ -2552,7 +2548,6 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NuweGRF:
|
||||
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Vrag aangeneem: {LTBLUE}
|
||||
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING})
|
||||
STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Spoorlyn spoed limiet: {LTBLUE}{VELOCITY}
|
||||
STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Pad spoedgrens: {LTBLUE}{VELOCITY}
|
||||
|
||||
# Description of land area of different tiles
|
||||
STR_LAI_CLEAR_DESCRIPTION_ROCKS :Rotse
|
||||
@@ -2649,7 +2644,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Maatskappy-besi
|
||||
STR_ABOUT_OPENTTD :{WHITE}Oor OpenTTD
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Oorspronklike kopiereg {COPYRIGHT} 1995 Chris Sawyer, Alle regte voorbehou
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD uitgawe {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2014 Die OpenTTD span
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2013 Die OpenTTD span
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Spaar Spel
|
||||
@@ -2688,6 +2683,7 @@ STR_MAPGEN_SNOW_LINE_UP :{BLACK}Beweeg d
|
||||
STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Beweeg die sneeu lyn een af
|
||||
STR_MAPGEN_RANDOM_SEED :{BLACK}Lukraak Saad:
|
||||
STR_MAPGEN_RANDOM_SEED_HELP :{BLACK}Klik om 'n willekeurige saad in te voer
|
||||
STR_MAPGEN_RANDOM :{BLACK}Lukraake
|
||||
STR_MAPGEN_RANDOM_HELP :{BLACK}Verander die lukraak saad gebruik vir Terrein Generasie
|
||||
STR_MAPGEN_LAND_GENERATOR :{BLACK}Land genereerder:
|
||||
STR_MAPGEN_TREE_PLACER :{BLACK}Boom algoritme:
|
||||
@@ -2881,7 +2877,6 @@ STR_NEWGRF_LIST_MISSING :{RED}Vermiste l
|
||||
STR_NEWGRF_BROKEN :{WHITE}Die gedrag van NewGRF '{0:STRING}' kan moontlik sinkroniesasie probleme of program ongelukke veroorsaak
|
||||
STR_NEWGRF_BROKEN_POWERED_WAGON :{WHITE}Dit het die aangedrewe-wa staat vir '{1:ENGINE}' wanneer nie in 'n depot verander
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Het lengte van voertuig verander '{1:ENGINE}' wanneer dit nie in 'n diensstasie is nie
|
||||
STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Dit verander voertuig kapasiteit vir '{1:ENGINE}' wanneer nie binne 'n diensstasie is nie of herstelwerk word gedoen
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Trein '{VEHICLE}' wat aan '{COMPANY}' behoort se lengte is ongeldig. Dit is waarskynlik veroorsaak deur 'n NewGRF. Spel kan verongeluk of sinchronisasie verloor
|
||||
|
||||
STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:STRING}' verskaf foutiewe inligting.
|
||||
|
||||
+21
-18
@@ -22,7 +22,7 @@
|
||||
STR_NULL :
|
||||
STR_EMPTY :
|
||||
STR_UNDEFINED :وصلة غير معرفة
|
||||
STR_JUST_NOTHING :لا شيئ
|
||||
STR_JUST_NOTHING :فارغ
|
||||
|
||||
# Cargo related strings
|
||||
# Plural cargo name
|
||||
@@ -31,13 +31,13 @@ STR_CARGO_PLURAL_PASSENGERS :ركاب
|
||||
STR_CARGO_PLURAL_COAL :فحم
|
||||
STR_CARGO_PLURAL_MAIL :بريد
|
||||
STR_CARGO_PLURAL_OIL :نفط
|
||||
STR_CARGO_PLURAL_LIVESTOCK :ماشيه
|
||||
STR_CARGO_PLURAL_LIVESTOCK :مواشي
|
||||
STR_CARGO_PLURAL_GOODS :بضائع
|
||||
STR_CARGO_PLURAL_GRAIN :حبوب
|
||||
STR_CARGO_PLURAL_WOOD :خشب
|
||||
STR_CARGO_PLURAL_IRON_ORE :خام حديد
|
||||
STR_CARGO_PLURAL_STEEL :صلب
|
||||
STR_CARGO_PLURAL_VALUABLES :مقتنيات ثمينه
|
||||
STR_CARGO_PLURAL_STEEL :حديد
|
||||
STR_CARGO_PLURAL_VALUABLES :مدخرات
|
||||
STR_CARGO_PLURAL_COPPER_ORE :منجم نحاس
|
||||
STR_CARGO_PLURAL_MAIZE :ذرة
|
||||
STR_CARGO_PLURAL_FRUIT :فواكة
|
||||
@@ -49,53 +49,53 @@ STR_CARGO_PLURAL_WATER :ماء
|
||||
STR_CARGO_PLURAL_WHEAT :قمح
|
||||
STR_CARGO_PLURAL_RUBBER :مطاط
|
||||
STR_CARGO_PLURAL_SUGAR :سكر
|
||||
STR_CARGO_PLURAL_TOYS :دُمَي
|
||||
STR_CARGO_PLURAL_TOYS :العاب
|
||||
STR_CARGO_PLURAL_CANDY :حلويات
|
||||
STR_CARGO_PLURAL_COLA :كولا
|
||||
STR_CARGO_PLURAL_COTTON_CANDY :سكر نبات
|
||||
STR_CARGO_PLURAL_COTTON_CANDY :الحلاوة القطنية
|
||||
STR_CARGO_PLURAL_BUBBLES :فقاعات
|
||||
STR_CARGO_PLURAL_TOFFEE :توفي
|
||||
STR_CARGO_PLURAL_BATTERIES :بطاريات
|
||||
STR_CARGO_PLURAL_PLASTIC :بلاستيك
|
||||
STR_CARGO_PLURAL_FIZZY_DRINKS :مشروبات غازيه
|
||||
STR_CARGO_PLURAL_FIZZY_DRINKS :شراب مخفوق
|
||||
|
||||
# Singular cargo name
|
||||
STR_CARGO_SINGULAR_NOTHING :
|
||||
STR_CARGO_SINGULAR_PASSENGER :راكب
|
||||
STR_CARGO_SINGULAR_PASSENGER :ركاب
|
||||
STR_CARGO_SINGULAR_COAL :فحم
|
||||
STR_CARGO_SINGULAR_MAIL :بريد
|
||||
STR_CARGO_SINGULAR_OIL :نفط
|
||||
STR_CARGO_SINGULAR_LIVESTOCK :ماشيه
|
||||
STR_CARGO_SINGULAR_LIVESTOCK :ماشية
|
||||
STR_CARGO_SINGULAR_GOODS :بضائع
|
||||
STR_CARGO_SINGULAR_GRAIN :حبوب
|
||||
STR_CARGO_SINGULAR_WOOD :خشب
|
||||
STR_CARGO_SINGULAR_IRON_ORE :خام الحديد
|
||||
STR_CARGO_SINGULAR_STEEL :صلب
|
||||
STR_CARGO_SINGULAR_STEEL :حديد
|
||||
STR_CARGO_SINGULAR_VALUABLES :مقتنيات ثمينة
|
||||
STR_CARGO_SINGULAR_COPPER_ORE :خام نحاس
|
||||
STR_CARGO_SINGULAR_MAIZE :ذرة
|
||||
STR_CARGO_SINGULAR_FRUIT :فواكة
|
||||
STR_CARGO_SINGULAR_DIAMOND :جواهر
|
||||
STR_CARGO_SINGULAR_FOOD :طعام
|
||||
STR_CARGO_SINGULAR_PAPER :ورق
|
||||
STR_CARGO_SINGULAR_PAPER :اوراق
|
||||
STR_CARGO_SINGULAR_GOLD :ذهب
|
||||
STR_CARGO_SINGULAR_WATER :ماء
|
||||
STR_CARGO_SINGULAR_WHEAT :قمح
|
||||
STR_CARGO_SINGULAR_RUBBER :مطاط
|
||||
STR_CARGO_SINGULAR_SUGAR :سكر
|
||||
STR_CARGO_SINGULAR_TOY :دُمِيه
|
||||
STR_CARGO_SINGULAR_TOY :لعبة
|
||||
STR_CARGO_SINGULAR_CANDY :حلويات
|
||||
STR_CARGO_SINGULAR_COLA :كولا
|
||||
STR_CARGO_SINGULAR_COTTON_CANDY :سكر نبات
|
||||
STR_CARGO_SINGULAR_COTTON_CANDY :حلاوة قطنية
|
||||
STR_CARGO_SINGULAR_BUBBLE :فقاعات
|
||||
STR_CARGO_SINGULAR_TOFFEE :توفي
|
||||
STR_CARGO_SINGULAR_BATTERY :بطاريات
|
||||
STR_CARGO_SINGULAR_PLASTIC :بلاستيك
|
||||
STR_CARGO_SINGULAR_FIZZY_DRINK :مشروب غازى
|
||||
STR_CARGO_SINGULAR_FIZZY_DRINK :مشروب مخفوق
|
||||
|
||||
# Quantity of cargo
|
||||
STR_QUANTITY_NOTHING :
|
||||
STR_QUANTITY_PASSENGERS :{COMMA} راكب
|
||||
STR_QUANTITY_PASSENGERS :{COMMA}راكب
|
||||
STR_QUANTITY_COAL :{WEIGHT_LONG} من الفحم
|
||||
STR_QUANTITY_MAIL :{COMMA} صندوق من البريد
|
||||
STR_QUANTITY_OIL :{VOLUME_LONG} من النفط
|
||||
@@ -785,11 +785,13 @@ STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE
|
||||
STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} تنتظر في حوض السفن
|
||||
STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} تنتظر في الحظيرة
|
||||
|
||||
# Order review system / warnings
|
||||
# Start of order review system
|
||||
# DON'T ADD OR REMOVE LINES HERE
|
||||
STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE} لديها اوامر قليلة جدا في جدولها
|
||||
STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} لديها امر غير صالح
|
||||
STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} لديها امر مكرر
|
||||
STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} لديها محطة غير صالحة في القائمة
|
||||
# end of order system
|
||||
|
||||
STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} اصبحت قديمة
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} اصبحت قديمة جدا
|
||||
@@ -1027,6 +1029,7 @@ STR_CONFIG_SETTING_CAPTION :{WHITE}إعدا
|
||||
STR_CONFIG_SETTING_EXPAND_ALL :مدد الكل
|
||||
STR_CONFIG_SETTING_COLLAPSE_ALL :إسحب الكل
|
||||
|
||||
STR_CONFIG_SETTING_RESTRICT_LABEL :اظهر:
|
||||
STR_CONFIG_SETTING_RESTRICT_BASIC :اﻹعدادات الاساسيه
|
||||
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_HELPTEXT :{BLACK}احصر القائمة على انواع اعدادات محددة
|
||||
@@ -1472,7 +1475,6 @@ STR_LIVERY_FREIGHT_TRAM :عربة ترا
|
||||
STR_FACE_CAPTION :{WHITE}اختيار الوجة
|
||||
STR_FACE_CANCEL_TOOLTIP :{BLACK}الغاء اختيار الوجة الجديد
|
||||
STR_FACE_OK_TOOLTIP :{BLACK}اقبل الوجة الجديد
|
||||
STR_MAPGEN_RANDOM :{BLACK}عشوائي
|
||||
|
||||
STR_FACE_MALE_BUTTON :{BLACK}رجل
|
||||
STR_FACE_MALE_TOOLTIP :{BLACK}اختر وجة رجل
|
||||
@@ -2277,7 +2279,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :ارض مملو
|
||||
STR_ABOUT_OPENTTD :{WHITE}حول النسخة المفتوحة
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}الحقوق الاصلية {COPYRIGHT} كريس سوير 1995 , جميع الحقوق محفوظة
|
||||
STR_ABOUT_VERSION :{BLACK}النسخة المفتوحة رقم {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2014 فريق النسخة المفتوحة
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}النسخة المفتوحة {COPYRIGHT}2002-2013 فريق النسخة المفتوحة
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}حفظ اللعبة
|
||||
@@ -2315,6 +2317,7 @@ STR_MAPGEN_SNOW_LINE_UP :{BLACK}ارفع
|
||||
STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}خفض خط الثلج مستوى واحد
|
||||
STR_MAPGEN_RANDOM_SEED :{BLACK}مرجع عشوائي
|
||||
STR_MAPGEN_RANDOM_SEED_HELP :{BLACK}اضغط لادخال مرجع عشوائي
|
||||
STR_MAPGEN_RANDOM :{BLACK}عشوائي
|
||||
STR_MAPGEN_RANDOM_HELP :{BLACK}غير المرجع العشوائي لتوليد تضاريس الخريطة
|
||||
STR_MAPGEN_LAND_GENERATOR :{BLACK}مولد الخريطة:
|
||||
STR_MAPGEN_TREE_PLACER :{BLACK} لوغاريثم الشجر:
|
||||
|
||||
+11
-107
@@ -199,26 +199,21 @@ STR_UNITS_POWER_IMPERIAL :{COMMA}hp
|
||||
STR_UNITS_POWER_METRIC :{COMMA}hp
|
||||
STR_UNITS_POWER_SI :{COMMA}kW
|
||||
|
||||
STR_UNITS_WEIGHT_SHORT_IMPERIAL :{COMMA}t
|
||||
STR_UNITS_WEIGHT_SHORT_METRIC :{COMMA}t
|
||||
STR_UNITS_WEIGHT_SHORT_SI :{COMMA}kg
|
||||
|
||||
STR_UNITS_WEIGHT_LONG_IMPERIAL :{COMMA} tona{P "" s}
|
||||
STR_UNITS_WEIGHT_LONG_METRIC :{COMMA} tona
|
||||
STR_UNITS_WEIGHT_LONG_SI :{COMMA} kg
|
||||
|
||||
STR_UNITS_VOLUME_SHORT_IMPERIAL :{COMMA}galoi
|
||||
STR_UNITS_VOLUME_SHORT_METRIC :{COMMA}l
|
||||
STR_UNITS_VOLUME_SHORT_SI :{COMMA}m³
|
||||
|
||||
STR_UNITS_VOLUME_LONG_IMPERIAL :{COMMA} galoi{P "" s}
|
||||
STR_UNITS_VOLUME_LONG_METRIC :{COMMA} litro
|
||||
STR_UNITS_VOLUME_LONG_SI :{COMMA} m³
|
||||
|
||||
STR_UNITS_FORCE_SI :{COMMA} kN
|
||||
|
||||
STR_UNITS_HEIGHT_IMPERIAL :{COMMA} ft
|
||||
STR_UNITS_HEIGHT_METRIC :{COMMA} m
|
||||
STR_UNITS_HEIGHT_SI :{COMMA} m
|
||||
|
||||
# Common window strings
|
||||
@@ -226,7 +221,6 @@ STR_LIST_FILTER_TITLE :{BLACK}Lokarri
|
||||
STR_LIST_FILTER_OSKTITLE :{BLACK}Sartu lokarri iragazkia
|
||||
STR_LIST_FILTER_TOOLTIP :{BLACK}Sartu hitz bat iragazkian zerrendan aurkitzeko
|
||||
|
||||
STR_TOOLTIP_GROUP_ORDER :{BLACK}Aukeratu taldekatzeko ordena
|
||||
STR_TOOLTIP_SORT_ORDER :{BLACK}Hautatu agertze ordena (deszendientea/aszendientea)
|
||||
STR_TOOLTIP_SORT_CRITERIA :{BLACK}Aukeratu ordenatze irizpideak
|
||||
STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Aukeratu iragazki irizpideak
|
||||
@@ -294,7 +288,6 @@ STR_SORT_BY_POWER_VS_RUNNING_COST :Potentzia/Mante
|
||||
STR_SORT_BY_CARGO_CAPACITY :Zama Edukiera
|
||||
STR_SORT_BY_RANGE :Irismena
|
||||
STR_SORT_BY_POPULATION :Biztanleria
|
||||
STR_SORT_BY_RATING :Balorazioa
|
||||
|
||||
# Tooltips for the main toolbar
|
||||
STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Jokoa pausatu
|
||||
@@ -710,7 +703,6 @@ STR_SMALLMAP_LEGENDA_SNOW :{TINY_FONT}{BLA
|
||||
STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Aukeratu hirien izenak on/off mapan
|
||||
STR_SMALLMAP_CENTER :{BLACK}Mapa txikia orain zauden posizioan zentratu
|
||||
STR_SMALLMAP_INDUSTRY :{TINY_FONT}{STRING} ({NUM})
|
||||
STR_SMALLMAP_LINKSTATS :{TINY_FONT}{STRING}
|
||||
STR_SMALLMAP_COMPANY :{TINY_FONT}{COMPANY}
|
||||
STR_SMALLMAP_TOWN :{TINY_FONT}{WHITE}{TOWN}
|
||||
STR_SMALLMAP_DISABLE_ALL :{BLACK}Dena desgaitu
|
||||
@@ -721,8 +713,6 @@ STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Erakutsi
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Garaiera mapa erakutsi/ ez erakutsi
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Ez erakutsi konpainiaren jabetzak mapan.
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Erakutsi konpaniaren propietate denak mapan
|
||||
STR_SMALLMAP_TOOLTIP_DISABLE_ALL_CARGOS :{BLACK}Ez erakutsi zamarik mapan
|
||||
STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Zama guztiak mapan erakutsi
|
||||
|
||||
# Status bar messages
|
||||
STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Erakutsi azken mezu edo albiste erreportaia
|
||||
@@ -799,11 +789,13 @@ STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE
|
||||
STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} deposituan itxaroten dago
|
||||
STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} hegazkin deposituan itxaroten dago
|
||||
|
||||
# Order review system / warnings
|
||||
# Start of order review system
|
||||
# DON'T ADD OR REMOVE LINES HERE
|
||||
STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE} agindu gutxiegi ditu zerrendan
|
||||
STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} agindu zerrenda hutsik du
|
||||
STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} agindu bikoitzak ditu
|
||||
STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} geltoki baliogabea du aginduetan
|
||||
# end of order system
|
||||
|
||||
STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} zaharra bihurtzen ari da
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} oso zaharra bihurtzen ari da
|
||||
@@ -1055,8 +1047,7 @@ STR_CONFIG_SETTING_TYPE_GAME_INGAME :Joko ezarpenak
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Konpainia ezarpenak (Gorden bilduta; bakarrik joko berriei eragingo die)
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Konpainia ezarpenak (Gorden bilduta; bakarrik uneko konpainiari eragiten dio)
|
||||
|
||||
STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Kategoria:
|
||||
STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Mota:
|
||||
STR_CONFIG_SETTING_RESTRICT_LABEL :{BLACK}Erakutsi
|
||||
STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Beheko zerrenda laburtu bakarrik aldatutako ezarpenak erakutsiz
|
||||
STR_CONFIG_SETTING_RESTRICT_BASIC :Oinarrizko ezarpenak
|
||||
STR_CONFIG_SETTING_RESTRICT_ADVANCED :Ezarpen aurreratuak
|
||||
@@ -1064,7 +1055,6 @@ STR_CONFIG_SETTING_RESTRICT_ALL :Adituentzako ez
|
||||
STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Ezarpenak lehenetsitakoen balio ezberdinarekin
|
||||
STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_NEW :Balio ezberdinak dituzten ezarpenak zure joko berriaren ezarpenekin alderatuta
|
||||
|
||||
STR_CONFIG_SETTINGS_NONE :{WHITE}- Ezer ez -
|
||||
|
||||
STR_CONFIG_SETTING_OFF :Itzalita
|
||||
STR_CONFIG_SETTING_ON :Piztuta
|
||||
@@ -1513,50 +1503,21 @@ STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Joko hasieran h
|
||||
STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD :Errepideak eraikitzerakoan elementu ez egokiak eragotzi: {STRING}
|
||||
STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD_HELPTEXT :Errepide berreraikuntza ordaintzerakoan irteerarik gabeko errepideak kentzea
|
||||
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :eskuz egin
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimetrikoa
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :simetrikoa
|
||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Banaketen zehaztasuna: {STRING}
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Abiadura unitateak: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :Inperiala (milia/orduko)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :Metrikoa (km/h)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_SI :SI (m/s)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Ibilgailuen indar unitateak: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :Inperiala (zp)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :Metrikoa (zp)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_SI :SI (kW)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT :Pisu unitateak: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_METRIC :Metrikoa (t/tona)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_SI :SI (kg)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME :Bolumen unitateak: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL :Inperiala (galoi)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_METRIC :Metrikoa (l)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_SI :SI (m³)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_METRIC :Metrikoa (kgf)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_SI :SI (kN)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Garaiera unitateak: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :Inperiala (oin)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :Metrikoa (m)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m)
|
||||
|
||||
STR_CONFIG_SETTING_GUI :{ORANGE}Interfazea
|
||||
STR_CONFIG_SETTING_LOCALISATION :{ORANGE}Kokapena
|
||||
STR_CONFIG_SETTING_CONSTRUCTION :{ORANGE}Eraikuntza
|
||||
STR_CONFIG_SETTING_VEHICLES :{ORANGE}Ibilgailuak
|
||||
STR_CONFIG_SETTING_STATIONS :{ORANGE}Geltokiak
|
||||
STR_CONFIG_SETTING_ECONOMY :{ORANGE}Ekonomia
|
||||
STR_CONFIG_SETTING_LINKGRAPH :{ORANGE}Zama Banaketa
|
||||
STR_CONFIG_SETTING_AI :{ORANGE}Lehiakideak
|
||||
STR_CONFIG_SETTING_DISPLAY_OPTIONS :{ORANGE}Aukerak erakutsi
|
||||
STR_CONFIG_SETTING_INTERACTION :{ORANGE}Interakzioa
|
||||
STR_CONFIG_SETTING_SOUND :{ORANGE}Soinu efektuak
|
||||
STR_CONFIG_SETTING_NEWS :{ORANGE}Albisteak eta mezuak
|
||||
STR_CONFIG_SETTING_CONSTRUCTION_SIGNALS :{ORANGE}Seinaleak
|
||||
STR_CONFIG_SETTING_STATIONS_CARGOHANDLING :{ORANGE}Zamak
|
||||
STR_CONFIG_SETTING_AI_NPC :{ORANGE}Ordenagailu jokalariak
|
||||
@@ -1599,7 +1560,6 @@ STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM :{WHITE}... Gord
|
||||
STR_CONFIG_ERROR_INVALID_BASE_GRAPHICS_NOT_FOUND :{WHITE}... jaramonik ez egiten Grafiko baseari '{STRING}': ez da aurkitu
|
||||
STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :{WHITE}... jaramonik ez egiten Soinu Paketeari '{STRING}': ez da aurkitu
|
||||
STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :{WHITE}... jaramonik ez egiten musika paketeari'{STRING}': ez da aurkitu
|
||||
STR_CONFIG_ERROR_OUT_OF_MEMORY :{WHITE}Memoriaz kanpo
|
||||
|
||||
# Intro window
|
||||
STR_INTRO_CAPTION :{WHITE}OpenTTD {REV}
|
||||
@@ -1721,7 +1681,6 @@ STR_LIVERY_FREIGHT_TRAM :Merkantzietarak
|
||||
STR_FACE_CAPTION :{WHITE}Aurpegia aukeratu
|
||||
STR_FACE_CANCEL_TOOLTIP :{BLACK}Bertan behera utzi aurpegia aukeratu
|
||||
STR_FACE_OK_TOOLTIP :{BLACK}Aurpegi berria onartu
|
||||
STR_MAPGEN_RANDOM :{BLACK}Ausaz egin
|
||||
|
||||
STR_FACE_MALE_BUTTON :{BLACK}Gizonezkoa
|
||||
STR_FACE_MALE_TOOLTIP :{BLACK}Aukeratu gizonezko aurpegiak
|
||||
@@ -1777,8 +1736,6 @@ STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Aldatu k
|
||||
|
||||
# Network server list
|
||||
STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}Multijokalaria
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_NO :Ez
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_YES :Bai
|
||||
STR_NETWORK_SERVER_LIST_PLAYER_NAME :{BLACK}Jokalariaren izena:
|
||||
STR_NETWORK_SERVER_LIST_ENTER_NAME_TOOLTIP :{BLACK}Izen honen bidez ezagutua izango zara beste jokalarien artean
|
||||
|
||||
@@ -1837,8 +1794,6 @@ STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}Jokoaren
|
||||
STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}Pasahitza ezarri
|
||||
STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}Babestu zure jokoa pasahitz batekin ez baduzu nahi publikoa izatea
|
||||
|
||||
STR_NETWORK_START_SERVER_UNADVERTISED :Ez
|
||||
STR_NETWORK_START_SERVER_ADVERTISED :Bai
|
||||
STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} Bezero
|
||||
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Gehienezko bezeroak:
|
||||
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Gehienezko bezero kopurua aukeratu. Ez da beharrezkoa guztia betetzea
|
||||
@@ -1959,7 +1914,6 @@ STR_NETWORK_CLIENT :Bezeroa
|
||||
STR_NETWORK_SPECTATORS :Ikusleak
|
||||
|
||||
STR_NETWORK_GIVE_MONEY_CAPTION :{WHITE}Eman nahi duzun diru kantitatea ezarri
|
||||
STR_NETWORK_TOOLBAR_LIST_SPECTATOR :{BLACK}Ikusle
|
||||
|
||||
# Network set password
|
||||
STR_COMPANY_PASSWORD_CANCEL :{BLACK}Ez gorde sartutako pasahitza
|
||||
@@ -2149,12 +2103,8 @@ STR_TRANSPARENT_LOADING_TOOLTIP :{BLACK}Zama adi
|
||||
STR_TRANSPARENT_INVISIBLE_TOOLTIP :{BLACK}Objektuak ikusezinak egin, gardenak izan ordez
|
||||
|
||||
# Linkgraph legend window
|
||||
STR_LINKGRAPH_LEGEND_ALL :{BLACK}Denak
|
||||
STR_LINKGRAPH_LEGEND_NONE :{BLACK}Bat ere ez
|
||||
|
||||
# Linkgraph legend window and linkgraph legend in smallmap
|
||||
STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}erabiltzeke
|
||||
STR_LINKGRAPH_LEGEND_SATURATED :{TINY_FONT}{BLACK}saturatua
|
||||
|
||||
# Base for station construction window(s)
|
||||
STR_STATION_BUILD_COVERAGE_AREA_TITLE :{BLACK}Geltoki irismena erakutsi
|
||||
@@ -2216,7 +2166,7 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Geltokia
|
||||
STR_STATION_BUILD_STATION_CLASS_TOOLTIP :{BLACK}Eraikiko den geltoki mota
|
||||
STR_STATION_BUILD_STATION_TYPE_TOOLTIP :{BLACK}Eraikiko den geltoki mota
|
||||
|
||||
STR_STATION_CLASS_DFLT :Geltoki lehenetsia
|
||||
STR_STATION_CLASS_DFLT :Oinarrizko geltokia
|
||||
STR_STATION_CLASS_WAYP :Bidepuntuak
|
||||
|
||||
# Signal window
|
||||
@@ -2458,7 +2408,6 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF:
|
||||
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Onartutako zama: {LTBLUE}
|
||||
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING})
|
||||
STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Trenbidearen abiadura muga: {LTBLUE}{VELOCITY}
|
||||
STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Bideko abiadura muga: {LTBLUE}{VELOCITY}
|
||||
|
||||
# Description of land area of different tiles
|
||||
STR_LAI_CLEAR_DESCRIPTION_ROCKS :Haitzak
|
||||
@@ -2555,7 +2504,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Konpainia jabe
|
||||
STR_ABOUT_OPENTTD :{WHITE}OpenTTD-ri buruz
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD bertsioa {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2014 The OpenTTD team
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2013 The OpenTTD team
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Gordetako jokoa
|
||||
@@ -2574,7 +2523,6 @@ STR_SAVELOAD_SAVE_BUTTON :{BLACK}Gorde
|
||||
STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Jokoa gorde, aukeratutako izenarekin
|
||||
STR_SAVELOAD_LOAD_BUTTON :{BLACK}Kargatu
|
||||
STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Aukeratutako jokoa kargatu
|
||||
STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Aukeratutako garaiera mapa kargatu
|
||||
STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Jokoaren Xehetasunak
|
||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Ez dago informaziorik
|
||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
||||
@@ -2594,6 +2542,7 @@ STR_MAPGEN_SNOW_LINE_UP :{BLACK}Igo punt
|
||||
STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Jeitsi puntu batean elur garaiera
|
||||
STR_MAPGEN_RANDOM_SEED :{BLACK}Ausazko hazia:
|
||||
STR_MAPGEN_RANDOM_SEED_HELP :{BLACK}Klikatu ausazko hazia ezartzeko
|
||||
STR_MAPGEN_RANDOM :{BLACK}Ausaz egin
|
||||
STR_MAPGEN_RANDOM_HELP :{BLACK}Ausazko hazia aldatu paisaia sortzeko
|
||||
STR_MAPGEN_LAND_GENERATOR :{BLACK}Paisaia sortzailea:
|
||||
STR_MAPGEN_TREE_PLACER :{BLACK}Zuhaitz algoritmoa:
|
||||
@@ -2800,7 +2749,6 @@ STR_NEWGRF_INVALID_ENGINE :<garraio modelo
|
||||
STR_NEWGRF_INVALID_INDUSTRYTYPE :<industria baliogabea>
|
||||
|
||||
# Placeholders for other invalid stuff, e.g. vehicles that have gone (Game Script).
|
||||
STR_INVALID_VEHICLE :<ibilgailu ezegokia>
|
||||
|
||||
# NewGRF scanning window
|
||||
STR_NEWGRF_SCAN_CAPTION :{WHITE} NewGRF berriak bilatzen.
|
||||
@@ -2883,13 +2831,9 @@ STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_EXCLUSIVE_TRANSPORT :{YELLOW}Urte ba
|
||||
STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE :{YELLOW}Udaletxea sobornatu zure balorazioa hobetzeko, isun larria jasotzeko arriskuarekinn.{}Kostea: {CURRENCY_LONG}
|
||||
|
||||
# Goal window
|
||||
STR_GOALS_CAPTION :{WHITE}{COMPANY} Helburuak
|
||||
STR_GOALS_SPECTATOR_CAPTION :{WHITE}Helburu orokorrak
|
||||
STR_GOALS_GLOBAL_TITLE :{BLACK}Helburu orokorrak:
|
||||
STR_GOALS_TEXT :{ORANGE}{STRING}
|
||||
STR_GOALS_NONE :{ORANGE}- Ezer ez -
|
||||
STR_GOALS_PROGRESS :{ORANGE}{STRING}
|
||||
STR_GOALS_PROGRESS_COMPLETE :{GREEN}{STRING}
|
||||
STR_GOALS_COMPANY_TITLE :{BLACK}Konpainiaren helburuak:
|
||||
STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikatu helburuan ikupegi nagusia industrian/herrian/laukian zentratzeko. Ktrl+Klik ikuspegi lehio berria irekiko du industri/herri/laukiaren kokapenean
|
||||
|
||||
@@ -2929,13 +2873,6 @@ STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING
|
||||
STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Klikatu garraio zerbitzuan ikuspegi nagusia industria/herrian zentratzeko. Ktrl+Klik ikuspegi lehio berria irekiko du indutri/herriaren kokapenean
|
||||
|
||||
# Story book window
|
||||
STR_STORY_BOOK_TITLE :{YELLOW}{STRING}
|
||||
STR_STORY_BOOK_GENERIC_PAGE_ITEM :Orrialdea {NUM}
|
||||
STR_STORY_BOOK_PREV_PAGE :{BLACK}Aurrekoa
|
||||
STR_STORY_BOOK_PREV_PAGE_TOOLTIP :{BLACK}Aurreko orrialdera joan
|
||||
STR_STORY_BOOK_NEXT_PAGE :{BLACK}Hurrengoa
|
||||
STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Hurrengo orrialdera joan
|
||||
STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Helburu erreferentzia baliogabea
|
||||
|
||||
# Station list window
|
||||
STR_STATION_LIST_TOOLTIP :{BLACK}Geltokien izenak - Klikatu geltokiaren izenean ikuspegi nagusia geltokian zentratzeko. Ktrl+Klik Ikuspegi lehio berria irekiko du geltokiaren kokapenean
|
||||
@@ -2963,27 +2900,8 @@ STR_STATIOV_VIEW_EXCLUSIVE_RIGHTS_COMPANY :{YELLOW}{COMPAN
|
||||
|
||||
STR_STATION_VIEW_RATINGS_BUTTON :{BLACK}Zama balorazioak
|
||||
STR_STATION_VIEW_RATINGS_TOOLTIP :{BLACK}Geltokiaren zama balorazioak erakutsi
|
||||
STR_STATION_VIEW_CARGO_SUPPLY_RATING :{WHITE}{STRING}: {YELLOW}{COMMA} / {STRING} ({COMMA}%)
|
||||
|
||||
STR_STATION_VIEW_WAITING_STATION :Geltokia: Itxaroten
|
||||
STR_STATION_VIEW_WAITING_AMOUNT :Kopurua: Itxoiten
|
||||
STR_STATION_VIEW_FROM :{YELLOW}{CARGO_SHORT} {STATION}-tik
|
||||
STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT}{STATION}-tik
|
||||
STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT}{STATION}-ra
|
||||
STR_STATION_VIEW_FROM_ANY :{RED}{CARGO_SHORT} geltoki ezezagunetik
|
||||
STR_STATION_VIEW_TO_ANY :{RED}{CARGO_SHORT} edozein geltokitara
|
||||
STR_STATION_VIEW_VIA_ANY :{RED}{CARGO_SHORT} edozein geltokitatik pasatuz
|
||||
STR_STATION_VIEW_FROM_HERE :{GREEN}{CARGO_SHORT} geltoki honetatik
|
||||
STR_STATION_VIEW_VIA_HERE :{GREEN}{CARGO_SHORT} geltoki honetan geldituz
|
||||
STR_STATION_VIEW_TO_HERE :{GREEN}{CARGO_SHORT} geltoki honetara
|
||||
STR_STATION_VIEW_NONSTOP :{YELLOW}{CARGO_SHORT} gelditu gabe
|
||||
|
||||
STR_STATION_VIEW_GROUP_S_V_D :Abiapuntua-Bidea-Helburua
|
||||
STR_STATION_VIEW_GROUP_S_D_V :Abiapuntua-Helburua-Bidea
|
||||
STR_STATION_VIEW_GROUP_V_S_D :Bidea-Abiapuntua-Helburua
|
||||
STR_STATION_VIEW_GROUP_V_D_S :Bidea-Helburua-Abiapuntua
|
||||
STR_STATION_VIEW_GROUP_D_S_V :Helburua-Abiapuntua-Bidea
|
||||
STR_STATION_VIEW_GROUP_D_V_S :Helburua-Bidea-Abiapuntua
|
||||
|
||||
############ range for rating starts
|
||||
STR_CARGO_RATING_APPALLING :Negargarria
|
||||
@@ -3126,7 +3044,6 @@ STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Azken hi
|
||||
STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{STRING}{BLACK} (%{COMMA} garraiatua)
|
||||
STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Ikuspegi nagusia industrian kokatu. Ktrl+Klik ikuspegi lehio berri bat irekiko du industriaren kokapenarekin
|
||||
STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Ekoizpen kopurua: {YELLOW}{COMMA}%
|
||||
STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}Industriak berehalako itxiera iragarri du!
|
||||
|
||||
############ range for requires starts
|
||||
STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Beharrezkoa du: {YELLOW}{STRING}{STRING}
|
||||
@@ -3242,10 +3159,10 @@ STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Ibilgail
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Itsasontia erosi
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Hegazkina erosi
|
||||
|
||||
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Aukeratuta dagoen ibilgailua erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Aukeratuta dagoen ibilgailua erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Aukeratuta dagoen itsasontzia erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Aukeratuta dagoen hegazkina erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Piztuta dagoen ibilgailua erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Piztuta dagoen ibilgailua erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Piztuta dagoen itsasontzia erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Piztuta dagoen hegazkina erosi. Shift+Klik gutxi gora beherako kostea erakutsi
|
||||
|
||||
STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Berrizendatu
|
||||
STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Berrizendatu
|
||||
@@ -3490,9 +3407,6 @@ STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Mantenim
|
||||
STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Mantenimendu tartea 10 puntutan igo. Ktrl+klik mantenimendu tartea 5 puntutan igo
|
||||
STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Mantenimendu tartea 10 puntutan gutxitu. Ktrl+klik mantenimendu tartea 5 puntutan gutxitu
|
||||
|
||||
STR_VEHICLE_DETAILS_DEFAULT :Lehenetsia
|
||||
STR_VEHICLE_DETAILS_DAYS :Egunak
|
||||
STR_VEHICLE_DETAILS_PERCENT :Ehunekoa
|
||||
|
||||
STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Trena izendatu
|
||||
STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION :{WHITE}Errepide ibilgailua izendatu
|
||||
@@ -3842,7 +3756,6 @@ STR_AI_SETTINGS_START_DELAY :IA hau abiarazt
|
||||
STR_TEXTFILE_README_CAPTION :{WHITE}{STRING} {STRING} ren "irakur nazazu" artxiboa
|
||||
STR_TEXTFILE_CHANGELOG_CAPTION :{WHITE}{STRING} {STRING}-aren aldaketak
|
||||
STR_TEXTFILE_LICENCE_CAPTION :{WHITE}{STRING} {STRING} rako lizentzia
|
||||
STR_TEXTFILE_WRAP_TEXT :{WHITE}Testua trinkotu
|
||||
STR_TEXTFILE_VIEW_README :{BLACK}Ikusi "irakur nazazu"
|
||||
STR_TEXTFILE_VIEW_CHANGELOG :{BLACK}Aldaketak
|
||||
STR_TEXTFILE_VIEW_LICENCE :{BLACK}Lizentzia
|
||||
@@ -3865,10 +3778,6 @@ STR_INCOME_FLOAT_INCOME_SMALL :{TINY_FONT}{GRE
|
||||
STR_INCOME_FLOAT_INCOME :{GREEN}Sarrerak: {CURRENCY_LONG}
|
||||
STR_FEEDER_TINY :{TINY_FONT}{YELLOW}Transferitu: {CURRENCY_LONG}
|
||||
STR_FEEDER :{YELLOW}Transferitu: {CURRENCY_LONG}
|
||||
STR_FEEDER_INCOME_TINY :{TINY_FONT}{YELLOW}Transferitu: {CURRENCY_LONG}{WHITE} / {GREEN}Sarrera: {CURRENCY_LONG}
|
||||
STR_FEEDER_INCOME :{YELLOW}Transferitu: {CURRENCY_LONG}{WHITE} / {GREEN}Sarrera: {CURRENCY_LONG}
|
||||
STR_FEEDER_COST_TINY :{TINY_FONT}{YELLOW}Transferitu: {CURRENCY_LONG}{WHITE} / {RED}Kostua: {CURRENCY_LONG}
|
||||
STR_FEEDER_COST :{YELLOW}Transferitu: {CURRENCY_LONG}{WHITE} / {RED}Kostua: {CURRENCY_LONG}
|
||||
STR_MESSAGE_ESTIMATED_COST :{WHITE}Gutxi gora beherako kostea: {CURRENCY_LONG}
|
||||
STR_MESSAGE_ESTIMATED_INCOME :{WHITE}Gutxi gora beherako sarrerak: {CURRENCY_LONG}
|
||||
|
||||
@@ -4220,9 +4129,6 @@ STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}Ezin da
|
||||
|
||||
STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... garraioa suntsituta
|
||||
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL :{WHITE}Ez da ibilgailu erabilgarririk egongo
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Aldatu zure NewGRF konfigurazioa
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}Ez dago ibilgailu erabilgarririk oraindik
|
||||
|
||||
# Specific vehicle errors
|
||||
STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Ezin da trena seinalea pasatzera behartu, istripu arriskua...
|
||||
@@ -4267,7 +4173,6 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Ezin da
|
||||
STR_DESKTOP_SHORTCUT_COMMENT :Transport Tycoon Deluxe-ren simulazio bat
|
||||
|
||||
# Translatable descriptions in media/baseset/*.ob* files
|
||||
STR_BASESOUNDS_NONE_DESCRIPTION :Soinurik gabeko soinu pakete bat
|
||||
|
||||
##id 0x2000
|
||||
# Town building names
|
||||
@@ -4717,7 +4622,6 @@ STR_JUST_DATE_ISO :{DATE_ISO}
|
||||
STR_JUST_STRING :{STRING}
|
||||
STR_JUST_STRING_STRING :{STRING}{STRING}
|
||||
STR_JUST_RAW_STRING :{STRING}
|
||||
STR_JUST_BIG_RAW_STRING :{BIG_FONT}{STRING}
|
||||
|
||||
# Slightly 'raw' stringcodes with colour or size
|
||||
STR_BLACK_COMMA :{BLACK}{COMMA}
|
||||
|
||||
+89
-95
@@ -553,8 +553,8 @@ STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Закр
|
||||
STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Загаловак вакна — цягніце яго для перамяшчэньня вакна
|
||||
STR_TOOLTIP_SHADE :{BLACK}Згарнуць вакно, пакінуўшы загаловак
|
||||
STR_TOOLTIP_DEBUG :{BLACK}Паказаць наладачную iнфармацыю NewGRF
|
||||
STR_TOOLTIP_DEFSIZE :{BLACK}Зьмяніць памеры вакна на значэньні па змоўчаньні. Ctrl+пстрычка захавае бягучы памер як значэньне па змоўчаньні.
|
||||
STR_TOOLTIP_STICKY :{BLACK}Пазначыць гэтае вакно як незачыняльнае па клявішы «Закрыць усе вокны». Ctrl+пстрычка захоўвае гэты стан па змоўчаньні.
|
||||
STR_TOOLTIP_DEFSIZE :{BLACK}Змяніць памеры вакна на значэньні па змаўчаньні. Ctrl+пстрычка захавае бягучы памер як значэньне па змаўчаньні.
|
||||
STR_TOOLTIP_STICKY :{BLACK}Пазначыць гэтае вакно як незачыняльнае па клявішы «Закрыць усе вокны». Ctrl+пстрычка захоўвае гэты стан па змаўчанні.
|
||||
STR_TOOLTIP_RESIZE :{BLACK}Націсьніце ды цягніце для зьмяненьня памеру вакна
|
||||
STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Вялікае/маленькае вакно
|
||||
STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Пракрутка ўверх/уніз
|
||||
@@ -612,7 +612,7 @@ STR_SORT_BY_POWER_VS_RUNNING_COST :Магутна
|
||||
STR_SORT_BY_CARGO_CAPACITY :Ёмiстасьць
|
||||
STR_SORT_BY_RANGE :Далёкасьць
|
||||
STR_SORT_BY_POPULATION :Насельніцтва
|
||||
STR_SORT_BY_RATING :Рэйтынґ
|
||||
STR_SORT_BY_RATING :Рэйтынг
|
||||
|
||||
# Tooltips for the main toolbar
|
||||
STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Паўза
|
||||
@@ -626,7 +626,7 @@ STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Сьпi
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Паказаць фінансавую інфармацыю кампаніі
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Паказаць агульную інфармацыю аб кампаніі
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Паказаць гісторыю кампаніі
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Паказаць сьпіс задач
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Паказаць спіс задач
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Паказаць ґрафiкi
|
||||
STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Паказаць рэйтынґі кампаніяў
|
||||
STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Сьпіс існуючых прадпрыемстваў; заснаваньне новых
|
||||
@@ -700,7 +700,7 @@ STR_FILE_MENU_EXIT :Выхад
|
||||
# map menu
|
||||
STR_MAP_MENU_MAP_OF_WORLD :Мапа сусьвету
|
||||
STR_MAP_MENU_EXTRA_VIEW_PORT :Дадатковае вакно прагляду
|
||||
STR_MAP_MENU_LINGRAPH_LEGEND :Леґенда грузаперавозак
|
||||
STR_MAP_MENU_LINGRAPH_LEGEND :Легенда грузаперавозак
|
||||
STR_MAP_MENU_SIGN_LIST :Сьпіс таблічак
|
||||
|
||||
############ range for town menu starts
|
||||
@@ -994,13 +994,13 @@ STR_SMALLMAP_TYPE_OWNERS :Уладаль
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Паказаць на мапе контуры зямлі
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP :{BLACK}Паказаць на мапе транспарт
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Паказаць на мапе прамысловасьць
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Паказаць на мапе грузавыя плыні
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Паказаць на карце грузавыя плыні
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Паказаць на мапе маршруты
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Паказаць на мапе расьліннасьць
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Паказаць на мапе уладальнікаў зямлі
|
||||
STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Клiк па тыпе прадпрыемства пераключае яго паказ на мапе. Ctrl+клiк адключае ўсе тыпы, акрамя аднаго выбранага. Паўторны Ctrl+клiк уключае ўсе тыпы прадпрыемстваў.
|
||||
STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Клiк па назьве кампанii пераключае паказ яе маёмасьцi на мапе. Ctrl+клiк адключае ўсе кампанii, акрамя адной выбранай.
|
||||
STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Пстрычка па назве грузу пераключае бачнасьць гэтага грузу. Ctrl+пстрычка хавае ўсе грузы акрамя выбранага. Паўторная Ctrl+пстрычка адлюстроўвае ўсе грузы.
|
||||
STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Пстрычка па назве грузу пераключае бачнасць гэтага грузу. Ctrl+пстрычка хавае ўсе грузы акрамя выбранага. Паўторная Ctrl+пстрычка адлюстроўвае ўсе грузы.
|
||||
|
||||
STR_SMALLMAP_LEGENDA_ROADS :{TINY_FONT}{BLACK}Дарогі
|
||||
STR_SMALLMAP_LEGENDA_RAILROADS :{TINY_FONT}{BLACK}Чыгункі
|
||||
@@ -1123,11 +1123,13 @@ STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE
|
||||
STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} чакае ў дэпо
|
||||
STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} чакае ў самалётным анґары
|
||||
|
||||
# Order review system / warnings
|
||||
# Start of order review system
|
||||
# DON'T ADD OR REMOVE LINES HERE
|
||||
STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}У ТС «{VEHICLE}» не хапае заданьняў у раскладзе
|
||||
STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} не мае заданьняў
|
||||
STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} мае дубляваныя заданьні
|
||||
STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} мае няісную станцыю ў заданьнях
|
||||
# end of order system
|
||||
|
||||
STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} састарэў
|
||||
STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} цалкам састарэў
|
||||
@@ -1381,8 +1383,7 @@ STR_CONFIG_SETTING_TYPE_GAME_INGAME :Наладкі
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Наладкі кампаніі (утрымліваюцца ў файлах захаваньняў; сапраўдныя толькі для новых гульняў)
|
||||
STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Наладкі кампаніі (утрымліваюцца ў файлах захаваньняў; сапраўдныя толькі для бягучай гульні)
|
||||
|
||||
STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Катэґорыя:
|
||||
STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Тып:
|
||||
STR_CONFIG_SETTING_RESTRICT_LABEL :{BLACK}Паказваць:
|
||||
STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Адлюстроўваць у сьпісе толькі зьмененыя наладкі
|
||||
STR_CONFIG_SETTING_RESTRICT_BASIC :Базавыя наладкі
|
||||
STR_CONFIG_SETTING_RESTRICT_ADVANCED :Пашыраныя наладкі
|
||||
@@ -1397,10 +1398,6 @@ STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_MENU :Наладкі
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Наладкі гульні (запісваюцца ў захаваньне; уплываюць толькі на бягучую гульню)
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Наладкі кампаніі (запісваюцца ў захаваньні; уплываюць толькі на новыя гульні)
|
||||
STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Наладкі кампаніі (запісваюцца ў захаваньне; уплываюць толькі на бягучую кампанію)
|
||||
STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Катэґорыя {BLACK}да {WHITE}{STRING}
|
||||
STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Тып BLACK}да {WHITE}Усе тыпы наладак
|
||||
STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Паказаць усе вынікі пошуку па наладках{}{SILVER}Катэґорыя {BLACK}да {WHITE}{STRING} {BLACK}і {SILVER}Тып {BLACK}да {WHITE}Усе тыпы наладак
|
||||
STR_CONFIG_SETTINGS_NONE :{WHITE}- Няма -
|
||||
|
||||
STR_CONFIG_SETTING_OFF :не
|
||||
STR_CONFIG_SETTING_ON :так
|
||||
@@ -1435,7 +1432,7 @@ STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Усталюй
|
||||
STR_CONFIG_SETTING_RECESSIONS :Спады: {STRING}
|
||||
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Калі ўключана, спад можа наставаць раз у некалькі гадоў. Падчас спаду ўвесь аб'ём вытворчасьці значна ніжэй (ён вяртаецца да ранейшага ўзроўня, калі спад сканчаецца)
|
||||
STR_CONFIG_SETTING_TRAIN_REVERSING :Забараніць разварот цягнікоў на станцыях: {STRING}
|
||||
STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :Калі ўключана, цягнікі ня будуць разварочвацца на прахадных станцыях, нават калі гэта дазволіць скараціць шлях да наступнага пункта прызначэньня.
|
||||
STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :Калі ўключана, цягнікі ня будуць разварочвацца на прахадных станцыях, нават калі гэта дазволіць скараціць шлях да наступнага пункта прызначэньня
|
||||
STR_CONFIG_SETTING_DISASTERS :Бедствы: {STRING}
|
||||
STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Пераключыце бедствы, якія могуць час ад часу блякаваць ці зьнішчаць транспартныя сродкі ды інфраструктуру
|
||||
STR_CONFIG_SETTING_CITY_APPROVAL :Стаўленьне гарадзкой рады да рэструктурызацыі навакольляў: {STRING}
|
||||
@@ -1655,7 +1652,7 @@ STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_ISO :ISO (2008-01-31
|
||||
|
||||
STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE :Калі ў NewGRF ня вызначана палітра, выкарыстоўваць: {STRING}
|
||||
STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_HELPTEXT :Палітра ґрафічных набораў (NewGRF), якая ўжываецца па змоўчаньні, калі ня вызначана ў самім наборы.
|
||||
STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_DOS :Палітра па змоўчаньні (DOS)
|
||||
STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_DOS :Палітра па змаўчаньні (DOS)
|
||||
STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_WIN :Састарэлы фармат палітры (Win)
|
||||
|
||||
STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME :Аўтаматычнае ўключэньне паўзы напачатку гульні: {STRING}
|
||||
@@ -1882,64 +1879,64 @@ STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Адносна
|
||||
STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD :Выдаляць абсурдныя элемэнты падчас дарожнага будаўніцтва: {STRING}
|
||||
STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD_HELPTEXT :Выдаляць "мёртвыя" канцы дарогаў, якія ўтварыліся пасля рэканструкцыі вуліц.
|
||||
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Абнаўляць ґраф размеркаваньня раз у {STRING} д{P 0:2 зень ні зён}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Перыяд пераразьліку ґрафаў размеркаваньня. У кожным цыкле разьлічваецца не ґраф цалкам, а толькі адзін зь яго кампанэнтаў. Чым менш гэта значэньне, тым больш будзе нагрузка на працэсар. Чым больш значэньне, тым больш часу пройдзе перад пачаткам разьліку ґрафаў для новых маршрутаў.
|
||||
STR_CONFIG_SETTING_LINKGRAPH_TIME :Пералічваць ґраф разьмеркаваньня раз у {STRING} д{P 0:2 зень ні зён}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Час, адведзены для пераразьліку кампанэнтаў ґрафа. Разьлік запускаецца асобным патокам і працягваецца на працягу паказанай колькасьці гульнявых дзён. Калі значэньне будзе надта малым, то, магчыма, разьлік не пасьпее завяршыцца, і гульня будзе чакаць завяршэньня (гэта прывядзе да затрымак). Пры вялікіх значэньнях ґрафы размеркаваньня будуць павольней абнаўляцца пры зьменах маршрутаў.
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Абнаўляць граф размеркаваньня раз у {STRING} д{P 0:2 зень ні зён}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Перыяд пераразліку графаў размеркаваньня. У кожным цыкле разлічваецца не граф цалкам, а толькі адзін з яго кампанентаў. Чым менш гэта значэньне, тым больш будзе нагрузка на працэсар. Чым больш значэньне, тым больш часу пройдзе перад пачаткам разліку графаў для новых маршрутаў.
|
||||
STR_CONFIG_SETTING_LINKGRAPH_TIME :Пералічваць граф размеркавання раз у {STRING} д{P 0:2 зень ні зён}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Час, адведзены для пераразліку кампанентаў графа. Разлік запускаецца асобным струменем і працягваецца на працягу паказанай колькасці гульнявых дзён. Калі значэньне будзе занадта маленькім, то, магчыма, разлік не паспее завяршыцца, і гульня будзе чакаць завяршэнні (гэта прывядзе да затрымак). Пры вялікіх значэньнях графы размеркаваньня будуць павольней абнаўляцца пры зменах маршрутаў.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :уручную
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :несымэтрычнае
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :сымэтрычнае
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_PAX :Разьмеркаваньне пасажыраў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :«Сымэтрычнае» азначае, што прыкладна аднолькавая колькасьць пасажыраў будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несымэтрычнае» азначае, што пасажырапатокі ў любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» — не выкарыстоўваць аўтаматычнае разьмеркаваньне для пасажыраў.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Разьмеркаваньне пошты: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :«Сымэтрычнае» азначае, што прыкладна аднолькавая колькасьць пошты будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несымэтрычнае» азначае, што аб'ёмы пошты ў любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» — не выкарыстоўваць аўтаматычнае разьмеркаваньне для пошты.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Разьмеркаваньне каштоўных грузаў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Каштоўныя грузы — гэта каштоўнасьці, алмазы й золата. Модулі NewGRF могуць зьмяніць вызначэньні грузаў.{}«Сымэтрычнае» азначае, што прыкладна аднолькавая колькасьць грузу будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несымэтрычнае» азначае, што аб'ёмы грузаў у любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» — не выкарыстоўваць аўтаматычнае разьмеркаваньне грузаў.{}На субарктычных мапах рэкамендуецца ўсталяваць несымэтрычнае ці ручное разьмеркаваньне, бо банкі не вяртаюць золата ў шахты. Ва ўмераным ці субтрапічным клімаце можна ўсталяваць сымэтрычнае разьмеркаваньне, бо банкі абменьваюцца каштоўнасьцямі паміж сабой.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Разьмеркаваньне іншых грузаў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :«Несымэтрычнае» азначае, што выпадковыя аб'ёмы грузаў могуць быць адпраўлены ў любых кірунках.{}«Уручную» азначае, што ніякага аўтаматычнага разьмеркаваньня для гэтых грузаў ня будзе.
|
||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Дакладнасьць разьмеркаваньня: {STRING}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Чым вышэй дадзенае значэньне, тым больш працэсарнага часу выкарыстоўваецца для разьліку ґрафа грузаперавозак. Пры высокіх значэньнях магчымы затрымкі ў гульні. Аднак пры нізкіх значэньнях разлікі грузапатокаў будуць недакладнымі, і грузы, магчыма, будуць адпраўляцца не туды, куды трэба.
|
||||
STR_CONFIG_SETTING_DEMAND_DISTANCE :Залежнасьць попыту ад адлегласьці: {STRING}
|
||||
STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :Калі гэта значэньне больш за 0 — тая колькасьць грузу, што адпраўляецца з адной станцыі на іншую, будзе залежаць ад адлегласьці паміж станцыямі. Чым вышэй гэта значэньне, тым больш грузу будзе адпраўляцца да блізкіх станцый і менш{NBSP} — да далёкіх.
|
||||
STR_CONFIG_SETTING_DEMAND_SIZE :Колькасьць грузу, што вяртаецца, пры сымэтрычным разьмеркаваньні: {STRING}
|
||||
STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Усталёўка гэтага значэньня ніжэй 100% прымусіць разьмеркаваньне быць меней «сымэтрычным»: колькасьць грузу, які вяртаецца, зможа быць меншай за колькасць адпраўленага. Усталёўка 0% зробіць разьмеркаваньне цалкам несымэтрычным.
|
||||
STR_CONFIG_SETTING_SHORT_PATH_SATURATION :Насычэньне кароткіх маршрутаў перад выкарыстаньнем ёмістых: {STRING}
|
||||
STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT :Пры наяўнасці некалькіх маршрутаў паміж станцыямі альґарытм разьмеркаваньня грузаў будзе выкарыстоўваць карацейшы маршрут да яго насычэньня, потым наступны па даўжыні, пакуль ён таксама не будзе насычаны, і г.{NBSP}д. Насычэньне вызначаецца па ацэнцы ёмістасьці ды плянуемай напружанасьці выкарыстаньня. Калі ўсе шляхі насычаныя, а попыт застаецца, Cargodist будзе перагружаць усе маршруты, аддаючы перавагу больш ёмістым. Збольшага альґарытм ня будзе дакладна вылічваць ёмістасьць. Гэта наладка дазваляе вызнасыць, наколькі загружаць маршрут, перад тым як пачаць выкарыстоўваць даўжэйшы. Усталюйце значэньне ніжэй за 100%, каб пазьбегнуць перагрузкі станцыяў у выпадку, калі прапускная здольнасьць маршруту будзе пераацэнена альґарытмам.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :несіметрычнае
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :сіметрычнае
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_PAX :Размеркаваньне пасажыраў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :«Сіметрычнае» азначае, што прыкладна аднолькавая колькасць пасажыраў будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несіметрычнае» азначае, што пасажыраплыні ў любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» - не выкарыстоўваць аўтаматычнае размеркаваньне для пасажыраў.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Размеркаваньне пошты: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :«Сіметрычнае» азначае, што прыкладна аднолькавая колькасць пошты будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несіметрычнае» азначае, што аб'ёмы пошты ў любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» - не выкарыстоўваць аўтаматычнае размеркаваньне для пошты.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Размеркаваньне каштоўных грузаў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :Каштоўныя грузы - гэта каштоўнасці, алмазы і золата. Модулі NewGRF могуць змяніць вызначэньні грузаў.{}«Сіметрычнае» азначае, што прыкладна аднолькавая колькасць грузу будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несіметрычнае» азначае, што аб'ёмы грузаў у любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» - не выкарыстоўваць аўтаматычнае размеркаваньне грузаў.{}На субарктычных мапах рэкамендуецца ўсталяваць несіметрычнае ці ручное размеркаваньне, бо банкі не вяртаюць золата ў шахты. Ва ўмераным ці субтрапічным клімаце можна ўсталяваць сіметрычнае размеркаваньне, бо банкі абменьваюцца каштоўнасцямі паміж сабой.
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Размеркаваньне іншых грузаў: {STRING}
|
||||
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :«Сіметрычнае» азначае, што прыкладна аднолькавая колькасць грузу будзе накіроўвацца па прамым і зваротным маршрутам.{}«Несіметрычнае» азначае, што аб'ёмы грузаў у любых кірунках не будуць залежаць адзін ад аднаго.{}«Уручную» - не выкарыстоўваць аўтаматычнае размеркаваньне грузаў.{}Вам, хутчэй за ўсё, запатрабуецца несіметрычнае ці ручное размеркаваньне.
|
||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Дакладнасць размеркаваньня: {STRING}
|
||||
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Чым вышэй дадзенае значэньне, тым больш працэсарнага часу выкарыстоўваецца для разліку графа грузаперавозак. Пры высокіх значэньнях магчымы затрымкі ў гульні. Аднак пры нізкіх значэньнях разлікі грузаплыняў будуць недакладнымі, і грузы, магчыма, будуць адпраўляцца не туды, куды трэба.
|
||||
STR_CONFIG_SETTING_DEMAND_DISTANCE :Залежнасць попыту ад адлегласці: {STRING}
|
||||
STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :Калі гэта значэньне больш 0, тая колькасць грузу, які адпраўляецца з адной станцыі на іншую, будзе залежаць ад адлегласці паміж станцыямі. Чым вышэй гэта значэньне, тым больш грузу будзе адпраўляцца да блізкіх станцый і менш{NBSP}- да далёкіх.
|
||||
STR_CONFIG_SETTING_DEMAND_SIZE :Колькасць грузу, які вяртаецца, пры сіметрычным размеркаваньні: {STRING}
|
||||
STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Усталёўка гэтага значэньня ніжэй 100% прымусіць размеркаваньне быць меней «сіметрычным»: колькасць грузу, які вяртаецца, зможа быць менш, чым колькасць адпраўленага. Усталёўка ў 0% зробіць размеркаваньне цалкам несіметрычным.
|
||||
STR_CONFIG_SETTING_SHORT_PATH_SATURATION :Мяжа загрузкі кароткіх маршрутаў перад выкарыстаньнем ёмістых: {STRING}
|
||||
STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT :Пры наяўнасці некалькіх маршрутаў паміж станцыямі алгарытм размеркаваньня грузаў будзе выкарыстоўваць найкароткі маршрут да яго загрузкі, потым наступны па даўжыні і г.{NBSP}д. Пры лішку грузу маршруты будуць перагружацца пачынальна з самых прадукцыйных. Загрузка разлічваецца зыходзячы з адзнакі прапускной здольнасці (якая можа быць недакладнай) і інтэнсіўнасці выкарыстаньня. Гэта наладка вызначае, наколькі загружаць маршрут перад тым, як пачаць выкарыстоўваць наступны. Усталюйце значэньне ніжэй 100% для таго, каб пазбегнуць затрымкі грузу, калі прапускная здольнасць маршруту будзе пераацэнена алгарытмам.
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Сыстэма адзінак для хуткасьці: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Паказваць значэньні хуткасьці ў выбранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :ангельскія (міль/г)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :мэтрычная (км/г)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Сістэма адзінак для хуткасці: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Паказваць значэнні хуткасці ў выбранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :англійская (міль/г)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :метрычная (км/г)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_SI :СІ (м/с)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Сыстэма адзінак для магутнасьці: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT :Паказваць магутнасьць рухавікоў транспартных сродкаў у выбранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :ангельская (к. с.)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :мэтрычная (к. с.)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Сістэма адзінак для магутнасці: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT :Паказваць магутнасць рухавікоў транспартных сродкаў у выбранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :англійская (к. с.)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :метрычная (к. с.)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_SI :СІ (кВт)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT :Сыстэма адзінак для масы: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT :Паказваць велічыні масы ў абранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL :ангельская (малая тона)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_METRIC :мэтрычная (т)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT :Сістэма адзінак для масы: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT :Паказваць велічыні масы ў абранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL :англійская (малая тона)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_METRIC :метрычная (т)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_SI :СІ (кг)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME :Сыстэма адзінак для аб'ёму: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT :Паказваць значэньні аб'ёму ў выбранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL :ангельская (галон)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_METRIC :мэтрычная (л)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME :Сістэма адзінак для аб'ёму: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT :Паказваць значэньні аб'ёму ў выбранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL :англійская (галон)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_METRIC :метрычная (л)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_SI :СІ (m³)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE :Сыстэма адзінак для цягавага намаганьня: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_HELPTEXT :Паказваць значэньні цягавага намаганьня ў выбранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE :Сістэма адзінак для цягавага намаганьня: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_HELPTEXT :Паказваць значэнні цягавага намаганьня ў выбранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_IMPERIAL :ангельская (фунт-сіла)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_METRIC :мэтрычная (кгс)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_METRIC :метрычная (кгс)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_SI :СІ (кН)
|
||||
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Сыстэма адзінак для вышыні: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Паказваць значэньні вышыні ў выбранай сыстэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :ангельская (фут)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :мэтрычная (м)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Сістэма адзінак для вышыні: {STRING}
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Паказваць значэнні вышыні ў выбранай сістэме адзінак
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :англійская (фут)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :метрычная (м)
|
||||
STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :СІ (м)
|
||||
|
||||
STR_CONFIG_SETTING_GUI :{ORANGE}Інтэрфэйс
|
||||
@@ -1948,7 +1945,7 @@ STR_CONFIG_SETTING_CONSTRUCTION :{ORANGE}Буд
|
||||
STR_CONFIG_SETTING_VEHICLES :{ORANGE}Транспарт
|
||||
STR_CONFIG_SETTING_STATIONS :{ORANGE}Станцыі
|
||||
STR_CONFIG_SETTING_ECONOMY :{ORANGE}Эканоміка
|
||||
STR_CONFIG_SETTING_LINKGRAPH :{ORANGE}Разьмеркаваньне грузаў
|
||||
STR_CONFIG_SETTING_LINKGRAPH :{ORANGE}Размеркаваньне грузаў
|
||||
STR_CONFIG_SETTING_AI :{ORANGE}Канкурэнты
|
||||
STR_CONFIG_SETTING_DISPLAY_OPTIONS :{ORANGE}Наладкі відарысу
|
||||
STR_CONFIG_SETTING_INTERACTION :{ORANGE}Узаемадзеяньне
|
||||
@@ -2119,7 +2116,6 @@ STR_LIVERY_FREIGHT_TRAM :Грузавы
|
||||
STR_FACE_CAPTION :{WHITE}Выбар твару
|
||||
STR_FACE_CANCEL_TOOLTIP :{BLACK}Скасаваць выбар новага твару
|
||||
STR_FACE_OK_TOOLTIP :{BLACK}Прыняць выбар новага твару
|
||||
STR_MAPGEN_RANDOM :{BLACK}Выпадковая
|
||||
|
||||
STR_FACE_MALE_BUTTON :{BLACK}Мужчынскі
|
||||
STR_FACE_MALE_TOOLTIP :{BLACK}Выбар мужчынскіх твараў
|
||||
@@ -2176,7 +2172,7 @@ STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Зьмя
|
||||
# Network server list
|
||||
STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}Сеткавая гульня
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED :{BLACK}Інтэрнэт
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_TOOLTIP :{BLACK}Выберыце паміж гульнёй праз Інтэрнэт або ў лакальнай сетцы
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_TOOLTIP :{BLACK}Выберыце паміж гульнёй праз Інтэрнэт, або ў лакальнай сетцы
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_NO :Не
|
||||
STR_NETWORK_SERVER_LIST_ADVERTISED_YES :Так
|
||||
STR_NETWORK_SERVER_LIST_PLAYER_NAME :{BLACK}Імя гульца:
|
||||
@@ -2568,14 +2564,14 @@ STR_TRANSPARENT_LOADING_TOOLTIP :{BLACK}Пера
|
||||
STR_TRANSPARENT_INVISIBLE_TOOLTIP :{BLACK}Зрабіць аб'екты не празрыстымі, а цалкам нябачнымі
|
||||
|
||||
# Linkgraph legend window
|
||||
STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Схема грузапатокаў
|
||||
STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Схема грузаплыняў
|
||||
STR_LINKGRAPH_LEGEND_ALL :{BLACK}Усе
|
||||
STR_LINKGRAPH_LEGEND_NONE :{BLACK}Няма
|
||||
STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Выберыце кампаніі для адлюстраваньня
|
||||
|
||||
# Linkgraph legend window and linkgraph legend in smallmap
|
||||
STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}нявыкарыст.
|
||||
STR_LINKGRAPH_LEGEND_SATURATED :{TINY_FONT}{BLACK}насычана
|
||||
STR_LINKGRAPH_LEGEND_SATURATED :{TINY_FONT}{BLACK}загруж.
|
||||
STR_LINKGRAPH_LEGEND_OVERLOADED :{TINY_FONT}{BLACK}перагруз
|
||||
|
||||
# Base for station construction window(s)
|
||||
@@ -2884,7 +2880,6 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF:
|
||||
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Прымае: {LTBLUE}
|
||||
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING})
|
||||
STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Макс. хуткасьць чыгункi: {LTBLUE}{VELOCITY}
|
||||
STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Макс. хуткасьць аўтамабіляў: {LTBLUE}{VELOCITY}
|
||||
|
||||
# Description of land area of different tiles
|
||||
STR_LAI_CLEAR_DESCRIPTION_ROCKS :Камяні
|
||||
@@ -2981,7 +2976,7 @@ STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Зямля на
|
||||
STR_ABOUT_OPENTTD :{WHITE}Аб OpenTTD
|
||||
STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Арыґінальныя аўтарскія правы {COPYRIGHT} 1995 Chris Sawyer. Усе правы абароненыя.
|
||||
STR_ABOUT_VERSION :{BLACK}OpenTTD вэрсія {REV}
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002–2014 Каманда распрацоўнікаў OpenTTD
|
||||
STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2013 Каманда распрацоўнікаў OpenTTD
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Захаваць гульню
|
||||
@@ -3000,7 +2995,6 @@ STR_SAVELOAD_SAVE_BUTTON :{BLACK}Заха
|
||||
STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Захаваць гульню пад выбранай назвай
|
||||
STR_SAVELOAD_LOAD_BUTTON :{BLACK}Загрузіць
|
||||
STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Загрузіць выбраную гульню
|
||||
STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Загрузіць выбраную мапу вышыняў
|
||||
STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Зьвесткі аб гульні
|
||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Няма зьвесткаў.
|
||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
||||
@@ -3021,6 +3015,7 @@ STR_MAPGEN_SNOW_LINE_UP :{BLACK}Падн
|
||||
STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Апусьціць сьнегавую лінію
|
||||
STR_MAPGEN_RANDOM_SEED :{BLACK}Выпадковая лічба:
|
||||
STR_MAPGEN_RANDOM_SEED_HELP :{BLACK}Пстрыкніце тут, каб увесьці адвольную пачатковую лічбу. Ляндшафт ствараецца псэўдавыпадкова, лічба — апорная кропка ў пасьлядоўнасьці выпадковых лічбаў.
|
||||
STR_MAPGEN_RANDOM :{BLACK}Выпадковая
|
||||
STR_MAPGEN_RANDOM_HELP :{BLACK}Зьмяніць выпадковую лічбу, якую выкарыстоўвае ґенэратар ляндшафту
|
||||
STR_MAPGEN_LAND_GENERATOR :{BLACK}Ґенэратар ляндшафту:
|
||||
STR_MAPGEN_TREE_PLACER :{BLACK}Альґарытм дрэваў:
|
||||
@@ -3214,7 +3209,6 @@ STR_NEWGRF_LIST_MISSING :{RED}Файлы
|
||||
STR_NEWGRF_BROKEN :{WHITE}Файл NewGRF «{0:STRING}» можа прывесьці да страты сынхранізацыі й крушэньня гульні.
|
||||
STR_NEWGRF_BROKEN_POWERED_WAGON :{WHITE}Мяняецца стан лакаматыва «{1:ENGINE}», які знаходзіцца па-за дэпо.
|
||||
STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Мяняецца даўжыня транспарту «{1:ENGINE}», які знаходзіцца па-за дэпо.
|
||||
STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Гэта зьмяніла ёмістасьць транспарту '{1:ENGINE}', калі не ў дэпо для пераабсталяваньня
|
||||
STR_BROKEN_VEHICLE_LENGTH :{WHITE}Цягнік «{VEHICLE}», які належыць «{COMPANY}», мае няправільную даўжыню. Верагодна, гэта выклікана праблемамі ў файле новай ґрафікі. Гульня можа рассынхранізавацца або «выляцець».
|
||||
|
||||
STR_NEWGRF_BUGGY :{WHITE}NewGRF «{0:STRING}» падае няправільную інфармацыю.
|
||||
@@ -3361,10 +3355,10 @@ STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Наці
|
||||
|
||||
# Story book window
|
||||
STR_STORY_BOOK_CAPTION :{WHITE}Гісторыя кампаніі «{COMPANY}»
|
||||
STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Сусьветная гісторыя
|
||||
STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Сусветная гісторыя
|
||||
STR_STORY_BOOK_TITLE :{YELLOW}{STRING}
|
||||
STR_STORY_BOOK_GENERIC_PAGE_ITEM :Стар. {NUM}
|
||||
STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Перайсьці на патрэбную старонку, выбраўшы яе ў выпадаючым сьпісе.
|
||||
STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Перайсьці на патрэбную старонку, выбраўшы яе ў выпадаючым спісе.
|
||||
STR_STORY_BOOK_PREV_PAGE :{BLACK}Папярэдняя
|
||||
STR_STORY_BOOK_PREV_PAGE_TOOLTIP :{BLACK}Папярэдняя старонка
|
||||
STR_STORY_BOOK_NEXT_PAGE :{BLACK}Наступная
|
||||
@@ -3398,18 +3392,18 @@ STR_STATIOV_VIEW_EXCLUSIVE_RIGHTS_COMPANY :{YELLOW}{COMPAN
|
||||
|
||||
STR_STATION_VIEW_RATINGS_BUTTON :{BLACK}Рэйтынґ
|
||||
STR_STATION_VIEW_RATINGS_TOOLTIP :{BLACK}Паказаць рэйтынґ станцыі
|
||||
STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Месячны аб'ём паставак і мясцовы рэйтынґ:
|
||||
STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Месячны аб'ём паставак і мясцовы рэйтынг:
|
||||
STR_STATION_VIEW_CARGO_SUPPLY_RATING :{WHITE}{STRING}: {YELLOW}{COMMA} / {STRING} ({COMMA}%)
|
||||
|
||||
STR_STATION_VIEW_GROUP :{BLACK}Групаваць
|
||||
STR_STATION_VIEW_WAITING_STATION :па станцыі (якія чакаюць)
|
||||
STR_STATION_VIEW_WAITING_AMOUNT :па колькасьці (якія чакаюць)
|
||||
STR_STATION_VIEW_PLANNED_STATION :па станцыі (плянаваныя)
|
||||
STR_STATION_VIEW_PLANNED_AMOUNT :па колькасьці (плянаваныя)
|
||||
STR_STATION_VIEW_WAITING_AMOUNT :па колькасці (якія чакаюць)
|
||||
STR_STATION_VIEW_PLANNED_STATION :па станцыі (планаваныя)
|
||||
STR_STATION_VIEW_PLANNED_AMOUNT :па колькасці (планаваныя)
|
||||
STR_STATION_VIEW_FROM :{YELLOW}{CARGO_SHORT} з {STATION}
|
||||
STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT} праз {STATION}
|
||||
STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT} у {STATION}
|
||||
STR_STATION_VIEW_FROM_ANY :{RED}{CARGO_SHORT} зь невядомай станцыі
|
||||
STR_STATION_VIEW_FROM_ANY :{RED}{CARGO_SHORT} з невядомай станцыі
|
||||
STR_STATION_VIEW_TO_ANY :{RED}{CARGO_SHORT} на любую станцыю
|
||||
STR_STATION_VIEW_VIA_ANY :{RED}{CARGO_SHORT} праз любую станцыю
|
||||
STR_STATION_VIEW_FROM_HERE :{GREEN}{CARGO_SHORT} з гэтай станцыі
|
||||
@@ -3417,12 +3411,12 @@ STR_STATION_VIEW_VIA_HERE :{GREEN}{CARGO_S
|
||||
STR_STATION_VIEW_TO_HERE :{GREEN}{CARGO_SHORT} на гэту станцыю
|
||||
STR_STATION_VIEW_NONSTOP :{YELLOW}{CARGO_SHORT} без перасадак
|
||||
|
||||
STR_STATION_VIEW_GROUP_S_V_D :Адкуль — Праз — Куды
|
||||
STR_STATION_VIEW_GROUP_S_D_V :Адкуль — Куды — Праз
|
||||
STR_STATION_VIEW_GROUP_V_S_D :Праз — Адкуль — Куды
|
||||
STR_STATION_VIEW_GROUP_V_D_S :Праз — Куды — Адкуль
|
||||
STR_STATION_VIEW_GROUP_D_S_V :Куды — Адкуль — Праз
|
||||
STR_STATION_VIEW_GROUP_D_V_S :Куды — Праз — Адкуль
|
||||
STR_STATION_VIEW_GROUP_S_V_D :Адкуль - Праз - Куды
|
||||
STR_STATION_VIEW_GROUP_S_D_V :Адкуль - Куды - Праз
|
||||
STR_STATION_VIEW_GROUP_V_S_D :Праз - Адкуль - Куды
|
||||
STR_STATION_VIEW_GROUP_V_D_S :Праз - Куды - Адкуль
|
||||
STR_STATION_VIEW_GROUP_D_S_V :Куды - Адкуль - Праз
|
||||
STR_STATION_VIEW_GROUP_D_V_S :Куды - Праз - Адкуль
|
||||
|
||||
############ range for rating starts
|
||||
STR_CARGO_RATING_APPALLING :Жудасны
|
||||
@@ -4189,7 +4183,7 @@ STR_TIMETABLE_STATUS_NOT_STARTED :{BLACK}Ґраф
|
||||
STR_TIMETABLE_STATUS_START_AT :{BLACK}Адлік часу пачнецца з {STRING}
|
||||
|
||||
STR_TIMETABLE_STARTING_DATE :{BLACK}Пачатковая дата
|
||||
STR_TIMETABLE_STARTING_DATE_TOOLTIP :{BLACK}Выберыце пачатковую дату для гэтага ґрафіка. Ctrl+пстрычка ўсталюе пачатковую дату і раўнамерна разьмяркуе ўсе транспартныя сродкі, якія рухаюцца па гэтым маршруце, калі час руху па ім цалкам разьлічаны.
|
||||
STR_TIMETABLE_STARTING_DATE_TOOLTIP :{BLACK}Выберыце пачатковую дату для гэтага графіка. Ctrl+пстрычка ўсталюе пачатковую дату і раўнамерна размяркуе ўсе транспартныя сродкі, якія рухаюцца па гэтым маршруце, калі час руху па ім цалкам разлічаны.
|
||||
|
||||
STR_TIMETABLE_CHANGE_TIME :{BLACK}Зьмяніць час
|
||||
STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Зьмяніць час для вылучанага заданьня
|
||||
@@ -4304,7 +4298,7 @@ STR_TEXTFILE_README_CAPTION :{WHITE}{STRING}
|
||||
STR_TEXTFILE_CHANGELOG_CAPTION :{WHITE}{STRING} сьпiс зьменаў {STRING}
|
||||
STR_TEXTFILE_LICENCE_CAPTION :{WHITE}{STRING} ліцэнзія {STRING}
|
||||
STR_TEXTFILE_WRAP_TEXT :{WHITE}Пераносіць тэкст
|
||||
STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}Пераносіць тэкст так, каб ён зьмяшчаўся ў вакне без неабходнасьці пракруткі
|
||||
STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}Пераносіць тэкст так, каб ён змяшчаўся ў акне без неабходнасці прагорткі
|
||||
STR_TEXTFILE_VIEW_README :{BLACK}Прагледзець iнструкцыю
|
||||
STR_TEXTFILE_VIEW_CHANGELOG :{BLACK}Журнал зьменаў
|
||||
STR_TEXTFILE_VIEW_LICENCE :{BLACK}Ліцэнзія
|
||||
@@ -4683,9 +4677,9 @@ STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}Не а
|
||||
STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... транспартны сродак зьнішчаны
|
||||
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL :{WHITE}Усе транспартныя сродкі будуць недаступныя
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Зьмяніце канфігурацыю модуля NewGRF
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Змяніце канфігурацыю модуля NewGRF
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}Няма даступных транспартных сродкаў
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE}Пачніце гульню пасьля {DATE_SHORT} або падключыце NewGRF з транспартам адпаведных часоў.
|
||||
STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE}Пачніце гульню не раней {DATE_SHORT} або падключыце NewGRF, дадаючы транспартныя сродкі, якія выкарыстоўваліся тым часам.
|
||||
|
||||
# Specific vehicle errors
|
||||
STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Немагчыма іґнараваць сыґнал. Небясьпечна...
|
||||
@@ -4730,14 +4724,14 @@ STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Не а
|
||||
STR_DESKTOP_SHORTCUT_COMMENT :Эканамічны сімулятар на аснове «Transport Tycoon Deluxe»
|
||||
|
||||
# Translatable descriptions in media/baseset/*.ob* files
|
||||
STR_BASEGRAPHICS_DOS_DESCRIPTION :Арыґінальная ґрафіка з Transport Tycoon Deluxe для DOS.
|
||||
STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Арыґінальная ґрафіка зь нямецкай версіі Transport Tycoon Deluxe для DOS.
|
||||
STR_BASEGRAPHICS_WIN_DESCRIPTION :Арыґінальная ґрафіка з Transport Tycoon Deluxe для Windows.
|
||||
STR_BASESOUNDS_DOS_DESCRIPTION :Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
|
||||
STR_BASESOUNDS_WIN_DESCRIPTION :Арыґінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
STR_BASESOUNDS_NONE_DESCRIPTION :"Пусты" набор гукавога афармленьня, які не зьмяшчае ніякіх гукаў.
|
||||
STR_BASEMUSIC_WIN_DESCRIPTION :Арыґінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
STR_BASEMUSIC_NONE_DESCRIPTION :"Пусты" набор музычнага афармлення, які не зьмяшчае ніякай музыкі.
|
||||
STR_BASEGRAPHICS_DOS_DESCRIPTION :Арыгінальная графіка з Transport Tycoon Deluxe для DOS.
|
||||
STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Арыгінальная графіка з нямецкай версіі Transport Tycoon Deluxe для DOS.
|
||||
STR_BASEGRAPHICS_WIN_DESCRIPTION :Арыгінальная графіка з Transport Tycoon Deluxe для Windows.
|
||||
STR_BASESOUNDS_DOS_DESCRIPTION :Арыгінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для DOS.
|
||||
STR_BASESOUNDS_WIN_DESCRIPTION :Арыгінальны набор гукавога афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
STR_BASESOUNDS_NONE_DESCRIPTION :"Пусты" набор гукавога афармленьня, не змяшчаючы ніякіх гукаў.
|
||||
STR_BASEMUSIC_WIN_DESCRIPTION :Арыгінальны набор музычнага афармленьня з гульні Transport Tycoon Deluxe для Windows.
|
||||
STR_BASEMUSIC_NONE_DESCRIPTION :"Пусты" набор музычнага афармлення, не змяшчаючы ніякай музыкі.
|
||||
|
||||
##id 0x2000
|
||||
# Town building names
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user