Merge branch 'master' into enhanced_viewport_overlay

Conflicts:
	src/road_gui.cpp
	src/widgets/dropdown.cpp
This commit is contained in:
Jonathan G Rennison 2015-08-11 21:41:41 +01:00
commit 388dab7390
78 changed files with 6613 additions and 622 deletions

View File

@ -29,6 +29,7 @@ set_default() {
strip="" strip=""
lipo="" lipo=""
awk="awk" awk="awk"
pkg_config="pkg-config"
os="DETECT" os="DETECT"
endian="AUTO" endian="AUTO"
cpu_type="DETECT" cpu_type="DETECT"
@ -84,7 +85,8 @@ set_default() {
with_libtimidity="1" with_libtimidity="1"
with_freetype="1" with_freetype="1"
with_fontconfig="1" with_fontconfig="1"
with_icu="1" with_icu_layout="1"
with_icu_sort="1"
static_icu="0" static_icu="0"
with_psp_config="1" with_psp_config="1"
with_threads="1" with_threads="1"
@ -105,6 +107,7 @@ set_default() {
strip strip
lipo lipo
awk awk
pkg_config
os os
endian endian
cpu_type cpu_type
@ -159,7 +162,8 @@ set_default() {
with_libtimidity with_libtimidity
with_freetype with_freetype
with_fontconfig with_fontconfig
with_icu with_icu_layout
with_icu_sort
static_icu static_icu
with_psp_config with_psp_config
with_threads with_threads
@ -213,6 +217,8 @@ detect_params() {
--windres=*) windres="$optarg";; --windres=*) windres="$optarg";;
--awk) prev_p="awk";; --awk) prev_p="awk";;
--awk=*) awk="$optarg";; --awk=*) awk="$optarg";;
--pkg-config) prev_p="pkg_config";;
--pkg-config=*) pkg_config="$optarg";;
--strip) prev_p="strip";; --strip) prev_p="strip";;
--strip=*) strip="$optarg";; --strip=*) strip="$optarg";;
--lipo) prev_p="lipo";; --lipo) prev_p="lipo";;
@ -383,12 +389,18 @@ detect_params() {
--without-libfontconfig) with_fontconfig="0";; --without-libfontconfig) with_fontconfig="0";;
--with-libfontconfig=*) with_fontconfig="$optarg";; --with-libfontconfig=*) with_fontconfig="$optarg";;
--with-icu) with_icu="2";; --with-icu) with_icu_layout="2";with_icu_sort="2";;
--without-icu) with_icu="0";; --without-icu) with_icu_layout="0";with_icu_sort="0";;
--with-icu=*) with_icu="$optarg";; --with-icu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
--with-libicu) with_icu="2";; --with-libicu) with_icu_layout="2";with_icu_sort="2";;
--without-libicu) with_icu="0";; --without-libicu) with_icu_layout="0";with_icu_sort="0";;
--with-libicu=*) with_icu="$optarg";; --with-libicu=*) with_icu_layout="$optarg";with_icu_sort="$optarg";;
--with-icu-layout) with_icu_layout="2";;
--without-icu-layout) with_icu_layout="0";;
--with-icu-layout=*) with_icu_layout="$optarg";;
--with-icu-sort) with_icu_sort="2";;
--without-icu-sort) with_icu_sort="0";;
--with-icu-sort=*) with_icu_sort="$optarg";;
--static-icu) static_icu="1";; --static-icu) static_icu="1";;
--static-icu=*) static_icu="$optarg";; --static-icu=*) static_icu="$optarg";;
--static-libicu) static_icu="1";; --static-libicu) static_icu="1";;
@ -787,7 +799,7 @@ check_params() {
pre_detect_with_zlib=$with_zlib pre_detect_with_zlib=$with_zlib
detect_zlib detect_zlib
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then if [ "$with_zlib" = "0" ] || [ -z "$zlib-config" ]; then
log 1 "WARNING: zlib was not detected or disabled" log 1 "WARNING: zlib was not detected or disabled"
log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features" log 1 "WARNING: OpenTTD doesn't require zlib, but it does mean that many features"
log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps," log 1 "WARNING: (like loading most old savegames/scenarios, loading heightmaps,"
@ -838,7 +850,8 @@ check_params() {
detect_png detect_png
detect_freetype detect_freetype
detect_fontconfig detect_fontconfig
detect_icu detect_icu_layout
detect_icu_sort
detect_pspconfig detect_pspconfig
detect_libtimidity detect_libtimidity
@ -1653,12 +1666,13 @@ make_cflags_and_ldflags() {
fi fi
if [ "$with_zlib" != "0" ]; then if [ "$with_zlib" != "0" ]; then
if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then
LIBS="$LIBS $zlib"
else
LIBS="$LIBS -lz"
fi
CFLAGS="$CFLAGS -DWITH_ZLIB" CFLAGS="$CFLAGS -DWITH_ZLIB"
CFLAGS="$CFLAGS `$zlib_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$zlib_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$zlib_config --libs | tr '\n\r' ' '`"
fi
fi fi
if [ -n "$lzma_config" ]; then if [ -n "$lzma_config" ]; then
@ -1704,13 +1718,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$png_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$png_config --variable=prefix`/lib/libpng.a `$png_config --libs --static | sed s@-lpng[0-9]*@@`"
else
LIBS="$LIBS `$png_config --libs --static | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$png_config --libs | tr '\n\r' ' '`"
fi fi
@ -1721,13 +1729,7 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
fi fi
@ -1738,26 +1740,31 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
if [ "$os" = "OSX" ]; then LIBS="$LIBS `$freetype_config --libs --static | tr '\n\r' ' '`"
LIBS="$LIBS `$freetype_config --prefix`/lib/libfreetype.a"
else
# Is it possible to do static with freetype, if so: how?
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi
else else
LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`" LIBS="$LIBS `$freetype_config --libs | tr '\n\r' ' '`"
fi fi
fi fi
if [ -n "$icu_config" ]; then if [ -n "$icu_layout_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU" CFLAGS="$CFLAGS -DWITH_ICU_LAYOUT"
CFLAGS="$CFLAGS `$icu_config --cppflags | tr '\n\r' ' '`" CFLAGS="$CFLAGS `$icu_layout_config --cflags | tr '\n\r' ' '`"
# Some icu-configs have the 'feature' of not adding a space where others do add the space
if [ "$static_icu" != "0" ]; then if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' ' | sed s/licu/lsicu/g`" LIBS="$LIBS `$icu_layout_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else else
LIBS="$LIBS `$icu_config --ldflags-searchpath` `($icu_config --ldflags-libsonly; $icu_config --ldflags-layout) | tr '\n\r' ' '`" LIBS="$LIBS `$icu_layout_config --libs | tr '\n\r' ' '`"
fi
fi
if [ -n "$icu_sort_config" ]; then
CFLAGS="$CFLAGS -DWITH_ICU_SORT"
CFLAGS="$CFLAGS `$icu_sort_config --cflags | tr '\n\r' ' '`"
if [ "$static_icu" != "0" ]; then
LIBS="$LIBS `$icu_sort_config --libs --static | tr '\n\r' ' ' | sed s/-licu/-lsicu/g`"
else
LIBS="$LIBS `$icu_sort_config --libs | tr '\n\r' ' '`"
fi fi
fi fi
@ -1772,13 +1779,15 @@ make_cflags_and_ldflags() {
fi fi
fi fi
if [ -n "$libtimidity" ]; then if [ -n "$libtimidity_config" ]; then
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS $libtimidity"
else
LIBS="$LIBS -ltimidity"
fi
CFLAGS="$CFLAGS -DLIBTIMIDITY" CFLAGS="$CFLAGS -DLIBTIMIDITY"
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
else
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
fi
fi fi
if [ "$with_iconv" != "0" ]; then if [ "$with_iconv" != "0" ]; then
@ -1938,9 +1947,26 @@ check_compiler() {
log 2 " exit code $ret" log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $compiler not found" if [ -z "$5" ]; then
log 1 "I couldn't detect any $6 binary for $3" log 1 "checking $1... $compiler not found"
exit 1 log 1 "I couldn't detect any $6 binary for $3"
exit 1
else
compiler="$3-$5"
fi
machine=`eval $compiler $9 2>/dev/null`
ret=$?
eval "$2=\"$compiler\""
log 2 "executing $compiler $9"
log 2 " returned $machine"
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $5 binary for $3"
exit 1
fi
fi fi
if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then if [ "$machine" != "$3" ] && ( [ "$8" = "0" ] || [ "$8" = "1" ] ); then
@ -2349,7 +2375,7 @@ detect_allegro() {
return 0 return 0
fi fi
# By default on OSX we don't use SDL. The rest is auto-detect # By default on OSX we don't use Allegro. The rest is auto-detect
if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then if [ "$with_allegro" = "1" ] && [ "$os" = "OSX" ] && [ "$with_cocoa" != "0" ]; then
log 1 "checking Allegro... OSX, skipping" log 1 "checking Allegro... OSX, skipping"
@ -2357,33 +2383,7 @@ detect_allegro() {
return 0 return 0
fi fi
if [ "$with_allegro" = "1" ] || [ "$with_allegro" = "" ] || [ "$with_allegro" = "2" ]; then detect_pkg_config "$with_allegro" "allegro" "allegro_config" "4.4"
allegro_config="allegro-config"
else
allegro_config="$with_allegro"
fi
version=`$allegro_config --version 2>/dev/null`
ret=$?
log 2 "executing $allegro_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking Allegro... not found"
# It was forced, so it should be found.
if [ "$with_allegro" != "1" ]; then
log 1 "configure: error: allegro-config couldn't be found"
log 1 "configure: error: you supplied '$with_allegro', but it seems invalid"
exit 1
fi
allegro_config=""
return 0
fi
log 1 "checking Allegro... found"
} }
@ -2429,33 +2429,7 @@ detect_sdl() {
sleep 5 sleep 5
fi fi
if [ "$with_sdl" = "1" ] || [ "$with_sdl" = "" ] || [ "$with_sdl" = "2" ]; then detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
sdl_config="sdl-config"
else
sdl_config="$with_sdl"
fi
version=`$sdl_config --version 2>/dev/null`
ret=$?
log 2 "executing $sdl_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking SDL... not found"
# It was forced, so it should be found.
if [ "$with_sdl" != "1" ]; then
log 1 "configure: error: sdl-config couldn't be found"
log 1 "configure: error: you supplied '$with_sdl', but it seems invalid"
exit 1
fi
sdl_config=""
return 0
fi
log 1 "checking SDL... found"
} }
detect_osx_sdk() { detect_osx_sdk() {
@ -2708,7 +2682,7 @@ detect_library() {
} }
detect_zlib() { detect_zlib() {
detect_library "$with_zlib" "zlib" "libz.a" "" "zlib.h" detect_pkg_config "$with_zlib" "zlib" "zlib_config" "1.2"
} }
detect_lzo2() { detect_lzo2() {
@ -2716,7 +2690,7 @@ detect_lzo2() {
} }
detect_libtimidity() { detect_libtimidity() {
detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "" "timidity.h" detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
} }
detect_pkg_config() { detect_pkg_config() {
@ -2724,6 +2698,7 @@ detect_pkg_config() {
# $2 - package name ('liblzma') # $2 - package name ('liblzma')
# $3 - config name ('lzma_config', sets $lzma_config) # $3 - config name ('lzma_config', sets $lzma_config)
# $4 - minimum module version ('2.3') # $4 - minimum module version ('2.3')
# $5 - check for dedicated, 1 is "skif if dedicated"
# 0 means no, 1 is auto-detect, 2 is force # 0 means no, 1 is auto-detect, 2 is force
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
@ -2733,10 +2708,17 @@ detect_pkg_config() {
return 0 return 0
fi fi
if [ "$5" = "1" ] && [ "$1" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking $2... dedicated server, skipping"
eval "$3=\"\""
return 0
fi
log 2 "detecting $2" log 2 "detecting $2"
if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then if [ "$1" = "1" ] || [ "$1" = "" ] || [ "$1" = "2" ]; then
pkg_config_call="pkg-config $2" pkg_config_call="$pkg_config $2"
else else
pkg_config_call="$1" pkg_config_call="$1"
fi fi
@ -2758,7 +2740,7 @@ detect_pkg_config() {
# It was forced, so it should be found. # It was forced, so it should be found.
if [ "$1" != "1" ]; then if [ "$1" != "1" ]; then
log 1 "configure: error: pkg-config $2 couldn't be found" log 1 "configure: error: $pkg_config $2 couldn't be found"
log 1 "configure: error: you supplied '$1', but it seems invalid" log 1 "configure: error: you supplied '$1', but it seems invalid"
exit 1 exit 1
fi fi
@ -2780,89 +2762,11 @@ detect_xdg_basedir() {
} }
detect_png() { detect_png() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$with_png" = "0" ]; then
log 1 "checking libpng... disabled"
png_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_png" != "1" ]; then
log 1 "checking libpng... no zlib"
log 1 "ERROR: libpng was forced, but zlib was not detected / disabled."
log 1 "ERROR: libpng depends on zlib."
exit 1
fi
log 1 "checking libpng... no zlib, skipping"
png_config=""
return 0
fi
detect_pkg_config "$with_png" "libpng" "png_config" "1.2" detect_pkg_config "$with_png" "libpng" "png_config" "1.2"
} }
detect_freetype() { detect_freetype() {
# 0 means no, 1 is auto-detect, 2 is force detect_pkg_config "$with_freetype" "freetype2" "freetype_config" "2.2" "1"
if [ "$with_freetype" = "0" ]; then
log 1 "checking libfreetype... disabled"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfreetype... dedicated server, skipping"
freetype_config=""
return 0
fi
if [ "$with_zlib" = "0" ] || [ -z "$zlib" ]; then
if [ "$with_freetype" != "1" ]; then
log 1 "checking libfreetype... no zlib"
log 1 "ERROR: libfreetype was forced, but zlib was not detected / disabled."
log 1 "ERROR: libfreetype depends on zlib."
exit 1
fi
log 1 "checking libfreetype... no zlib, skipping"
freetype_config=""
return 0
fi
if [ "$with_freetype" = "1" ] || [ "$with_freetype" = "" ] || [ "$with_freetype" = "2" ]; then
freetype_config="freetype-config"
else
freetype_config="$with_freetype"
fi
version=`$freetype_config --version 2>/dev/null`
ret=$?
log 2 "executing freetype_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ]; then
log 1 "checking libfreetype... not found"
# It was forced, so it should be found.
if [ "$with_freetype" != "1" ]; then
log 1 "configure: error: freetype-config couldn't be found"
log 1 "configure: error: you supplied '$with_freetype', but it seems invalid"
exit 1
fi
freetype_config=""
return 0
fi
log 1 "checking libfreetype... found"
} }
detect_fontconfig() { detect_fontconfig() {
@ -2873,19 +2777,6 @@ detect_fontconfig() {
fontconfig_config="" fontconfig_config=""
return 0 return 0
fi fi
if [ "$with_fontconfig" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libfontconfig... dedicated server, skipping"
fontconfig_config=""
return 0
fi
if [ "$with_fontconfig" != "2" ] && [ -z "$freetype_config" ]; then
log 1 "checking libfontconfig... no freetype, skipping"
fontconfig_config=""
return 0
fi
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
log 1 "checking libfontconfig... WIN32, skipping" log 1 "checking libfontconfig... WIN32, skipping"
fontconfig_config="" fontconfig_config=""
@ -2898,57 +2789,15 @@ detect_fontconfig() {
return 0 return 0
fi fi
detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" detect_pkg_config "$with_fontconfig" "fontconfig" "fontconfig_config" "2.3" "1"
} }
detect_icu() { detect_icu_layout() {
# 0 means no, 1 is auto-detect, 2 is force detect_pkg_config "$with_icu_layout" "icu-lx" "icu_layout_config" "4.8" "1"
if [ "$with_icu" = "0" ]; then }
log 1 "checking libicu... disabled"
icu_config="" detect_icu_sort() {
return 0 detect_pkg_config "$with_icu_sort" "icu-i18n" "icu_sort_config" "4.8" "1"
fi
if [ "$with_icu" = "1" ] && [ "$enable_dedicated" != "0" ]; then
log 1 "checking libicu... dedicated server, skipping"
icu_config=""
return 0
fi
if [ "$with_icu" = "1" ] || [ "$with_icu" = "" ] || [ "$with_icu" = "2" ]; then
icu_config="icu-config"
else
icu_config="$with_icu"
fi
version=`$icu_config --version 2>/dev/null`
ret=$?
check_version '3.6' "$version"
version_ok=$?
log 2 "executing $icu_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
log 1 "checking libicu... needs at least version 3.6.0, icu NOT enabled"
else
log 1 "checking libicu... not found"
fi
# It was forced, so it should be found.
if [ "$with_icu" != "1" ]; then
log 1 "configure: error: icu-config couldn't be found"
log 1 "configure: error: you supplied '$with_icu', but it seems invalid"
exit 1
fi
icu_config=""
return 0
fi
log 1 "checking libicu... found"
} }
detect_pspconfig() { detect_pspconfig() {
@ -3588,6 +3437,7 @@ showhelp() {
echo " --windres=WINDRES the windres to use [HOST-windres]" echo " --windres=WINDRES the windres to use [HOST-windres]"
echo " --strip=STRIP the strip to use [HOST-strip]" echo " --strip=STRIP the strip to use [HOST-strip]"
echo " --awk=AWK the awk to use in configure [awk]" echo " --awk=AWK the awk to use in configure [awk]"
echo " --pkg-config=PKG-CONFIG the pkg-config to use in configure [pkg-config]"
echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]" echo " --lipo=LIPO the lipo to use (OSX ONLY) [HOST-lipo]"
echo " --os=OS the OS we are compiling for [DETECT]" echo " --os=OS the OS we are compiling for [DETECT]"
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/" echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
@ -3662,23 +3512,30 @@ showhelp() {
echo " --with-midi=midi define which midi-player to use" echo " --with-midi=midi define which midi-player to use"
echo " --with-midi-arg=arg define which args to use for the" echo " --with-midi-arg=arg define which args to use for the"
echo " midi-player" echo " midi-player"
echo " --with-libtimidity enables libtimidity support" echo " --with-libtimidity[=\"pkg-config libtimidity\"]"
echo " --with-allegro[=allegro-config]" echo " enables libtimidity support"
echo " --with-allegro[=\"pkg-config allegro\"]"
echo " enables Allegro video driver support" echo " enables Allegro video driver support"
echo " --with-cocoa enables COCOA video driver (OSX ONLY)" echo " --with-cocoa enables COCOA video driver (OSX ONLY)"
echo " --with-sdl[=sdl-config] enables SDL video driver support" echo " --with-sdl[=\"pkg-config sdl\"] enables SDL video driver support"
echo " --with-zlib[=zlib.a] enables zlib support" echo " --with-zlib[=\"pkg-config zlib\"]"
echo " enables zlib support"
echo " --with-liblzma[=\"pkg-config liblzma\"]" echo " --with-liblzma[=\"pkg-config liblzma\"]"
echo " enables liblzma support" echo " enables liblzma support"
echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support" echo " --with-liblzo2[=liblzo2.a] enables liblzo2 support"
echo " --with-png[=libpng-config] enables libpng support" echo " --with-png[=\"pkg-config libpng\"]"
echo " --with-freetype[=freetype-config]" echo " enables libpng support"
echo " --with-freetype[=\"pkg-config freetype2\"]"
echo " enables libfreetype support" echo " enables libfreetype support"
echo " --with-fontconfig[=\"pkg-config fontconfig\"]" echo " --with-fontconfig[=\"pkg-config fontconfig\"]"
echo " enables fontconfig support" echo " enables fontconfig support"
echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]" echo " --with-xdg-basedir[=\"pkg-config libxdg-basedir\"]"
echo " enables XDG base directory support" echo " enables XDG base directory support"
echo " --with-icu[=icu-config] enables icu (used for right-to-left support)" echo " --with-icu enables icu components for layout and sorting"
echo " --with-icu-layout[=\"pkg-config icu-lx\"]"
echo " enables icu components for layouting (right-to-left support)"
echo " --with-icu-sort[=\"pkg-config icu-i18n\"]"
echo " enables icu components for locale specific string sorting"
echo " --static-icu try to link statically (libsicu instead of" echo " --static-icu try to link statically (libsicu instead of"
echo " libicu; can fail as the new name is guessed)" echo " libicu; can fail as the new name is guessed)"
echo " --with-iconv[=iconv-path] enables iconv support" echo " --with-iconv[=iconv-path] enables iconv support"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,7 +186,7 @@ static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int
int grade_x = x2 - x; int grade_x = x2 - x;
/* Clipping rectangle. Slightly extended so we can ignore the width of the line. */ /* Clipping rectangle. Slightly extended so we can ignore the width of the line. */
uint extra = CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2" int extra = (int)CeilDiv(3 * width, 4); // not less then "width * sqrt(2) / 2"
Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra }; Rect clip = { -extra, -extra, screen_width - 1 + extra, screen_height - 1 + extra };
/* prevent integer overflows. */ /* prevent integer overflows. */
@ -586,7 +586,7 @@ int GetStringLineCount(StringID str, int maxw)
*/ */
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion) Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
{ {
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)}; Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box; return box;
} }
@ -598,7 +598,7 @@ Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestio
*/ */
Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion) Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
{ {
Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)}; Dimension box = {suggestion.width, (uint)GetStringHeight(str, suggestion.width)};
return box; return box;
} }

View File

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

View File

@ -19,12 +19,12 @@
#include <map> #include <map>
#include <string> #include <string>
#ifdef WITH_ICU #ifdef WITH_ICU_LAYOUT
#include "layout/ParagraphLayout.h" #include "layout/ParagraphLayout.h"
#define ICU_FONTINSTANCE : public LEFontInstance #define ICU_FONTINSTANCE : public LEFontInstance
#else /* WITH_ICU */ #else /* WITH_ICU_LAYOUT */
#define ICU_FONTINSTANCE #define ICU_FONTINSTANCE
#endif /* WITH_ICU */ #endif /* WITH_ICU_LAYOUT */
/** /**
* Text drawing parameters, which can change while drawing a line, but are kept between multiple parts * Text drawing parameters, which can change while drawing a line, but are kept between multiple parts
@ -75,7 +75,7 @@ public:
Font(FontSize size, TextColour colour); Font(FontSize size, TextColour colour);
#ifdef WITH_ICU #ifdef WITH_ICU_LAYOUT
/* Implementation details of LEFontInstance */ /* Implementation details of LEFontInstance */
le_int32 getUnitsPerEM() const; le_int32 getUnitsPerEM() const;
@ -91,7 +91,7 @@ public:
LEGlyphID mapCharToGlyph(LEUnicode32 ch) const; LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;
void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const; void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const; le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
#endif /* WITH_ICU */ #endif /* WITH_ICU_LAYOUT */
}; };
/** Mapping from index to font. */ /** Mapping from index to font. */

View File

@ -1390,7 +1390,7 @@ STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Ropné rafineri
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Výška sněhové čáry: {STRING} STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Výška sněhové čáry: {STRING}
STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Určuje o jaké výšky se vyskytuje sníh u subarktického klimatu. Sníh rovněž ovlivňuje vytváření průmyslu a požadavky na růst měst STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :Určuje o jaké výšky se vyskytuje sníh u subarktického klimatu. Sníh rovněž ovlivňuje vytváření průmyslu a požadavky na růst měst
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Členitost krajiny: {STRING} STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Členitost krajiny: {STRING}
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_HELPTEXT :(Pouze TerraGenesis) Zvol množství hor: Rovinatý terén má méně hor, které jsou však rozlehlejší. Členitý terén má mnoho hor, u kterých se může zdát, že se upakují STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_HELPTEXT :(Pouze TerraGenesis) Zvol množství hor: Rovinatý terén má méně hor, které jsou však rozlehlejší. Členitý terén má mnoho hor, u kterých se může zdát, že se opakují
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :velmi rovná STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :velmi rovná
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :rovná STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :rovná
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH :členitá STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH :členitá

View File

@ -1143,7 +1143,7 @@ STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN :Maximale beginl
STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Maximale bedrag een bedrijf kan lenen (zonder rekening te houden met de inflatie) STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Maximale bedrag een bedrijf kan lenen (zonder rekening te houden met de inflatie)
STR_CONFIG_SETTING_INTEREST_RATE :Rente van lening: {STRING} STR_CONFIG_SETTING_INTEREST_RATE :Rente van lening: {STRING}
STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :Percentage rente op lening; bepaald ook het inflatiecijfer wanneer ingeschakeld STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :Percentage rente op lening; bepaald ook het inflatiecijfer wanneer ingeschakeld
STR_CONFIG_SETTING_RUNNING_COSTS :Brandstofkosten: {STRING} STR_CONFIG_SETTING_RUNNING_COSTS :Onderhoudskosten: {STRING}
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Het niveau van onderhoud en bedrijfskosten van voertuigen en infrastuctuur STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Het niveau van onderhoud en bedrijfskosten van voertuigen en infrastuctuur
STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Bouwsnelheid: {STRING} STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Bouwsnelheid: {STRING}
STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Beperk de hoeveelheid bouwactiviteiten voor computerspeler STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Beperk de hoeveelheid bouwactiviteiten voor computerspeler
@ -3184,16 +3184,16 @@ STR_FINANCES_EXPENDITURE_INCOME_TITLE :{WHITE}Uitgaven
STR_FINANCES_YEAR :{WHITE}{NUM} STR_FINANCES_YEAR :{WHITE}{NUM}
STR_FINANCES_SECTION_CONSTRUCTION :{GOLD}Bouwkosten STR_FINANCES_SECTION_CONSTRUCTION :{GOLD}Bouwkosten
STR_FINANCES_SECTION_NEW_VEHICLES :{GOLD}Nieuwe voertuigen STR_FINANCES_SECTION_NEW_VEHICLES :{GOLD}Nieuwe voertuigen
STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Treinbrandstofkosten STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Treinonderhoudskosten
STR_FINANCES_SECTION_ROAD_VEHICLE_RUNNING_COSTS :{GOLD}Wegvoertuigbrandstofkosten STR_FINANCES_SECTION_ROAD_VEHICLE_RUNNING_COSTS :{GOLD}Wegvoertuigbrandstofkosten
STR_FINANCES_SECTION_AIRCRAFT_RUNNING_COSTS :{GOLD}Vliegtuigbrandstofkosten STR_FINANCES_SECTION_AIRCRAFT_RUNNING_COSTS :{GOLD}Vliegtuigonderhoudskosten
STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Schipbrandstofkosten STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Schiponderhoudskosten
STR_FINANCES_SECTION_PROPERTY_MAINTENANCE :{GOLD}Eigendomsonderhoud STR_FINANCES_SECTION_PROPERTY_MAINTENANCE :{GOLD}Eigendomsonderhoud
STR_FINANCES_SECTION_TRAIN_INCOME :{GOLD}Treininkomsten STR_FINANCES_SECTION_TRAIN_INCOME :{GOLD}Treininkomsten
STR_FINANCES_SECTION_ROAD_VEHICLE_INCOME :{GOLD}Wegvoertuiginkomsten STR_FINANCES_SECTION_ROAD_VEHICLE_INCOME :{GOLD}Wegvoertuiginkomsten
STR_FINANCES_SECTION_AIRCRAFT_INCOME :{GOLD}Vliegtuiginkomsten STR_FINANCES_SECTION_AIRCRAFT_INCOME :{GOLD}Vliegtuiginkomsten
STR_FINANCES_SECTION_SHIP_INCOME :{GOLD}Schipinkomsten STR_FINANCES_SECTION_SHIP_INCOME :{GOLD}Schipinkomsten
STR_FINANCES_SECTION_LOAN_INTEREST :{GOLD}Rente van lening STR_FINANCES_SECTION_LOAN_INTEREST :{GOLD} De rente van de lening
STR_FINANCES_SECTION_OTHER :{GOLD}Overig STR_FINANCES_SECTION_OTHER :{GOLD}Overig
STR_FINANCES_NEGATIVE_INCOME :{BLACK}-{CURRENCY_LONG} STR_FINANCES_NEGATIVE_INCOME :{BLACK}-{CURRENCY_LONG}
STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURRENCY_LONG} STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURRENCY_LONG}
@ -3598,12 +3598,12 @@ STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Bouw sch
STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Bouw vliegtuig om voor een ander goederentype STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Bouw vliegtuig om voor een ander goederentype
STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Keer trein om STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Keer trein om
STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Dwing het wegvoertuig om om te draaien STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Dwing het wegvoertuig te keren.
STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Toon orders van trein. Ctrl+klik toont het tijdschema van de trein STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Toon orders van de trein. Ctrl+klik toont het tijdschema van de trein
STR_VEHICLE_VIEW_ROAD_VEHICLE_ORDERS_TOOLTIP :{BLACK}Toon orders van wegvoertuig. Ctrl+klik toont tijdschema van het voertuig STR_VEHICLE_VIEW_ROAD_VEHICLE_ORDERS_TOOLTIP :{BLACK}Toon orders van het wegvoertuig. Ctrl+klik toont tijdschema van het voertuig
STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Toon orders van schip. Ctrl+klik toont tijdschema van het schip STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Toon orders van het schip. Ctrl+klik toont tijdschema van het schip
STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Toon orders van vliegtuig. Ctrl+klik toont het tijdschema van het vliegtuig STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Toon orders van het vliegtuig. Ctrl+klik toont het tijdschema van het vliegtuig
STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Toon details van trein STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Toon details van trein
STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Toon details van wegvoertuig STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Toon details van wegvoertuig
@ -4153,9 +4153,9 @@ STR_ERROR_MAXIMUM_PERMITTED_LOAN :{WHITE}... maxi
STR_ERROR_CAN_T_BORROW_ANY_MORE_MONEY :{WHITE}Kan geen geld meer lenen... STR_ERROR_CAN_T_BORROW_ANY_MORE_MONEY :{WHITE}Kan geen geld meer lenen...
STR_ERROR_LOAN_ALREADY_REPAYED :{WHITE}... geen lening om af te betalen STR_ERROR_LOAN_ALREADY_REPAYED :{WHITE}... geen lening om af te betalen
STR_ERROR_CURRENCY_REQUIRED :{WHITE}... {CURRENCY_LONG} benodigd STR_ERROR_CURRENCY_REQUIRED :{WHITE}... {CURRENCY_LONG} benodigd
STR_ERROR_CAN_T_REPAY_LOAN :{WHITE}Kan geen lening afbetalen... STR_ERROR_CAN_T_REPAY_LOAN :{WHITE}Kan de lening niet afbetalen..
STR_ERROR_INSUFFICIENT_FUNDS :{WHITE}Kan geen geld weggeven dat van de bank geleend is... STR_ERROR_INSUFFICIENT_FUNDS :{WHITE}Kan geen geld weggeven dat van de bank geleend is...
STR_ERROR_CAN_T_BUY_COMPANY :{WHITE}Kan bedrijf niet kopen... STR_ERROR_CAN_T_BUY_COMPANY :{WHITE}Kan het bedrijf niet kopen...
STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS :{WHITE}Kan bedrijfshoofdkantoor niet bouwen... STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS :{WHITE}Kan bedrijfshoofdkantoor niet bouwen...
STR_ERROR_CAN_T_BUY_25_SHARE_IN_THIS :{WHITE}Kan geen 25% aandeel in dit bedrijf kopen... STR_ERROR_CAN_T_BUY_25_SHARE_IN_THIS :{WHITE}Kan geen 25% aandeel in dit bedrijf kopen...
STR_ERROR_CAN_T_SELL_25_SHARE_IN :{WHITE}Kan geen 25% aandeel in dit bedrijf verkopen... STR_ERROR_CAN_T_SELL_25_SHARE_IN :{WHITE}Kan geen 25% aandeel in dit bedrijf verkopen...

View File

@ -3848,7 +3848,7 @@ STR_ORDER_NO_LOAD :(Ingen lastning
STR_ORDER_UNLOAD :(Lasta av och lasta gods) STR_ORDER_UNLOAD :(Lasta av och lasta gods)
STR_ORDER_UNLOAD_FULL_LOAD :(Lasta av och vänta på full last) STR_ORDER_UNLOAD_FULL_LOAD :(Lasta av och vänta på full last)
STR_ORDER_UNLOAD_FULL_LOAD_ANY :(Lasta av och vänta på någon full last) STR_ORDER_UNLOAD_FULL_LOAD_ANY :(Lasta av och vänta på någon full last)
STR_ORDER_UNLOAD_NO_LOAD :(Ladda av och lämna tom) STR_ORDER_UNLOAD_NO_LOAD :(Lasta av och lämna tom)
STR_ORDER_TRANSFER :(Överför och lasta gods) STR_ORDER_TRANSFER :(Överför och lasta gods)
STR_ORDER_TRANSFER_FULL_LOAD :(Överför och vänta på full last) STR_ORDER_TRANSFER_FULL_LOAD :(Överför och vänta på full last)
STR_ORDER_TRANSFER_FULL_LOAD_ANY :(Överför och vänta på full last av någon godstyp) STR_ORDER_TRANSFER_FULL_LOAD_ANY :(Överför och vänta på full last av någon godstyp)

View File

@ -13,9 +13,9 @@
#define LANGUAGE_H #define LANGUAGE_H
#include "core/smallvec_type.hpp" #include "core/smallvec_type.hpp"
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
#include <unicode/coll.h> #include <unicode/coll.h>
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
static const uint8 CASE_GENDER_LEN = 16; ///< The (maximum) length of a case/gender string. static const uint8 CASE_GENDER_LEN = 16; ///< The (maximum) length of a case/gender string.
static const uint8 MAX_NUM_GENDERS = 8; ///< Maximum number of supported genders. static const uint8 MAX_NUM_GENDERS = 8; ///< Maximum number of supported genders.
@ -110,9 +110,9 @@ extern LanguageList _languages;
/** The currently loaded language. */ /** The currently loaded language. */
extern const LanguageMetadata *_current_language; extern const LanguageMetadata *_current_language;
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
extern Collator *_current_collator; extern Collator *_current_collator;
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
bool ReadLanguagePack(const LanguageMetadata *lang); bool ReadLanguagePack(const LanguageMetadata *lang);
const LanguageMetadata *GetLanguage(byte newgrflangid); const LanguageMetadata *GetLanguage(byte newgrflangid);

View File

@ -34,7 +34,7 @@ protected:
{ {
uint super_size = data.Length(); uint super_size = data.Length();
if (super_size > 0) { if (super_size > 0) {
SubArray& s = data[super_size - 1]; SubArray &s = data[super_size - 1];
if (!s.IsFull()) return s; if (!s.IsFull()) return s;
} }
return *data.AppendC(); return *data.AppendC();
@ -42,9 +42,16 @@ protected:
public: public:
/** implicit constructor */ /** implicit constructor */
inline SmallArray() { } inline SmallArray()
{
}
/** Clear (destroy) all items */ /** Clear (destroy) all items */
inline void Clear() {data.Clear();} inline void Clear()
{
data.Clear();
}
/** Return actual number of items */ /** Return actual number of items */
inline uint Length() const inline uint Length() const
{ {
@ -54,25 +61,41 @@ public:
return (super_size - 1) * B + sub_size; return (super_size - 1) * B + sub_size;
} }
/** return true if array is empty */ /** return true if array is empty */
inline bool IsEmpty() { return data.IsEmpty(); } inline bool IsEmpty()
/** return true if array is full */
inline bool IsFull() { return data.IsFull() && data[N - 1].IsFull(); }
/** allocate but not construct new item */
inline T *Append() { return FirstFreeSubArray().Append(); }
/** allocate and construct new item */
inline T *AppendC() { return FirstFreeSubArray().AppendC(); }
/** indexed access (non-const) */
inline T& operator [] (uint index)
{ {
const SubArray& s = data[index / B]; return data.IsEmpty();
T& item = s[index % B]; }
/** return true if array is full */
inline bool IsFull()
{
return data.IsFull() && data[N - 1].IsFull();
}
/** allocate but not construct new item */
inline T *Append()
{
return FirstFreeSubArray().Append();
}
/** allocate and construct new item */
inline T *AppendC()
{
return FirstFreeSubArray().AppendC();
}
/** indexed access (non-const) */
inline T& operator[](uint index)
{
const SubArray &s = data[index / B];
T &item = s[index % B];
return item; return item;
} }
/** indexed access (const) */ /** indexed access (const) */
inline const T& operator [] (uint index) const inline const T& operator[](uint index) const
{ {
const SubArray& s = data[index / B]; const SubArray &s = data[index / B];
const T& item = s[index % B]; const T &item = s[index % B];
return item; return item;
} }
@ -87,7 +110,7 @@ public:
dmp.WriteLine("num_items = %d", num_items); dmp.WriteLine("num_items = %d", num_items);
CStrA name; CStrA name;
for (uint i = 0; i < num_items; i++) { for (uint i = 0; i < num_items; i++) {
const T& item = (*this)[i]; const T &item = (*this)[i];
name.Format("item[%d]", i); name.Format("item[%d]", i);
dmp.WriteStructT(name.Data(), &item); dmp.WriteStructT(name.Data(), &item);
} }

View File

@ -157,21 +157,30 @@ public:
* *
* @return The number of items in the queue * @return The number of items in the queue
*/ */
inline uint Length() const { return this->items; } inline uint Length() const
{
return this->items;
}
/** /**
* Test if the priority queue is empty. * Test if the priority queue is empty.
* *
* @return True if empty * @return True if empty
*/ */
inline bool IsEmpty() const { return this->items == 0; } inline bool IsEmpty() const
{
return this->items == 0;
}
/** /**
* Test if the priority queue is full. * Test if the priority queue is full.
* *
* @return True if full. * @return True if full.
*/ */
inline bool IsFull() const { return this->items >= this->capacity; } inline bool IsFull() const
{
return this->items >= this->capacity;
}
/** /**
* Get the smallest item in the binary tree. * Get the smallest item in the binary tree.
@ -287,7 +296,10 @@ public:
* Make the priority queue empty. * Make the priority queue empty.
* All remaining items will remain untouched. * All remaining items will remain untouched.
*/ */
inline void Clear() { this->items = 0; } inline void Clear()
{
this->items = 0;
}
}; };
#endif /* BINARYHEAP_HPP */ #endif /* BINARYHEAP_HPP */

View File

@ -71,7 +71,10 @@ public:
static const size_t header_size = sizeof(BlobHeader); static const size_t header_size = sizeof(BlobHeader);
/** default constructor - initializes empty blob */ /** default constructor - initializes empty blob */
inline ByteBlob() { InitEmpty(); } inline ByteBlob()
{
InitEmpty();
}
/** copy constructor */ /** copy constructor */
inline ByteBlob(const ByteBlob &src) inline ByteBlob(const ByteBlob &src)
@ -311,9 +314,22 @@ public:
struct OnTransfer { struct OnTransfer {
typename base::BlobHeader *header; typename base::BlobHeader *header;
OnTransfer(const OnTransfer& src) : header(src.header) {assert(src.header != NULL); *const_cast<typename base::BlobHeader**>(&src.header) = NULL;}
OnTransfer(CBlobT& src) : header(src.header) {src.InitEmpty();} OnTransfer(const OnTransfer& src) : header(src.header)
~OnTransfer() {assert(header == NULL);} {
assert(src.header != NULL);
*const_cast<typename base::BlobHeader**>(&src.header) = NULL;
}
OnTransfer(CBlobT& src) : header(src.header)
{
src.InitEmpty();
}
~OnTransfer()
{
assert(header == NULL);
}
}; };
/** Default constructor - makes new Blob ready to accept any data */ /** Default constructor - makes new Blob ready to accept any data */

View File

@ -25,7 +25,12 @@ int32 SimpleCountedObject::Release()
int32 res = --m_ref_cnt; int32 res = --m_ref_cnt;
assert(res >= 0); assert(res >= 0);
if (res == 0) { if (res == 0) {
FinalRelease(); try {
FinalRelease(); // may throw, for example ScriptTest/ExecMode
} catch (...) {
delete this;
throw;
}
delete this; delete this;
} }
return res; return res;

View File

@ -35,60 +35,118 @@ protected:
public: public:
/** default (NULL) construct or construct from a raw pointer */ /** default (NULL) construct or construct from a raw pointer */
inline CCountedPtr(Tcls *pObj = NULL) : m_pT(pObj) {AddRef();} inline CCountedPtr(Tcls *pObj = NULL) : m_pT(pObj)
{
AddRef();
}
/** copy constructor (invoked also when initializing from another smart ptr) */ /** copy constructor (invoked also when initializing from another smart ptr) */
inline CCountedPtr(const CCountedPtr& src) : m_pT(src.m_pT) {AddRef();} inline CCountedPtr(const CCountedPtr &src) : m_pT(src.m_pT)
{
AddRef();
}
/** destructor releasing the reference */ /** destructor releasing the reference */
inline ~CCountedPtr() {Release();} inline ~CCountedPtr()
{
Release();
}
protected: protected:
/** add one ref to the underlaying object */ /** add one ref to the underlaying object */
inline void AddRef() {if (m_pT != NULL) m_pT->AddRef();} inline void AddRef()
{
if (m_pT != NULL) m_pT->AddRef();
}
public: public:
/** release smart pointer (and decrement ref count) if not null */ /** release smart pointer (and decrement ref count) if not null */
inline void Release() {if (m_pT != NULL) {Tcls *pT = m_pT; m_pT = NULL; pT->Release();}} inline void Release()
{
if (m_pT != NULL) {
Tcls *pT = m_pT;
m_pT = NULL;
pT->Release();
}
}
/** dereference of smart pointer - const way */ /** dereference of smart pointer - const way */
inline const Tcls *operator -> () const {assert(m_pT != NULL); return m_pT;} inline const Tcls *operator->() const
{
assert(m_pT != NULL);
return m_pT;
}
/** dereference of smart pointer - non const way */ /** dereference of smart pointer - non const way */
inline Tcls *operator -> () {assert(m_pT != NULL); return m_pT;} inline Tcls *operator->()
{
assert(m_pT != NULL);
return m_pT;
}
/** raw pointer casting operator - const way */ /** raw pointer casting operator - const way */
inline operator const Tcls*() const {assert(m_pT == NULL); return m_pT;} inline operator const Tcls*() const
{
assert(m_pT == NULL);
return m_pT;
}
/** raw pointer casting operator - non-const way */ /** raw pointer casting operator - non-const way */
inline operator Tcls*() {return m_pT;} inline operator Tcls*()
{
return m_pT;
}
/** operator & to support output arguments */ /** operator & to support output arguments */
inline Tcls** operator &() {assert(m_pT == NULL); return &m_pT;} inline Tcls** operator&()
{
assert(m_pT == NULL);
return &m_pT;
}
/** assignment operator from raw ptr */ /** assignment operator from raw ptr */
inline CCountedPtr& operator = (Tcls *pT) {Assign(pT); return *this;} inline CCountedPtr& operator=(Tcls *pT)
{
Assign(pT);
return *this;
}
/** assignment operator from another smart ptr */ /** assignment operator from another smart ptr */
inline CCountedPtr& operator = (const CCountedPtr& src) {Assign(src.m_pT); return *this;} inline CCountedPtr& operator=(const CCountedPtr &src)
{
Assign(src.m_pT);
return *this;
}
/** assignment operator helper */ /** assignment operator helper */
inline void Assign(Tcls *pT); inline void Assign(Tcls *pT);
/** one way how to test for NULL value */ /** one way how to test for NULL value */
inline bool IsNull() const {return m_pT == NULL;} inline bool IsNull() const
{
return m_pT == NULL;
}
/** another way how to test for NULL value */ /** another way how to test for NULL value */
//inline bool operator == (const CCountedPtr& sp) const {return m_pT == sp.m_pT;} //inline bool operator == (const CCountedPtr &sp) const {return m_pT == sp.m_pT;}
/** yet another way how to test for NULL value */ /** yet another way how to test for NULL value */
//inline bool operator != (const CCountedPtr& sp) const {return m_pT != sp.m_pT;} //inline bool operator != (const CCountedPtr &sp) const {return m_pT != sp.m_pT;}
/** assign pointer w/o incrementing ref count */ /** assign pointer w/o incrementing ref count */
inline void Attach(Tcls *pT) {Release(); m_pT = pT;} inline void Attach(Tcls *pT)
{
Release();
m_pT = pT;
}
/** detach pointer w/o decrementing ref count */ /** detach pointer w/o decrementing ref count */
inline Tcls *Detach() {Tcls *pT = m_pT; m_pT = NULL; return pT;} inline Tcls *Detach()
{
Tcls *pT = m_pT;
m_pT = NULL;
return pT;
}
}; };
template <class Tcls_> template <class Tcls_>
@ -136,7 +194,6 @@ template <class T> struct AdaptT {
} }
}; };
/** /**
* Simple counted object. Use it as base of your struct/class if you want to use * Simple counted object. Use it as base of your struct/class if you want to use
* basic reference counting. Your struct/class will destroy and free itself when * basic reference counting. Your struct/class will destroy and free itself when
@ -161,7 +218,4 @@ struct SimpleCountedObject {
virtual void FinalRelease() {}; virtual void FinalRelease() {};
}; };
#endif /* COUNTEDPTR_HPP */ #endif /* COUNTEDPTR_HPP */

View File

@ -111,7 +111,7 @@ struct DumpTarget {
m_ptr = src.m_ptr; m_ptr = src.m_ptr;
} }
bool operator < (const KnownStructKey &other) const bool operator<(const KnownStructKey &other) const
{ {
if ((size_t)m_ptr < (size_t)other.m_ptr) return true; if ((size_t)m_ptr < (size_t)other.m_ptr) return true;
if ((size_t)m_ptr > (size_t)other.m_ptr) return false; if ((size_t)m_ptr > (size_t)other.m_ptr) return false;

View File

@ -41,13 +41,28 @@ protected:
T *data; T *data;
/** return reference to the array header (non-const) */ /** return reference to the array header (non-const) */
inline ArrayHeader& Hdr() { return *(ArrayHeader*)(((byte*)data) - HeaderSize); } inline ArrayHeader& Hdr()
{
return *(ArrayHeader*)(((byte*)data) - HeaderSize);
}
/** return reference to the array header (const) */ /** return reference to the array header (const) */
inline const ArrayHeader& Hdr() const { return *(ArrayHeader*)(((byte*)data) - HeaderSize); } inline const ArrayHeader& Hdr() const
{
return *(ArrayHeader*)(((byte*)data) - HeaderSize);
}
/** return reference to the block reference counter */ /** return reference to the block reference counter */
inline uint& RefCnt() { return Hdr().reference_count; } inline uint& RefCnt()
{
return Hdr().reference_count;
}
/** return reference to number of used items */ /** return reference to number of used items */
inline uint& SizeRef() { return Hdr().items; } inline uint& SizeRef()
{
return Hdr().items;
}
public: public:
/** Default constructor. Preallocate space for items and header, then initialize header. */ /** Default constructor. Preallocate space for items and header, then initialize header. */
@ -63,7 +78,7 @@ public:
} }
/** Copy constructor. Preallocate space for items and header, then initialize header. */ /** Copy constructor. Preallocate space for items and header, then initialize header. */
FixedSizeArray(const FixedSizeArray<T, C>& src) FixedSizeArray(const FixedSizeArray<T, C> &src)
{ {
/* share block (header + items) with the source array */ /* share block (header + items) with the source array */
data = src.data; data = src.data;
@ -96,19 +111,50 @@ public:
} }
/** return number of used items */ /** return number of used items */
inline uint Length() const { return Hdr().items; } inline uint Length() const
{
return Hdr().items;
}
/** return true if array is full */ /** return true if array is full */
inline bool IsFull() const { return Length() >= C; } inline bool IsFull() const
{
return Length() >= C;
}
/** return true if array is empty */ /** return true if array is empty */
inline bool IsEmpty() const { return Length() <= 0; } inline bool IsEmpty() const
{
return Length() <= 0;
}
/** add (allocate), but don't construct item */ /** add (allocate), but don't construct item */
inline T *Append() { assert(!IsFull()); return &data[SizeRef()++]; } inline T *Append()
{
assert(!IsFull());
return &data[SizeRef()++];
}
/** add and construct item using default constructor */ /** add and construct item using default constructor */
inline T *AppendC() { T *item = Append(); new(item)T; return item; } inline T *AppendC()
{
T *item = Append();
new(item)T;
return item;
}
/** return item by index (non-const version) */ /** return item by index (non-const version) */
inline T& operator [] (uint index) { assert(index < Length()); return data[index]; } inline T& operator[](uint index)
{
assert(index < Length());
return data[index];
}
/** return item by index (const version) */ /** return item by index (const version) */
inline const T& operator [] (uint index) const { assert(index < Length()); return data[index]; } inline const T& operator[](uint index) const
{
assert(index < Length());
return data[index];
}
}; };
#endif /* FIXEDSIZEARRAY_HPP */ #endif /* FIXEDSIZEARRAY_HPP */

View File

@ -24,10 +24,13 @@ struct CHashTableSlotT
inline CHashTableSlotT() : m_pFirst(NULL) {} inline CHashTableSlotT() : m_pFirst(NULL) {}
/** hash table slot helper - clears the slot by simple forgetting its items */ /** hash table slot helper - clears the slot by simple forgetting its items */
inline void Clear() {m_pFirst = NULL;} inline void Clear()
{
m_pFirst = NULL;
}
/** hash table slot helper - linear search for item with given key through the given blob - const version */ /** hash table slot helper - linear search for item with given key through the given blob - const version */
inline const Titem_ *Find(const Key& key) const inline const Titem_ *Find(const Key &key) const
{ {
for (const Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) { for (const Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) {
if (pItem->GetKey() == key) { if (pItem->GetKey() == key) {
@ -39,7 +42,7 @@ struct CHashTableSlotT
} }
/** hash table slot helper - linear search for item with given key through the given blob - non-const version */ /** hash table slot helper - linear search for item with given key through the given blob - non-const version */
inline Titem_ *Find(const Key& key) inline Titem_ *Find(const Key &key)
{ {
for (Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) { for (Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) {
if (pItem->GetKey() == key) { if (pItem->GetKey() == key) {
@ -51,7 +54,7 @@ struct CHashTableSlotT
} }
/** hash table slot helper - add new item to the slot */ /** hash table slot helper - add new item to the slot */
inline void Attach(Titem_& new_item) inline void Attach(Titem_ &new_item)
{ {
assert(new_item.GetHashNext() == NULL); assert(new_item.GetHashNext() == NULL);
new_item.SetHashNext(m_pFirst); new_item.SetHashNext(m_pFirst);
@ -59,7 +62,7 @@ struct CHashTableSlotT
} }
/** hash table slot helper - remove item from a slot */ /** hash table slot helper - remove item from a slot */
inline bool Detach(Titem_& item_to_remove) inline bool Detach(Titem_ &item_to_remove)
{ {
if (m_pFirst == &item_to_remove) { if (m_pFirst == &item_to_remove) {
m_pFirst = item_to_remove.GetHashNext(); m_pFirst = item_to_remove.GetHashNext();
@ -81,7 +84,7 @@ struct CHashTableSlotT
} }
/** hash table slot helper - remove and return item from a slot */ /** hash table slot helper - remove and return item from a slot */
inline Titem_ *Detach(const Key& key) inline Titem_ *Detach(const Key &key)
{ {
/* do we have any items? */ /* do we have any items? */
if (m_pFirst == NULL) { if (m_pFirst == NULL) {
@ -89,7 +92,7 @@ struct CHashTableSlotT
} }
/* is it our first item? */ /* is it our first item? */
if (m_pFirst->GetKey() == key) { if (m_pFirst->GetKey() == key) {
Titem_& ret_item = *m_pFirst; Titem_ &ret_item = *m_pFirst;
m_pFirst = m_pFirst->GetHashNext(); m_pFirst = m_pFirst->GetHashNext();
ret_item.SetHashNext(NULL); ret_item.SetHashNext(NULL);
return &ret_item; return &ret_item;
@ -128,7 +131,7 @@ struct CHashTableSlotT
* - public method that calculates key's hash: * - public method that calculates key's hash:
* int CalcHash() const; * int CalcHash() const;
* - public 'equality' operator to compare the key with another one * - public 'equality' operator to compare the key with another one
* bool operator == (const Key& other) const; * bool operator==(const Key &other) const;
*/ */
template <class Titem_, int Thash_bits_> template <class Titem_, int Thash_bits_>
class CHashTableT { class CHashTableT {
@ -156,7 +159,7 @@ public:
protected: protected:
/** static helper - return hash for the given key modulo number of slots */ /** static helper - return hash for the given key modulo number of slots */
inline static int CalcHash(const Tkey& key) inline static int CalcHash(const Tkey &key)
{ {
int32 hash = key.CalcHash(); int32 hash = key.CalcHash();
if ((8 * Thash_bits) < 32) hash ^= hash >> (min(8 * Thash_bits, 31)); if ((8 * Thash_bits) < 32) hash ^= hash >> (min(8 * Thash_bits, 31));
@ -168,38 +171,47 @@ protected:
} }
/** static helper - return hash for the given item modulo number of slots */ /** static helper - return hash for the given item modulo number of slots */
inline static int CalcHash(const Titem_& item) {return CalcHash(item.GetKey());} inline static int CalcHash(const Titem_ &item)
{
return CalcHash(item.GetKey());
}
public: public:
/** item count */ /** item count */
inline int Count() const {return m_num_items;} inline int Count() const
{
return m_num_items;
}
/** simple clear - forget all items - used by CSegmentCostCacheT.Flush() */ /** simple clear - forget all items - used by CSegmentCostCacheT.Flush() */
inline void Clear() {for (int i = 0; i < Tcapacity; i++) m_slots[i].Clear();} inline void Clear()
{
for (int i = 0; i < Tcapacity; i++) m_slots[i].Clear();
}
/** const item search */ /** const item search */
const Titem_ *Find(const Tkey& key) const const Titem_ *Find(const Tkey &key) const
{ {
int hash = CalcHash(key); int hash = CalcHash(key);
const Slot& slot = m_slots[hash]; const Slot &slot = m_slots[hash];
const Titem_ *item = slot.Find(key); const Titem_ *item = slot.Find(key);
return item; return item;
} }
/** non-const item search */ /** non-const item search */
Titem_ *Find(const Tkey& key) Titem_ *Find(const Tkey &key)
{ {
int hash = CalcHash(key); int hash = CalcHash(key);
Slot& slot = m_slots[hash]; Slot &slot = m_slots[hash];
Titem_ *item = slot.Find(key); Titem_ *item = slot.Find(key);
return item; return item;
} }
/** non-const item search & optional removal (if found) */ /** non-const item search & optional removal (if found) */
Titem_ *TryPop(const Tkey& key) Titem_ *TryPop(const Tkey &key)
{ {
int hash = CalcHash(key); int hash = CalcHash(key);
Slot& slot = m_slots[hash]; Slot &slot = m_slots[hash];
Titem_ *item = slot.Detach(key); Titem_ *item = slot.Detach(key);
if (item != NULL) { if (item != NULL) {
m_num_items--; m_num_items--;
@ -208,7 +220,7 @@ public:
} }
/** non-const item search & removal */ /** non-const item search & removal */
Titem_& Pop(const Tkey& key) Titem_& Pop(const Tkey &key)
{ {
Titem_ *item = TryPop(key); Titem_ *item = TryPop(key);
assert(item != NULL); assert(item != NULL);
@ -216,11 +228,11 @@ public:
} }
/** non-const item search & optional removal (if found) */ /** non-const item search & optional removal (if found) */
bool TryPop(Titem_& item) bool TryPop(Titem_ &item)
{ {
const Tkey& key = item.GetKey(); const Tkey &key = item.GetKey();
int hash = CalcHash(key); int hash = CalcHash(key);
Slot& slot = m_slots[hash]; Slot &slot = m_slots[hash];
bool ret = slot.Detach(item); bool ret = slot.Detach(item);
if (ret) { if (ret) {
m_num_items--; m_num_items--;
@ -229,17 +241,17 @@ public:
} }
/** non-const item search & removal */ /** non-const item search & removal */
void Pop(Titem_& item) void Pop(Titem_ &item)
{ {
bool ret = TryPop(item); bool ret = TryPop(item);
assert(ret); assert(ret);
} }
/** add one item - copy it from the given item */ /** add one item - copy it from the given item */
void Push(Titem_& new_item) void Push(Titem_ &new_item)
{ {
int hash = CalcHash(new_item); int hash = CalcHash(new_item);
Slot& slot = m_slots[hash]; Slot &slot = m_slots[hash];
assert(slot.Find(new_item.GetKey()) == NULL); assert(slot.Find(new_item.GetKey()) == NULL);
slot.Attach(new_item); slot.Attach(new_item);
m_num_items++; m_num_items++;

View File

@ -35,7 +35,7 @@ struct CStrA : public CBlobT<char>
} }
/** Take over ownership constructor */ /** Take over ownership constructor */
inline CStrA(const OnTransfer& ot) inline CStrA(const OnTransfer &ot)
: base(ot) : base(ot)
{ {
} }
@ -67,7 +67,7 @@ struct CStrA : public CBlobT<char>
} }
/** Assignment from C string. */ /** Assignment from C string. */
inline CStrA &operator = (const char *src) inline CStrA &operator=(const char *src)
{ {
base::Clear(); base::Clear();
AppendStr(src); AppendStr(src);
@ -75,7 +75,7 @@ struct CStrA : public CBlobT<char>
} }
/** Assignment from another CStrA. */ /** Assignment from another CStrA. */
inline CStrA &operator = (const CStrA &src) inline CStrA &operator=(const CStrA &src)
{ {
if (&src != this) { if (&src != this) {
base::Clear(); base::Clear();
@ -86,7 +86,7 @@ struct CStrA : public CBlobT<char>
} }
/** Lower-than operator (to support stl collections) */ /** Lower-than operator (to support stl collections) */
inline bool operator < (const CStrA &other) const inline bool operator<(const CStrA &other) const
{ {
return strcmp(base::Data(), other.Data()) < 0; return strcmp(base::Data(), other.Data()) < 0;
} }

View File

@ -831,7 +831,7 @@ Point QueryString::GetCaretPosition(const Window *w, int wid) const
int delta = min(0, (right - left) - tb->pixels - 10); int delta = min(0, (right - left) - tb->pixels - 10);
if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs; if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
Point pt = {left + WD_FRAMERECT_LEFT + tb->caretxoffs + delta, wi->pos_y + WD_FRAMERECT_TOP}; Point pt = {left + WD_FRAMERECT_LEFT + tb->caretxoffs + delta, (int)wi->pos_y + WD_FRAMERECT_TOP};
return pt; return pt;
} }

View File

@ -22,6 +22,7 @@
#include "dmusic.h" #include "dmusic.h"
#include <windows.h> #include <windows.h>
#undef FACILITY_DIRECTMUSIC // Needed for newer Windows SDK version.
#include <dmksctrl.h> #include <dmksctrl.h>
#include <dmusici.h> #include <dmusici.h>
#include <dmusicc.h> #include <dmusicc.h>

View File

@ -223,7 +223,7 @@ struct NewGRFParametersWindow : public Window {
case WID_NP_DESCRIPTION: case WID_NP_DESCRIPTION:
/* Minimum size of 4 lines. The 500 is the default size of the window. */ /* Minimum size of 4 lines. The 500 is the default size of the window. */
Dimension suggestion = {500 - WD_FRAMERECT_LEFT - WD_FRAMERECT_RIGHT, FONT_HEIGHT_NORMAL * 4 + WD_TEXTPANEL_TOP + WD_TEXTPANEL_BOTTOM}; Dimension suggestion = {500 - WD_FRAMERECT_LEFT - WD_FRAMERECT_RIGHT, (uint)FONT_HEIGHT_NORMAL * 4 + WD_TEXTPANEL_TOP + WD_TEXTPANEL_BOTTOM};
for (uint i = 0; i < this->grf_config->param_info.Length(); i++) { for (uint i = 0; i < this->grf_config->param_info.Length(); i++) {
const GRFParameterInfo *par_info = this->grf_config->param_info[i]; const GRFParameterInfo *par_info = this->grf_config->param_info[i];
if (par_info == NULL) continue; if (par_info == NULL) continue;

View File

@ -322,7 +322,9 @@ static char *PrintModuleInfo(char *output, const char *last, HMODULE mod)
} }
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma warning(disable:4091)
#include <dbghelp.h> #include <dbghelp.h>
#pragma warning(default:4091)
char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) const char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) const
{ {

View File

@ -24,34 +24,23 @@
template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_> template <class Titem_, int Thash_bits_open_, int Thash_bits_closed_>
class CNodeList_HashTableT { class CNodeList_HashTableT {
public: public:
/** make Titem_ visible from outside of class */ typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class.
typedef Titem_ Titem; typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of #HashTable.
/** make Titem_::Key a property of HashTable */ typedef SmallArray<Titem_, 65536, 256> CItemArray; ///< Type that we will use as item container.
typedef typename Titem_::Key Key; typedef CHashTableT<Titem_, Thash_bits_open_ > COpenList; ///< How pointers to open nodes will be stored.
/** type that we will use as item container */ typedef CHashTableT<Titem_, Thash_bits_closed_> CClosedList; ///< How pointers to closed nodes will be stored.
typedef SmallArray<Titem_, 65536, 256> CItemArray; typedef CBinaryHeapT<Titem_> CPriorityQueue; ///< How the priority queue will be managed.
/** how pointers to open nodes will be stored */
typedef CHashTableT<Titem_, Thash_bits_open_ > COpenList;
/** how pointers to closed nodes will be stored */
typedef CHashTableT<Titem_, Thash_bits_closed_> CClosedList;
/** how the priority queue will be managed */
typedef CBinaryHeapT<Titem_> CPriorityQueue;
protected: protected:
/** here we store full item data (Titem_) */ CItemArray m_arr; ///< Here we store full item data (Titem_).
CItemArray m_arr; COpenList m_open; ///< Hash table of pointers to open item data.
/** hash table of pointers to open item data */ CClosedList m_closed; ///< Hash table of pointers to closed item data.
COpenList m_open; CPriorityQueue m_open_queue; ///< Priority queue of pointers to open item data.
/** hash table of pointers to closed item data */ Titem *m_new_node; ///< New open node under construction.
CClosedList m_closed;
/** priority queue of pointers to open item data */
CPriorityQueue m_open_queue;
/** new open node under construction */
Titem *m_new_node;
public: public:
/** default constructor */ /** default constructor */
CNodeList_HashTableT() CNodeList_HashTableT() : m_open_queue(2048)
: m_open_queue(2048)
{ {
m_new_node = NULL; m_new_node = NULL;
} }
@ -81,7 +70,7 @@ public:
} }
/** Notify the nodelist that we don't want to discard the given node. */ /** Notify the nodelist that we don't want to discard the given node. */
inline void FoundBestNode(Titem_& item) inline void FoundBestNode(Titem_ &item)
{ {
/* for now it is enough to invalidate m_new_node if it is our given node */ /* for now it is enough to invalidate m_new_node if it is our given node */
if (&item == m_new_node) { if (&item == m_new_node) {
@ -91,7 +80,7 @@ public:
} }
/** insert given item as open node (into m_open and m_open_queue) */ /** insert given item as open node (into m_open and m_open_queue) */
inline void InsertOpenNode(Titem_& item) inline void InsertOpenNode(Titem_ &item)
{ {
assert(m_closed.Find(item.GetKey()) == NULL); assert(m_closed.Find(item.GetKey()) == NULL);
m_open.Push(item); m_open.Push(item);
@ -122,39 +111,46 @@ public:
} }
/** return the open node specified by a key or NULL if not found */ /** return the open node specified by a key or NULL if not found */
inline Titem_ *FindOpenNode(const Key& key) inline Titem_ *FindOpenNode(const Key &key)
{ {
Titem_ *item = m_open.Find(key); Titem_ *item = m_open.Find(key);
return item; return item;
} }
/** remove and return the open node specified by a key */ /** remove and return the open node specified by a key */
inline Titem_& PopOpenNode(const Key& key) inline Titem_& PopOpenNode(const Key &key)
{ {
Titem_& item = m_open.Pop(key); Titem_ &item = m_open.Pop(key);
uint idxPop = m_open_queue.FindIndex(item); uint idxPop = m_open_queue.FindIndex(item);
m_open_queue.Remove(idxPop); m_open_queue.Remove(idxPop);
return item; return item;
} }
/** close node */ /** close node */
inline void InsertClosedNode(Titem_& item) inline void InsertClosedNode(Titem_ &item)
{ {
assert(m_open.Find(item.GetKey()) == NULL); assert(m_open.Find(item.GetKey()) == NULL);
m_closed.Push(item); m_closed.Push(item);
} }
/** return the closed node specified by a key or NULL if not found */ /** return the closed node specified by a key or NULL if not found */
inline Titem_ *FindClosedNode(const Key& key) inline Titem_ *FindClosedNode(const Key &key)
{ {
Titem_ *item = m_closed.Find(key); Titem_ *item = m_closed.Find(key);
return item; return item;
} }
/** The number of items. */ /** The number of items. */
inline int TotalCount() {return m_arr.Length();} inline int TotalCount()
{
return m_arr.Length();
}
/** Get a particular item. */ /** Get a particular item. */
inline Titem_& ItemAt(int idx) {return m_arr[idx];} inline Titem_& ItemAt(int idx)
{
return m_arr[idx];
}
/** Helper for creating output of this array. */ /** Helper for creating output of this array. */
template <class D> void Dump(D &dmp) const template <class D> void Dump(D &dmp) const

View File

@ -38,10 +38,10 @@ extern int _total_pf_time_us;
* -------------------------------------------------------------- * --------------------------------------------------------------
* Your pathfinder derived class needs to implement following methods: * Your pathfinder derived class needs to implement following methods:
* inline void PfSetStartupNodes() * inline void PfSetStartupNodes()
* inline void PfFollowNode(Node& org) * inline void PfFollowNode(Node &org)
* inline bool PfCalcCost(Node& n) * inline bool PfCalcCost(Node &n)
* inline bool PfCalcEstimate(Node& n) * inline bool PfCalcEstimate(Node &n)
* inline bool PfDetectDestination(Node& n) * inline bool PfDetectDestination(Node &n)
* *
* For more details about those methods, look at the end of CYapfBaseT * For more details about those methods, look at the end of CYapfBaseT
* declaration. There are some examples. For another example look at * declaration. There are some examples. For another example look at
@ -99,7 +99,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -193,12 +193,12 @@ public:
*/ */
inline Node& CreateNewNode() inline Node& CreateNewNode()
{ {
Node& node = *m_nodes.CreateNewNode(); Node &node = *m_nodes.CreateNewNode();
return node; return node;
} }
/** Add new node (created by CreateNewNode and filled with data) into open list */ /** Add new node (created by CreateNewNode and filled with data) into open list */
inline void AddStartupNode(Node& n) inline void AddStartupNode(Node &n)
{ {
Yapf().PfNodeCacheFetch(n); Yapf().PfNodeCacheFetch(n);
/* insert the new node only if it is not there */ /* insert the new node only if it is not there */
@ -217,7 +217,7 @@ public:
bool is_choice = (KillFirstBit(tf.m_new_td_bits) != TRACKDIR_BIT_NONE); bool is_choice = (KillFirstBit(tf.m_new_td_bits) != TRACKDIR_BIT_NONE);
for (TrackdirBits rtds = tf.m_new_td_bits; rtds != TRACKDIR_BIT_NONE; rtds = KillFirstBit(rtds)) { for (TrackdirBits rtds = tf.m_new_td_bits; rtds != TRACKDIR_BIT_NONE; rtds = KillFirstBit(rtds)) {
Trackdir td = (Trackdir)FindFirstBit2x64(rtds); Trackdir td = (Trackdir)FindFirstBit2x64(rtds);
Node& n = Yapf().CreateNewNode(); Node &n = Yapf().CreateNewNode();
n.Set(parent, tf.m_new_tile, td, is_choice); n.Set(parent, tf.m_new_tile, td, is_choice);
Yapf().AddNewNode(n, tf); Yapf().AddNewNode(n, tf);
} }
@ -333,7 +333,7 @@ public:
inline void PfSetStartupNodes() inline void PfSetStartupNodes()
{ {
/* example: */ /* example: */
Node& n1 = *base::m_nodes.CreateNewNode(); Node &n1 = *base::m_nodes.CreateNewNode();
. .
. // setup node members here . // setup node members here
. .
@ -341,10 +341,10 @@ public:
} }
/** Example: PfFollowNode() - set following (child) nodes of the given node */ /** Example: PfFollowNode() - set following (child) nodes of the given node */
inline void PfFollowNode(Node& org) inline void PfFollowNode(Node &org)
{ {
for (each follower of node org) { for (each follower of node org) {
Node& n = *base::m_nodes.CreateNewNode(); Node &n = *base::m_nodes.CreateNewNode();
. .
. // setup node members here . // setup node members here
. .
@ -354,7 +354,7 @@ public:
} }
/** Example: PfCalcCost() - set path cost from origin to the given node */ /** Example: PfCalcCost() - set path cost from origin to the given node */
inline bool PfCalcCost(Node& n) inline bool PfCalcCost(Node &n)
{ {
/* evaluate last step cost */ /* evaluate last step cost */
int cost = ...; int cost = ...;
@ -364,7 +364,7 @@ public:
} }
/** Example: PfCalcEstimate() - set path cost estimate from origin to the target through given node */ /** Example: PfCalcEstimate() - set path cost estimate from origin to the target through given node */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
/* evaluate the distance to our destination */ /* evaluate the distance to our destination */
int distance = ...; int distance = ...;
@ -374,7 +374,7 @@ public:
} }
/** Example: PfDetectDestination() - return true if the given node is our destination */ /** Example: PfDetectDestination() - return true if the given node is our destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
bool bDest = (n.m_key.m_x == m_x2) && (n.m_key.m_y == m_y2); bool bDest = (n.m_key.m_x == m_x2) && (n.m_key.m_y == m_y2);
return bDest; return bDest;

View File

@ -28,7 +28,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -45,7 +45,7 @@ public:
bool is_choice = (KillFirstBit(m_orgTrackdirs) != TRACKDIR_BIT_NONE); bool is_choice = (KillFirstBit(m_orgTrackdirs) != TRACKDIR_BIT_NONE);
for (TrackdirBits tdb = m_orgTrackdirs; tdb != TRACKDIR_BIT_NONE; tdb = KillFirstBit(tdb)) { for (TrackdirBits tdb = m_orgTrackdirs; tdb != TRACKDIR_BIT_NONE; tdb = KillFirstBit(tdb)) {
Trackdir td = (Trackdir)FindFirstBit2x64(tdb); Trackdir td = (Trackdir)FindFirstBit2x64(tdb);
Node& n1 = Yapf().CreateNewNode(); Node &n1 = Yapf().CreateNewNode();
n1.Set(NULL, m_orgTile, td, is_choice); n1.Set(NULL, m_orgTile, td, is_choice);
Yapf().AddStartupNode(n1); Yapf().AddStartupNode(n1);
} }
@ -72,7 +72,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -91,12 +91,12 @@ public:
void PfSetStartupNodes() void PfSetStartupNodes()
{ {
if (m_orgTile != INVALID_TILE && m_orgTd != INVALID_TRACKDIR) { if (m_orgTile != INVALID_TILE && m_orgTd != INVALID_TRACKDIR) {
Node& n1 = Yapf().CreateNewNode(); Node &n1 = Yapf().CreateNewNode();
n1.Set(NULL, m_orgTile, m_orgTd, false); n1.Set(NULL, m_orgTile, m_orgTd, false);
Yapf().AddStartupNode(n1); Yapf().AddStartupNode(n1);
} }
if (m_revTile != INVALID_TILE && m_revTd != INVALID_TRACKDIR) { if (m_revTile != INVALID_TILE && m_revTd != INVALID_TRACKDIR) {
Node& n2 = Yapf().CreateNewNode(); Node &n2 = Yapf().CreateNewNode();
n2.Set(NULL, m_revTile, m_revTd, false); n2.Set(NULL, m_revTile, m_revTd, false);
n2.m_cost = m_reverse_penalty; n2.m_cost = m_reverse_penalty;
Yapf().AddStartupNode(n2); Yapf().AddStartupNode(n2);
@ -135,12 +135,12 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
bool bDest = (n.m_key.m_tile == m_destTile) && ((m_destTrackdirs & TrackdirToTrackdirBits(n.GetTrackdir())) != TRACKDIR_BIT_NONE); bool bDest = (n.m_key.m_tile == m_destTile) && ((m_destTrackdirs & TrackdirToTrackdirBits(n.GetTrackdir())) != TRACKDIR_BIT_NONE);
return bDest; return bDest;
@ -150,7 +150,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; static const int dg_dir_to_y_offs[] = {0, 1, 0, -1};

View File

@ -30,7 +30,7 @@ public:
* Called by YAPF to attach cached or local segment cost data to the given node. * Called by YAPF to attach cached or local segment cost data to the given node.
* @return true if globally cached data were used or false if local data was used * @return true if globally cached data were used or false if local data was used
*/ */
inline bool PfNodeCacheFetch(Node& n) inline bool PfNodeCacheFetch(Node &n)
{ {
return false; return false;
} }
@ -39,7 +39,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage. * Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that. * Current cache implementation doesn't use that.
*/ */
inline void PfNodeCacheFlush(Node& n) inline void PfNodeCacheFlush(Node &n)
{ {
} }
}; };
@ -67,7 +67,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -75,7 +75,7 @@ public:
* Called by YAPF to attach cached or local segment cost data to the given node. * Called by YAPF to attach cached or local segment cost data to the given node.
* @return true if globally cached data were used or false if local data was used * @return true if globally cached data were used or false if local data was used
*/ */
inline bool PfNodeCacheFetch(Node& n) inline bool PfNodeCacheFetch(Node &n)
{ {
CacheKey key(n.GetKey()); CacheKey key(n.GetKey());
Yapf().ConnectNodeToCachedData(n, *new (m_local_cache.Append()) CachedData(key)); Yapf().ConnectNodeToCachedData(n, *new (m_local_cache.Append()) CachedData(key));
@ -86,7 +86,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage. * Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that. * Current cache implementation doesn't use that.
*/ */
inline void PfNodeCacheFlush(Node& n) inline void PfNodeCacheFlush(Node &n)
{ {
} }
}; };
@ -121,9 +121,7 @@ struct CSegmentCostCacheBase
* Look at CYapfRailSegment (yapf_node_rail.hpp) for the segment example * Look at CYapfRailSegment (yapf_node_rail.hpp) for the segment example
*/ */
template <class Tsegment> template <class Tsegment>
struct CSegmentCostCacheT struct CSegmentCostCacheT : public CSegmentCostCacheBase {
: public CSegmentCostCacheBase
{
static const int C_HASH_BITS = 14; static const int C_HASH_BITS = 14;
typedef CHashTableT<Tsegment, C_HASH_BITS> HashTable; typedef CHashTableT<Tsegment, C_HASH_BITS> HashTable;
@ -142,7 +140,7 @@ struct CSegmentCostCacheT
m_heap.Clear(); m_heap.Clear();
} }
inline Tsegment& Get(Key& key, bool *found) inline Tsegment& Get(Key &key, bool *found)
{ {
Tsegment *item = m_map.Find(key); Tsegment *item = m_map.Find(key);
if (item == NULL) { if (item == NULL) {
@ -162,9 +160,7 @@ struct CSegmentCostCacheT
* segment cost caching services for your Nodes. * segment cost caching services for your Nodes.
*/ */
template <class Types> template <class Types>
class CYapfSegmentCostCacheGlobalT class CYapfSegmentCostCacheGlobalT : public CYapfSegmentCostCacheLocalT<Types> {
: public CYapfSegmentCostCacheLocalT<Types>
{
public: public:
typedef CYapfSegmentCostCacheLocalT<Types> Tlocal; typedef CYapfSegmentCostCacheLocalT<Types> Tlocal;
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
@ -175,14 +171,14 @@ public:
typedef CSegmentCostCacheT<CachedData> Cache; typedef CSegmentCostCacheT<CachedData> Cache;
protected: protected:
Cache& m_global_cache; Cache &m_global_cache;
inline CYapfSegmentCostCacheGlobalT() : m_global_cache(stGetGlobalCache()) {}; inline CYapfSegmentCostCacheGlobalT() : m_global_cache(stGetGlobalCache()) {};
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
inline static Cache& stGetGlobalCache() inline static Cache& stGetGlobalCache()
@ -211,14 +207,14 @@ public:
* Called by YAPF to attach cached or local segment cost data to the given node. * Called by YAPF to attach cached or local segment cost data to the given node.
* @return true if globally cached data were used or false if local data was used * @return true if globally cached data were used or false if local data was used
*/ */
inline bool PfNodeCacheFetch(Node& n) inline bool PfNodeCacheFetch(Node &n)
{ {
if (!Yapf().CanUseGlobalCache(n)) { if (!Yapf().CanUseGlobalCache(n)) {
return Tlocal::PfNodeCacheFetch(n); return Tlocal::PfNodeCacheFetch(n);
} }
CacheKey key(n.GetKey()); CacheKey key(n.GetKey());
bool found; bool found;
CachedData& item = m_global_cache.Get(key, &found); CachedData &item = m_global_cache.Get(key, &found);
Yapf().ConnectNodeToCachedData(n, item); Yapf().ConnectNodeToCachedData(n, item);
return found; return found;
} }
@ -227,7 +223,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage. * Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that. * Current cache implementation doesn't use that.
*/ */
inline void PfNodeCacheFlush(Node& n) inline void PfNodeCacheFlush(Node &n)
{ {
} }
}; };

View File

@ -15,9 +15,7 @@
#include "../../pbs.h" #include "../../pbs.h"
template <class Types> template <class Types>
class CYapfCostRailT class CYapfCostRailT : public CYapfCostBase {
: public CYapfCostBase
{
public: public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
typedef typename Types::TrackFollower TrackFollower; typedef typename Types::TrackFollower TrackFollower;
@ -74,10 +72,7 @@ protected:
static const int s_max_segment_cost = 10000; static const int s_max_segment_cost = 10000;
CYapfCostRailT() CYapfCostRailT() : m_max_cost(0), m_disable_cache(false), m_stopped_on_first_two_way_signal(false)
: m_max_cost(0)
, m_disable_cache(false)
, m_stopped_on_first_two_way_signal(false)
{ {
/* pre-compute look-ahead penalties into array */ /* pre-compute look-ahead penalties into array */
int p0 = Yapf().PfGetSettings().rail_look_ahead_signal_p0; int p0 = Yapf().PfGetSettings().rail_look_ahead_signal_p0;
@ -92,7 +87,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -130,7 +125,7 @@ public:
} }
/** Return one tile cost (base cost + level crossing penalty). */ /** Return one tile cost (base cost + level crossing penalty). */
inline int OneTileCost(TileIndex& tile, Trackdir trackdir) inline int OneTileCost(TileIndex &tile, Trackdir trackdir)
{ {
int cost = 0; int cost = 0;
/* set base cost */ /* set base cost */
@ -165,7 +160,7 @@ public:
} }
/** The cost for reserved tiles, including skipped ones. */ /** The cost for reserved tiles, including skipped ones. */
inline int ReservationCost(Node& n, TileIndex tile, Trackdir trackdir, int skipped) inline int ReservationCost(Node &n, TileIndex tile, Trackdir trackdir, int skipped)
{ {
if (n.m_num_signals_passed >= m_sig_look_ahead_costs.Size() / 2) return 0; if (n.m_num_signals_passed >= m_sig_look_ahead_costs.Size() / 2) return 0;
if (!IsPbsSignal(n.m_last_signal_type)) return 0; if (!IsPbsSignal(n.m_last_signal_type)) return 0;
@ -180,7 +175,7 @@ public:
return 0; return 0;
} }
int SignalCost(Node& n, TileIndex tile, Trackdir trackdir) int SignalCost(Node &n, TileIndex tile, Trackdir trackdir)
{ {
int cost = 0; int cost = 0;
/* if there is one-way signal in the opposite direction, then it is not our way */ /* if there is one-way signal in the opposite direction, then it is not our way */
@ -614,14 +609,14 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
return true; return true;
} }
inline bool CanUseGlobalCache(Node& n) const inline bool CanUseGlobalCache(Node &n) const
{ {
return !m_disable_cache return !m_disable_cache
&& (n.m_parent != NULL) && (n.m_parent != NULL)
&& (n.m_parent->m_num_signals_passed >= m_sig_look_ahead_costs.Size()); && (n.m_parent->m_num_signals_passed >= m_sig_look_ahead_costs.Size());
} }
inline void ConnectNodeToCachedData(Node& n, CachedData& ci) inline void ConnectNodeToCachedData(Node &n, CachedData &ci)
{ {
n.m_segment = &ci; n.m_segment = &ci;
if (n.m_segment->m_cost < 0) { if (n.m_segment->m_cost < 0) {

View File

@ -12,8 +12,7 @@
#ifndef YAPF_DESTRAIL_HPP #ifndef YAPF_DESTRAIL_HPP
#define YAPF_DESTRAIL_HPP #define YAPF_DESTRAIL_HPP
class CYapfDestinationRailBase class CYapfDestinationRailBase {
{
protected: protected:
RailTypes m_compatible_railtypes; RailTypes m_compatible_railtypes;
@ -36,9 +35,7 @@ public:
}; };
template <class Types> template <class Types>
class CYapfDestinationAnyDepotRailT class CYapfDestinationAnyDepotRailT : public CYapfDestinationRailBase {
: public CYapfDestinationRailBase
{
public: public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
typedef typename Types::NodeList::Titem Node; ///< this will be our node type typedef typename Types::NodeList::Titem Node; ///< this will be our node type
@ -47,11 +44,11 @@ public:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
} }
@ -67,7 +64,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
n.m_estimate = n.m_cost; n.m_estimate = n.m_cost;
return true; return true;
@ -75,9 +72,7 @@ public:
}; };
template <class Types> template <class Types>
class CYapfDestinationAnySafeTileRailT class CYapfDestinationAnySafeTileRailT : public CYapfDestinationRailBase {
: public CYapfDestinationRailBase
{
public: public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
typedef typename Types::NodeList::Titem Node; ///< this will be our node type typedef typename Types::NodeList::Titem Node; ///< this will be our node type
@ -87,11 +82,11 @@ public:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
} }
@ -107,7 +102,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate. * adds it to the actual cost from origin and stores the sum to the Node::m_estimate.
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
n.m_estimate = n.m_cost; n.m_estimate = n.m_cost;
return true; return true;
@ -115,9 +110,7 @@ public:
}; };
template <class Types> template <class Types>
class CYapfDestinationTileOrStationRailT class CYapfDestinationTileOrStationRailT : public CYapfDestinationRailBase {
: public CYapfDestinationRailBase
{
public: public:
typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class)
typedef typename Types::NodeList::Titem Node; ///< this will be our node type typedef typename Types::NodeList::Titem Node; ///< this will be our node type
@ -131,7 +124,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -164,7 +157,7 @@ public:
} }
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir()); return PfDetectDestination(n.GetLastTile(), n.GetLastTrackdir());
} }
@ -188,7 +181,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; static const int dg_dir_to_y_offs[] = {0, 1, 0, -1};

View File

@ -25,8 +25,15 @@ struct CYapfNodeKeyExitDir {
m_exitdir = (m_td == INVALID_TRACKDIR) ? INVALID_DIAGDIR : TrackdirToExitdir(m_td); m_exitdir = (m_td == INVALID_TRACKDIR) ? INVALID_DIAGDIR : TrackdirToExitdir(m_td);
} }
inline int CalcHash() const {return m_exitdir | (m_tile << 2);} inline int CalcHash() const
inline bool operator == (const CYapfNodeKeyExitDir& other) const {return (m_tile == other.m_tile) && (m_exitdir == other.m_exitdir);} {
return m_exitdir | (m_tile << 2);
}
inline bool operator==(const CYapfNodeKeyExitDir &other) const
{
return m_tile == other.m_tile && m_exitdir == other.m_exitdir;
}
void Dump(DumpTarget &dmp) const void Dump(DumpTarget &dmp) const
{ {
@ -38,8 +45,15 @@ struct CYapfNodeKeyExitDir {
struct CYapfNodeKeyTrackDir : public CYapfNodeKeyExitDir struct CYapfNodeKeyTrackDir : public CYapfNodeKeyExitDir
{ {
inline int CalcHash() const {return m_td | (m_tile << 4);} inline int CalcHash() const
inline bool operator == (const CYapfNodeKeyTrackDir& other) const {return (m_tile == other.m_tile) && (m_td == other.m_td);} {
return m_td | (m_tile << 4);
}
inline bool operator==(const CYapfNodeKeyTrackDir &other) const
{
return m_tile == other.m_tile && m_td == other.m_td;
}
}; };
/** Yapf Node base */ /** Yapf Node base */
@ -63,14 +77,45 @@ struct CYapfNodeT {
m_estimate = 0; m_estimate = 0;
} }
inline Node *GetHashNext() {return m_hash_next;} inline Node *GetHashNext()
inline void SetHashNext(Node *pNext) {m_hash_next = pNext;} {
inline TileIndex GetTile() const {return m_key.m_tile;} return m_hash_next;
inline Trackdir GetTrackdir() const {return m_key.m_td;} }
inline const Tkey_& GetKey() const {return m_key;}
inline int GetCost() const {return m_cost;} inline void SetHashNext(Node *pNext)
inline int GetCostEstimate() const {return m_estimate;} {
inline bool operator < (const Node& other) const {return m_estimate < other.m_estimate;} m_hash_next = pNext;
}
inline TileIndex GetTile() const
{
return m_key.m_tile;
}
inline Trackdir GetTrackdir() const
{
return m_key.m_td;
}
inline const Tkey_& GetKey() const
{
return m_key;
}
inline int GetCost() const
{
return m_cost;
}
inline int GetCostEstimate() const
{
return m_estimate;
}
inline bool operator<(const Node &other) const
{
return m_estimate < other.m_estimate;
}
void Dump(DumpTarget &dmp) const void Dump(DumpTarget &dmp) const
{ {

View File

@ -17,19 +17,19 @@ struct CYapfRailSegmentKey
{ {
uint32 m_value; uint32 m_value;
inline CYapfRailSegmentKey(const CYapfRailSegmentKey& src) : m_value(src.m_value) {} inline CYapfRailSegmentKey(const CYapfRailSegmentKey &src) : m_value(src.m_value) {}
inline CYapfRailSegmentKey(const CYapfNodeKeyTrackDir& node_key) inline CYapfRailSegmentKey(const CYapfNodeKeyTrackDir &node_key)
{ {
Set(node_key); Set(node_key);
} }
inline void Set(const CYapfRailSegmentKey& src) inline void Set(const CYapfRailSegmentKey &src)
{ {
m_value = src.m_value; m_value = src.m_value;
} }
inline void Set(const CYapfNodeKeyTrackDir& node_key) inline void Set(const CYapfNodeKeyTrackDir &node_key)
{ {
m_value = (((int)node_key.m_tile) << 4) | node_key.m_td; m_value = (((int)node_key.m_tile) << 4) | node_key.m_td;
} }
@ -49,7 +49,7 @@ struct CYapfRailSegmentKey
return (Trackdir)(m_value & 0x0F); return (Trackdir)(m_value & 0x0F);
} }
inline bool operator == (const CYapfRailSegmentKey& other) const inline bool operator==(const CYapfRailSegmentKey &other) const
{ {
return m_value == other.m_value; return m_value == other.m_value;
} }
@ -75,7 +75,7 @@ struct CYapfRailSegment
EndSegmentReasonBits m_end_segment_reason; EndSegmentReasonBits m_end_segment_reason;
CYapfRailSegment *m_hash_next; CYapfRailSegment *m_hash_next;
inline CYapfRailSegment(const CYapfRailSegmentKey& key) inline CYapfRailSegment(const CYapfRailSegmentKey &key)
: m_key(key) : m_key(key)
, m_last_tile(INVALID_TILE) , m_last_tile(INVALID_TILE)
, m_last_td(INVALID_TRACKDIR) , m_last_td(INVALID_TRACKDIR)

View File

@ -14,13 +14,11 @@
/** Yapf Node for road YAPF */ /** Yapf Node for road YAPF */
template <class Tkey_> template <class Tkey_>
struct CYapfRoadNodeT struct CYapfRoadNodeT : CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> > {
: CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> >
{
typedef CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> > base; typedef CYapfNodeT<Tkey_, CYapfRoadNodeT<Tkey_> > base;
TileIndex m_segment_last_tile; TileIndex m_segment_last_tile;
Trackdir m_segment_last_td; Trackdir m_segment_last_td;
void Set(CYapfRoadNodeT *parent, TileIndex tile, Trackdir td, bool is_choice) void Set(CYapfRoadNodeT *parent, TileIndex tile, Trackdir td, bool is_choice)
{ {

View File

@ -14,11 +14,7 @@
/** Yapf Node for ships */ /** Yapf Node for ships */
template <class Tkey_> template <class Tkey_>
struct CYapfShipNodeT struct CYapfShipNodeT : CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > { };
: CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> >
{
};
/* now define two major node types (that differ by key type) */ /* now define two major node types (that differ by key type) */
typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir; typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir;
@ -28,5 +24,4 @@ typedef CYapfShipNodeT<CYapfNodeKeyTrackDir> CYapfShipNodeTrackDir;
typedef CNodeList_HashTableT<CYapfShipNodeExitDir , 10, 12> CShipNodeListExitDir; typedef CNodeList_HashTableT<CYapfShipNodeExitDir , 10, 12> CShipNodeListExitDir;
typedef CNodeList_HashTableT<CYapfShipNodeTrackDir, 10, 12> CShipNodeListTrackDir; typedef CNodeList_HashTableT<CYapfShipNodeTrackDir, 10, 12> CShipNodeListTrackDir;
#endif /* YAPF_NODE_SHIP_HPP */ #endif /* YAPF_NODE_SHIP_HPP */

View File

@ -48,7 +48,7 @@ protected:
/** to access inherited pathfinder */ /** to access inherited pathfinder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
private: private:
@ -200,7 +200,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -209,7 +209,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it * reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n) * and adds it to the open list by calling Yapf().AddNewNode(n)
*/ */
inline void PfFollowNode(Node& old_node) inline void PfFollowNode(Node &old_node)
{ {
TrackFollower F(Yapf().GetVehicle()); TrackFollower F(Yapf().GetVehicle());
if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir())) { if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir())) {
@ -296,7 +296,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -305,7 +305,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it * reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n) * and adds it to the open list by calling Yapf().AddNewNode(n)
*/ */
inline void PfFollowNode(Node& old_node) inline void PfFollowNode(Node &old_node)
{ {
TrackFollower F(Yapf().GetVehicle(), Yapf().GetCompatibleRailTypes()); TrackFollower F(Yapf().GetVehicle(), Yapf().GetCompatibleRailTypes());
if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir()) && F.MaskReservedTracks()) { if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir()) && F.MaskReservedTracks()) {
@ -379,7 +379,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -388,7 +388,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it * reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n) * and adds it to the open list by calling Yapf().AddNewNode(n)
*/ */
inline void PfFollowNode(Node& old_node) inline void PfFollowNode(Node &old_node)
{ {
TrackFollower F(Yapf().GetVehicle()); TrackFollower F(Yapf().GetVehicle());
if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir())) { if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir())) {
@ -453,7 +453,7 @@ public:
this->FindSafePositionOnNode(pPrev); this->FindSafePositionOnNode(pPrev);
} }
/* return trackdir from the best origin node (one of start nodes) */ /* return trackdir from the best origin node (one of start nodes) */
Node& best_next_node = *pPrev; Node &best_next_node = *pPrev;
next_trackdir = best_next_node.GetTrackdir(); next_trackdir = best_next_node.GetTrackdir();
if (reserve_track && path_found) this->TryReservePath(target, pNode->GetLastTile()); if (reserve_track && path_found) this->TryReservePath(target, pNode->GetLastTile());
@ -502,7 +502,7 @@ public:
} }
/* check if it was reversed origin */ /* check if it was reversed origin */
Node& best_org_node = *pNode; Node &best_org_node = *pNode;
bool reversed = (best_org_node.m_cost != 0); bool reversed = (best_org_node.m_cost != 0);
return reversed; return reversed;
} }

View File

@ -30,7 +30,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir trackdir) int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir trackdir)
@ -102,7 +102,7 @@ public:
* Calculates only the cost of given node, adds it to the parent node cost * Calculates only the cost of given node, adds it to the parent node cost
* and stores the result into Node::m_cost member * and stores the result into Node::m_cost member
*/ */
inline bool PfCalcCost(Node& n, const TrackFollower *tf) inline bool PfCalcCost(Node &n, const TrackFollower *tf)
{ {
int segment_cost = 0; int segment_cost = 0;
uint tiles = 0; uint tiles = 0;
@ -179,11 +179,11 @@ public:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
bool bDest = IsRoadDepotTile(n.m_segment_last_tile); bool bDest = IsRoadDepotTile(n.m_segment_last_tile);
return bDest; return bDest;
@ -198,7 +198,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
n.m_estimate = n.m_cost; n.m_estimate = n.m_cost;
return true; return true;
@ -242,12 +242,12 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
/** Called by YAPF to detect if node ends in the desired destination */ /** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(Node& n) inline bool PfDetectDestination(Node &n)
{ {
return PfDetectDestinationTile(n.m_segment_last_tile, n.m_segment_last_td); return PfDetectDestinationTile(n.m_segment_last_tile, n.m_segment_last_td);
} }
@ -268,7 +268,7 @@ public:
* Called by YAPF to calculate cost estimate. Calculates distance to the destination * Called by YAPF to calculate cost estimate. Calculates distance to the destination
* adds it to the actual cost from origin and stores the sum to the Node::m_estimate * adds it to the actual cost from origin and stores the sum to the Node::m_estimate
*/ */
inline bool PfCalcEstimate(Node& n) inline bool PfCalcEstimate(Node &n)
{ {
static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; static const int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
static const int dg_dir_to_y_offs[] = {0, 1, 0, -1}; static const int dg_dir_to_y_offs[] = {0, 1, 0, -1};
@ -309,7 +309,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -319,7 +319,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it * reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n) * and adds it to the open list by calling Yapf().AddNewNode(n)
*/ */
inline void PfFollowNode(Node& old_node) inline void PfFollowNode(Node &old_node)
{ {
TrackFollower F(Yapf().GetVehicle()); TrackFollower F(Yapf().GetVehicle());
if (F.Follow(old_node.m_segment_last_tile, old_node.m_segment_last_td)) { if (F.Follow(old_node.m_segment_last_tile, old_node.m_segment_last_td)) {
@ -373,7 +373,7 @@ public:
pNode = pNode->m_parent; pNode = pNode->m_parent;
} }
/* return trackdir from the best origin node (one of start nodes) */ /* return trackdir from the best origin node (one of start nodes) */
Node& best_next_node = *pNode; Node &best_next_node = *pNode;
assert(best_next_node.GetTile() == tile); assert(best_next_node.GetTile() == tile);
next_trackdir = best_next_node.GetTrackdir(); next_trackdir = best_next_node.GetTrackdir();
} }

View File

@ -31,7 +31,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
inline Tpf& Yapf() inline Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -40,7 +40,7 @@ public:
* reachable trackdir on the new tile creates new node, initializes it * reachable trackdir on the new tile creates new node, initializes it
* and adds it to the open list by calling Yapf().AddNewNode(n) * and adds it to the open list by calling Yapf().AddNewNode(n)
*/ */
inline void PfFollowNode(Node& old_node) inline void PfFollowNode(Node &old_node)
{ {
TrackFollower F(Yapf().GetVehicle()); TrackFollower F(Yapf().GetVehicle());
if (F.Follow(old_node.m_key.m_tile, old_node.m_key.m_td)) { if (F.Follow(old_node.m_key.m_tile, old_node.m_key.m_td)) {
@ -97,7 +97,7 @@ public:
pNode = pNode->m_parent; pNode = pNode->m_parent;
} }
/* return trackdir from the best next node (direct child of origin) */ /* return trackdir from the best next node (direct child of origin) */
Node& best_next_node = *pPrevNode; Node &best_next_node = *pPrevNode;
assert(best_next_node.GetTile() == tile); assert(best_next_node.GetTile() == tile);
next_trackdir = best_next_node.GetTrackdir(); next_trackdir = best_next_node.GetTrackdir();
} }
@ -155,7 +155,7 @@ protected:
/** to access inherited path finder */ /** to access inherited path finder */
Tpf& Yapf() Tpf& Yapf()
{ {
return *static_cast<Tpf*>(this); return *static_cast<Tpf *>(this);
} }
public: public:
@ -164,7 +164,7 @@ public:
* Calculates only the cost of given node, adds it to the parent node cost * Calculates only the cost of given node, adds it to the parent node cost
* and stores the result into Node::m_cost member * and stores the result into Node::m_cost member
*/ */
inline bool PfCalcCost(Node& n, const TrackFollower *tf) inline bool PfCalcCost(Node &n, const TrackFollower *tf)
{ {
/* base tile cost depending on distance */ /* base tile cost depending on distance */
int c = IsDiagonalTrackdir(n.GetTrackdir()) ? YAPF_TILE_LENGTH : YAPF_TILE_CORNER_LENGTH; int c = IsDiagonalTrackdir(n.GetTrackdir()) ? YAPF_TILE_LENGTH : YAPF_TILE_CORNER_LENGTH;

View File

@ -233,7 +233,7 @@ static void PlaceRoadStop(TileIndex start_tile, TileIndex end_tile, uint32 p2, u
p2 |= ddir << 6; // Set the DiagDirecion into p2 bits 6 and 7. p2 |= ddir << 6; // Set the DiagDirecion into p2 bits 6 and 7.
TileArea ta(start_tile, end_tile); TileArea ta(start_tile, end_tile);
CommandContainer cmdcont = { ta.tile, ta.w | ta.h << 8, p2, cmd, CcRoadStop, 0, "" }; CommandContainer cmdcont = { ta.tile, (uint32)(ta.w | ta.h << 8), p2, cmd, CcRoadStop, 0, "" };
ShowSelectStationIfNeeded(cmdcont, ta); ShowSelectStationIfNeeded(cmdcont, ta);
} }

View File

@ -30,7 +30,7 @@ ScriptExecMode::ScriptExecMode()
this->SetDoCommandMode(&ScriptExecMode::ModeProc, this); this->SetDoCommandMode(&ScriptExecMode::ModeProc, this);
} }
ScriptExecMode::~ScriptExecMode() void ScriptExecMode::FinalRelease()
{ {
if (this->GetDoCommandModeInstance() != this) { if (this->GetDoCommandModeInstance() != this) {
/* Ignore this error if the script already died. */ /* Ignore this error if the script already died. */
@ -38,5 +38,9 @@ ScriptExecMode::~ScriptExecMode()
throw Script_FatalError("ScriptExecMode object was removed while it was not the latest *Mode object created."); throw Script_FatalError("ScriptExecMode object was removed while it was not the latest *Mode object created.");
} }
} }
}
ScriptExecMode::~ScriptExecMode()
{
this->SetDoCommandMode(this->last_mode, this->last_instance); this->SetDoCommandMode(this->last_mode, this->last_instance);
} }

View File

@ -46,6 +46,8 @@ public:
* in when the instance was created. * in when the instance was created.
*/ */
~ScriptExecMode(); ~ScriptExecMode();
virtual void FinalRelease();
}; };
#endif /* SCRIPT_EXECMODE_HPP */ #endif /* SCRIPT_EXECMODE_HPP */

View File

@ -371,8 +371,8 @@ static bool NormaliseTileOffset(int32 *tile)
if (!::IsValidTile(tile) || !::IsValidTile(start) || !::IsValidTile(end)) return -1; if (!::IsValidTile(tile) || !::IsValidTile(start) || !::IsValidTile(end)) return -1;
if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1; if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1;
/* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */ /* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
static const TileIndex neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)}; static const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32)); Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32));
existing->size = 0; existing->size = 0;

View File

@ -30,7 +30,7 @@ ScriptTestMode::ScriptTestMode()
this->SetDoCommandMode(&ScriptTestMode::ModeProc, this); this->SetDoCommandMode(&ScriptTestMode::ModeProc, this);
} }
ScriptTestMode::~ScriptTestMode() void ScriptTestMode::FinalRelease()
{ {
if (this->GetDoCommandModeInstance() != this) { if (this->GetDoCommandModeInstance() != this) {
/* Ignore this error if the script already died. */ /* Ignore this error if the script already died. */
@ -38,5 +38,9 @@ ScriptTestMode::~ScriptTestMode()
throw Script_FatalError("Testmode object was removed while it was not the latest *Mode object created."); throw Script_FatalError("Testmode object was removed while it was not the latest *Mode object created.");
} }
} }
}
ScriptTestMode::~ScriptTestMode()
{
this->SetDoCommandMode(this->last_mode, this->last_instance); this->SetDoCommandMode(this->last_mode, this->last_instance);
} }

View File

@ -48,6 +48,8 @@ public:
* in when the instance was created. * in when the instance was created.
*/ */
~ScriptTestMode(); ~ScriptTestMode();
virtual void FinalRelease();
}; };
#endif /* SCRIPT_TESTMODE_HPP */ #endif /* SCRIPT_TESTMODE_HPP */

View File

@ -1897,13 +1897,13 @@ struct GameSettingsWindow : Window {
if (this->warn_missing != WHR_NONE) { if (this->warn_missing != WHR_NONE) {
const int left = panel->pos_x; const int left = panel->pos_x;
const int right = left + panel->current_x - 1; const int right = left + panel->current_x - 1;
const int top = panel->pos_y; const int top = panel->pos_y + WD_FRAMETEXT_TOP + (SETTING_HEIGHT - FONT_HEIGHT_NORMAL) * this->warn_lines / 2;
SetDParam(0, _game_settings_restrict_dropdown[this->filter.min_cat]); SetDParam(0, _game_settings_restrict_dropdown[this->filter.min_cat]);
if (this->warn_lines == 1) { if (this->warn_lines == 1) {
/* If the warning fits at one line, center it. */ /* If the warning fits at one line, center it. */
DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top + WD_FRAMETEXT_TOP, warn_str, TC_FROMSTRING, SA_HOR_CENTER); DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top, warn_str, TC_FROMSTRING, SA_HOR_CENTER);
} else { } else {
DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top + WD_FRAMERECT_TOP, INT32_MAX, warn_str); DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, INT32_MAX, warn_str, TC_FROMSTRING, SA_HOR_CENTER);
} }
} }
} }
@ -1957,7 +1957,7 @@ struct GameSettingsWindow : Window {
{ {
switch (widget) { switch (widget) {
case WID_GS_OPTIONSPANEL: { case WID_GS_OPTIONSPANEL: {
int top_pos = r.top + SETTINGTREE_TOP_OFFSET + 1 + this->warn_lines * FONT_HEIGHT_NORMAL; int top_pos = r.top + SETTINGTREE_TOP_OFFSET + 1 + this->warn_lines * SETTING_HEIGHT;
uint last_row = this->vscroll->GetPosition() + this->vscroll->GetCapacity() - this->warn_lines; uint last_row = this->vscroll->GetPosition() + this->vscroll->GetCapacity() - this->warn_lines;
int next_row = GetSettingsTree().Draw(settings_ptr, r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos, int next_row = GetSettingsTree().Draw(settings_ptr, r.left + SETTINGTREE_LEFT_OFFSET, r.right - SETTINGTREE_RIGHT_OFFSET, top_pos,
this->vscroll->GetPosition(), last_row, this->last_clicked); this->vscroll->GetPosition(), last_row, this->last_clicked);

View File

@ -268,7 +268,7 @@ struct SignListWindow : Window, SignList {
Dimension spr_dim = GetSpriteSize(SPR_COMPANY_ICON); Dimension spr_dim = GetSpriteSize(SPR_COMPANY_ICON);
this->text_offset = WD_FRAMETEXT_LEFT + spr_dim.width + 2; // 2 pixels space between icon and the sign text. this->text_offset = WD_FRAMETEXT_LEFT + spr_dim.width + 2; // 2 pixels space between icon and the sign text.
resize->height = max<uint>(FONT_HEIGHT_NORMAL, spr_dim.height); resize->height = max<uint>(FONT_HEIGHT_NORMAL, spr_dim.height);
Dimension d = {this->text_offset + WD_FRAMETEXT_RIGHT, WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM}; Dimension d = {(uint)(this->text_offset + WD_FRAMETEXT_RIGHT), WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM};
*size = maxdim(*size, d); *size = maxdim(*size, d);
break; break;
} }

View File

@ -981,7 +981,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary()
_heightmap_schemes[n].height_colours = ReallocT<uint32>(_heightmap_schemes[n].height_colours, heights); _heightmap_schemes[n].height_colours = ReallocT<uint32>(_heightmap_schemes[n].height_colours, heights);
for (int z = 0; z < heights; z++) { for (int z = 0; z < heights; z++) {
uint access_index = (_heightmap_schemes[n].colour_count * z) / heights; size_t access_index = (_heightmap_schemes[n].colour_count * z) / heights;
/* Choose colour by mapping the range (0..max heightlevel) on the complete colour table. */ /* Choose colour by mapping the range (0..max heightlevel) on the complete colour table. */
_heightmap_schemes[n].height_colours[z] = _heightmap_schemes[n].height_colours_base[access_index]; _heightmap_schemes[n].height_colours[z] = _heightmap_schemes[n].height_colours_base[access_index];
@ -1306,7 +1306,7 @@ int SmallMapWindow::GetPositionOnLegend(Point pt)
case WID_SM_ZOOM_IN: case WID_SM_ZOOM_IN:
case WID_SM_ZOOM_OUT: { case WID_SM_ZOOM_OUT: {
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP); const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SM_MAP);
Point pt = {wid->current_x / 2, wid->current_y / 2}; Point pt = { (int)wid->current_x / 2, (int)wid->current_y / 2};
this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &pt); this->SetZoomLevel((widget == WID_SM_ZOOM_IN) ? ZLC_ZOOM_IN : ZLC_ZOOM_OUT, &pt);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
break; break;

View File

@ -1409,7 +1409,7 @@ struct StationViewWindow : public Window {
if (!this->IsShaded()) { if (!this->IsShaded()) {
/* Draw 'accepted cargo' or 'cargo ratings'. */ /* Draw 'accepted cargo' or 'cargo ratings'. */
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SV_ACCEPT_RATING_LIST); const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SV_ACCEPT_RATING_LIST);
const Rect r = {wid->pos_x, wid->pos_y, wid->pos_x + wid->current_x - 1, wid->pos_y + wid->current_y - 1}; const Rect r = {(int)wid->pos_x, (int)wid->pos_y, (int)(wid->pos_x + wid->current_x - 1), (int)(wid->pos_y + wid->current_y - 1)};
if (this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) { if (this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) {
int lines = this->DrawAcceptedCargo(r); int lines = this->DrawAcceptedCargo(r);
if (lines > this->accepts_lines) { // Resize the widget, and perform re-initialization of the window. if (lines > this->accepts_lines) { // Resize the widget, and perform re-initialization of the window.
@ -1437,7 +1437,7 @@ struct StationViewWindow : public Window {
/* Draw waiting cargo. */ /* Draw waiting cargo. */
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_SV_WAITING); NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_SV_WAITING);
Rect waiting_rect = {nwi->pos_x, nwi->pos_y, nwi->pos_x + nwi->current_x - 1, nwi->pos_y + nwi->current_y - 1}; Rect waiting_rect = { (int)nwi->pos_x, (int)nwi->pos_y, (int)(nwi->pos_x + nwi->current_x - 1), (int)(nwi->pos_y + nwi->current_y - 1)};
this->DrawEntries(&cargo, waiting_rect, pos, maxrows, 0); this->DrawEntries(&cargo, waiting_rect, pos, maxrows, 0);
scroll_to_row = INT_MAX; scroll_to_row = INT_MAX;
} }

View File

@ -223,7 +223,9 @@
#include <malloc.h> // alloca() #include <malloc.h> // alloca()
#define NORETURN __declspec(noreturn) #define NORETURN __declspec(noreturn)
#define inline __forceinline #if (_MSC_VER < 1900)
#define inline __forceinline
#endif
#if !defined(WINCE) #if !defined(WINCE)
#define CDECL _cdecl #define CDECL _cdecl

View File

@ -378,7 +378,7 @@ static int TranslateArgumentIdx(int arg, int offset = 0);
static void EmitWordList(Buffer *buffer, const char * const *words, uint nw) static void EmitWordList(Buffer *buffer, const char * const *words, uint nw)
{ {
buffer->AppendByte(nw); buffer->AppendByte(nw);
for (uint i = 0; i < nw; i++) buffer->AppendByte((uint)strlen(words[i]) + 1); for (uint i = 0; i < nw; i++) buffer->AppendByte((byte)strlen(words[i]) + 1);
for (uint i = 0; i < nw; i++) { for (uint i = 0; i < nw; i++) {
for (uint j = 0; words[i][j] != '\0'; j++) buffer->AppendByte(words[i][j]); for (uint j = 0; words[i][j] != '\0'; j++) buffer->AppendByte(words[i][j]);
buffer->AppendByte(0); buffer->AppendByte(0);

View File

@ -25,12 +25,12 @@
#include <errno.h> // required by vsnprintf implementation for MSVC #include <errno.h> // required by vsnprintf implementation for MSVC
#endif #endif
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
/* Required by strnatcmp. */ /* Required by strnatcmp. */
#include <unicode/ustring.h> #include <unicode/ustring.h>
#include "language.h" #include "language.h"
#include "gfx_func.h" #include "gfx_func.h"
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
/* The function vsnprintf is used internally to perform the required formatting /* The function vsnprintf is used internally to perform the required formatting
* tasks. As such this one must be allowed, and makes sure it's terminated. */ * tasks. As such this one must be allowed, and makes sure it's terminated. */
@ -349,7 +349,7 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
} }
#ifdef WIN32 #ifdef WIN32
#ifdef _MSC_VER #if defined(_MSC_VER) && _MSC_VER < 1900
/** /**
* Almost POSIX compliant implementation of \c vsnprintf for VC compiler. * Almost POSIX compliant implementation of \c vsnprintf for VC compiler.
* The difference is in the value returned on output truncation. This * The difference is in the value returned on output truncation. This
@ -572,33 +572,20 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front)
s1 = SkipGarbage(s1); s1 = SkipGarbage(s1);
s2 = SkipGarbage(s2); s2 = SkipGarbage(s2);
} }
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
if (_current_collator != NULL) { if (_current_collator != NULL) {
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
int result; int result = _current_collator->compareUTF8(s1, s2, status);
/* We want to use the new faster method for ICU 4.2 and higher. */
#if U_ICU_VERSION_MAJOR_NUM > 4 || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 2)
/* The StringPiece parameter gets implicitly constructed from the char *. */
result = _current_collator->compareUTF8(s1, s2, status);
#else /* The following for 4.0 and lower. */
UChar buffer1[DRAW_STRING_BUFFER];
u_strFromUTF8Lenient(buffer1, lengthof(buffer1), NULL, s1, -1, &status);
UChar buffer2[DRAW_STRING_BUFFER];
u_strFromUTF8Lenient(buffer2, lengthof(buffer2), NULL, s2, -1, &status);
result = _current_collator->compare(buffer1, buffer2, status);
#endif /* ICU version check. */
if (U_SUCCESS(status)) return result; if (U_SUCCESS(status)) return result;
} }
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
/* Do a normal comparison if ICU is missing or if we cannot create a collator. */ /* Do a normal comparison if ICU is missing or if we cannot create a collator. */
return strcasecmp(s1, s2); return strcasecmp(s1, s2);
} }
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
#include <unicode/utext.h> #include <unicode/utext.h>
#include <unicode/brkiter.h> #include <unicode/brkiter.h>

View File

@ -49,9 +49,9 @@ const LanguageMetadata *_current_language = NULL; ///< The currently loaded lang
TextDirection _current_text_dir; ///< Text direction of the currently selected language. TextDirection _current_text_dir; ///< Text direction of the currently selected language.
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
Collator *_current_collator = NULL; ///< Collator for the language currently in use. Collator *_current_collator = NULL; ///< Collator for the language currently in use.
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam. static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam.
static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters
@ -1275,7 +1275,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (c == NULL) break; if (c == NULL) break;
if (c->name != NULL) { if (c->name != NULL) {
int64 args_array[] = {(uint64)(size_t)c->name}; int64 args_array[] = {(int64)(size_t)c->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1301,7 +1301,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
case SCC_DEPOT_NAME: { // {DEPOT} case SCC_DEPOT_NAME: { // {DEPOT}
VehicleType vt = (VehicleType)args->GetInt32(SCC_DEPOT_NAME); VehicleType vt = (VehicleType)args->GetInt32(SCC_DEPOT_NAME);
if (vt == VEH_AIRCRAFT) { if (vt == VEH_AIRCRAFT) {
uint64 args_array[] = {args->GetInt32()}; uint64 args_array[] = {(uint64)args->GetInt32()};
WChar types_array[] = {SCC_STATION_NAME}; WChar types_array[] = {SCC_STATION_NAME};
StringParameters tmp_params(args_array, 1, types_array); StringParameters tmp_params(args_array, 1, types_array);
buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_AIRCRAFT, &tmp_params, last); buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_AIRCRAFT, &tmp_params, last);
@ -1310,7 +1310,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
const Depot *d = Depot::Get(args->GetInt32()); const Depot *d = Depot::Get(args->GetInt32());
if (d->name != NULL) { if (d->name != NULL) {
int64 args_array[] = {(uint64)(size_t)d->name}; int64 args_array[] = {(int64)(size_t)d->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1326,7 +1326,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (e == NULL) break; if (e == NULL) break;
if (e->name != NULL && e->IsEnabled()) { if (e->name != NULL && e->IsEnabled()) {
int64 args_array[] = {(uint64)(size_t)e->name}; int64 args_array[] = {(int64)(size_t)e->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1341,7 +1341,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (g == NULL) break; if (g == NULL) break;
if (g->name != NULL) { if (g->name != NULL) {
int64 args_array[] = {(uint64)(size_t)g->name}; int64 args_array[] = {(int64)(size_t)g->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1378,7 +1378,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (c == NULL) break; if (c == NULL) break;
if (c->president_name != NULL) { if (c->president_name != NULL) {
int64 args_array[] = {(uint64)(size_t)c->president_name}; int64 args_array[] = {(int64)(size_t)c->president_name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1403,7 +1403,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
} }
if (st->name != NULL) { if (st->name != NULL) {
int64 args_array[] = {(uint64)(size_t)st->name}; int64 args_array[] = {(int64)(size_t)st->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1432,7 +1432,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (t == NULL) break; if (t == NULL) break;
if (t->name != NULL) { if (t->name != NULL) {
int64 args_array[] = {(uint64)(size_t)t->name}; int64 args_array[] = {(int64)(size_t)t->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1446,7 +1446,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (wp == NULL) break; if (wp == NULL) break;
if (wp->name != NULL) { if (wp->name != NULL) {
int64 args_array[] = {(uint64)(size_t)wp->name}; int64 args_array[] = {(int64)(size_t)wp->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1464,7 +1464,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (v == NULL) break; if (v == NULL) break;
if (v->name != NULL) { if (v->name != NULL) {
int64 args_array[] = {(uint64)(size_t)v->name}; int64 args_array[] = {(int64)(size_t)v->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1490,7 +1490,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
if (si == NULL) break; if (si == NULL) break;
if (si->name != NULL) { if (si->name != NULL) {
int64 args_array[] = {(uint64)(size_t)si->name}; int64 args_array[] = {(int64)(size_t)si->name};
StringParameters tmp_params(args_array); StringParameters tmp_params(args_array);
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last); buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
} else { } else {
@ -1790,7 +1790,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
strecpy(_config_language_file, c_file, lastof(_config_language_file)); strecpy(_config_language_file, c_file, lastof(_config_language_file));
SetCurrentGrfLangID(_current_language->newgrflangid); SetCurrentGrfLangID(_current_language->newgrflangid);
#ifdef WITH_ICU #ifdef WITH_ICU_SORT
/* Delete previous collator. */ /* Delete previous collator. */
if (_current_collator != NULL) { if (_current_collator != NULL) {
delete _current_collator; delete _current_collator;
@ -1807,7 +1807,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
delete _current_collator; delete _current_collator;
_current_collator = NULL; _current_collator = NULL;
} }
#endif /* WITH_ICU */ #endif /* WITH_ICU_SORT */
/* Some lists need to be sorted again after a language change. */ /* Some lists need to be sorted again after a language change. */
ReconsiderGameScriptLanguage(); ReconsiderGameScriptLanguage();
@ -2132,7 +2132,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
/* Update the font with cache */ /* Update the font with cache */
LoadStringWidthTable(searcher->Monospace()); LoadStringWidthTable(searcher->Monospace());
#if !defined(WITH_ICU) #if !defined(WITH_ICU_LAYOUT)
/* /*
* For right-to-left languages we need the ICU library. If * For right-to-left languages we need the ICU library. If
* we do not have support for that library we warn the user * we do not have support for that library we warn the user
@ -2152,5 +2152,5 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
SetDParamStr(0, err_str); SetDParamStr(0, err_str);
ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR); ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
} }
#endif #endif /* !WITH_ICU_LAYOUT */
} }

View File

@ -13,7 +13,7 @@
#include "../newgrf_engine.h" #include "../newgrf_engine.h"
/* Helper for filling property tables */ /* Helper for filling property tables */
#define NIP(prop, base, variable, type, name) { name, cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type } #define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
#define NIP_END() { NULL, 0, 0, 0, 0 } #define NIP_END() { NULL, 0, 0, 0, 0 }
/* Helper for filling callback tables */ /* Helper for filling callback tables */

View File

@ -9,23 +9,23 @@
/** @file string_colours.h The colour translation of GRF's strings. */ /** @file string_colours.h The colour translation of GRF's strings. */
/** Colour mapping for the TextColours. */ /** Colour mapping for #TextColour. */
static const byte _string_colourmap[17] = { static const byte _string_colourmap[17] = {
150, // TC_BLUE 150, // TC_BLUE
12, // TC_SILVER 12, // TC_SILVER
189, // TC_GOLD 189, // TC_GOLD
184, // TC_RED 184, // TC_RED
174, // TC_PURPLE 174, // TC_PURPLE
30, // TC_LIGHT_BROWN 30, // TC_LIGHT_BROWN
195, // TC_ORANGE 195, // TC_ORANGE
209, // TC_GREEN 209, // TC_GREEN
68, // TC_YELLOW 68, // TC_YELLOW
95, // TC_DARK_GREEN 95, // TC_DARK_GREEN
79, // TC_CREAM 79, // TC_CREAM
116, // TC_BROWN 116, // TC_BROWN
15, // TC_WHITE 15, // TC_WHITE
152, // TC_LIGHT_BLUE 152, // TC_LIGHT_BLUE
6, // TC_GREY 6, // TC_GREY
133, // TC_DARK_BLUE 133, // TC_DARK_BLUE
1, // TC_BLACK 1, // TC_BLACK
}; };

View File

@ -403,7 +403,7 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
} }
} }
if (c != NULL) c->terraform_limit -= ts.tile_to_new_height.size() << 16; if (c != NULL) c->terraform_limit -= (uint32)ts.tile_to_new_height.size() << 16;
} }
return total_cost; return total_cost;
} }

View File

@ -227,7 +227,7 @@ static void Gunzip(byte **bufp, size_t *sizep)
memset(&z, 0, sizeof(z)); memset(&z, 0, sizeof(z));
z.next_in = *bufp; z.next_in = *bufp;
z.avail_in = *sizep; z.avail_in = (uInt)*sizep;
/* window size = 15, add 32 to enable gzip or zlib header processing */ /* window size = 15, add 32 to enable gzip or zlib header processing */
res = inflateInit2(&z, 15 + 32); res = inflateInit2(&z, 15 + 32);

View File

@ -1545,7 +1545,7 @@ void NWidgetMatrix::SetupSmallestSize(Window *w, bool init_array)
SB(nw->index, 16, 16, 0); SB(nw->index, 16, 16, 0);
this->head->SetupSmallestSize(w, init_array); this->head->SetupSmallestSize(w, init_array);
Dimension padding = {this->pip_pre + this->pip_post, this->pip_pre + this->pip_post}; Dimension padding = { (uint)this->pip_pre + this->pip_post, (uint)this->pip_pre + this->pip_post};
Dimension size = {this->head->smallest_x + padding.width, this->head->smallest_y + padding.height}; Dimension size = {this->head->smallest_x + padding.width, this->head->smallest_y + padding.height};
Dimension fill = {0, 0}; Dimension fill = {0, 0};
Dimension resize = {this->pip_inter + this->head->smallest_x, this->pip_inter + this->head->smallest_y}; Dimension resize = {this->pip_inter + this->head->smallest_x, this->pip_inter + this->head->smallest_y};

View File

@ -398,8 +398,8 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
if (auto_width) width = max(width, max_item_width); if (auto_width) width = max(width, max_item_width);
Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - width : wi_rect.left), top}; Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - (int)width : wi_rect.left), top};
Dimension dw_size = {width, height}; Dimension dw_size = {width, (uint)height};
new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll, sync_parent_focus); new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll, sync_parent_focus);
} }